~ubuntu-branches/ubuntu/maverick/obexd/maverick

« back to all changes in this revision

Viewing changes to client/session.h

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-04-27 04:17:15 UTC
  • mfrom: (0.1.3 sid) (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100427041715-9dv1jqg73bs6xxr9
Tags: 0.23-1
* New upstream release (Closes: #558710).
* Update debian/control.
  - Remove Filippo Giunchedi <filippo@debian.org> from uploaders.
  - Add Nobuhiro Iwamatsu to Uploaders (Closes: #564570).
  - Bumped standards-version to 3.8.4.
  - Update description (Closes: #541880).
* Add debian/source/format.
  Set source format to "1.0". 

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <glib.h>
25
25
#include <gdbus.h>
 
26
#include <gw-obex.h>
26
27
 
27
28
#include <bluetooth/bluetooth.h>
28
29
#include <bluetooth/sdp.h>
29
 
#include <gw-obex.h>
 
30
 
 
31
struct agent_data;
 
32
struct session_callback;
30
33
 
31
34
struct session_data {
32
35
        gint refcount;
36
39
        const char *target;     /* OBEX Target UUID */
37
40
        int target_len;
38
41
        uuid_t uuid;            /* Bluetooth Service Class */
39
 
        gchar *name;
40
42
        gchar *path;            /* Session path */
41
 
        gchar *transfer_path;   /* Transfer path */
42
43
        int sock;
43
 
        int fd;
44
44
        DBusConnection *conn;
45
45
        DBusMessage *msg;
46
46
        GwObex *obex;
47
 
        GwObexXfer *xfer;
48
 
        char *buffer;
49
 
        size_t buffer_len;
50
 
        int filled;
51
 
        gint64 size;
52
 
        gint64 transferred;
53
 
        gchar *filename;
54
 
        gchar *agent_name;
55
 
        gchar *agent_path;
56
 
        guint agent_watch;
 
47
        struct agent_data *agent;
 
48
        struct session_callback *callback;
57
49
        gchar *owner;           /* Session owner */
58
 
        guint owner_watch;
59
 
        GPtrArray *pending;
 
50
        guint watch;
 
51
        GSList *pending;
60
52
        void *priv;
61
53
};
62
54
 
63
55
typedef void (*session_callback_t) (struct session_data *session,
64
56
                                                        void *user_data);
65
57
 
66
 
int session_create(const char *source,
 
58
struct session_data *session_create(const char *source,
67
59
                        const char *destination, const char *target,
68
60
                        uint8_t channel, session_callback_t function,
69
61
                        void *user_data);
 
62
 
 
63
struct session_data *session_ref(struct session_data *session);
 
64
void session_unref(struct session_data *session);
 
65
void session_shutdown(struct session_data *session);
 
66
 
 
67
int session_set_owner(struct session_data *session, const char *name,
 
68
                        GDBusWatchFunction func);
 
69
const char *session_get_owner(struct session_data *session);
 
70
 
70
71
int session_set_agent(struct session_data *session, const char *name,
71
72
                                                        const char *path);
 
73
const char *session_get_agent(struct session_data *session);
 
74
 
72
75
int session_send(struct session_data *session, const char *filename,
73
76
                                const char *remotename);
74
77
int session_get(struct session_data *session, const char *type,