当前位置: 技术问答>linux和unix
请教一个关于pidgin的问题
来源: 互联网 发布时间:2016-03-10
本文导语: 请问一下,有没有人用pidgin的库开发过相关程序,有没有办法知道MSN和Gtalk中对方从联系人中删除了自己 还有就是在它的例子程序中 iter = purple_plugins_get_protocols(); for (i = 0; iter; iter = iter->next) { PurplePlugin *plug...
请问一下,有没有人用pidgin的库开发过相关程序,有没有办法知道MSN和Gtalk中对方从联系人中删除了自己
还有就是在它的例子程序中
iter = purple_plugins_get_protocols();
for (i = 0; iter; iter = iter->next) {
PurplePlugin *plugin = iter->data;
PurplePluginInfo *info = plugin->info;
if (info && info->name) {
printf("t%d: %sn", i++, info->name);
names = g_list_append(names, info->id);
}
}
printf("Select the protocol [0-%d]: ", i-1);
fgets(name, sizeof(name), stdin);
sscanf(name, "%d", &num);
prpl = g_list_nth_data(names, num);
printf("Username: ");
fgets(name, sizeof(name), stdin);
name[strlen(name) - 1] = 0; /* strip the n at the end */
/* Create the account */
account = purple_account_new(name, prpl);
/* Get the password for the account */
password = getpass("Password: ");
purple_account_set_password(account, password);
/* It's necessary to enable the account first. */
purple_account_set_enabled(account, UI_ID, TRUE);
/* Now, to connect the account(s), create a status and activate it. */
status = purple_savedstatus_new(NULL, PURPLE_STATUS_AVAILABLE);
purple_savedstatus_activate(status);
connect_to_signals_for_demonstration_purposes_only();
g_main_loop_run(loop);
我选择XMPP协议,然后输入gmail的帐号,xxxx@gmail和密码 无法连上服务器,请教一下原因,是不是要设置Domain,该怎么设置
还有就是在它的例子程序中
iter = purple_plugins_get_protocols();
for (i = 0; iter; iter = iter->next) {
PurplePlugin *plugin = iter->data;
PurplePluginInfo *info = plugin->info;
if (info && info->name) {
printf("t%d: %sn", i++, info->name);
names = g_list_append(names, info->id);
}
}
printf("Select the protocol [0-%d]: ", i-1);
fgets(name, sizeof(name), stdin);
sscanf(name, "%d", &num);
prpl = g_list_nth_data(names, num);
printf("Username: ");
fgets(name, sizeof(name), stdin);
name[strlen(name) - 1] = 0; /* strip the n at the end */
/* Create the account */
account = purple_account_new(name, prpl);
/* Get the password for the account */
password = getpass("Password: ");
purple_account_set_password(account, password);
/* It's necessary to enable the account first. */
purple_account_set_enabled(account, UI_ID, TRUE);
/* Now, to connect the account(s), create a status and activate it. */
status = purple_savedstatus_new(NULL, PURPLE_STATUS_AVAILABLE);
purple_savedstatus_activate(status);
connect_to_signals_for_demonstration_purposes_only();
g_main_loop_run(loop);
我选择XMPP协议,然后输入gmail的帐号,xxxx@gmail和密码 无法连上服务器,请教一下原因,是不是要设置Domain,该怎么设置
|
帮你顶,
|
选了XMPP协议还要选gtalk的服务器啊。
希望这个能对你有所帮助。
http://code.google.com/apis/talk/open_communications.html
希望这个能对你有所帮助。
http://code.google.com/apis/talk/open_communications.html