📄 xmpp__muc_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_muc.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_muc.h</h1><a href="xmpp__muc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * xmpp_muc.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Extensible Messaging and Presence Protocol (XMPP)</span>00005 <span class="comment"> * JEP-0045 Multi-User Chat</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_muc.h,v $</span>00028 <span class="comment"> * Revision 1.1 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"> *</span>00032 <span class="comment"> */</span>00033 00034 <span class="preprocessor">#ifndef _XMPP_MUC</span>00035 <span class="preprocessor"></span><span class="preprocessor">#define _XMPP_MUC</span>00036 <span class="preprocessor"></span>00037 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00038 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00039 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00040 <span class="preprocessor"></span>00041 <span class="preprocessor">#include <<a class="code" href="xmpp__c2s_8h.html">ptclib/xmpp_c2s.h</a>></span>00042 00043 <span class="preprocessor">#if P_EXPAT</span>00044 <span class="preprocessor"></span>00046 00047 <span class="keyword">namespace </span>XMPP00048 {00049 <span class="keyword">namespace </span>MUC00050 {00051 <span class="keyword">extern</span> <a class="code" href="classPString.html">PString</a> Namespace;00052 00053 <span class="keyword">class </span>User : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00054 {00055 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(User, <a class="code" href="classPObject.html">PObject</a>);00056 <span class="keyword">public</span>:00057 <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> Namespace;00058 00059 <span class="keyword">enum</span> Role {00060 None,00061 Moderator,00062 Participant,00063 Visitor,00064 Unknown = 99900065 };00066 00067 <span class="keyword">enum</span> Affiliation {00068 None_a,00069 Owner,00070 Admin,00071 Member,00072 Outcast,00073 Unknown_a = 99900074 };00075 00076 <a class="code" href="classPString.html">PString</a> m_Nick;00077 Role m_Role;00078 Affiliation m_Affiliation;00079 00080 Comparison Compare(<span class="keyword">const</span> <a class="code" href="classPObject.html">PObject</a> & obj) <span class="keyword">const</span>;00081 };00082 <a class="code" href="lists_8h.html#a6">PSORTED_LIST</a>(Users, User);00083 00084 <span class="keyword">class </span>Room : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00085 {00086 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(Room, <a class="code" href="classPObject.html">PObject</a>);00087 <a class="code" href="notifier__ext_8h.html#a0">PDECLARE_SMART_NOTIFIEE</a>;00088 <span class="keyword">public</span>:00089 Room(C2S::StreamHandler * handler, <span class="comment">// The C2S stream handler</span>00090 <span class="keyword">const</span> JID& jid, <span class="comment">// The room's jid</span>00091 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a>& nick); <span class="comment">// Our user in the room</span>00092 00093 <span class="keyword">const</span> User& GetUser()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_User; }00094 <span class="keyword">const</span> Users& GetOtherUsers()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_OtherUsers; }00095 00096 <span class="keyword">virtual</span> BOOL Enter();00097 <span class="keyword">virtual</span> BOOL Leave();00098 <span class="keyword">virtual</span> BOOL SendMessage(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a>& msg);00099 <span class="keyword">virtual</span> BOOL SendMessage(Message& msg);00100 00101 <span class="comment">// Event methods</span>00102 <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnMessage(Message& msg);00103 <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnRoomJoined();00104 <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnRoomLeft();00105 <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnUserAdded(User& user);00106 <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnUserRemoved(User& user);00107 <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnUserChanged(User& user);00108 00109 <span class="keyword">protected</span>:00110 <a class="code" href="notifier__ext_8h.html#a2">PDECLARE_SMART_NOTIFIER</a>(C2S::StreamHandler, Room, OnSessionReleased);00111 <a class="code" href="notifier__ext_8h.html#a2">PDECLARE_SMART_NOTIFIER</a>(Message, Room, OnMessage);00112 <a class="code" href="notifier__ext_8h.html#a2">PDECLARE_SMART_NOTIFIER</a>(Presence, Room, OnPresence);00113 00114 C2S::StreamHandler * m_Handler;00115 BareJID m_RoomJID;00116 User m_User;00117 Users m_OtherUsers;00118 00119 <a class="code" href="classPNotifierList.html">PNotifierList</a> m_MessageHandlers;00120 <a class="code" href="classPNotifierList.html">PNotifierList</a> m_RoomJoinedHandlers;00121 <a class="code" href="classPNotifierList.html">PNotifierList</a> m_RoomLeftHandlers;00122 <a class="code" href="classPNotifierList.html">PNotifierList</a> m_UserAddedHandlers;00123 <a class="code" href="classPNotifierList.html">PNotifierList</a> m_UserRemovedHandlers;00124 <a class="code" href="classPNotifierList.html">PNotifierList</a> m_UserChangedHandlers;00125 };00126 00127 } <span class="comment">// namespace MUC</span>00128 } <span class="comment">// namespace XMPP</span>00129 00130 00131 <span class="preprocessor">#endif // P_EXPAT</span>00132 <span class="preprocessor"></span>00133 <span class="preprocessor">#endif // _XMPP_MUC</span>00134 <span class="preprocessor"></span>00135 <span class="comment">// End of File ///////////////////////////////////////////////////////////////</span>00136 00137 00138 </pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:12 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -