当前位置: 首页>>代码示例>>C++>>正文


C++ purple_conversations_get_handle函数代码示例

本文整理汇总了C++中purple_conversations_get_handle函数的典型用法代码示例。如果您正苦于以下问题:C++ purple_conversations_get_handle函数的具体用法?C++ purple_conversations_get_handle怎么用?C++ purple_conversations_get_handle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了purple_conversations_get_handle函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: add_plugin_functionality

static void add_plugin_functionality(PurplePlugin *plugin) {
	if(_signals_connected)
		return;

	purple_debug_info("cap", "Adding plugin functionality.\n");

	/* Connect all the signals */
	purple_signal_connect(purple_conversations_get_handle(), "sent-im-msg", plugin,
			PURPLE_CALLBACK(sent_im_msg), NULL);

	purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", plugin,
			PURPLE_CALLBACK(received_im_msg), NULL);

	purple_signal_connect(purple_blist_get_handle(), "buddy-status-changed", plugin,
			PURPLE_CALLBACK(buddy_status_changed), NULL);

	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", plugin,
			PURPLE_CALLBACK(buddy_signed_on), NULL);

	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", plugin,
			PURPLE_CALLBACK(buddy_signed_off), NULL);

	purple_signal_connect(pidgin_blist_get_handle(), "drawing-tooltip", plugin,
			PURPLE_CALLBACK(drawing_tooltip), NULL);

	purple_signal_connect(purple_connections_get_handle(), "signed-on", plugin,
			PURPLE_CALLBACK(signed_on), NULL);

	purple_signal_connect(purple_connections_get_handle(), "signed-off", plugin,
			PURPLE_CALLBACK(signed_off), NULL);

	_signals_connected = TRUE;
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:33,代码来源:cap.c

示例2: plugin_load

static gboolean
plugin_load(PurplePlugin *plugin, GError **error)
{
	PurpleNotifyUiOps *ops = purple_notify_get_ui_ops();

	purple_prefs_add_none(PREFS_BASE);
	purple_prefs_add_int(PREF_LENGTH, 30);
	purple_prefs_add_string(PREF_URL, "http://tinyurl.com/api-create.php?url=");

	g_object_set_data(G_OBJECT(plugin), "notify-uri", ops->notify_uri);
	ops->notify_uri = tinyurl_notify_uri;

	tinyurl_cache = g_hash_table_new_full(g_str_hash, g_str_equal,
		g_free, g_free);

	purple_signal_connect(purple_conversations_get_handle(),
			"wrote-im-msg",
			plugin, PURPLE_CALLBACK(wrote_msg), NULL);
	purple_signal_connect(purple_conversations_get_handle(),
			"wrote-chat-msg",
			plugin, PURPLE_CALLBACK(wrote_msg), NULL);
	purple_signal_connect(purple_conversations_get_handle(),
			"writing-im-msg",
			plugin, PURPLE_CALLBACK(writing_msg), NULL);
	purple_signal_connect(purple_conversations_get_handle(),
			"writing-chat-msg",
			plugin, PURPLE_CALLBACK(writing_msg), NULL);
	purple_signal_connect(purple_conversations_get_handle(),
			"deleting-conversation",
			plugin, PURPLE_CALLBACK(free_conv_urls), NULL);

	return TRUE;
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:33,代码来源:gnttinyurl.c

示例3: plugin_load

static gboolean
plugin_load (PurplePlugin * plugin)
{
    printf("Foobar");
    purple_debug_info("core-hoh-hubbub-pidgin", "Fork debug\n");
    
    /*
    purple_notify_message (plugin, PURPLE_NOTIFY_MSG_INFO, "Hello World!",
        "Welcome to the Hubbub-Pidgin plugin ! Make sure the OTR plugin is loaded after me.", NULL, NULL,
        NULL);
    */

    purple_signal_connect(
                purple_conversations_get_handle(),
                "receiving-im-msg",
                plugin,
                PURPLE_CALLBACK(receiving_im_msg_cb),
                NULL);

    purple_signal_connect(
                purple_conversations_get_handle(),
                "writing-im-msg",
                plugin,
                PURPLE_CALLBACK(writing_im_msg_cb),
                NULL);

    helloworld_plugin = plugin; /* assign this here so we have a valid handle later */

    //hubbub_engine_status = system("/home/okso/Documents/Thesis/Hubbub/venv3/bin/python3 -m hubbub fork");
    purple_debug_info("core-hoh-hubbub-pidgin",
                      "Fork finished launching Python.\n");

    return TRUE;
}
开发者ID:hoh,项目名称:Hubbub-Pidgin,代码行数:34,代码来源:hubbub-pidgin.c

示例4: plugin_load

static gboolean
plugin_load(PurplePlugin *plugin, GError **error)
{
	purple_prefs_add_none("/plugins");
	purple_prefs_add_none("/plugins/gnt");

	purple_prefs_add_none("/plugins/gnt/gntgf");
	purple_prefs_add_none(PREFS_EVENT);

	purple_prefs_add_bool(PREFS_EVENT_SIGNONF, TRUE);
	purple_prefs_add_bool(PREFS_EVENT_IM_MSG, TRUE);
	purple_prefs_add_bool(PREFS_EVENT_CHAT_MSG, TRUE);
	purple_prefs_add_bool(PREFS_EVENT_CHAT_NICK, TRUE);

	purple_prefs_add_bool(PREFS_BEEP, TRUE);
#ifdef HAVE_X11
	purple_prefs_add_bool(PREFS_URGENT, FALSE);
#endif

	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", plugin,
			PURPLE_CALLBACK(buddy_signed_on), NULL);
	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", plugin,
			PURPLE_CALLBACK(buddy_signed_off), NULL);
	purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", plugin,
			PURPLE_CALLBACK(received_im_msg), NULL);
	purple_signal_connect(purple_conversations_get_handle(), "received-chat-msg", plugin,
			PURPLE_CALLBACK(received_chat_msg), NULL);

	memset(&gpsy, 0, sizeof(gpsy));
	memset(&gpsw, 0, sizeof(gpsw));

	return TRUE;
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:33,代码来源:gntgf.c

