view libpurple/protocols/msn/notification.h @ 25633:c384d62009c0

*** Plucked rev b932d4f94f9c771877b6a8a6a1d7dd3ea9c08005 (qulogic@pidgin.im): Treat FQY responses with no network ID as on the Passport network. Fixes #9240. *** Plucked rev 76f13d0fc7fbff369d01187fcc1b8f517854e119 (qulogic@pidgin.im): These strcmp checks are for equality, meaning a return of 0. *** Plucked rev a7bd74cbe46498f1390a4d33cce115bdd123a68d (qulogic@pidgin.im): Add a data parameter for FQY callbacks and remove the pending users list that was previously used instead. *** Plucked rev 84f6765b71f2ad2d6c7cddd461114ab5fc758b72 (qulogic@pidgin.im): We can't get an ADD error if we never send an ADD command. *** Plucked rev 6d3a0b29b22baeedf393b76044dde689caef3b45 (qulogic@pidgin.im): Add a msn_notification_post_rml analog. *** Plucked rev 0e2af7d2799397628273f534fac31e6dd7c6fe14 (qulogic@pidgin.im): Remove some left over code. *** Plucked rev 0841af13da028245cc279ce8f927ff05c0367ae1 (qulogic@pidgin.im): Check network type, and send an FQY if necessary, when modifying the allow and block lists. Before, users who were not added by you (i.e. spammers) would have no network type and cause disconnects. This should fix it. Fixes #8977. *** Plucked rev a1463341c3bf211c429282870babdb4785c7d817 (qulogic@pidgin.im): Remove notification-server group commands ADG, REG, RMG as groups are now handled in the AddressBook with SOAP calls.
author Ka-Hing Cheung <khc@hxbc.us>
date Sat, 20 Jun 2009 18:27:49 +0000
parents fd5eedf131b4
children 462cb893521b e30865b62859
line wrap: on
line source

/**
 * @file notification.h Notification server functions
 *
 * purple
 *
 * Purple 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., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 */
#ifndef _MSN_NOTIFICATION_H_
#define _MSN_NOTIFICATION_H_

/*MSN protocol challenge info*/

/*MSNP15 challenge: WLM 8.5.1288.816*/
#define MSNP15_WLM_PRODUCT_KEY "ILTXC!4IXB5FB*PX"
#define MSNP15_WLM_PRODUCT_ID "PROD0119GSJUC$18"

/*MSNP13 challenge*/
#define MSNP13_WLM_PRODUCT_KEY	"O4BG@C7BWLYQX?5G"
#define MSNP13_WLM_PRODUCT_ID	"PROD01065C%ZFN6F"

#define MSNP10_PRODUCT_KEY		"VT6PX?UQTM4WM%YR"
#define MSNP10_PRODUCT_ID		"PROD0038W!61ZTF9"

typedef struct _MsnNotification MsnNotification;

#include "session.h"
#include "servconn.h"
#include "cmdproc.h"
#include "user.h"

struct _MsnNotification
{
	MsnSession *session;

	/**
	 * This is a convenience pointer that always points to
	 * servconn->cmdproc
	 */
	MsnCmdProc *cmdproc;
	MsnServConn *servconn;

	gboolean in_use;
};

typedef void (*MsnFqyCb)(MsnSession *session, const char *passport, MsnNetwork network, gpointer data);

#include "state.h"
void uum_send_msg(MsnSession *session,MsnMessage *msg);

void msn_notification_end(void);
void msn_notification_init(void);

void msn_notification_add_buddy_to_list(MsnNotification *notification,
					MsnListId list_id, MsnUser *user);
void msn_notification_rem_buddy_from_list(MsnNotification *notification,
					  MsnListId list_id, MsnUser *user);

void msn_notification_send_fqy(MsnSession *session,
                               const char *payload, int payload_len,
                               MsnFqyCb cb, gpointer cb_data);

MsnNotification *msn_notification_new(MsnSession *session);
void msn_notification_destroy(MsnNotification *notification);
gboolean msn_notification_connect(MsnNotification *notification,
				  const char *host, int port);
void msn_notification_disconnect(MsnNotification *notification);
void msn_notification_dump_contact(MsnSession *session);

/**
 * Closes a notification.
 *
 * It's first closed, and then disconnected.
 *
 * @param notification The notification object to close.
 */
void msn_notification_close(MsnNotification *notification);

void msn_got_login_params(MsnSession *session, const char *ticket, const char *response);

#endif /* _MSN_NOTIFICATION_H_ */