reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ClientPagerMessage.hxx
Go to the documentation of this file.
1
#if !defined(RESIP_CLIENTPAGERMESSAGE_HXX)
2
#define RESIP_CLIENTPAGERMESSAGE_HXX
3
4
#include "
resip/dum/NonDialogUsage.hxx
"
5
#include "
resip/stack/CSeqCategory.hxx
"
6
#include "
resip/stack/SipMessage.hxx
"
7
#include "
resip/dum/DialogUsageManager.hxx
"
8
#include <deque>
9
#include <memory>
10
11
namespace
resip
12
{
13
class
SipMessage;
14
15
class
ClientPagerMessage
:
public
NonDialogUsage
16
{
17
public
:
18
ClientPagerMessage
(
DialogUsageManager
& dum,
DialogSet
& dialogSet);
19
ClientPagerMessage
(
const
ClientPagerMessage
&) =
delete
;
20
ClientPagerMessage
(
ClientPagerMessage
&&) =
delete
;
21
22
ClientPagerMessage
&
operator=
(
const
ClientPagerMessage
&) =
delete
;
23
ClientPagerMessage
&
operator=
(
ClientPagerMessage
&&) =
delete
;
24
25
ClientPagerMessageHandle
getHandle
();
26
27
//allow the user to adorn the MESSAGE message if desired
29
//I don't know how this would interact with the queuing mechanism.
30
//Will come back to re-visit this in the future.
31
SipMessage
&
getMessageRequest
() noexcept;
32
std::shared_ptr<
SipMessage
>
getMessageRequestSharedPtr
() const noexcept {
return
mRequest; }
33
35
//queues the message if there is one sent but not yet received a response
36
//for it.
37
//asserts if contents->get() is NULL.
38
virtual
void
page
(std::unique_ptr<Contents> contents,
DialogUsageManager::EncryptionLevel
level=
DialogUsageManager::None
);
39
void
end
()
override
;
40
41
// Use this API if the application has ongoing pending messages and it is using
42
// getMessageRequest to modify the target routing information for messages (ie:
43
// requestUri or Route headers). This will cause the current pending message to
44
// be re-sent immediately using the new information that the application just set.
45
// Any onSuccess or onFailure callbacks that might result from the active pending
46
// message at the time this is called will be suppressed. Any messages queued
47
// behind that message will be dispatched sequentially to the new target.
48
void
newTargetInfoSet
();
49
53
virtual
void
endCommand
();
54
virtual
void
pageCommand
(std::unique_ptr<Contents> contents,
DialogUsageManager::EncryptionLevel
level=
DialogUsageManager::None
);
55
56
void
dispatch
(
const
SipMessage
& msg)
override
;
57
void
dispatch
(
const
DumTimeout
& timer)
override
;
58
59
size_t
msgQueued
()
const
;
60
61
EncodeStream
&
dump
(
EncodeStream
& strm)
const override
;
62
63
protected
:
64
virtual
~ClientPagerMessage
();
65
66
private
:
67
friend
class
DialogSet
;
68
69
//uses memory from creator
70
//SipMessage& mRequest;
71
std::shared_ptr<SipMessage> mRequest;
72
73
typedef
struct
74
{
75
DialogUsageManager::EncryptionLevel
encryptionLevel;
76
Contents
* contents;
77
} Item;
78
79
typedef
std::deque<Item> MsgQueue;
80
MsgQueue mMsgQueue;
81
bool
mEnded;
82
83
void
pageFirstMsgQueued();
84
void
clearMsgQueued();
85
};
86
87
}
88
89
#endif
90
91
/* ====================================================================
92
* The Vovida Software License, Version 1.0
93
*
94
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
95
*
96
* Redistribution and use in source and binary forms, with or without
97
* modification, are permitted provided that the following conditions
98
* are met:
99
*
100
* 1. Redistributions of source code must retain the above copyright
101
* notice, this list of conditions and the following disclaimer.
102
*
103
* 2. Redistributions in binary form must reproduce the above copyright
104
* notice, this list of conditions and the following disclaimer in
105
* the documentation and/or other materials provided with the
106
107
* distribution.
108
*
109
* 3. The names "VOCAL", "Vovida Open Communication Application Library",
110
* and "Vovida Open Communication Application Library (VOCAL)" must
111
* not be used to endorse or promote products derived from this
112
* software without prior written permission. For written
113
* permission, please contact vocal@vovida.org.
114
*
115
* 4. Products derived from this software may not be called "VOCAL", nor
116
* may "VOCAL" appear in their name, without prior written
117
* permission of Vovida Networks, Inc.
118
*
119
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
120
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
121
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
122
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
123
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
124
* IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
125
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
126
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
127
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
128
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
129
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
130
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
131
* DAMAGE.
132
*
133
* ====================================================================
134
*
135
* This software consists of voluntary contributions made by Vovida
136
* Networks, Inc. and many individuals on behalf of Vovida Networks,
137
* Inc. For more information on Vovida Networks, Inc., please see
138
* <http://www.vovida.org/>.
139
*
140
*/
CSeqCategory.hxx
DialogUsageManager.hxx
NonDialogUsage.hxx
SipMessage.hxx
resip::ClientPagerMessage
Definition
ClientPagerMessage.hxx:16
resip::ClientPagerMessage::endCommand
virtual void endCommand()
Provide asynchronous method access by using command.
Definition
ClientPagerMessage.cxx:292
resip::ClientPagerMessage::operator=
ClientPagerMessage & operator=(ClientPagerMessage &&)=delete
resip::ClientPagerMessage::dump
EncodeStream & dump(EncodeStream &strm) const override
Definition
ClientPagerMessage.cxx:327
resip::ClientPagerMessage::ClientPagerMessage
ClientPagerMessage(const ClientPagerMessage &)=delete
resip::ClientPagerMessage::getHandle
ClientPagerMessageHandle getHandle()
Definition
ClientPagerMessage.cxx:93
resip::ClientPagerMessage::pageCommand
virtual void pageCommand(std::unique_ptr< Contents > contents, DialogUsageManager::EncryptionLevel level=DialogUsageManager::None)
Definition
ClientPagerMessage.cxx:164
resip::ClientPagerMessage::dispatch
void dispatch(const SipMessage &msg) override
Definition
ClientPagerMessage.cxx:189
resip::ClientPagerMessage::newTargetInfoSet
void newTargetInfoSet()
Definition
ClientPagerMessage.cxx:178
resip::ClientPagerMessage::getMessageRequest
SipMessage & getMessageRequest() noexcept
kh!
Definition
ClientPagerMessage.cxx:112
resip::ClientPagerMessage::operator=
ClientPagerMessage & operator=(const ClientPagerMessage &)=delete
resip::ClientPagerMessage::ClientPagerMessage
ClientPagerMessage(ClientPagerMessage &&)=delete
resip::ClientPagerMessage::~ClientPagerMessage
virtual ~ClientPagerMessage()
Definition
ClientPagerMessage.cxx:105
resip::ClientPagerMessage::page
virtual void page(std::unique_ptr< Contents > contents, DialogUsageManager::EncryptionLevel level=DialogUsageManager::None)
kh!
Definition
ClientPagerMessage.cxx:118
resip::ClientPagerMessage::getMessageRequestSharedPtr
std::shared_ptr< SipMessage > getMessageRequestSharedPtr() const noexcept
Definition
ClientPagerMessage.hxx:32
resip::ClientPagerMessage::end
void end() override
Definition
ClientPagerMessage.cxx:261
resip::ClientPagerMessage::msgQueued
size_t msgQueued() const
Definition
ClientPagerMessage.cxx:298
resip::Contents
Base class for all SIP body types.
Definition
Contents.hxx:51
resip::DialogSet
Definition
DialogSet.hxx:26
resip::DialogUsageManager
Definition
DialogUsageManager.hxx:79
resip::DialogUsageManager::EncryptionLevel
EncryptionLevel
Definition
DialogUsageManager.hxx:94
resip::DialogUsageManager::None
@ None
Definition
DialogUsageManager.hxx:95
resip::DumTimeout
Definition
DumTimeout.hxx:12
resip::Handle
Definition
Handle.hxx:15
resip::NonDialogUsage
Definition
NonDialogUsage.hxx:21
resip::SipMessage
Represents a SIP message.
Definition
SipMessage.hxx:175
resip
dcm! – add UnusedChecking(_enum) below;
Definition
AbstractFifo.hxx:16
EncodeStream
#define EncodeStream
Definition
resipfaststreams.hxx:461
resip
dum
ClientPagerMessage.hxx
Generated by
1.9.8