示例5: plugin_load

/*
 *  EXPORTED FUNCTIONS
 */
static gboolean plugin_load(PurplePlugin *plugin) {

	purple_signal_connect(purple_conversations_get_handle(),
		"conversation-created", plugin,
		PURPLE_CALLBACK(new_conversation_cb), NULL);

	/* Set callback to remove window from the list, if the window is destroyed */
	purple_signal_connect(purple_conversations_get_handle(),
		"deleting-conversation", plugin,
		PURPLE_CALLBACK(conversation_delete_cb), NULL);

	purple_signal_connect(pidgin_conversations_get_handle(),
		"conversation-dragging", plugin,
		PURPLE_CALLBACK(set_conv_window_trans), NULL);

	purple_signal_connect(purple_conversations_get_handle(),
		"conversation-updated", plugin,
		PURPLE_CALLBACK(conv_updated_cb), NULL);

	update_existing_convs();

	if (blist)
		blist_created_cb(NULL, NULL);
	else
		purple_signal_connect(pidgin_blist_get_handle(),
			"gtkblist-created", plugin,
			PURPLE_CALLBACK(blist_created_cb), NULL);


	return TRUE;
}
开发者ID:Draghtnod,项目名称:pidgin,代码行数:34,代码来源:win2ktrans.c

示例6: twitter_conv_icon_account_load

void twitter_conv_icon_account_load(PurpleAccount * account)
{
    PurpleConnection *gc = purple_account_get_connection(account);
    TwitterConnectionData *twitter = gc->proto_data;
    twitter->icons = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) twitter_conv_icon_free);

    purple_signal_connect(pidgin_conversations_get_handle(), "displaying-chat-msg", twitter->icons, PURPLE_CALLBACK(twitter_conv_icon_displaying_chat_cb), account);
    purple_signal_connect(pidgin_conversations_get_handle(), "displayed-chat-msg", twitter->icons, PURPLE_CALLBACK(twitter_conv_icon_displayed_chat_cb), account);
    purple_signal_connect(purple_conversations_get_handle(), "conversation-created", twitter->icons, PURPLE_CALLBACK(twitter_conv_icon_conversation_created_cb), account);
    purple_signal_connect(purple_conversations_get_handle(), "deleting-conversation", twitter->icons, PURPLE_CALLBACK(twitter_conv_icon_deleting_conversation_cb), account);
}
开发者ID:FourthDr,项目名称:prpltwtr,代码行数:11,代码来源:gtkprpltwtr_convicon.c

示例7: plugin_unload

static gboolean plugin_unload(PurplePlugin *plugin) {
	bar_set(FALSE); /* Turn the led off */
	purple_signal_disconnect(purple_conversations_get_handle(),
	                         "conversation-updated", plugin,
	                         PURPLE_CALLBACK(lednot_conversation_updated));
    return TRUE;
}
开发者ID:moutons,项目名称:pidgin-xmonad,代码行数:7,代码来源:xmobar-notification.c

示例8: plugin_load

static gboolean plugin_load(PurplePlugin *plugin)
{
	void *conv_handle;
	GHashTable *users;
	guint id;
	gpointer *data;

	users = g_hash_table_new_full((GHashFunc)joinpart_key_hash,
	                              (GEqualFunc)joinpart_key_equal,
	                              (GDestroyNotify)joinpart_key_destroy,
	                              g_free);

	conv_handle = purple_conversations_get_handle();
	purple_signal_connect(conv_handle, "chat-buddy-joining", plugin,
	                    PURPLE_CALLBACK(chat_buddy_joining_cb), users);
	purple_signal_connect(conv_handle, "chat-buddy-leaving", plugin,
	                    PURPLE_CALLBACK(chat_buddy_leaving_cb), users);
	purple_signal_connect(conv_handle, "received-chat-msg", plugin,
	                    PURPLE_CALLBACK(received_chat_msg_cb), users);

	/* Cleanup every 5 minutes */
	id = purple_timeout_add_seconds(60 * 5, (GSourceFunc)clean_users_hash, users);

	data = g_new(gpointer, 2);
	data[0] = users;
	data[1] = GUINT_TO_POINTER(id);
	plugin->extra = data;

	return TRUE;
}
开发者ID:bf4,项目名称:pidgin-mac,代码行数:30,代码来源:joinpart.c

示例9: plugin_load

static gboolean 
plugin_load(PurplePlugin *plugin) {

  FILE *which_pf;
  char line[1024];
  which_pf= popen("which festival 2>/dev/null","r");
  fscanf(which_pf,"%1023s",line);
  pclose(which_pf);

  if( *line != '/')
    return FALSE;

  char proc[1024];
  sprintf(proc, "%s %s", snd((char *)purple_prefs_get_string("/pidgin/sound/method")), line);
  purple_debug(PURPLE_DEBUG_INFO, "pidgin festival", proc);

  int errno=0;
  festival_pf= popen(proc,"w");

  if(errno) {
    pclose(festival_pf);
    return FALSE;
  }

  load_conf();

  void *conv_handle = purple_conversations_get_handle();
  void *blist_handle = purple_blist_get_handle();
  void *accounts_handle = purple_accounts_get_handle();

  purple_signal_connect(conv_handle, "received-im-msg",
		      plugin, PURPLE_CALLBACK(im_recv_im), NULL);
  purple_signal_connect(conv_handle, "received-chat-msg",
  		      plugin, PURPLE_CALLBACK(im_recv_im), NULL);
  purple_signal_connect(conv_handle, "conversation-created",
  		      plugin, PURPLE_CALLBACK(chat_created), NULL);
  purple_signal_connect(blist_handle, "buddy-signed-on",
  		      plugin, PURPLE_CALLBACK(buddy_signed_on_cb), NULL);
  purple_signal_connect(blist_handle, "buddy-signed-off",
  		      plugin, PURPLE_CALLBACK(buddy_signed_off_cb), NULL);
  purple_signal_connect(conv_handle, "chat-buddy-joined",
  		      plugin, PURPLE_CALLBACK(chat_buddy_joined_cb), NULL);
  purple_signal_connect(conv_handle, "chat-buddy-left",
		      plugin, PURPLE_CALLBACK(chat_buddy_left_cb), NULL);

  /* Buddy List subsystem signals */
  purple_signal_connect(blist_handle, "buddy-away",
		      plugin, PURPLE_CALLBACK(buddy_away_cb), NULL);
  purple_signal_connect(blist_handle, "buddy-back",
		      plugin, PURPLE_CALLBACK(buddy_back_cb), NULL);
  purple_signal_connect(blist_handle, "buddy-idle",
		      plugin, PURPLE_CALLBACK(buddy_idle_cb), NULL);
  purple_signal_connect(blist_handle, "buddy-unidle",
		      plugin, PURPLE_CALLBACK(buddy_unidle_cb), NULL);

  purple_signal_connect(accounts_handle, "account-connecting",
		      plugin, PURPLE_CALLBACK(account_connecting_cb), NULL);

  return TRUE;
}
开发者ID:gerrywastaken,项目名称:pidgin-festival,代码行数:60,代码来源:festival.c

示例10: plugin_load

static gboolean plugin_load(PurplePlugin *plugin)
{
	void *conv_handle;
	PurpleConversationUiOps *ui_ops;
	
	purple_prefs_set_bool(PURPLE_NICKCHANGE_PREF, FALSE);

	userstable = g_hash_table_new_full((GHashFunc)joinpart_key_hash,
	                              (GEqualFunc)joinpart_key_equal,
	                              (GDestroyNotify)joinpart_key_destroy,
	                              g_free);

	conv_handle = purple_conversations_get_handle();
	//purple_signal_connect(conv_handle, "chat-buddy-joining", plugin, PURPLE_CALLBACK(chat_buddy_joining_cb), userstable);
	//purple_signal_connect(conv_handle, "chat-buddy-leaving", plugin, PURPLE_CALLBACK(chat_buddy_leaving_cb), userstable);
	purple_signal_connect(conv_handle, "received-chat-msg", plugin, PURPLE_CALLBACK(received_chat_msg_cb), userstable);

	//purple_prefs_connect_callback(plugin, const char *name, PurplePrefCallback cb, gpointer data)
	
	//Attempt overriding the global UI ops
	ui_ops = pidgin_conversations_get_conv_ui_ops();
	
	/* Cleanup every 5 minutes */
	clean_user_timeout = purple_timeout_add_seconds(60 * 5, (GSourceFunc)clean_users_hash, userstable);
	
	if (ui_ops) {
		orig_chat_rename_user = ui_ops->chat_rename_user;
		ui_ops->chat_rename_user = nickchange_chat_rename_user;
	} else {
		//TODO make it work for !Pidgin too
		return FALSE;
	}

	return TRUE;
}
开发者ID:vorburger,项目名称:pidgin-ignore-nickchange,代码行数:35,代码来源:nickchange.c

示例11: plugin_load

static gboolean plugin_load(PurplePlugin * plugin) {
    asprintf(&hook_script, "%s/%s", purple_user_dir(), AUTORESPOND);
    void *conv_handle = purple_conversations_get_handle();
    purple_signal_connect(conv_handle, "received-im-msg", plugin, 
        PURPLE_CALLBACK(received_im_msg_cb), NULL);
    return TRUE;
}
开发者ID:akurtasinski,项目名称:libpurple_autorespond,代码行数:7,代码来源:autorespond.c

示例12: plugin_load

