📄 xmpp__c2s_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>xmpp_c2s.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>xmpp_c2s.h</h1><a href="xmpp__c2s_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * xmpp_c2s.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Extensible Messaging and Presence Protocol (XMPP) Core</span>00005 <span class="comment"> * Client to Server communication classes</span>00006 <span class="comment"> *</span>00007 <span class="comment"> * Portable Windows Library</span>00008 <span class="comment"> *</span>00009 <span class="comment"> * Copyright (c) 2004 Reitek S.p.A.</span>00010 <span class="comment"> *</span>00011 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00012 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00013 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00014 <span class="comment"> * http://www.mozilla.org/MPL/</span>00015 <span class="comment"> *</span>00016 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00017 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00018 <span class="comment"> * the License for the specific language governing rights and limitations</span>00019 <span class="comment"> * under the License.</span>00020 <span class="comment"> *</span>00021 <span class="comment"> * The Original Code is Portable Windows Library.</span>00022 <span class="comment"> *</span>00023 <span class="comment"> * The Initial Developer of the Original Code is Post Increment</span>00024 <span class="comment"> *</span>00025 <span class="comment"> * Contributor(s): ______________________________________.</span>00026 <span class="comment"> *</span>00027 <span class="comment"> * $Log: xmpp_c2s.h,v $</span>00028 <span class="comment"> * Revision 1.6 2004/05/09 07:23:46 rjongbloed</span>00029 <span class="comment"> * More work on XMPP, thanks Federico Pinna and Reitek S.p.A.</span>00030 <span class="comment"> *</span>00031 <span class="comment"> * Revision 1.5 2004/04/28 11:26:42 csoutheren</span>00032 <span class="comment"> * Hopefully fixed SASL and SASL2 problems</span>00033 <span class="comment"> *</span>00034 <span class="comment"> * Revision 1.4 2004/04/26 19:44:30 dsandras</span>00035 <span class="comment"> * Fixes compilation with P_SASL = 0.</span>00036 <span class="comment"> *</span>00037 <span class="comment"> * Revision 1.3 2004/04/26 01:51:57 rjongbloed</span>00038 <span class="comment"> * More implementation of XMPP, thanks a lot to Federico Pinna & Reitek S.p.A.</span>00039 <span class="comment"> *</span>00040 <span class="comment"> * Revision 1.2 2004/04/23 06:07:24 csoutheren</span>00041 <span class="comment"> * Added #if P_SASL to allow operation without SASL</span>00042 <span class="comment"> *</span>00043 <span class="comment"> * Revision 1.1 2004/04/22 12:31:00 rjongbloed</span>00044 <span class="comment"> * Added PNotifier extensions and XMPP (Jabber) support,</span>00045 <span class="comment"> * thanks to Federico Pinna and Reitek S.p.A.</span>00046 <span class="comment"> *</span>00047 <span class="comment"> *</span>00048 <span class="comment"> */</span>00049 00050 <span class="preprocessor">#ifndef _XMPP_C2S</span>00051 <span class="preprocessor"></span><span class="preprocessor">#define _XMPP_C2S</span>00052 <span class="preprocessor"></span>00053 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00054 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00055 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00056 <span class="preprocessor"></span>00057 <span class="preprocessor">#include <<a class="code" href="xmpp_8h.html">ptclib/xmpp.h</a>></span>00058 00059 <span class="preprocessor">#if P_EXPAT</span>00060 <span class="preprocessor"></span>00061 <span class="preprocessor">#include <<a class="code" href="psasl_8h.html">ptclib/psasl.h</a>></span>00062 <span class="preprocessor">#include <<a class="code" href="sockets_8h.html">ptlib/sockets.h</a>></span>00063 00064 00066 00067 <span class="keyword">namespace </span>XMPP00068 {00069 <span class="keyword">namespace </span>C2S00070 {00071 00074 <span class="keyword">class </span>TCPTransport : <span class="keyword">public</span> Transport00075 {00076 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(TCPTransport, Transport);00077 00078 <span class="keyword">public</span>:00079 TCPTransport(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a>& hostname);00080 TCPTransport(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a>& hostname, WORD port);00081 ~TCPTransport();00082 00083 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a>& GetServerHost()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Hostname; }00084 WORD GetServerPort()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Port; }00085 00086 <span class="keyword">virtual</span> BOOL Open();00087 <span class="keyword">virtual</span> BOOL Close();00088 00089 <span class="keyword">protected</span>:00090 <a class="code" href="classPString.html">PString</a> m_Hostname;00091 WORD m_Port;00092 <a class="code" href="classPTCPSocket.html">PTCPSocket</a> * m_Socket;00093 };00094 00095 00099 <span class="keyword">class </span>StreamHandler : <span class="keyword">public</span> BaseStreamHandler00100 {00101 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(StreamHandler, BaseStreamHandler);00102 00103 <span class="keyword">public</span>:00104 StreamHandler(<span class="keyword">const</span> JID& jid, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a>& pwd, BOOL newAccount = FALSE);00105 ~StreamHandler();00106 00107 <span class="keyword">virtual</span> BOOL IsEstablished()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_State == Established; }00108 00109 <span class="keyword">virtual</span> BOOL Start(Transport * transport = 0);00110 00117 BOOL Send(Stanza * stanza);00118 00119 <span class="keywordtype">void</span> SetVersion(WORD major, WORD minor);00120 <span class="keywordtype">void</span> GetVersion(WORD& major, WORD& minor) <span class="keyword">const</span>;00121 00122 <span class="keyword">const</span> JID& GetJID()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_JID; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -