jingle-ft/filetransfer.c
changeset 170 2af5b8872201
parent 169 9aee866bdb9a
child 171 2729dfd1c085
equal deleted inserted replaced
169:9aee866bdb9a 170:2af5b8872201
    99   .init            = jingle_ft_init,
    99   .init            = jingle_ft_init,
   100   .uninit          = jingle_ft_uninit,
   100   .uninit          = jingle_ft_uninit,
   101   .next            = NULL,
   101   .next            = NULL,
   102 };
   102 };
   103 
   103 
       
   104 #ifdef MCABBER_API_HAVE_CMD_ID
       
   105 static gpointer jft_cmdid;
       
   106 #endif
       
   107 
   104 
   108 
   105 /**
   109 /**
   106  * @brief Check if a node description with xmlns of JFT is correct 
   110  * @brief Check if a node description with xmlns of JFT is correct
   107  *
   111  *
   108  * @param cn the jinglecontent a node description
   112  * @param cn the jinglecontent a node description
   109  * @param err contain an error of the domain JINGLE_CHECK_ERROR
   113  * @param err contain an error of the domain JINGLE_CHECK_ERROR
   110  * @return a gconstpointer, which is a new allocated JingleFT
   114  * @return a gconstpointer, which is a new allocated JingleFT
   111  */
   115  */
   795     //compl_add_category_word(jft_cid, "request");
   799     //compl_add_category_word(jft_cid, "request");
   796     compl_add_category_word(jft_cid, "info");
   800     compl_add_category_word(jft_cid, "info");
   797     compl_add_category_word(jft_cid, "flush");
   801     compl_add_category_word(jft_cid, "flush");
   798   }
   802   }
   799   /* Add command */
   803   /* Add command */
       
   804 #ifdef MCABBER_API_HAVE_CMD_ID
       
   805   jft_cmdid = cmd_add("jft", "Manage file transfer", jft_cid, 0, do_sendfile,
       
   806                       NULL);
       
   807 #else
   800   cmd_add("jft", "Manage file transfer", jft_cid, 0, do_sendfile, NULL);
   808   cmd_add("jft", "Manage file transfer", jft_cid, 0, do_sendfile, NULL);
       
   809 #endif
   801 }
   810 }
   802 
   811 
   803 static void jingle_ft_uninit(void)
   812 static void jingle_ft_uninit(void)
   804 {
   813 {
   805   g_slist_free(info_list);
   814   g_slist_free(info_list);
   806   xmpp_del_feature(NS_JINGLE_APP_FT);
   815   xmpp_del_feature(NS_JINGLE_APP_FT);
   807   jingle_unregister_app(NS_JINGLE_APP_FT);
   816   jingle_unregister_app(NS_JINGLE_APP_FT);
   808   cmd_del("file");
       
   809   if (jft_cid)
   817   if (jft_cid)
   810     compl_del_category(jft_cid);
   818     compl_del_category(jft_cid);
       
   819 #ifdef MCABBER_API_HAVE_CMD_ID
       
   820   cmd_del(jft_cmdid);
       
   821 #else
       
   822   cmd_del("file");
       
   823 #endif
   811 }
   824 }
   812 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */
   825 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */