OPAL
Version 3.14.3
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
sipim.h
Go to the documentation of this file.
1
/*
2
* sipim.h
3
*
4
* Support for SIP session mode IM
5
*
6
* Open Phone Abstraction Library (OPAL)
7
*
8
* Copyright (c) 2008 Post Increment
9
*
10
* The contents of this file are subject to the Mozilla Public License
11
* Version 1.0 (the "License"); you may not use this file except in
12
* compliance with the License. You may obtain a copy of the License at
13
* http://www.mozilla.org/MPL/
14
*
15
* Software distributed under the License is distributed on an "AS IS"
16
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17
* the License for the specific language governing rights and limitations
18
* under the License.
19
*
20
* The Original Code is Open Phone Abstraction Library.
21
*
22
* The Initial Developer of the Original Code is Post Increment
23
*
24
* Contributor(s): ______________________________________.
25
*
26
* $Revision: 29536 $
27
* $Author: rjongbloed $
28
* $Date: 2013-04-19 18:55:15 +1000 (Fri, 19 Apr 2013) $
29
*/
30
31
#ifndef OPAL_IM_SIPIM_H
32
#define OPAL_IM_SIPIM_H
33
34
#include <ptlib.h>
35
#include <
opal_config.h
>
36
37
#if OPAL_HAS_SIPIM
38
39
#include <
opal/mediasession.h
>
40
#include <
sip/sippdu.h
>
41
#include <
im/im.h
>
42
#include <
im/rfc4103.h
>
43
44
46
65
class
OpalSIPIMContext
:
public
OpalIMContext
66
{
67
public
:
68
OpalSIPIMContext
();
69
70
virtual
bool
Open
(
bool
byRemote);
71
virtual
bool
SendCompositionIndication
(
const
CompositionInfo
& info);
72
73
static
void
OnMESSAGECompleted
(
74
SIPEndPoint
& endpoint,
75
const
SIPMessage::Params
& params,
76
SIP_PDU::StatusCodes
reason
77
);
78
static
void
OnReceivedMESSAGE
(
79
SIPEndPoint
& endpoint,
80
SIPConnection
* connection,
81
SIP_PDU
& pdu
82
);
83
84
protected
:
85
virtual
MessageDisposition
InternalSendOutsideCall
(
OpalIM
& message);
86
virtual
MessageDisposition
InternalSendInsideCall
(
OpalIM
& message);
87
88
virtual
MessageDisposition
OnMessageReceived
(
const
OpalIM
& message);
89
90
virtual
MessageDisposition
InternalOnCompositionIndication
(
const
OpalIM
& message);
91
virtual
MessageDisposition
InternalOnDisposition
(
const
OpalIM
& message);
92
93
void
PopulateParams
(
SIPMessage::Params
& params,
const
OpalIM
& message);
94
95
PDECLARE_NOTIFIER
(PTimer,
OpalSIPIMContext
, OnRxCompositionIdleTimer);
96
PDECLARE_NOTIFIER
(PTimer,
OpalSIPIMContext
, OnTxCompositionIdleTimer);
97
98
PString
m_rxCompositionState
;
99
PTimer
m_rxCompositionIdleTimeout
;
100
PString
m_txCompositionState
;
101
PTimer
m_txCompositionIdleTimeout
;
102
PSimpleTimer
m_txCompositionRefreshTimeout
;
103
PTime
m_lastActive
;
104
};
105
106
108
109
#endif // OPAL_HAS_SIPIM
110
111
#endif // OPAL_IM_SIPIM_H
include
im
sipim.h
Generated on Fri Oct 10 2014 21:36:58 for OPAL by
1.8.3.1