sipdialogpresenceserver.h

来自「MiniSip Client with DomainKeys Authentic」· C头文件 代码 · 共 91 行

H
91
字号
/* Copyright (C) 2004-2006 the Minisip Team  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.  You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA *//* Copyright (C) 2004  * * Authors: Erik Eliasson <eliasson@it.kth.se> *          Johan Bilien <jobi@via.ecp.fr>*//* Name * 	SipDialogPresenceServer.h * Author * 	Erik Eliasson, eliasson@it.kth.se * Purpose * */#ifndef SipDialogPresenceServer_H#define SipDialogPresenceServer_H#include<libminisip/libminisip_config.h>#include<libmutil/StateMachine.h>#include<libmutil/minilist.h>#include<libmsip/SipDialog.h>#include<libmsip/SipTransaction.h>#include<libmsip/SipResponse.h>#include<libminisip/sip/SipSoftPhoneConfiguration.h>class Session;class SipDialogContainer;class SipDialogConfig;class LogEntry;class LIBMINISIP_API SipDialogPresenceServer: public SipDialog{	public:		SipDialogPresenceServer(MRef<SipStack*> dContainer, MRef<SipDialogConfig*> callconfig, bool use_stun);				virtual ~SipDialogPresenceServer();		virtual std::string getMemObjectType(){return "SipDialogPresenceServer";}				virtual  std::string getName(){return "SipDialogPresenceServer[callid="+dialogState.callId +"]";}		virtual bool handleCommand(const SipSMCommand &command);		void setUpStateMachine();	private:		void sendNoticeToAll( std::string onlineStatus);		void sendNotice( std::string onlinestatus,  std::string user);		void sendSubscribeOk(MRef<SipRequest*> sub);		void removeUser( std::string user);		void addUser( std::string user);				void sendNotify(const  std::string &branch,  std::string toUri,  std::string callId);//		void createNotifyClientTransaction();				bool a0_start_default_startpresenceserver(const SipSMCommand &command);		bool a1_default_default_timerremovesubscriber(const SipSMCommand &command);		bool a2_default_default_localpresenceupdated(const SipSMCommand &command);		bool a3_default_termwait_stoppresenceserver(const SipSMCommand &command);		bool a4_termwait_terminated_notransactions(const SipSMCommand &command);		bool a5_default_default_SUBSCRIBE(const SipSMCommand &command);		bool useSTUN;		minilist< std::string> subscribing_users;		Mutex usersLock;		 std::string onlineStatus;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?