view src/protocols/yahoo/yahoo_friend.h @ 11044:8bf376579177

[gaim-migrate @ 12958] Patch #1229320 from Bleeter "I couldn't get anyone to confirm that doing this is correct, however to me it would seem that I'm leaking on a couple of the privacy_checks inside the yahoo prpl. Here's a fix. This also includes privacy wrapper for the conference decline function, used in some booters." (00:37:39) Bleeter: ... we're returning out of the function, and those things are freed further down if the function isn't returned (00:38:18) Bleeter: so it makes sense to free them before the return. I'm just unsure because they'reprevious patches which were applied without these checks being picked up That makes sense to me. It looks good. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Jun 2005 05:41:43 +0000
parents b4919e8c634c
children b41b75f709e4
line wrap: on
line source

/**
 * @file yahoo_friend.h The Yahoo! protocol plugin YahooFriend object
 *
 * gaim
 *
 * Gaim is the legal property of its developers, whose names are too numerous
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 * source distribution.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef _YAHOO_FRIEND_H_
#define _YAHOO_FRIEND_H_

#include "yahoo.h"
#include "yahoo_packet.h"

typedef enum {
	YAHOO_STEALTH_DEFAULT = 0,
	YAHOO_STEALTH_ONLINE,
	YAHOO_STEALTH_PERM_OFFLINE
} YahooStealthVisibility;

/* these are called friends instead of buddies mainly so I can use variables
 * named f and not confuse them with variables named b
 */
typedef struct _YahooFriend {
	enum yahoo_status status;
	char *msg;
	char *game;
	int idle;
	int away;
	gboolean sms;
	char *ip;
	gboolean bicon_sent_request;
	YahooStealthVisibility stealth;
} YahooFriend;

YahooFriend *yahoo_friend_find(GaimConnection *gc, const char *name);
YahooFriend *yahoo_friend_find_or_new(GaimConnection *gc, const char *name);

void yahoo_friend_set_ip(YahooFriend *f, const char *ip);
const char *yahoo_friend_get_ip(YahooFriend *f);

void yahoo_friend_set_game(YahooFriend *f, const char *game);
const char *yahoo_friend_get_game(YahooFriend *f);

void yahoo_friend_set_status_message(YahooFriend *f, char *msg);
const char *yahoo_friend_get_status_message(YahooFriend *f);

void yahoo_friend_set_buddy_icon_need_request(YahooFriend *f, gboolean needs);
gboolean yahoo_friend_get_buddy_icon_need_request(YahooFriend *f);

void yahoo_friend_free(gpointer p);

void yahoo_process_stealth(GaimConnection *gc, struct yahoo_packet *pkt);
void yahoo_friend_update_stealth(GaimConnection *gc, const char *name,
		YahooStealthVisibility stealth);

#endif /* _YAHOO_FRIEND_H_ */