[Bug 31376] TpFileTransferChannel : high level API for FT

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 15 12:48:57 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=31376

--- Comment #1 from Morten Mjelva <morten.mjelva at gmail.com> 2011-02-15 03:48:56 PST ---
As per our discussion, here's an attempt at a first API draft:


Properties and accessors
------------------------

TpFTState *tp_ft_channel_get_state (TpFTChannel *self);
const gchar *tp_ft_channel_get_content_type (TpFTChannel *self);
const gchar *tp_ft_channel_get_filename (TpFTChannel *self);
guint64 *tp_ft_channel_get_size (TpFTChannel *self);
TpFTHashType tp_ft_channel_get_content_hash_type (TpFTChannel *self);
const gchar *tp_ft_channel_get_content_hash (TpFTChannel *self);
const gchar *tp_ft_channel_get_description (TpFTChannel *self);
gint64 *tp_ft_channel_get_date (TpFTChannel *self);
guint64 *tp_ft_channel_get_transferred_bytes (TpFTChannel *self);
guint64 *tp_ft_channel_get_initial_offset (TpFTChannel *self);
const gchar *tp_ft_channel_get_uri (TpFTChannel *self);


Methods
-------

TpFTChannel tp_ft_channel_new (TpConnection *conn,
    const gchar *object_path,
    const GHashTable *immutable_properties,
    GError **error);

void tp_ft_channel_accept_async (TpFTChannel *self,
    guint64 offset,
    GFile *file,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

void tp_ft_channel_accept_finish (TpFTChannel *self,
    GAsyncResult *result,
    GError  **error);

void tp_ft_channel_offer_async (TpFTChannel *self,
    GFile *file,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

void tp_ft_channel_offer_finish (TpFTChannel *self,
    GAsyncResult *result,
    GError **error);

Signals
-------

"transferred-bytes-changed" (guint64 count);
"uri-defined" (const gchar uri);

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list