reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
TransportType.hxx
Go to the documentation of this file.
1#if !defined(RESIP_TRANSPORTTYPE_HXX)
2#define RESIP_TRANSPORTTYPE_HXX
3
4#include <ostream>
5#include <string>
6#include "rutil/Data.hxx"
7
8namespace resip
9{
10
27
31typedef enum
32{
34 V6
36
42TransportType getTransportTypeFromName(const std::string & transportName);
43TransportType toTransportType(const resip::Data & transportName);
44
52std::string getTransportNameFromType(const TransportType typeEnum);
53std::string getTransportNameFromTypeLower(const TransportType typeEnum);
54const resip::Data& toData(const TransportType typeEnum);
55const resip::Data& toDataLower(const TransportType typeEnum);
56
58bool isReliable(TransportType type);
59
61bool isSecure(TransportType type);
62
64bool isWebSocket(TransportType type);
65
66// Indicate whether or not to run a stun server on a Transport
72
73}
74
75#endif
76
77/* ====================================================================
78 * The Vovida Software License, Version 1.0
79 *
80 * Copyright (c) 2000-2005 Vovida Networks, Inc. All rights reserved.
81 *
82 * Redistribution and use in source and binary forms, with or without
83 * modification, are permitted provided that the following conditions
84 * are met:
85 *
86 * 1. Redistributions of source code must retain the above copyright
87 * notice, this list of conditions and the following disclaimer.
88 *
89 * 2. Redistributions in binary form must reproduce the above copyright
90 * notice, this list of conditions and the following disclaimer in
91 * the documentation and/or other materials provided with the
92 * distribution.
93 *
94 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
95 * and "Vovida Open Communication Application Library (VOCAL)" must
96 * not be used to endorse or promote products derived from this
97 * software without prior written permission. For written
98 * permission, please contact vocal@vovida.org.
99 *
100 * 4. Products derived from this software may not be called "VOCAL", nor
101 * may "VOCAL" appear in their name, without prior written
102 * permission of Vovida Networks, Inc.
103 *
104 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
105 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
106 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
107 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
108 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
109 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
110 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
111 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
112 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
113 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
114 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
115 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
116 * DAMAGE.
117 *
118 * ====================================================================
119 *
120 * This software consists of voluntary contributions made by Vovida
121 * Networks, Inc. and many individuals on behalf of Vovida Networks,
122 * Inc. For more information on Vovida Networks, Inc., please see
123 * <http://www.vovida.org/>.
124 *
125 */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
dcm! – add UnusedChecking(_enum) below;
const resip::Data & toData(const TransportType typeEnum)
bool isWebSocket(TransportType type)
Returns true if passed in transport type is a WebSocket transport protocol.
std::string getTransportNameFromType(const TransportType typeEnum)
Function which translates a transport enum value to its corrisponding name.
TransportType toTransportType(const resip::Data &transportName)
bool isSecure(TransportType type)
Returns true if passed in transport type is a secure transport protocol.
const resip::Data & toDataLower(const TransportType typeEnum)
TransportType getTransportTypeFromName(const std::string &transportName)
Function which translates a transport name to its corrisponding integer enum value.
TransportType
An enumeration of transport protocols.
@ UNKNOWN_TRANSPORT
IpVersion
An enumeration of IP versions.
std::string getTransportNameFromTypeLower(const TransportType typeEnum)
bool isReliable(TransportType type)
Returns true if passed in transport type is a reliable transport protocol.