Frameworks/libpurple.framework/Versions/0.5.6/Headers/oim.h
branchadium-1.3
changeset 350 708bedafdc3a
parent 349 17ef128722b7
child 351 b01ab9b157f9
     1.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/oim.h	Sun Jun 21 22:04:11 2009 -0400
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,163 +0,0 @@
     1.4 -/**
     1.5 - * @file oim.h			Header file for oim.c
     1.6 - *	Author
     1.7 - *		MaYuan<mayuan2006@gmail.com>
     1.8 - * purple
     1.9 - *
    1.10 - * Purple is the legal property of its developers, whose names are too numerous
    1.11 - * to list here.  Please refer to the COPYRIGHT file distributed with this
    1.12 - * source distribution.
    1.13 - *
    1.14 - * This program is free software; you can redistribute it and/or modify
    1.15 - * it under the terms of the GNU General Public License as published by
    1.16 - * the Free Software Foundation; either version 2 of the License, or
    1.17 - * (at your option) any later version.
    1.18 - *
    1.19 - * This program is distributed in the hope that it will be useful,
    1.20 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.21 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.22 - * GNU General Public License for more details.
    1.23 - *
    1.24 - * You should have received a copy of the GNU General Public License
    1.25 - * along with this program; if not, write to the Free Software
    1.26 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.27 - */
    1.28 -#ifndef _MSN_OIM_H_
    1.29 -#define _MSN_OIM_H_
    1.30 -
    1.31 -/* OIM Retrieval Info */
    1.32 -#define MSN_OIM_RETRIEVE_HOST	"rsi.hotmail.com"
    1.33 -#define MSN_OIM_RETRIEVE_URL	"/rsi/rsi.asmx"
    1.34 -
    1.35 -/* OIM GetMetadata SOAP Template */
    1.36 -#define MSN_OIM_GET_METADATA_ACTION "http://www.hotmail.msn.com/ws/2004/09/oim/rsi/GetMetadata"
    1.37 -
    1.38 -#define MSN_OIM_GET_METADATA_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
    1.39 -"<soap:Envelope"\
    1.40 -	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
    1.41 -	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
    1.42 -	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
    1.43 -	"<soap:Header>"\
    1.44 -		"<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
    1.45 -			"<t>EMPTY</t>"\
    1.46 -			"<p>EMPTY</p>"\
    1.47 -		"</PassportCookie>"\
    1.48 -	"</soap:Header>"\
    1.49 -	"<soap:Body>"\
    1.50 -		"<GetMetadata xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\" />"\
    1.51 -	"</soap:Body>"\
    1.52 -"</soap:Envelope>"
    1.53 -
    1.54 -/*OIM GetMessage SOAP Template*/
    1.55 -#define MSN_OIM_GET_SOAP_ACTION	"http://www.hotmail.msn.com/ws/2004/09/oim/rsi/GetMessage"
    1.56 -
    1.57 -#define MSN_OIM_GET_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
    1.58 -"<soap:Envelope"\
    1.59 -	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
    1.60 -	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
    1.61 -	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
    1.62 -	"<soap:Header>"\
    1.63 -		"<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
    1.64 -			"<t>EMPTY</t>"\
    1.65 -			"<p>EMPTY</p>"\
    1.66 -		"</PassportCookie>"\
    1.67 -	"</soap:Header>"\
    1.68 -	"<soap:Body>"\
    1.69 -		"<GetMessage xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
    1.70 -			"<messageId>%s</messageId>"\
    1.71 -			"<alsoMarkAsRead>false</alsoMarkAsRead>"\
    1.72 -		"</GetMessage>"\
    1.73 -	"</soap:Body>"\
    1.74 -"</soap:Envelope>"
    1.75 -
    1.76 -/*OIM DeleteMessages SOAP Template*/
    1.77 -#define MSN_OIM_DEL_SOAP_ACTION	"http://www.hotmail.msn.com/ws/2004/09/oim/rsi/DeleteMessages"
    1.78 -
    1.79 -#define MSN_OIM_DEL_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
    1.80 -"<soap:Envelope"\
    1.81 -	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
    1.82 -	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
    1.83 -	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
    1.84 -	"<soap:Header>"\
    1.85 -		"<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
    1.86 -			"<t>EMPTY</t>"\
    1.87 -			"<p>EMPTY</p>"\
    1.88 -		"</PassportCookie>"\
    1.89 -	"</soap:Header>"\
    1.90 -	"<soap:Body>"\
    1.91 -		"<DeleteMessages xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
    1.92 -			"<messageIds>"\
    1.93 -				"<messageId>%s</messageId>"\
    1.94 -			"</messageIds>"\
    1.95 -		"</DeleteMessages>"\
    1.96 -	"</soap:Body>"\
    1.97 -"</soap:Envelope>"
    1.98 -
    1.99 -/*OIM Send SOAP Template*/
   1.100 -#define MSN_OIM_MSG_TEMPLATE "MIME-Version: 1.0\n"\
   1.101 -	"Content-Type: text/plain; charset=UTF-8\n"\
   1.102 -	"Content-Transfer-Encoding: base64\n"\
   1.103 -	"X-OIM-Message-Type: OfflineMessage\n"\
   1.104 -	"X-OIM-Run-Id: {%s}\n"\
   1.105 -	"X-OIM-Sequence-Num: %d\n\n"
   1.106 -
   1.107 -#define MSN_OIM_SEND_HOST	"ows.messenger.msn.com"
   1.108 -#define MSN_OIM_SEND_URL	"/OimWS/oim.asmx"
   1.109 -#define MSN_OIM_SEND_SOAP_ACTION	"http://messenger.live.com/ws/2006/09/oim/Store2"
   1.110 -#define MSN_OIM_SEND_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
   1.111 -"<soap:Envelope"\
   1.112 -	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
   1.113 -	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
   1.114 -	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
   1.115 -	"<soap:Header>"\
   1.116 -		"<From"\
   1.117 -			" memberName=\"%s\""\
   1.118 -			" friendlyName=\"%s\""\
   1.119 -			" xml:lang=\"en-US\""\
   1.120 -			" proxy=\"MSNMSGR\""\
   1.121 -			" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\""\
   1.122 -			" msnpVer=\"MSNP15\""\
   1.123 -			" buildVer=\"8.5.1288\"/>"\
   1.124 -		"<To memberName=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>"\
   1.125 -		"<Ticket passport=\"EMPTY\" appid=\"%s\" lockkey=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>"\
   1.126 -		"<Sequence xmlns=\"http://schemas.xmlsoap.org/ws/2003/03/rm\">"\
   1.127 -			"<Identifier xmlns=\"http://schemas.xmlsoap.org/ws/2002/07/utility\">http://messenger.msn.com</Identifier>"\
   1.128 -			"<MessageNumber>%d</MessageNumber>"\
   1.129 -		"</Sequence>"\
   1.130 -	"</soap:Header>"\
   1.131 -	"<soap:Body>"\
   1.132 -		"<MessageType xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\">text</MessageType>"\
   1.133 -		"<Content xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\">%s</Content>"\
   1.134 -	"</soap:Body>"\
   1.135 -"</soap:Envelope>"
   1.136 -
   1.137 -typedef struct _MsnOim MsnOim;
   1.138 -
   1.139 -struct _MsnOim
   1.140 -{
   1.141 -	MsnSession *session;
   1.142 -
   1.143 -	GList * oim_list;
   1.144 -
   1.145 -	char *challenge;
   1.146 -	char *run_id;
   1.147 -	gint send_seq;
   1.148 -	GQueue *send_queue;
   1.149 -};
   1.150 -
   1.151 -/****************************************************
   1.152 - * function prototype
   1.153 - * **************************************************/
   1.154 -MsnOim * msn_oim_new(MsnSession *session);
   1.155 -void msn_oim_destroy(MsnOim *oim);
   1.156 -
   1.157 -void msn_parse_oim_msg(MsnOim *oim,const char *xmlmsg);
   1.158 -
   1.159 -/*Send OIM Message*/
   1.160 -void msn_oim_prep_send_msg_info(MsnOim *oim, const char *membername,
   1.161 -								const char *friendname, const char *tomember,
   1.162 -								const char * msg);
   1.163 -
   1.164 -void msn_oim_send_msg(MsnOim *oim);
   1.165 -
   1.166 -#endif/* _MSN_OIM_H_*/