1
#if !defined(MediaInterface_hxx)
2
#define MediaInterface_hxx
4
#include <os/OsMsgDispatcher.h>
5
#include <mi/CpMediaInterface.h>
6
#include "HandleTypes.hxx"
10
class ConversationManager;
12
// Wrapper class to allow CpMediaIterface to be stored in a SharedPtr.
13
// Note: CpMediaIterface cannot be directly stored in a SharePtr because
14
// the destructor is private and the release() call must be used
15
// to destroy the object.
16
class MediaInterface : public OsMsgDispatcher
19
MediaInterface(ConversationManager& conversationManager, ConversationHandle ownerConversationHandle, CpMediaInterface* mediaInterface);
20
~MediaInterface() { mMediaInterface->release(); }
21
CpMediaInterface* getInterface() { return mMediaInterface; }
23
virtual OsStatus post(const OsMsg& msg);
25
ConversationManager& mConversationManager;
26
ConversationHandle mOwnerConversationHandle;
27
CpMediaInterface* mMediaInterface;
35
/* ====================================================================
37
Copyright (c) 2010, SIP Spectrum, Inc.
40
Redistribution and use in source and binary forms, with or without
41
modification, are permitted provided that the following conditions are
44
1. Redistributions of source code must retain the above copyright
45
notice, this list of conditions and the following disclaimer.
47
2. Redistributions in binary form must reproduce the above copyright
48
notice, this list of conditions and the following disclaimer in the
49
documentation and/or other materials provided with the distribution.
51
3. Neither the name of SIP Spectrum nor the names of its contributors
52
may be used to endorse or promote products derived from this
53
software without specific prior written permission.
55
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
56
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
57
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
58
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
59
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
61
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
62
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
65
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67
==================================================================== */