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


C++ purple_debug_error函数代码示例

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


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

示例1: purple_prefs_set_bool

void
purple_prefs_set_bool(const char *name, gboolean value)
{
	struct purple_pref *pref = find_pref(name);

	if(pref) {
		if(pref->type != PURPLE_PREF_BOOLEAN) {
			purple_debug_error("prefs",
					"purple_prefs_set_bool: %s not a boolean pref\n", name);
			return;
		}

		if(pref->value.boolean != value) {
			pref->value.boolean = value;
			do_callbacks(name, pref);
		}
	} else {
		purple_prefs_add_bool(name, value);
	}
}
开发者ID:psunkari,项目名称:spicebird,代码行数:20,代码来源:prefs.c

示例2: jingle_handle_session_initiate

static void
jingle_handle_session_initiate(JingleSession *session, xmlnode *jingle)
{
	xmlnode *content = xmlnode_get_child(jingle, "content");

	for (; content; content = xmlnode_get_next_twin(content)) {
		JingleContent *parsed_content = jingle_content_parse(content);
		if (parsed_content == NULL) {
			purple_debug_error("jingle", "Error parsing content\n");
			jabber_iq_send(jingle_session_terminate_packet(session,
				"unsupported-applications"));
		} else {
			jingle_session_add_content(session, parsed_content);
			jingle_content_handle_action(parsed_content, content,
					JINGLE_SESSION_INITIATE);
		}
	}

	jabber_iq_send(jingle_session_create_ack(session, jingle));
}
开发者ID:Lilitana,项目名称:Pidgin,代码行数:20,代码来源:jingle.c

示例3: group_join_cb

static void group_join_cb(qq_room_req *opt_req, const gchar *reason_utf8)
{
	qq_room_data *rmd;

	g_return_if_fail(opt_req != NULL);
	if (opt_req->gc == NULL || opt_req->id == 0) {
		g_free(opt_req);
		return;
	}

	rmd = qq_room_data_find(opt_req->gc, opt_req->id);
	if (rmd == NULL) {
		purple_debug_error("QQ", "Can not find room data of %u\n", opt_req->id);
		g_free(opt_req);
		return;
	}

	qq_send_cmd_group_auth(opt_req->gc, rmd, QQ_ROOM_AUTH_REQUEST_APPLY, 0, reason_utf8);
	g_free(opt_req);
}
开发者ID:1dot75cm,项目名称:pidgin-libqq,代码行数:20,代码来源:group_join.c

示例4: purple_prefs_set_int

void
purple_prefs_set_int(const char *name, int value)
{
	struct purple_pref *pref = find_pref(name);

	if(pref) {
		if(pref->type != PURPLE_PREF_INT) {
			purple_debug_error("prefs",
					"purple_prefs_set_int: %s not an integer pref\n", name);
			return;
		}

		if(pref->value.integer != value) {
			pref->value.integer = value;
			do_callbacks(name, pref);
		}
	} else {
		purple_prefs_add_int(name, value);
	}
}
开发者ID:psunkari,项目名称:spicebird,代码行数:20,代码来源:prefs.c

示例5: purple_perl_get_plugin_frame

PurplePluginPrefFrame *
purple_perl_get_plugin_frame(PurplePlugin *plugin)
{
	/* Sets up the Perl Stack for our call back into the script to run the
	 * plugin_pref... sub */
	int count;
	PurplePerlScript *gps;
	PurplePluginPrefFrame *ret_frame;
	dSP;

	gps = (PurplePerlScript *)plugin->info->extra_info;

	ENTER;
	SAVETMPS;
	/* Some perl magic to run perl_plugin_pref_frame_SV perl sub and
	 * return the frame */
	PUSHMARK(SP);
	PUTBACK;

	count = call_pv(gps->prefs_sub, G_EVAL | G_SCALAR | G_NOARGS);

	SPAGAIN;

	if (SvTRUE(ERRSV)) {
		purple_debug_error("perl",
		                 "Perl plugin prefs frame init exited abnormally: %s\n",
		                 SvPVutf8_nolen(ERRSV));
	}

	if (count != 1)
		croak("call_pv: Did not return the correct number of values.\n");
	/* the frame was created in a perl sub and is returned */
	ret_frame = (PurplePluginPrefFrame *)purple_perl_ref_object(POPs);

	/* Tidy up the Perl stack */
	PUTBACK;
	FREETMPS;
	LEAVE;

	return ret_frame;
}
开发者ID:bf4,项目名称:pidgin-mac,代码行数:41,代码来源:perl-handlers.c

