Frameworks/libpurple.framework/Versions/2.10.12r8d2874a79747/Headers/notification.h
branchadium-1.5.11
changeset 6014 fcb71cb71a3d
parent 5941 307f53385811
parent 6013 f8d0dc659e3f
child 6016 325e2ab3406f
equal deleted inserted replaced
5941:307f53385811 6014:fcb71cb71a3d
     1 /**
       
     2  * @file notification.h Notification server functions
       
     3  *
       
     4  * purple
       
     5  *
       
     6  * Purple is the legal property of its developers, whose names are too numerous
       
     7  * to list here.  Please refer to the COPYRIGHT file distributed with this
       
     8  * source distribution.
       
     9  *
       
    10  * This program is free software; you can redistribute it and/or modify
       
    11  * it under the terms of the GNU General Public License as published by
       
    12  * the Free Software Foundation; either version 2 of the License, or
       
    13  * (at your option) any later version.
       
    14  *
       
    15  * This program is distributed in the hope that it will be useful,
       
    16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    18  * GNU General Public License for more details.
       
    19  *
       
    20  * You should have received a copy of the GNU General Public License
       
    21  * along with this program; if not, write to the Free Software
       
    22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
       
    23  */
       
    24 #ifndef MSN_NOTIFICATION_H
       
    25 #define MSN_NOTIFICATION_H
       
    26 
       
    27 typedef struct _MsnNotification MsnNotification;
       
    28 
       
    29 /* MSN protocol challenge info */
       
    30 
       
    31 /* MSNP18 challenge: WLM Version 2009 (Build 14.0.8089.726) */
       
    32 #define MSNP18_WLM_PRODUCT_KEY "C1BX{V4W}Q3*10SM"
       
    33 #define MSNP18_WLM_PRODUCT_ID "PROD0120PW!CCV9@"
       
    34 
       
    35 /* MSNP15 challenge: WLM 8.5.1288.816 */
       
    36 #define MSNP15_WLM_PRODUCT_KEY "ILTXC!4IXB5FB*PX"
       
    37 #define MSNP15_WLM_PRODUCT_ID "PROD0119GSJUC$18"
       
    38 
       
    39 /* MSNP13 challenge */
       
    40 #define MSNP13_WLM_PRODUCT_KEY	"O4BG@C7BWLYQX?5G"
       
    41 #define MSNP13_WLM_PRODUCT_ID	"PROD01065C%ZFN6F"
       
    42 
       
    43 #define MSNP10_PRODUCT_KEY		"VT6PX?UQTM4WM%YR"
       
    44 #define MSNP10_PRODUCT_ID		"PROD0038W!61ZTF9"
       
    45 
       
    46 #include "cmdproc.h"
       
    47 #include "msg.h"
       
    48 #include "session.h"
       
    49 #include "servconn.h"
       
    50 #include "state.h"
       
    51 #include "user.h"
       
    52 #include "userlist.h"
       
    53 
       
    54 struct _MsnNotification
       
    55 {
       
    56 	MsnSession *session;
       
    57 
       
    58 	/**
       
    59 	 * This is a convenience pointer that always points to
       
    60 	 * servconn->cmdproc
       
    61 	 */
       
    62 	MsnCmdProc *cmdproc;
       
    63 	MsnServConn *servconn;
       
    64 
       
    65 	gboolean in_use;
       
    66 };
       
    67 
       
    68 typedef void (*MsnFqyCb)(MsnSession *session, const char *passport, MsnNetwork network, gpointer data);
       
    69 
       
    70 /* Type used for msn_notification_send_uun */
       
    71 typedef enum {
       
    72 	MSN_UNIFIED_NOTIFICATION_SHARED_FOLDERS = 1,
       
    73 	MSN_UNIFIED_NOTIFICATION_UNKNOWN1 = 2,
       
    74 	MSN_UNIFIED_NOTIFICATION_P2P = 3,
       
    75 	MSN_UNIFIED_NOTIFICATION_MPOP = 4
       
    76 
       
    77 } MsnUnifiedNotificationType;
       
    78 
       
    79 void msn_notification_end(void);
       
    80 void msn_notification_init(void);
       
    81 
       
    82 void msn_notification_add_buddy_to_list(MsnNotification *notification,
       
    83 					MsnListId list_id, MsnUser *user);
       
    84 void msn_notification_rem_buddy_from_list(MsnNotification *notification,
       
    85 					  MsnListId list_id, MsnUser *user);
       
    86 
       
    87 void msn_notification_send_fqy(MsnSession *session,
       
    88                                const char *payload, int payload_len,
       
    89                                MsnFqyCb cb, gpointer cb_data);
       
    90 
       
    91 MsnNotification *msn_notification_new(MsnSession *session);
       
    92 void msn_notification_destroy(MsnNotification *notification);
       
    93 gboolean msn_notification_connect(MsnNotification *notification,
       
    94 				  const char *host, int port);
       
    95 void msn_notification_disconnect(MsnNotification *notification);
       
    96 void msn_notification_dump_contact(MsnSession *session);
       
    97 
       
    98 void msn_notification_send_uum(MsnSession *session, MsnMessage *msg);
       
    99 
       
   100 void msn_notification_send_uux(MsnSession *session, const char *payload);
       
   101 
       
   102 void msn_notification_send_uux_endpointdata(MsnSession *session);
       
   103 
       
   104 void msn_notification_send_uux_private_endpointdata(MsnSession *session);
       
   105 
       
   106 void msn_notification_send_uun(MsnSession *session,
       
   107                                const char *user,
       
   108                                MsnUnifiedNotificationType type,
       
   109                                const char *payload);
       
   110 
       
   111 void msn_notification_send_circle_auth(MsnSession *session, const char *ticket);
       
   112 
       
   113 /**
       
   114  * Closes a notification.
       
   115  *
       
   116  * It's first closed, and then disconnected.
       
   117  *
       
   118  * @param notification The notification object to close.
       
   119  */
       
   120 void msn_notification_close(MsnNotification *notification);
       
   121 
       
   122 void msn_got_login_params(MsnSession *session, const char *ticket, const char *response);
       
   123 
       
   124 #endif /* MSN_NOTIFICATION_H */