marking.c
changeset 10 b84d72957c06
parent 2 30b66610f86a
child 11 f7c76b2c9900
equal deleted inserted replaced
9:97f340cae8e0 10:b84d72957c06
    19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    20  * USA
    20  * USA
    21  */
    21  */
    22 
    22 
    23 #include <glib.h>
    23 #include <glib.h>
    24 #include <gmodule.h>
       
    25 #include <string.h>
    24 #include <string.h>
    26 
    25 
    27 #include <mcabber/hbuf.h>
    26 #include <mcabber/hbuf.h>
    28 #include <mcabber/screen.h>
    27 #include <mcabber/screen.h>
    29 #include <mcabber/commands.h>
    28 #include <mcabber/commands.h>
    30 #include <mcabber/compl.h>
    29 #include <mcabber/compl.h>
    31 #include <mcabber/utils.h>
    30 #include <mcabber/utils.h>
    32 #include <mcabber/logprint.h>
    31 #include <mcabber/logprint.h>
       
    32 #include <mcabber/modules.h>
       
    33 
       
    34 static void marking_init   (void);
       
    35 static void marking_uninit (void);
       
    36 
       
    37 module_info_t info_marking = {
       
    38 	.mcabber_version = "0.10.0",
       
    39 	.requires        = NULL,
       
    40 	.init            = marking_init,
       
    41 	.uninit          = marking_uninit,
       
    42 };
    33 
    43 
    34 static GSList *marked_jids = NULL;
    44 static GSList *marked_jids = NULL;
    35 
    45 
    36 // mark set jid
    46 // mark set jid
    37 // mark clear jid
    47 // mark clear jid
   168 	}
   178 	}
   169 
   179 
   170 	free_arg_lst (args);
   180 	free_arg_lst (args);
   171 }
   181 }
   172 
   182 
   173 gchar *g_module_check_init (GModule *module)
   183 static void marking_init (void)
   174 {
   184 {
   175 	cmd_add ("mark", "", 0, COMPL_JID, do_mark, NULL);
   185 	cmd_add ("mark", "", 0, COMPL_JID, do_mark, NULL);
   176 	cmd_add ("marked", "", 0, COMPL_CMD, do_marked, NULL);
   186 	cmd_add ("marked", "", 0, COMPL_CMD, do_marked, NULL);
   177 
   187 }
   178 	return NULL;
   188 
   179 }
   189 static void marking_uninit (void)
   180 
       
   181 void g_module_unload (GModule *module)
       
   182 {
   190 {
   183 	cmd_del ("mark");
   191 	cmd_del ("mark");
   184 	cmd_del ("marked");
   192 	cmd_del ("marked");
   185 
   193 
   186 	{
   194 	{