示例6: do_port_mapping_cb

static void
do_port_mapping_cb(gboolean has_control_mapping, gpointer data)
{
	UPnPMappingAddRemove *ar = data;

	if (has_control_mapping) {
		gchar action_name[25];
		gchar *action_params;
		if(ar->add) {
			const gchar *internal_ip;
			/* get the internal IP */
			if(!(internal_ip = purple_upnp_get_internal_ip())) {
				purple_debug_error("upnp",
					"purple_upnp_set_port_mapping(): couldn't get local ip\n");
				ar->success = FALSE;
				ar->tima = purple_timeout_add(0, fire_ar_cb_async_and_free, ar);
				return;
			}
			strncpy(action_name, "AddPortMapping",
					sizeof(action_name));
			action_params = g_strdup_printf(
					ADD_PORT_MAPPING_PARAMS,
					ar->portmap, ar->protocol, ar->portmap,
					internal_ip);
		} else {
			strncpy(action_name, "DeletePortMapping", sizeof(action_name));
			action_params = g_strdup_printf(
				DELETE_PORT_MAPPING_PARAMS,
				ar->portmap, ar->protocol);
		}

		ar->gfud = purple_upnp_generate_action_message_and_send(action_name,
						action_params, done_port_mapping_cb, ar);

		g_free(action_params);
		return;
	}

	ar->success = FALSE;
	ar->tima = purple_timeout_add(0, fire_ar_cb_async_and_free, ar);
}
开发者ID:Lilitana,项目名称:Pidgin,代码行数:41,代码来源:upnp.c

示例7: jabber_presence_received

/* ------------------
 * called on received presence
 * ------------------ */
static gboolean
jabber_presence_received(PurpleConnection *pc, const char *type,
                         const char *from, xmlnode *presence)
{
	const xmlnode* parent_node = presence;
	xmlnode* x_node = NULL;

	// check if presence has special "x" childnode
	x_node = xmlnode_get_child_with_namespace(parent_node,"x",NS_SIGNED);
	if (x_node != NULL)
	{
		// user supports openpgp encryption
		purple_debug_info(PLUGIN_ID, "user %s supports openpgp encryption!\n",from);

		char* x_node_data = xmlnode_get_data(x_node);
		if (x_node_data != NULL)
		{
			// try to verify
			char* fpr = verify(x_node_data);
			if (fpr != NULL)
			{
				char* bare_jid = get_bare_jid(from);
				purple_debug_info(PLUGIN_ID, "user %s has fingerprint %s\n",bare_jid,fpr);

				// add key to list
				struct list_item *item = malloc(sizeof(struct list_item));
				item->fpr = fpr;
				g_hash_table_replace(list_fingerprints,bare_jid,item);
			}else
			{
				purple_debug_error(PLUGIN_ID, "could not verify presence of user %s\n",from);
			}
		}else
		{
			purple_debug_info(PLUGIN_ID, "user %s sent empty signed presence\n",from);
		}
	}

	/* We don't want the plugin to stop processing */
	return FALSE;
}
开发者ID:bitboulder,项目名称:Pidgin-GPG,代码行数:44,代码来源:pidgin-gpg.c

示例8: purple_perl_gtk_get_plugin_frame

