Changes in protocols/msn/msn.h [27053b5:8b01217]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.h
r27053b5 r8b01217 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 10Wilmer van der Gaast and others *4 * Copyright 2002-2004 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 39 39 #endif 40 40 41 /* This should be MSN Messenger 7.0.0813 42 #define MSNP11_PROD_KEY "CFHUR$52U_{VIX5T" 43 #define MSNP11_PROD_ID "PROD0101{0RM?UBW" 44 */ 45 46 #define MSN_NS_HOST "messenger.hotmail.com" 47 #define MSN_NS_PORT 1863 48 49 /* Some other version. 50 #define MSNP11_PROD_KEY "O4BG@C7BWLYQX?5G" 51 #define MSNP11_PROD_ID "PROD01065C%ZFN6F" 52 */ 53 54 #define MSNP11_PROD_KEY "ILTXC!4IXB5FB*PX" 55 #define MSNP11_PROD_ID "PROD0119GSJUC$18" 56 #define MSNP_VER "MSNP15" 57 #define MSNP_BUILD "8.5.1288" 41 #define QRY_NAME "msmsgs@msnmsgr.com" 42 #define QRY_CODE "Q1P7W2E4J9R8U3S5" 58 43 59 44 #define MSN_SB_NEW -24062002 … … 76 61 #define PROFILE_URL "http://members.msn.com/" 77 62 78 typedef enum79 {80 MSN_GOT_PROFILE = 1,81 MSN_GOT_PROFILE_DN = 2,82 MSN_DONE_ADL = 4,83 MSN_REAUTHING = 8,84 } msn_flags_t;85 86 struct msn_handler_data87 {88 int fd, inpa;89 int rxlen;90 char *rxq;91 92 int msglen;93 char *cmd_text;94 95 /* Either ic or sb */96 gpointer data;97 98 int (*exec_command) ( struct msn_handler_data *handler, char **cmd, int count );99 int (*exec_message) ( struct msn_handler_data *handler, char *msg, int msglen, char **cmd, int count );100 };101 102 63 struct msn_data 103 64 { 104 65 struct im_connection *ic; 105 66 106 struct msn_handler_data ns[1];107 msn_flags_t flags;67 int fd; 68 struct msn_handler_data *handler; 108 69 109 70 int trId; 110 char *tokens[4]; 111 char *lock_key, *pp_policy; 112 113 GSList *msgq, *grpq, *soapq; 71 72 GSList *msgq, *grpq; 114 73 GSList *switchboards; 115 74 int sb_failures; 116 75 time_t first_sb_failure; 76 GSList *filetransfers; 117 77 118 78 const struct msn_away_state *away_state; 119 GSList *groups; 120 121 /* Mostly used for sending the ADL command; since MSNP13 the client 122 is responsible for downloading the contact list and then sending 123 it to the MSNP server. */ 124 GTree *domaintree; 125 int adl_todo; 79 int buddycount; 80 int groupcount; 81 char **grouplist; 126 82 }; 127 83 … … 130 86 struct im_connection *ic; 131 87 132 /* The following two are also in the handler. TODO: Clean up. */133 88 int fd; 134 89 gint inp; … … 172 127 }; 173 128 174 typedef enum 175 { 176 MSN_BUDDY_FL = 1, /* Warning: FL,AL,BL *must* be 1,2,4. */ 177 MSN_BUDDY_AL = 2, 178 MSN_BUDDY_BL = 4, 179 MSN_BUDDY_RL = 8, 180 MSN_BUDDY_PL = 16, 181 MSN_BUDDY_ADL_SYNCED = 256, 182 } msn_buddy_flags_t; 183 184 struct msn_buddy_data 185 { 186 char *cid; 187 msn_buddy_flags_t flags; 188 }; 189 190 struct msn_group 191 { 192 char *name; 193 char *id; 129 struct msn_handler_data 130 { 131 int fd; 132 int rxlen; 133 char *rxq; 134 135 int msglen; 136 char *cmd_text; 137 138 gpointer data; 139 140 int (*exec_command) ( gpointer data, char **cmd, int count ); 141 int (*exec_message) ( gpointer data, char *msg, int msglen, char **cmd, int count ); 194 142 }; 195 143 … … 213 161 214 162 /* ns.c */ 215 int msn_ns_write( struct im_connection *ic, int fd, const char *fmt, ... ); 216 gboolean msn_ns_connect( struct im_connection *ic, struct msn_handler_data *handler, const char *host, int port ); 217 void msn_ns_close( struct msn_handler_data *handler ); 218 void msn_auth_got_passport_token( struct im_connection *ic, const char *token, const char *error ); 219 void msn_auth_got_contact_list( struct im_connection *ic ); 220 int msn_ns_finish_login( struct im_connection *ic ); 163 gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond ); 221 164 222 165 /* msn_util.c */ 166 int msn_write( struct im_connection *ic, char *s, int len ); 223 167 int msn_logged_in( struct im_connection *ic ); 224 int msn_buddy_list_add( struct im_connection *ic, msn_buddy_flags_tlist, const char *who, const char *realname_, const char *group );225 int msn_buddy_list_remove( struct im_connection *ic, msn_buddy_flags_tlist, const char *who, const char *group );226 void msn_buddy_ask( bee_user_t *bu);168 int msn_buddy_list_add( struct im_connection *ic, const char *list, const char *who, const char *realname_, const char *group ); 169 int msn_buddy_list_remove( struct im_connection *ic, char *list, const char *who, const char *group ); 170 void msn_buddy_ask( struct im_connection *ic, char *handle, char *realname ); 227 171 char *msn_findheader( char *text, char *header, int len ); 228 172 char **msn_linesplit( char *line ); 229 173 int msn_handler( struct msn_handler_data *h ); 174 char *msn_http_encode( const char *input ); 230 175 void msn_msgq_purge( struct im_connection *ic, GSList **list ); 231 char *msn_p11_challenge( char *challenge ); 232 gint msn_domaintree_cmp( gconstpointer a_, gconstpointer b_ ); 233 struct msn_group *msn_group_by_name( struct im_connection *ic, const char *name ); 234 struct msn_group *msn_group_by_id( struct im_connection *ic, const char *id ); 235 int msn_ns_set_display_name( struct im_connection *ic, const char *value ); 176 gboolean msn_set_display_name( struct im_connection *ic, const char *rawname ); 236 177 237 178 /* tables.c */ … … 242 183 243 184 /* sb.c */ 244 int msn_sb_write( struct msn_switchboard *sb, c onst char *fmt, ...);185 int msn_sb_write( struct msn_switchboard *sb, char *s, int len ); 245 186 struct msn_switchboard *msn_sb_create( struct im_connection *ic, char *host, int port, char *key, int session ); 246 187 struct msn_switchboard *msn_sb_by_handle( struct im_connection *ic, char *handle ); … … 255 196 void msn_sb_stop_keepalives( struct msn_switchboard *sb ); 256 197 198 /* invitation.c */ 199 void msn_ftp_transfer_request( struct im_connection *ic, file_transfer_t *ft, char *who ); 200 257 201 #endif //_MSN_H
Note: See TracChangeset
for help on using the changeset viewer.