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


C++ purple_timeout_remove函数代码示例

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


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

示例1: qq_close

/* clean up the given QQ connection and free all resources */
static void qq_close(PurpleConnection *gc)
{
	qq_data *qd;

	g_return_if_fail(gc != NULL  && gc->proto_data);
	qd = gc->proto_data;

	if (qd->check_watcher > 0) {
		purple_timeout_remove(qd->check_watcher);
		qd->check_watcher = 0;
	}

	if (qd->connect_watcher > 0) {
		purple_timeout_remove(qd->connect_watcher);
		qd->connect_watcher = 0;
	}

	/* This is cancelled by _purple_connection_destroy */
	qd->conn_data = NULL;

	qq_disconnect(gc);

	if (qd->redirect) g_free(qd->redirect);
	if (qd->ld.token) g_free(qd->ld.token);
	if (qd->ld.token_ex) g_free(qd->ld.token_ex);
	if (qd->captcha.token) g_free(qd->captcha.token);
	if (qd->captcha.data) g_free(qd->captcha.data);

	server_list_remove_all(qd);

	g_free(qd);
	gc->proto_data = NULL;
}
开发者ID:Mons,项目名称:libpurple-mini,代码行数:34,代码来源:qq.c

示例2: redirect_server

static void redirect_server(PurpleConnection *gc)
{
	qq_data *qd;
	qd = (qq_data *) gc->proto_data;

	if (qd->check_watcher > 0) {
			purple_timeout_remove(qd->check_watcher);
			qd->check_watcher = 0;
	}
	if (qd->connect_watcher > 0)	purple_timeout_remove(qd->connect_watcher);
	qd->connect_watcher = purple_timeout_add_seconds(QQ_CONNECT_INTERVAL, qq_connect_later, gc);
}
开发者ID:cysfek,项目名称:openq-ng,代码行数:12,代码来源:qq_network.c

示例3: skypeweb_close

static void
skypeweb_close(PurpleConnection *pc)
{
	SkypeWebAccount *sa;
	
	g_return_if_fail(pc != NULL);
	
	sa = purple_connection_get_protocol_data(pc);
	g_return_if_fail(sa != NULL);
	
	purple_timeout_remove(sa->authcheck_timeout);
	purple_timeout_remove(sa->poll_timeout);
	purple_timeout_remove(sa->watchdog_timeout);

	skypeweb_logout(sa);
	purple_signal_disconnect(purple_conversations_get_handle(), "conversation-updated", pc, PURPLE_CALLBACK(skypeweb_mark_conv_seen));
	purple_debug_info("skypeweb", "destroying %d waiting connections\n",
					  g_queue_get_length(sa->waiting_conns));
	
	while (!g_queue_is_empty(sa->waiting_conns))
		skypeweb_connection_destroy(g_queue_pop_tail(sa->waiting_conns));
	g_queue_free(sa->waiting_conns);
	
	purple_debug_info("skypeweb", "destroying %d incomplete connections\n",
			g_slist_length(sa->conns));

	while (sa->conns != NULL)
		skypeweb_connection_destroy(sa->conns->data);
		
	while (sa->dns_queries != NULL) {
		PurpleDnsQueryData *dns_query = sa->dns_queries->data;
		purple_debug_info("skypeweb", "canceling dns query for %s\n",
					purple_dnsquery_get_host(dns_query));
		sa->dns_queries = g_slist_remove(sa->dns_queries, dns_query);
		purple_dnsquery_destroy(dns_query);
	}
	
	g_hash_table_destroy(sa->sent_messages_hash);
	g_hash_table_destroy(sa->cookie_table);
	g_hash_table_destroy(sa->hostname_ip_cache);
	
	g_free(sa->messages_host);
	g_free(sa->skype_token);
	g_free(sa->registration_token);
	g_free(sa->endpoint);
	g_free(sa->username);
	g_free(sa);
}
开发者ID:Stat1cV01D,项目名称:skype4pidgin,代码行数:48,代码来源:libskypeweb.c

示例4: cancel_conversation_timeouts

static void cancel_conversation_timeouts(gpointer key, gpointer value, gpointer user_data) {
	CapStatistics *stats = value;
	if(stats->timeout_source_id != 0) {
		purple_timeout_remove(stats->timeout_source_id);
		stats->timeout_source_id = 0;
	}
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:7,代码来源:cap.c

示例5: 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

示例6: msn_servconn_destroy

void
msn_servconn_destroy(MsnServConn *servconn)
{
	g_return_if_fail(servconn != NULL);

	if (servconn->processing)
	{
		servconn->wasted = TRUE;
		return;
	}

	msn_servconn_disconnect(servconn);

	if (servconn->destroy_cb)
		servconn->destroy_cb(servconn);

	if (servconn->httpconn != NULL)
		msn_httpconn_destroy(servconn->httpconn);

	g_free(servconn->host);

	purple_circ_buffer_destroy(servconn->tx_buf);
	if (servconn->tx_handler > 0)
		purple_input_remove(servconn->tx_handler);
	if (servconn->timeout_handle > 0)
		purple_timeout_remove(servconn->timeout_handle);

	msn_cmdproc_destroy(servconn->cmdproc);
	g_free(servconn);
}
开发者ID:Mons,项目名称:libpurple-mini,代码行数:30,代码来源:servconn.c

示例7: nateon_transaction_destroy

void
nateon_transaction_destroy(NateonTransaction *trans)
{
	g_return_if_fail(trans != NULL);

	g_free(trans->command);
	g_free(trans->params);
	g_free(trans->payload);

#if 0
	if (trans->pendent_cmd != NULL)
		nateon_message_unref(trans->pendent_msg);
#endif

#if 0
	NateonTransaction *elem;
	if (trans->queue != NULL)
	{
		while ((elem = g_queue_pop_head(trans->queue)) != NULL)
			nateon_transaction_destroy(elem);

		g_queue_free(trans->queue);
	}
#endif

	if (trans->callbacks != NULL && trans->has_custom_callbacks)
		g_hash_table_destroy(trans->callbacks);

	if (trans->timer)
		purple_timeout_remove(trans->timer);

	g_free(trans);
}
开发者ID:D1RiP,项目名称:pidgin-nateon,代码行数:33,代码来源:transaction.c

示例8: hide_conv

static void
hide_conv(PidginConversation *gtkconv, gboolean closetimer)
{
	GList *list;

	purple_signal_emit(pidgin_conversations_get_handle(),
			"conversation-hiding", gtkconv);

	for (list = g_list_copy(gtkconv->convs); list; list = g_list_delete_link(list, list)) {
		PurpleConversation *conv = list->data;
		if (closetimer) {
			guint timer = GPOINTER_TO_INT(purple_conversation_get_data(conv, "close-timer"));
			if (timer)
				purple_timeout_remove(timer);
			timer = purple_timeout_add_seconds(CLOSE_CONV_TIMEOUT_SECS, close_already, conv);
			purple_conversation_set_data(conv, "close-timer", GINT_TO_POINTER(timer));
		}
#if 0
		/* I will miss you */
		purple_conversation_set_ui_ops(conv, NULL);
#else
		pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
		pidgin_conv_window_add_gtkconv(hidden_convwin, gtkconv);
#endif
	}
}
开发者ID:cemeyer2,项目名称:pidgin-closeoffline,代码行数:26,代码来源:closeoffline.c

示例9: skypeweb_do_all_the_things

void
skypeweb_do_all_the_things(SkypeWebAccount *sa)
{
	if (!sa->username) {
		skypeweb_get_self_details(sa);
	} else
	if (sa->registration_token) {
		skypeweb_get_self_details(sa);
		
		if (sa->authcheck_timeout) 
			purple_timeout_remove(sa->authcheck_timeout);
		skypeweb_check_authrequests(sa);
		sa->authcheck_timeout = purple_timeout_add_seconds(120, (GSourceFunc)skypeweb_check_authrequests, sa);
		purple_connection_set_state(sa->pc, PURPLE_CONNECTION_CONNECTED);

		skypeweb_get_friend_list(sa);
		skypeweb_poll(sa);
		
		skype_web_get_offline_history(sa);

		skypeweb_set_status(sa->account, purple_account_get_active_status(sa->account));
	} else {
		//Too soon!
		skypeweb_get_registration_token(sa);
	}
}
开发者ID:EduardoLeggiero,项目名称:skype4pidgin,代码行数:26,代码来源:libskypeweb.c

示例10: delete_win_cb

static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d)
{
	PidginRoomlistDialog *dialog = d;

	if (dialog->roomlist && purple_roomlist_get_in_progress(dialog->roomlist))
		purple_roomlist_cancel_get_list(dialog->roomlist);

	if (dialog->pg_update_to > 0)
		purple_timeout_remove(dialog->pg_update_to);

	if (dialog->roomlist) {
		PidginRoomlist *rl = dialog->roomlist->ui_data;

		if (dialog->pg_update_to > 0)
			/* yes, that's right, unref it twice. */
			purple_roomlist_unref(dialog->roomlist);

		if (rl)
			rl->dialog = NULL;
		purple_roomlist_unref(dialog->roomlist);
	}

	dialog->progress = NULL;
	g_free(dialog);

	return FALSE;
}
开发者ID:mclarkelauer,项目名称:HoneyIM,代码行数:27,代码来源:gtkroomlist.c