GtkWidget *
purple_perl_gtk_get_plugin_frame(PurplePlugin *plugin)
{
	SV * sv;
	int count;
	MAGIC *mg;
	GtkWidget *ret;
	PurplePerlScript *gps;
	dSP;

	gps = plugin->info->extra_info;

	ENTER;
	SAVETMPS;

	count = call_pv(gps->gtk_prefs_sub, G_EVAL | G_SCALAR | G_NOARGS);
	if (count != 1)
		croak("call_pv: Did not return the correct number of values.\n");

	/* the frame was created in a perl sub and is returned */
	SPAGAIN;

	if (SvTRUE(ERRSV)) {
		purple_debug_error("perl",
		                 "Perl gtk plugin frame init exited abnormally: %s\n",
		                 SvPVutf8_nolen(ERRSV));
	}

	/* We have a Gtk2::Frame on top of the stack */
	sv = POPs;

	/* The magic field hides the pointer to the actual GtkWidget */
	mg = mg_find(SvRV(sv), PERL_MAGIC_ext);
	ret = (GtkWidget *)mg->mg_ptr;

	PUTBACK;
	FREETMPS;
	LEAVE;

	return ret;
}
开发者ID:bf4,项目名称:pidgin-mac,代码行数:41,代码来源:perl-handlers.c

示例9: jingle_handle_transport_info

static void
jingle_handle_transport_info(JingleSession *session, xmlnode *jingle)
{
	xmlnode *content = xmlnode_get_child(jingle, "content");

	jabber_iq_send(jingle_session_create_ack(session, jingle));

	for (; content; content = xmlnode_get_next_twin(content)) {
		const gchar *name = xmlnode_get_attrib(content, "name");
		const gchar *creator = xmlnode_get_attrib(content, "creator");
		JingleContent *parsed_content = 
				jingle_session_find_content(session, name, creator);
		if (parsed_content == NULL) {
			purple_debug_error("jingle", "Error parsing content\n");
			/* XXX: send error */
		} else {
			jingle_content_handle_action(parsed_content, content,
					JINGLE_TRANSPORT_INFO);
		}
	}
}
开发者ID:crodjer,项目名称:pidgin_whiteboard,代码行数:21,代码来源:jingle.c

示例10: purple_smiley_data_unstore

static void
purple_smiley_data_unstore(const char *filename)
{
	const char *dirname;
	char *path;

	g_return_if_fail(filename != NULL);

	dirname  = purple_smileys_get_storing_dir();
	path = g_build_filename(dirname, filename, NULL);

	if (g_file_test(path, G_FILE_TEST_EXISTS)) {
		if (g_unlink(path))
			purple_debug_error(SMILEYS_LOG_ID, "Failed to delete %s: %s\n",
			                   path, g_strerror(errno));
		else
			purple_debug_info(SMILEYS_LOG_ID, "Deleted cache file: %s\n", path);
	}

	g_free(path);
}
开发者ID:matyapiro31,项目名称:instantbird-1.5,代码行数:21,代码来源:smiley.c

示例11: mxit_http_raw_write

/*------------------------------------------------------------------------
 * Write the request to the HTTP server.
 *
 *  @param fd			The file descriptor
 *  @param pktdata		The packet data
 *  @param pktlen		The length of the packet data
 *  @return				Return -1 on error, otherwise 0
 */
static int mxit_http_raw_write( int fd, const char* pktdata, int pktlen )
{
	int		written;
	int		res;

	written = 0;
	while ( written < pktlen ) {
		res = write( fd, &pktdata[written], pktlen - written );
		if ( res <= 0 ) {
			/* error on socket */
			if ( errno == EAGAIN )
				continue;

			purple_debug_error( MXIT_PLUGIN_ID, "Error while writing packet to HTTP server (%i)\n", res );
			return -1;
		}
		written += res;
	}

	return 0;
}
开发者ID:felipec,项目名称:libpurple-mini,代码行数:29,代码来源:http.c

