• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ purple_conversations_get_handle函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: msn_session_destroy

void
msn_session_destroy (MsnSession *session)
{
    if (!session)
        return;

    pn_oim_session_free (session->oim_session);

    purple_signal_disconnect (purple_conversations_get_handle(), "conversation-created",
                              session, PURPLE_CALLBACK (conversation_created_cb));

    if (session->connected)
        msn_session_disconnect (session);

#if defined(PECAN_CVR)
    g_hash_table_destroy (session->links);
#endif /* defined(PECAN_CVR) */

    msn_notification_destroy (session->notification);

    pn_dp_manager_free (session->dp_manager);

    g_hash_table_destroy (session->conversations);
    g_hash_table_destroy (session->chats);

    pn_contactlist_destroy (session->contactlist);

    g_free (session->passport_info.kv);
    g_free (session->passport_info.sid);
    g_free (session->passport_info.mspauth);
    g_free (session->passport_info.client_ip);

    g_free (session->passport_info.mail_url);

    g_free (session->passport_cookie.t);
    g_free (session->passport_cookie.p);

    if (session->autoupdate_tune.timer)
        g_source_remove (session->autoupdate_tune.timer);

    if (session->sync)
        msn_sync_destroy (session->sync);

    if (session->nexus)
        msn_nexus_destroy (session->nexus);

    pn_contact_free (session->user);

    g_hash_table_destroy (session->config);

    g_free (session->username);
    g_free (session->password);

#ifdef INTERNAL_MAINLOOP
    purple_timeout_remove (session->g_main_loop_timer);
    g_main_loop_unref (session->g_main_loop);
#endif

    g_free (session);
}
开发者ID:mikecpt,项目名称:msn-pecan,代码行数:60,代码来源:session.c


示例17: plugin_unload

static gboolean
plugin_unload (PurplePlugin *plugin)
{
	void *conv_handle, *blist_handle, *conn_handle;

	conv_handle = purple_conversations_get_handle ();
	blist_handle = purple_blist_get_handle ();
	conn_handle = purple_connections_get_handle();

	purple_signal_disconnect (blist_handle, "buddy-signed-on", plugin,
							PURPLE_CALLBACK(notify_buddy_signon_cb));

	purple_signal_disconnect (blist_handle, "buddy-signed-off", plugin,
							PURPLE_CALLBACK(notify_buddy_signoff_cb));

	purple_signal_disconnect (conv_handle, "received-im-msg", plugin,
							PURPLE_CALLBACK(notify_new_message_cb));

	purple_signal_disconnect (conv_handle, "received-chat-msg", plugin,
							PURPLE_CALLBACK(notify_chat_nick));

	purple_signal_disconnect (conv_handle, "deleting-conversation", plugin,
							PURPLE_CALLBACK(notify_deleting_conversation_cb));


	purple_signal_disconnect (conn_handle, "signed-on", plugin,
							PURPLE_CALLBACK(event_connection_throttle));

	g_hash_table_destroy (buddy_hash);

	notify_uninit ();

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


示例18: purple_pounces_init

void
purple_pounces_init(void)
{
	void *handle       = purple_pounces_get_handle();
	void *blist_handle = purple_blist_get_handle();
	void *conv_handle  = purple_conversations_get_handle();

	pounce_handlers = g_hash_table_new_full(g_str_hash, g_str_equal,
											g_free, free_pounce_handler);

	purple_signal_connect(blist_handle, "buddy-idle-changed",
	                    handle, PURPLE_CALLBACK(buddy_idle_changed_cb), NULL);
	purple_signal_connect(blist_handle, "buddy-status-changed",
	                    handle, PURPLE_CALLBACK(buddy_status_changed_cb), NULL);
	purple_signal_connect(blist_handle, "buddy-signed-on",
						handle, PURPLE_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(PURPLE_POUNCE_SIGNON));
	purple_signal_connect(blist_handle, "buddy-signed-off",
						handle, PURPLE_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(PURPLE_POUNCE_SIGNOFF));

	purple_signal_connect(conv_handle, "buddy-typing",
						handle, PURPLE_CALLBACK(buddy_typing_cb), NULL);
	purple_signal_connect(conv_handle, "buddy-typed",
						handle, PURPLE_CALLBACK(buddy_typing_cb), NULL);
	purple_signal_connect(conv_handle, "buddy-typing-stopped",
						handle, PURPLE_CALLBACK(buddy_typing_cb), NULL);

	purple_signal_connect(conv_handle, "received-im-msg",
						handle, PURPLE_CALLBACK(received_message_cb), NULL);

	purple_pounces_load();
}
开发者ID:ArmoredPidgin,项目名称:pidgin-hardened,代码行数:33,代码来源:pounce.c


示例19: plugin_load

static gboolean
plugin_load(PurplePlugin *plugin) {
	void *conv_list_handle;

	PURPLE_DBUS_RETURN_FALSE_IF_DISABLED(plugin);

    /* First, we have to register our four exported functions with the
       main purple dbus loop.  Without this statement, the purple dbus
       code wouldn't know about our functions. */
    PURPLE_DBUS_REGISTER_BINDINGS(plugin);
	
	/* Keep the plugin for reference (needed for notify's) */
	plugin_pointer = plugin;
	
	/* Add the button to all the current conversations */
	purple_conversation_foreach (init_conversation);
	
	/* Listen for any new conversations */
	conv_list_handle = purple_conversations_get_handle();
	
	purple_signal_connect(conv_list_handle, "conversation-created", 
					plugin, PURPLE_CALLBACK(init_conversation), NULL);
	
	/* Listen for conversations that are ending */
	purple_signal_connect(conv_list_handle, "deleting-conversation",
					plugin, PURPLE_CALLBACK(conv_destroyed), NULL);
					
	/* Listen for sending/receiving messages to replace tags */
	purple_signal_connect(conv_list_handle, "sending-im-msg",
					plugin, PURPLE_CALLBACK(intercept_sent), NULL);
	purple_signal_connect(conv_list_handle, "receiving-im-msg",
					plugin, PURPLE_CALLBACK(intercept_received), NULL);
	
	return TRUE;
}
开发者ID:gotomypc,项目名称:pidgin_whiteboard,代码行数:35,代码来源:musicmessaging.c


示例20: msn_session_new

MsnSession *
msn_session_new (const gchar *username,
                 const gchar *password,
                 gboolean http_method)
{
    MsnSession *session;

    session = g_new0 (MsnSession, 1);

    session->username = pn_normalize (username);
    session->password = g_strndup (password, 16);

#ifdef INTERNAL_MAINLOOP
    session->g_main_loop = g_main_loop_new  (NULL, FALSE);
    session->g_main_loop_timer = purple_timeout_add (1000, g_main_context_iteration_timer, NULL);
#endif

    session->config = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);

    /** @todo sb and ns need this here but should be updated on-the-fly. */
    msn_session_set_bool (session, "use_http_method", http_method);

#if 0
    if (session->http_method)
    {
        PnNode *foo;
        foo = PN_NODE (pn_http_server_new ("foo server"));
        foo->session = session;
        session->http_conn = foo;
    }
#endif

    session->dp_manager = pn_dp_manager_new (session);

    session->notification = msn_notification_new (session);
    pn_node_set_id(session->notification->cmdproc->conn,
                   session->conn_count++, "ns");

    session->contactlist = pn_contactlist_new (session);

    session->user = pn_contact_new (NULL);
    pn_contact_set_passport (session->user, session->username);

    session->conv_seq = 1;

    session->oim_session = pn_oim_session_new (session);

    session->conversations = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) msn_switchboard_unref);
    session->chats = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) msn_switchboard_unref);

#if defined(PECAN_CVR)
    session->links = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) pn_peer_link_unref);
#endif /* defined(PECAN_CVR) */

    purple_signal_connect (purple_conversations_get_handle(), "conversation-created",
                           session, PURPLE_CALLBACK (conversation_created_cb), session);

    return session;
}
开发者ID:mikecpt,项目名称:msn-pecan,代码行数:59,代码来源:session.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ purple_debug函数代码示例发布时间:2022-05-30
下一篇:
C++ purple_conversation_write函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap