~ubuntu-branches/ubuntu/saucy/resiprocate/saucy-proposed

« back to all changes in this revision

Viewing changes to resip/recon/MediaInterface.hxx

  • Committer: Package Import Robot
  • Author(s): Daniel Pocock
  • Date: 2012-05-17 19:29:59 UTC
  • Revision ID: package-import@ubuntu.com-20120517192959-vv00m77isztdy64q
Tags: upstream-1.8.2
ImportĀ upstreamĀ versionĀ 1.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if !defined(MediaInterface_hxx)
 
2
#define MediaInterface_hxx
 
3
 
 
4
#include <os/OsMsgDispatcher.h>
 
5
#include <mi/CpMediaInterface.h>
 
6
#include "HandleTypes.hxx"
 
7
 
 
8
namespace recon
 
9
{
 
10
class ConversationManager;
 
11
 
 
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
 
17
{
 
18
public:
 
19
   MediaInterface(ConversationManager& conversationManager, ConversationHandle ownerConversationHandle, CpMediaInterface* mediaInterface);
 
20
   ~MediaInterface() { mMediaInterface->release(); }
 
21
   CpMediaInterface* getInterface() { return mMediaInterface; }
 
22
private:
 
23
   virtual OsStatus post(const OsMsg& msg);
 
24
 
 
25
   ConversationManager& mConversationManager;
 
26
   ConversationHandle mOwnerConversationHandle;
 
27
   CpMediaInterface* mMediaInterface;
 
28
};
 
29
 
 
30
}
 
31
 
 
32
#endif
 
33
 
 
34
 
 
35
/* ====================================================================
 
36
 
 
37
 Copyright (c) 2010, SIP Spectrum, Inc.
 
38
 All rights reserved.
 
39
 
 
40
 Redistribution and use in source and binary forms, with or without
 
41
 modification, are permitted provided that the following conditions are 
 
42
 met:
 
43
 
 
44
 1. Redistributions of source code must retain the above copyright 
 
45
    notice, this list of conditions and the following disclaimer. 
 
46
 
 
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. 
 
50
 
 
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. 
 
54
 
 
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.
 
66
 
 
67
 ==================================================================== */