⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libfetion.h

📁 linux-下的fetion-0.8.1。包括所有源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
/** * \addtogroup send_dialog_fetion_functions   * @{ *//** * \addtogroup simple_send_dialog_fetion_functions   * @{ *//**  * \fn BOOL fs_begin_dialog(long who)  * \brief begin the dialog function  *  * if you want to have a dialog with somebody. invoke this function first,  * of course, if you not invoke this function to send a dialog, it will invoked by itself.  * if you will not have a dialog with somebody, you should invoke fetion_end_dialog  * advise: invoke this function before send a dialog to somebody,  * \sa fetion_end_dialog  *  * \param who The somebody who you want to have a dialog  *  * \return non zero if init successfully, otherwise if fail return 0.( this function will not return 0)  **/FX_EXPORT BOOL fs_begin_dialog(long who);/**  * \fn BOOL fs_dialog_send(long who, const char *message)  * \brief send a message to somebody in a dialog   *  * \param who The somebody who you want to send  * \param message The content which you want to send.  *  * \return TRUE if init successfully, otherwise return FALSE..*/FX_EXPORT BOOL fs_dialog_send(long who, const char *message);/**  * \fn void fs_end_dialog(long who)  * \brief end a dialog with somebody  *  * if you will not have a dialog with somebody, you should invoke this function  *  * \param who The somebody who you want to end a dialog  **/void fs_end_dialog(long who);/** @} end of simple_send_dialog_fetion_functions *//** * \addtogroup generic_send_dialog_fetion_functions  * @{ *//**  * \fn int fx_begin_dialog(long who, EventListener func,void *args)  * \brief begin the dialog function  *  * if you want to have a dialog with somebody. invoke this function first,  * of course, if you not invoke this function to send a dialog, it will invoked by itself.  * if you will not have a dialog with somebody, you should invoke fetion_end_dialog  * advise: invoke this function before send a dialog to somebody,  * \sa fetion_end_dialog  *  * \param who The somebody who you want to have a dialog  *  * \return non zero if init successfully, otherwise if fail return 0.( this function will not return 0)  **/FX_EXPORT int fx_begin_dialog(long who, EventListener func,void *args);/**  * \fn int fx_dialog_send(long who, const char *message, EventListener func,void *args)  * \brief send a message to somebody in a dialog   *  * \param who The somebody who you want to send  * \param message The content which you want to send.  *  * \return ..*/FX_EXPORT int fx_dialog_send(long who, const char *message, EventListener func,void *args);/**  * \fn void fx_end_dialog(long who)  * \brief end a dialog with somebody  *  * if you will not have a dialog with somebody, you should invoke this function  *  * \param who The somebody who you want to end a dialog  **/FX_EXPORT void fx_end_dialog(long who);/** @} end of generic_send_dialog_fetion_functions *//** @} end of send_dialog_fetion_functions *//*** \addtogroup get_or_set_user_info  * @{*//**  * \fn const char *fx_get_usr_uid(void)  * \brief get a current user is uid  *  * \sa Fetion_Data  *  * \return non NULL value if successfully, otherwise return NULL..*/FX_EXPORT const char *fx_get_usr_uid(void);/**  * \fn const char *fx_get_usr_passwd(void)  * \brief get a current user is passwd   *  * \sa Fetion_Data  *  * \return non NULL value if successfully, otherwise return NULL..*/FX_EXPORT const char *fx_get_usr_passwd(void);/**  * \fn const char *fx_get_usr_show_name(void)  * \brief get a current user is name  *  * \sa Fetion_Data  *  * \return non NULL value if successfully, otherwise return NULL..*/FX_EXPORT const char *fx_get_usr_show_name(void);/**  * \fn const char *fx_get_usr_uri(void)  * \brief get a current user is uir  *  * \sa Fetion_Data  *  * \return non NULL value if successfully, otherwise return NULL..*/FX_EXPORT const char *fx_get_usr_uri(void);/**  * \fn const char *fx_get_usr_mobilenum(void)  * \brief get a current user is mobile number  *  * \sa Fetion_Data  *  * \return non NULL value if successfully, otherwise return NULL..*/FX_EXPORT const char *fx_get_usr_mobilenum(void);/**  * \fn int fx_get_usr_score(void)  * \brief get the user is score  *  * \return the value of score..*/FX_EXPORT int fx_get_usr_score(void);/**  * \fn int fx_set_user_state(int state, char *desc, EventListener func, void *args)  * \brief set the user state.  *  * This function set the usr fetion state.   *  * \param state The state which you want to set.  * \param desc If you set the state is by your self define, set the connect of desc.  *  *  * \return non zero on successfully, otherwise return zero.*/FX_EXPORT int fx_set_user_state(int state, char *desc, EventListener func, void *args);/**  * \fn int fx_get_user_state(void)  * \brief get the user state.  *  * This function get the usr fetion state.   * \return the current usr state.*/FX_EXPORT int fx_get_user_state(void);/**  * \fn int fx_set_user_impresa(const char *impresa, EventListener func, void *args)  * \brief set the user impresa.   *  * \param impresa The impresa which you want to set.  *  * \return non zero on successfully, otherwise return zero.*/FX_EXPORT int fx_set_user_impresa(const char *impresa, EventListener func, void *args);/**  * \fn int fx_set_user_nickname(const char *nickname, EventListener func, void *args)  * \brief set the user nickname.   *  * \param nickname The nickname which you want to set.  *  * \return non zero on successfully, otherwise return zero.*/FX_EXPORT int fx_set_user_nickname(const char *nickname, EventListener func, void *args);/**  * \fn int fx_get_user_refuse_sms_day(void)  * \brief get the user how long day to receive the sms message.   *  * This function get the usr fetion day.   * \return the day.*/FX_EXPORT int fx_get_user_refuse_sms_day(void);/**  * \fn int fx_set_user_refuse_sms_day(int day, EventListener func, void *args)  * \brief set the user how long day to receive the sms message.   *  * \param day The day which you want to set, if day = 0, show will   * receive sms, or it is the refuse sms days. .  *  * \return non zero on successfully, otherwise return zero.*/FX_EXPORT int fx_set_user_refuse_sms_day(int day, EventListener func, void *args);/**  * \fn int fx_get_expirestime(void)  * \brief get the expires time of the fetion.  *  * you should once the expires time to invoke the fetion_keep_alive functions to keep your fetion alive.  *  * \sa fetion_keep_alive  *  * \return the expirestime. if the expires time equal zero, you should quit fetion.*/FX_EXPORT int  fx_get_expirestime(void);/**  * \fn const Fetion_Personal *fx_data_get_PersonalInfo(void)  * \brief get a current user is personal info  *  * \sa Fetion_Personal  *  * \return the Fetion_Personal info struct of the user*/FX_EXPORT const Fetion_Personal *fx_data_get_PersonalInfo(void);/**  * \fn Ftion_Status_Primitive fetion_data_get_status(void)  * \brief get a current user is status info  *  * \sa Ftion_Status_Primitive  *  * \return status info of the user*///Ftion_Status_Primitive fetion_data_get_status(void);/** @} end of get_or_set_user_info *//*** \addtogroup get_contact_info  * @{*//**  * \fn const DList *fx_get_group()  * \brief get the fetion's group info  *  * this function will return a list which store the group info  *  * \return a dlist value if successfully, otherwise return NULL..  *  *  *  ** A template to get all group info from the dlis struct  * \code  *   * Fetion_Group *group = NULL;  *	DList *tmp = (DList *)fx_get_group();  *  *	while(tmp)  *	{  * 	group = (Fetion_Group *) tmp->data;  *		if(group) {  *         // do something to access this group...	  *		}  *		tmp = d_list_next(tmp);  *	}  * \endcode  *  *  * \sa Fetion_Group DList   */FX_EXPORT const DList *fx_get_group();/**  * \fn const DList *fx_get_account()  * \brief get the fetion's all accounts info  *  * this function will return a list which store all account info  *  * \return a dlist value if successfully, otherwise return NULL..  *  *  *  * A template to get all account info from the dlis struct  * \code  *   * Fetion_Account *account = NULL;  *	DList *tmp = (DList *)fx_get_account();  *	while(tmp)   *	{  *		if(	account =(Fetion_Account *)tmp->data ) {  *         // do something to access this account...  *        }  *  *		tmp = d_list_next(tmp);  *	}  * \endcode  *  *  * \sa Fetion_Account DList */FX_EXPORT const DList *fx_get_account();/**  * \fn const DList *fx_get_blacklist()  * \brief get the fetion's all black's accounts info  *  * this function will return a list which store all black's account info  *  * \return a dlist value if successfully, otherwise return NULL..  *  *  *  * A template to get all blacks account info from the dlis struct  * \code  *   * Fetion_Black *black = NULL;  *	DList *tmp = (DList *)fx_get_blacklist();  *	while(tmp)   *	{  *		if(	black =(Fetion_Black *)tmp->data ) {  *         // do something to access this account...  *        }  *  *		tmp = d_list_next(tmp);  *	}  * \endcode  *  *  * \sa Fetion_Black DList */FX_EXPORT const DList *fx_get_blacklist();/**  * \fn const DList *fx_get_qun()  * \brief get the fetion's qun info  *  * this function will return a list which store the qun info  *  * \return a dlist value if successfully, otherwise return NULL..  *  *  *  ** A template to get all qun info from the dlis struct  * \code  *   * Fetion_Qun *qun = NULL;  *	DList *tmp = (DList *)fx_get_qun();  *  *	while(tmp)  *	{  * 	qun = (Fetion_Qun *) tmp->data;  *		if(qun) {  *         // do something to access this group...	  *		}  *		tmp = d_list_next(tmp);  *	}  * \endcode  *  *  * \sa Fetion_Qun DList   */FX_EXPORT const DList *fx_get_qun();/**  * \fn const Fetion_Account *fx_get_account_by_id(long id)  * \brief get a account which uid 's the gived id  *  * \sa Fetion_Account  *  * \return a account value if successfully, otherwise return NULL..*/FX_EXPORT const Fetion_Account *fx_get_account_by_id(long id);/**  * \fn const Fetion_Qun *fx_get_qun_by_id(long id)  * \brief get  qun which uid 's the gived id  *  * \sa Fetion_Qun  *  * \return a qun value if successfully, otherwise return NULL..*/FX_EXPORT const Fetion_Qun *fx_get_qun_by_id(long id);/**  * \fn BOOL fx_is_pc_user_by_id(long id)  * \brief judge this id is PC USER or not  *  * \return TRUE if id is PC USER, otherwise return FALSE..*/FX_EXPORT BOOL fx_is_pc_user_by_id(long id);/**  * \fn BOOL fx_is_qun_by_id(long id)  * \brief judge this id is qun or not  *  * \return TRUE if id is qun id, otherwise return FALSE..*/FX_EXPORT BOOL fx_is_qun_by_id(long id);/**  * \fn BOOL fx_is_pc_user_by_account(const Fetion_Account *account)  * \brief judge this account is PC USER or not  *  * \return TRUE if id is PC USER, otherwise return FALSE..*/FX_EXPORT BOOL fx_is_pc_user_by_account(const Fetion_Account *account);/**  * \fn int fx_is_authed_by_id(long id)  * \brief judge this id is auth to you add it  *  * \return AUTH_OK if id is auth,  AUTH_REFUS if the id auth refus,   * AUTH_WAIT is the id is not decide.*/FX_EXPORT int fx_is_authed_by_id(long id);/**  * \fn int fx_is_authed_by_account(Fetion_Account *account)  * \brief judge this account is auth to you add it  *  * if id is not correct, it will return AUTH_WAIT  *  * \return AUTH_OK if account is auth,  AUTH_REFUS if it auth refus,   * AUTH_WAIT if it not decide.*/FX_EXPORT int fx_is_authed_by_account(Fetion_Account *account);/**  * \fn BOOL fx_is_InBlacklist_by_id(const long id)  * \brief judge this account is in the blacklist  *  * if id is not correct, it will return FALSE   *  * \return TRUE if account is in blacklist,  FALSE if not in, */FX_EXPORT BOOL fx_is_InBlacklist_by_id(const long id);/**  * \fn BOOL fx_is_InBlacklist_by_account(const Fetion_Account * account)  * \brief judge this account is in the blacklist  *  * if id is not correct, it will return FALSE   *  * \return TRUE if account is in blacklist,  FALSE if not in, */FX_EXPORT BOOL fx_is_InBlacklist_by_account(const Fetion_Account * account);/** * \fn int fx_move_group_buddy_by_id(long uid, int group_id, EventListener func, void *args) * \brief modify the group which account was belonged.  * * \param uid The account's id which you want to move. * \param group_id The group is id. * \param func The operate's callback function's address, and the operate result will pass to this function. * \param args The operate's callback function's args.  * * \return 0 if fail immediately, or can get the result from func. */FX_EXPORT int fx_move_group_buddy_by_id(long uid, int group_id, EventListener func, void *args);/** * \fn int fx_move_group_buddy(const Fetion_Account * account, int group_id, EventListener func, void *args)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -