reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
RegistrationCreator.cxx
Go to the documentation of this file.
5#include "rutil/Random.hxx"
6#include "rutil/Logger.hxx"
7
8#include <utility>
9
10using namespace resip;
11
12#define RESIPROCATE_SUBSYSTEM Subsystem::DUM
13
15 const NameAddr& target,
16 std::shared_ptr<UserProfile> userProfile,
17 uint32_t registrationTime)
18 : BaseCreator(dum, userProfile)
19{
20 makeInitialRequest(target, target, REGISTER);
21 mLastRequest->header(h_RequestLine).uri().user() = Data::Empty;
22 mLastRequest->header(h_Expires).value() = registrationTime;
23
24 // Tag Contact with rInstance, InstanceId, regId, and/or methods parameter according to profile settings
25 ClientRegistration::tagContact(mLastRequest->header(h_Contacts).front(), dum, mUserProfile);
26
27 DebugLog ( << "RegistrationCreator::RegistrationCreator: " << mLastRequest);
28}
29
30/* ====================================================================
31 * The Vovida Software License, Version 1.0
32 *
33 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
34 *
35 * Redistribution and use in source and binary forms, with or without
36 * modification, are permitted provided that the following conditions
37 * are met:
38 *
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 *
42 * 2. Redistributions in binary form must reproduce the above copyright
43 * notice, this list of conditions and the following disclaimer in
44 * the documentation and/or other materials provided with the
45 * distribution.
46 *
47 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
48 * and "Vovida Open Communication Application Library (VOCAL)" must
49 * not be used to endorse or promote products derived from this
50 * software without prior written permission. For written
51 * permission, please contact vocal@vovida.org.
52 *
53 * 4. Products derived from this software may not be called "VOCAL", nor
54 * may "VOCAL" appear in their name, without prior written
55 * permission of Vovida Networks, Inc.
56 *
57 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
58 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
59 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
60 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
61 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
62 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
63 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
64 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
65 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
66 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
67 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
68 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
69 * DAMAGE.
70 *
71 * ====================================================================
72 *
73 * This software consists of voluntary contributions made by Vovida
74 * Networks, Inc. and many individuals on behalf of Vovida Networks,
75 * Inc. For more information on Vovida Networks, Inc., please see
76 * <http://www.vovida.org/>.
77 *
78 */
#define DebugLog(args_)
Definition Logger.hxx:128
void makeInitialRequest(const NameAddr &target, MethodTypes method)
std::shared_ptr< SipMessage > mLastRequest
std::shared_ptr< UserProfile > mUserProfile
static void tagContact(NameAddr &contact, DialogUsageManager &dum, const std::shared_ptr< UserProfile > &userProfile)
static const Data Empty
Constant that represents a zero-length data.
Definition Data.hxx:882
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Definition NameAddr.hxx:19
RegistrationCreator(DialogUsageManager &dum, const NameAddr &target, std::shared_ptr< UserProfile > userProfile, uint32_t RegistrationTime)
dcm! – add UnusedChecking(_enum) below;
unsigned int uint32_t
Definition Stun.hxx:34
RequestLineType h_RequestLine
Definition Headers.cxx:347