示例11: jabber_bosh_connection_destroy

void
jabber_bosh_connection_destroy(PurpleJabberBOSHConnection *conn)
{
	if (conn == NULL || conn->is_terminating)
		return;
	conn->is_terminating = TRUE;

	if (conn->sid != NULL) {
		purple_debug_info("jabber-bosh",
			"Terminating a session for %p\n", conn);
		jabber_bosh_connection_send_now(conn);
	}

	purple_http_connection_set_destroy(conn->payload_reqs);
	conn->payload_reqs = NULL;

	if (conn->send_timer)
		purple_timeout_remove(conn->send_timer);

	purple_http_conn_cancel(conn->sc_req);
	conn->sc_req = NULL;

	purple_http_keepalive_pool_unref(conn->kapool);
	conn->kapool = NULL;
	g_string_free(conn->send_buff, TRUE);
	conn->send_buff = NULL;

	g_free(conn->sid);
	conn->sid = NULL;
	g_free(conn->url);
	conn->url = NULL;

	g_free(conn);
}
开发者ID:ArmoredPidgin,项目名称:pidgin-hardened,代码行数:34,代码来源:bosh.c

示例12: sipe_backend_schedule_cancel

void sipe_backend_schedule_cancel(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public,
				  gpointer data)
{
	struct purple_schedule *schedule = data;
	purple_timeout_remove(schedule->timeout_handler);
	g_free(schedule);
}
开发者ID:rravinuthala,项目名称:sipe,代码行数:7,代码来源:purple-schedule.c

示例13: tgp_msg_send_schedule

static void tgp_msg_send_schedule (struct tgl_state *TLS, gchar *chunk, tgl_peer_id_t to) {
  g_queue_push_tail (tls_get_data (TLS)->out_messages, tgp_msg_sending_init (TLS, chunk, to));
  if (tls_get_data (TLS)->out_timer) {
    purple_timeout_remove (tls_get_data (TLS)->out_timer);
  }
  tls_get_data (TLS)->out_timer = purple_timeout_add (0, tgp_msg_send_schedule_cb, tls_get_data (TLS));
}
开发者ID:Houlbek,项目名称:telegram-purple,代码行数:7,代码来源:tgp-msg.c

示例14: oscar_data_destroy

/**
 * Logoff and deallocate a session.
 *
 * @param od Session to kill
 */
void
oscar_data_destroy(OscarData *od)
{
	aim_cleansnacs(od, -1);

	/* Only used when connecting with clientLogin */
	if (od->url_data != NULL)
		purple_util_fetch_url_cancel(od->url_data);

	while (od->requesticon)
	{
		g_free(od->requesticon->data);
		od->requesticon = g_slist_delete_link(od->requesticon, od->requesticon);
	}
	g_free(od->email);
	g_free(od->newp);
	g_free(od->oldp);
	if (od->getblisttimer > 0)
		purple_timeout_remove(od->getblisttimer);
	while (od->oscar_connections != NULL)
		flap_connection_destroy(od->oscar_connections->data,
				OSCAR_DISCONNECT_DONE, NULL);

	while (od->peer_connections != NULL)
		peer_connection_destroy(od->peer_connections->data,
				OSCAR_DISCONNECT_LOCAL_CLOSED, NULL);

	aim__shutdownmodules(od);

	g_hash_table_destroy(od->buddyinfo);
	g_hash_table_destroy(od->handlerlist);

	g_free(od);
}
开发者ID:Draghtnod,项目名称:pidgin,代码行数:39,代码来源:oscar_data.c

示例15: sevencup_connection_close

void
sevencup_connection_close(SevenCupConnection *scon)
{
	scon->sa->conns = g_slist_remove(scon->sa->conns, scon);
	
	if (scon->connect_data != NULL) {
		purple_proxy_connect_cancel(scon->connect_data);
		scon->connect_data = NULL;
	}

	if (scon->ssl_conn != NULL) {
		purple_ssl_close(scon->ssl_conn);
		scon->ssl_conn = NULL;
	}

	if (scon->fd >= 0) {
		close(scon->fd);
		scon->fd = -1;
	}

	if (scon->input_watcher > 0) {
		purple_input_remove(scon->input_watcher);
		scon->input_watcher = 0;
	}
	
	purple_timeout_remove(scon->timeout_watcher);
	
	g_free(scon->rx_buf);
	scon->rx_buf = NULL;
	scon->rx_len = 0;
}
开发者ID:EionRobb,项目名称:pidgin-7cupsotea,代码行数:31,代码来源:7cup_connection.c


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