reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
MOHManager.hxx
Go to the documentation of this file.
1#if !defined(MOHManager_hxx)
2#define MOHManager_hxx
3
4#include <map>
5#include <set>
6#include "ActiveCallInfo.hxx"
7#include "../UserAgent.hxx"
8#include "../HandleTypes.hxx"
9#include "ConfigParser.hxx"
10
11namespace mohparkserver
12{
13class Server;
14
24
26{
27public:
28 MOHManager(Server& server);
29 virtual ~MOHManager();
30
32 void initializeConversationProfile(const resip::NameAddr& uri, const resip::Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy);
34
36
41
42private:
43 resip::Mutex mMutex;
44 Server& mServer;
45 volatile recon::ConversationProfileHandle mConversationProfileHandle;
46 resip::NameAddr mMOHUri; // The main AOR we are registing as
47 resip::Uri mMusicFilename;
48 volatile bool mMusicFilenameChanged;
49
50 typedef std::map<recon::ParticipantHandle, ParticipantMOHInfo*> ParticipantMap;
51 typedef std::map<recon::ConversationHandle, ParticipantMap> ConversationMap;
52 ConversationMap mConversations;
53};
54
55}
56
57#endif
58
59/* ====================================================================
60
61 Copyright (c) 2010-2016, SIP Spectrum, Inc.
62 All rights reserved.
63
64 Redistribution and use in source and binary forms, with or without
65 modification, are permitted provided that the following conditions are
66 met:
67
68 1. Redistributions of source code must retain the above copyright
69 notice, this list of conditions and the following disclaimer.
70
71 2. Redistributions in binary form must reproduce the above copyright
72 notice, this list of conditions and the following disclaimer in the
73 documentation and/or other materials provided with the distribution.
74
75 3. Neither the name of SIP Spectrum nor the names of its contributors
76 may be used to endorse or promote products derived from this
77 software without specific prior written permission.
78
79 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
80 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
81 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
82 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
83 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
84 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
85 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
86 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
87 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
88 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
89 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
90
91 ==================================================================== */
92
bool removeParticipant(recon::ParticipantHandle participantHandle)
void startup(ConfigParser::MOHSettings &settings)
void addParticipant(recon::ParticipantHandle participantHandle, const resip::Uri &heldUri, const resip::Uri &holdingUri)
void shutdown(bool shuttingDownServer)
void getActiveCallsInfo(CallInfoList &callInfos)
void initializeSettings(const resip::Uri &musicFilename)
bool isMyProfile(recon::ConversationProfile &profile)
void initializeConversationProfile(const resip::NameAddr &uri, const resip::Data &password, unsigned long registrationTime, const resip::NameAddr &outboundProxy)
ParticipantMOHInfo(recon::ParticipantHandle participantHandle, const resip::Uri &heldUri, const resip::Uri &holdingUri)
recon::ParticipantHandle mParticipantHandle
This class extends the resip UserProfile to include Conversation Manager specific settings.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Definition NameAddr.hxx:19
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
std::list< ActiveCallInfo > CallInfoList
unsigned int ConversationProfileHandle
unsigned int ParticipantHandle
std::mutex Mutex
A semaphore that can be locked by only one thread at a time.
Definition Mutex.hxx:37
void list()
Definition userAdmin.cxx:66