static gboolean
plugin_load(PurplePlugin * plugin)
{
	plugin_self = plugin;

	purple_signal_connect(purple_conversations_get_handle(), "conversation-created", plugin,
	                      PURPLE_CALLBACK(timezone_createconv_cb), NULL);

	purple_plugin_ipc_register(plugin, BUDDYTIME_BUDDY_GET_TIMEZONE,
	                           PURPLE_CALLBACK(buddy_get_timezone),
	                           marshal_POINTER__POINTER_BOOL,
	                           purple_value_new(PURPLE_TYPE_STRING),
	                           2,
	                           purple_value_new(PURPLE_TYPE_SUBTYPE,
	                                            PURPLE_SUBTYPE_BLIST_NODE),
	                           purple_value_new(PURPLE_TYPE_BOOLEAN));

	purple_plugin_ipc_register(plugin, BUDDYTIME_TIMEZONE_GET_TIME,
	                           PURPLE_CALLBACK(timezone_get_time),
	                           marshal_POINTER__POINTER_POINTER_POINTER,
	                           purple_value_new(PURPLE_TYPE_INT),
	                           2,
	                           purple_value_new(PURPLE_TYPE_POINTER),
	                           purple_value_new(PURPLE_TYPE_POINTER));

	/* This is done as an idle callback to avoid an infinite loop
	 * when we try to load the UI plugin which depends on this plugin
	 * which isn't officially loaded yet. */
	purple_timeout_add(0, load_ui_plugin, NULL);

	return TRUE;
}
开发者ID:Javran,项目名称:purple-plugin-pack,代码行数:32,代码来源:buddytime.c

示例13: plugin_load

static gboolean plugin_load(PurplePlugin *plugin)
{
	PurpleBuddyList *buddy_list;
	void *conv_handle;

	if (cc_init_gtk_gl())
		return FALSE;

	cc_init(&cc_info);
	buddy_list = purple_get_blist();
	if (buddy_list) {
		purple_signal_connect(PIDGIN_BLIST
				    (buddy_list),
				    "drawing-menu", plugin,
				    PURPLE_CALLBACK(cc_buddy_menu), NULL);
		conv_handle = purple_conversations_get_handle();
		purple_signal_connect(conv_handle, "received-im-msg", plugin,
			PURPLE_CALLBACK(receive_im_cb), &cc_info);
		purple_signal_connect(conv_handle, "displaying-im-msg", plugin,
			PURPLE_CALLBACK(display_im_cb), &cc_info);
	} else {
		purple_signal_connect
		    (purple_connections_get_handle(), "signed-on",
		     plugin, PURPLE_CALLBACK(cc_signed_on), plugin);
	}

	Debug("CrazyChat plugin loaded.\n");

	return TRUE;
}
开发者ID:dylex,项目名称:pidgin,代码行数:30,代码来源:cc_pidgin_plugin.c

示例14: translate_sending_chat_message_cb

void
translate_sending_chat_message_cb(const gchar *original_phrase, const gchar *translated_phrase, const gchar *detected_language, gpointer userdata)
{
	struct TranslateConvMessage *convmsg = userdata;
	gchar *html_text;
	int err = 0;
	
	html_text = purple_strdup_withhtml(translated_phrase);
	err = serv_chat_send(purple_account_get_connection(convmsg->account), purple_conv_chat_get_id(PURPLE_CONV_CHAT(convmsg->conv)), html_text, convmsg->flags);
	g_free(html_text);
	
	html_text = purple_strdup_withhtml(original_phrase);
	//if (err > 0)
	//{
	//	purple_conversation_write(convmsg->conv, convmsg->sender, html_text, convmsg->flags, time(NULL));
	//}
	
	purple_signal_emit(purple_conversations_get_handle(), "sent-chat-msg",
						convmsg->account, html_text,
						purple_conv_chat_get_id(PURPLE_CONV_CHAT(convmsg->conv)));
	
	g_free(html_text);
	g_free(convmsg->sender);
	g_free(convmsg);
}
开发者ID:Javran,项目名称:purple-plugin-pack,代码行数:25,代码来源:translate.c

示例15: plugin_unload

static gboolean plugin_unload(PurplePlugin *plugin)
{
    purple_signal_disconnect(purple_conversations_get_handle(),
                             "received-im-msg", plugin,
                             PURPLE_CALLBACK(msg_received));
    return TRUE;
}
开发者ID:bcho-archive,项目名称:msgq-pidgin,代码行数:7,代码来源:msgq-pidgin.c


注:本文中的purple_conversations_get_handle函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。