equal
deleted
inserted
replaced
29 #include <mcabber/modules.h> |
29 #include <mcabber/modules.h> |
30 #include <mcabber/xmpp.h> |
30 #include <mcabber/xmpp.h> |
31 #include <mcabber/xmpp_helper.h> |
31 #include <mcabber/xmpp_helper.h> |
32 |
32 |
33 #include "pep.h" |
33 #include "pep.h" |
34 #include "activity.h" |
34 #include "pep_activity.h" |
35 |
35 |
36 #include "config.h" |
36 #include "config.h" |
37 |
37 |
38 // |
38 // |
39 // module description |
39 // module description |
40 // |
40 // |
41 |
41 |
42 void pep_activity_init (void); |
42 void pep_activity_init (void); |
43 void pep_activity_uninit (void); |
43 void pep_activity_uninit (void); |
44 |
44 |
45 #define DESCRIPTION ( "PEP activity support" ) |
45 #define DESCRIPTION ( PEP_ACTIVITY_DESCRIPTION ) |
|
46 |
46 static const gchar *deps[] = { "pep", NULL }; |
47 static const gchar *deps[] = { "pep", NULL }; |
47 |
48 |
48 static module_info_t info_activity_dev = { |
49 static module_info_t info_activity_dev = { |
49 .branch = "dev", |
50 .branch = "dev", |
50 .api = 20, |
51 .api = 20, |
127 } |
128 } |
128 |
129 |
129 return LM_HANDLER_RESULT_REMOVE_MESSAGE; |
130 return LM_HANDLER_RESULT_REMOVE_MESSAGE; |
130 } |
131 } |
131 |
132 |
132 void activity_publish (const gchar *major, const gchar *minor, const gchar *text) |
133 static void activity_publish (const gchar *major, const gchar *minor, const gchar *text) |
133 { |
134 { |
134 if (!xmpp_is_online ()) { |
135 if (!xmpp_is_online ()) { |
135 g_free (activity_major); |
136 g_free (activity_major); |
136 g_free (activity_minor); |
137 g_free (activity_minor); |
137 g_free (activity_text); |
138 g_free (activity_text); |
181 } |
182 } |
182 |
183 |
183 lm_message_unref (request); |
184 lm_message_unref (request); |
184 } |
185 } |
185 |
186 |
186 gboolean activity_request ( const gchar *to, GError **err ) |
187 gboolean pep_activity_request ( const gchar *to, GError **err ) |
187 { |
188 { |
188 LmMessage *request; |
189 LmMessage *request; |
189 LmMessageNode *node; |
190 LmMessageNode *node; |
190 |
191 |
191 if ( ! xmpp_is_online () ) { |
192 if ( ! xmpp_is_online () ) { |