/[resiprocate]/main/resip/dum/DumHelper.cxx
ViewVC logotype

Annotation of /main/resip/dum/DumHelper.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10695 - (hide annotations) (download)
Fri Nov 22 23:12:34 2013 UTC (6 years ago) by sgodin
File MIME type: text/plain
File size: 3871 byte(s)
-Merged from b-uasprack-20130904
  -added UAS Prack support to DUM!  Original implementation taken from b-uasprack-20091103
  -many changes, fixes and enhancements from original branch
  -MasterProfile setting setUasReliableProvisionalMode is used to enable
  -added mode called SupportedEssential where we will send reliable provisionals only if they
   are a provisional that is carrying an offer or answer  - required for 3GPP IMS flows 
  -added resubmit timer for reliable responses to ensure we send a reliable provisional at least 
   every 2.5 minutes  -new profile setting: set1xxRelResubmitTime to support this
  -updated state diagrams and added new PRACK flow diagrams to dum/doc directory (removed old diagrams)
  -fixed update glare handling for UAC prack 
  -added in support for UAC Prack to be able to send an offer in the first PRACK response 
  (must call provideOffer from onAnswer callback)
  -made a helper method on DialogUsageManager to set advertised capabilities 
  -fixed missing break in ClientInviteSession::dispatchReceivedUpdateEarly 
  

  
  
1 daniel 5383 #include "resip/dum/DumHelper.hxx"
2     #include "resip/stack/SipMessage.hxx"
3     #include "rutil/WinLeakCheck.hxx"
4    
5     using namespace resip;
6     using namespace std;
7    
8     #define RESIPROCATE_SUBSYSTEM Subsystem::DUM
9    
10 sgodin 10695 void
11     DumHelper::setOutgoingEncryptionLevel(SipMessage& message,
12     DialogUsageManager::EncryptionLevel level)
13 daniel 5383 {
14     SecurityAttributes* attr = new SecurityAttributes();
15 sgodin 5405 attr->setOutgoingEncryptionLevel(convert(level));
16 daniel 5383 message.setSecurityAttributes(auto_ptr<SecurityAttributes>(attr));
17     }
18    
19 sgodin 10695 void
20     DumHelper::setEncryptionPerformed(SipMessage& message)
21 daniel 5383 {
22     SecurityAttributes* attr = new SecurityAttributes();
23     attr->setOutgoingEncryptionLevel(message.getSecurityAttributes()->getOutgoingEncryptionLevel());
24     attr->setEncryptionPerformed(true);
25     message.setSecurityAttributes(auto_ptr<SecurityAttributes>(attr));
26     }
27    
28 sgodin 10695 SecurityAttributes::OutgoingEncryptionLevel
29     DumHelper::convert(DialogUsageManager::EncryptionLevel level)
30 daniel 5383 {
31     SecurityAttributes::OutgoingEncryptionLevel ret = SecurityAttributes::None;
32    
33     switch(level)
34     {
35     case DialogUsageManager::None:
36     ret = SecurityAttributes::None;
37     break;
38     case DialogUsageManager::Encrypt:
39     ret = SecurityAttributes::Encrypt;
40     break;
41     case DialogUsageManager::Sign:
42     ret = SecurityAttributes::Sign;
43     break;
44     case DialogUsageManager::SignAndEncrypt:
45     ret = SecurityAttributes::SignAndEncrypt;
46     break;
47     }
48    
49     return ret;
50     }
51    
52    
53     /* ====================================================================
54     * The Vovida Software License, Version 1.0
55     *
56     * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
57     *
58     * Redistribution and use in source and binary forms, with or without
59     * modification, are permitted provided that the following conditions
60     * are met:
61     *
62     * 1. Redistributions of source code must retain the above copyright
63     * notice, this list of conditions and the following disclaimer.
64     *
65     * 2. Redistributions in binary form must reproduce the above copyright
66     * notice, this list of conditions and the following disclaimer in
67     * the documentation and/or other materials provided with the
68     * distribution.
69     *
70     * 3. The names "VOCAL", "Vovida Open Communication Application Library",
71     * and "Vovida Open Communication Application Library (VOCAL)" must
72     * not be used to endorse or promote products derived from this
73     * software without prior written permission. For written
74     * permission, please contact vocal@vovida.org.
75     *
76     * 4. Products derived from this software may not be called "VOCAL", nor
77     * may "VOCAL" appear in their name, without prior written
78     * permission of Vovida Networks, Inc.
79     *
80     * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
81     * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
82     * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
83     * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
84     * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
85     * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
86     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
87     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
88     * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
89     * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
90     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
91     * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
92     * DAMAGE.
93     *
94     * ====================================================================
95     *
96     * This software consists of voluntary contributions made by Vovida
97     * Networks, Inc. and many individuals on behalf of Vovida Networks,
98     * Inc. For more information on Vovida Networks, Inc., please see
99     * <http://www.vovida.org/>.
100     *
101     */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27