equal
deleted
inserted
replaced
106 struct JingleActionList { |
106 struct JingleActionList { |
107 const gchar *name; |
107 const gchar *name; |
108 void (*handler)(JingleNode *); |
108 void (*handler)(JingleNode *); |
109 }; |
109 }; |
110 |
110 |
111 typedef void (*JingleAckCallback) (LmMessage *, gpointer); |
111 typedef enum { |
|
112 JINGLE_ACK_RESPONSE, |
|
113 JINGLE_ACK_TIMEOUT |
|
114 } JingleAckType; |
|
115 |
|
116 typedef void (*JingleAckCallback) (JingleAckType type, LmMessage *, gpointer); |
112 |
117 |
113 typedef struct { |
118 typedef struct { |
|
119 /* function to be called when we receive a response to the IQ */ |
114 JingleAckCallback callback; |
120 JingleAckCallback callback; |
|
121 |
|
122 /* additional data to pass to callback */ |
115 gpointer *user_data; |
123 gpointer *user_data; |
|
124 |
|
125 /* if no response was received after timeout seconds, callback |
|
126 * will be called with JINGLE_ACK_TIMEOUT as type */ |
|
127 guint timeout; |
|
128 |
|
129 /* (private) date at which the handler was inserted using |
|
130 * jingle_new_ack_handler */ |
|
131 time_t _inserted; |
|
132 |
|
133 /* (private) a pointer to the LmMessageHandler created |
|
134 * using jingle_new_ack_handler */ |
|
135 LmMessageHandler *_handler; |
116 } JingleAckHandle; |
136 } JingleAckHandle; |
117 |
137 |
118 typedef struct { |
138 typedef struct { |
119 const gchar *sid; |
139 const gchar *sid; |
120 const gchar *from; |
140 const gchar *from; |
123 |
143 |
124 LmHandlerResult jingle_handle_ack_iq(LmMessageHandler *handler, |
144 LmHandlerResult jingle_handle_ack_iq(LmMessageHandler *handler, |
125 LmConnection *connection, |
145 LmConnection *connection, |
126 LmMessage *message, gpointer user_data); |
146 LmMessage *message, gpointer user_data); |
127 LmMessageHandler *jingle_new_ack_handler(JingleAckHandle *ri); |
147 LmMessageHandler *jingle_new_ack_handler(JingleAckHandle *ri); |
|
148 void jingle_ack_handler_free(JingleAckHandle *ah); |
128 |
149 |
129 LmMessage *jingle_new_iq_error(LmMessage *m, const gchar *errtype, |
150 LmMessage *jingle_new_iq_error(LmMessage *m, const gchar *errtype, |
130 const gchar *cond, const gchar *jinglecond); |
151 const gchar *cond, const gchar *jinglecond); |
131 void jingle_send_iq_error(LmMessage *m, const gchar *errtype, |
152 void jingle_send_iq_error(LmMessage *m, const gchar *errtype, |
132 const gchar *cond, const gchar *jinglecond); |
153 const gchar *cond, const gchar *jinglecond); |