示例12: mxit_chat_reject

/*------------------------------------------------------------------------
 * User has rejected an invite to join a MultiMX room.
 *
 *  @param gc			The connection object
 *  @param components	The list of chat configuration values
 */
void mxit_chat_reject(PurpleConnection *gc, GHashTable* components)
{
	struct MXitSession* session = (struct MXitSession*) gc->proto_data;
	const char* roomname = NULL;
	struct multimx* multimx = NULL;

	purple_debug_info(MXIT_PLUGIN_ID, "mxit_chat_reject\n");

	roomname = g_hash_table_lookup(components, "room");
	multimx = find_room_by_alias(session, roomname);
	if (multimx == NULL) {
		purple_debug_error(MXIT_PLUGIN_ID, "Groupchat '%s' not found\n", roomname);
		return;
	}

	/* Send Subscription Reject to MXit */
	mxit_send_deny_sub(session, multimx->roomid);

	/* Remove from our list of rooms */
	room_remove(session, multimx);
}
开发者ID:crodjer,项目名称:pidgin_whiteboard,代码行数:27,代码来源:multimx.c

示例13: qq_show_buddy_info

/* send packet to get who's detailed information */
static void qq_show_buddy_info(PurpleConnection *gc, const gchar *who)
{
	guint32 uid;
	qq_data *qd;

	qd = gc->proto_data;
	uid = purple_name_to_uid(who);

	if (uid <= 0) {
		purple_debug_error("QQ", "Not valid QQid: %s\n", who);
		purple_notify_error(gc, NULL, _("Invalid name"), NULL);
		return;
	}

	if (qd->client_version >= 2007) {
		qq_request_get_level_2007(gc, uid);
	} else {
		qq_request_get_level(gc, uid);
	}
	qq_request_buddy_info(gc, uid, 0, QQ_BUDDY_INFO_DISPLAY);
}
开发者ID:Mons,项目名称:libpurple-mini,代码行数:22,代码来源:qq.c

示例14: ggp_roster_reply

void ggp_roster_reply(PurpleConnection *gc,
	struct gg_event_userlist100_reply *reply)
{
	if (GG_USERLIST100_FORMAT_TYPE_GG100 != reply->format_type) {
		purple_debug_warning("gg", "ggp_roster_reply: "
			"unsupported format type (%x)\n", reply->format_type);
		return;
	}

	if (reply->type == GG_USERLIST100_REPLY_LIST)
		ggp_roster_reply_list(gc, reply->version, reply->reply);
	else if (reply->type == 0x01) /* list up to date (TODO: push to libgadu) */
		purple_debug_info("gg", "ggp_roster_reply: list up to date\n");
	else if (reply->type == GG_USERLIST100_REPLY_ACK)
		ggp_roster_reply_ack(gc, reply->version);
	else if (reply->type == GG_USERLIST100_REPLY_REJECT)
		ggp_roster_reply_reject(gc, reply->version);
	else
		purple_debug_error("gg", "ggp_roster_reply: "
			"unsupported reply (%x)\n", reply->type);
}
开发者ID:Distrotech,项目名称:pidgin,代码行数:21,代码来源:roster.c

示例15: purple_prefs_set_path

void
purple_prefs_set_path(const char *name, const char *value)
{
	struct purple_pref *pref = find_pref(name);

	if(pref) {
		if(pref->type != PURPLE_PREF_PATH) {
			purple_debug_error("prefs",
					"purple_prefs_set_path: %s not a path pref\n", name);
			return;
		}

		if (!purple_strequal(pref->value.string, value)) {
			g_free(pref->value.string);
			pref->value.string = g_strdup(value);
			do_callbacks(name, pref);
		}
	} else {
		purple_prefs_add_path(name, value);
	}
}
开发者ID:psunkari,项目名称:spicebird,代码行数:21,代码来源:prefs.c


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