reSIProcate/rutil  9694
TransportType.hxx
Go to the documentation of this file.
00001 #if !defined(RESIP_TRANSPORTTYPE_HXX)
00002 #define RESIP_TRANSPORTTYPE_HXX
00003 
00004 #include <ostream>
00005 #include <string>
00006 #include "rutil/Data.hxx"
00007 
00008 namespace resip
00009 {
00010 
00014 typedef enum 
00015 {
00016    UNKNOWN_TRANSPORT = 0,
00017    TLS,
00018    TCP,
00019    UDP,
00020    SCTP,
00021    DCCP,
00022    DTLS,
00023    MAX_TRANSPORT
00024 } TransportType;
00025 
00029 typedef enum 
00030 {
00031    V4,
00032    V6
00033 } IpVersion;
00034 
00040 TransportType getTransportTypeFromName(const std::string & transportName);
00041 TransportType toTransportType(const resip::Data & transportName);
00042 
00050 std::string getTransportNameFromType(const TransportType typeEnum);
00051 std::string getTransportNameFromTypeLower(const TransportType typeEnum);
00052 const resip::Data& toData(const TransportType typeEnum);
00053 const resip::Data& toDataLower(const TransportType typeEnum);
00054 
00056 bool isReliable(TransportType type);
00057 
00058 // Indicate whether or not to run a stun server on a Transport
00059 typedef enum
00060 {
00061    StunDisabled,
00062    StunEnabled
00063 } StunSetting;
00064    
00065 }
00066 
00067 #endif
00068 
00069 /* ====================================================================
00070  * The Vovida Software License, Version 1.0 
00071  * 
00072  * Copyright (c) 2000-2005 Vovida Networks, Inc.  All rights reserved.
00073  * 
00074  * Redistribution and use in source and binary forms, with or without
00075  * modification, are permitted provided that the following conditions
00076  * are met:
00077  * 
00078  * 1. Redistributions of source code must retain the above copyright
00079  *    notice, this list of conditions and the following disclaimer.
00080  * 
00081  * 2. Redistributions in binary form must reproduce the above copyright
00082  *    notice, this list of conditions and the following disclaimer in
00083  *    the documentation and/or other materials provided with the
00084  *    distribution.
00085  * 
00086  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
00087  *    and "Vovida Open Communication Application Library (VOCAL)" must
00088  *    not be used to endorse or promote products derived from this
00089  *    software without prior written permission. For written
00090  *    permission, please contact vocal@vovida.org.
00091  *
00092  * 4. Products derived from this software may not be called "VOCAL", nor
00093  *    may "VOCAL" appear in their name, without prior written
00094  *    permission of Vovida Networks, Inc.
00095  * 
00096  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
00097  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00098  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
00099  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
00100  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
00101  * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
00102  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00103  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00104  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00105  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00106  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00107  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00108  * DAMAGE.
00109  * 
00110  * ====================================================================
00111  * 
00112  * This software consists of voluntary contributions made by Vovida
00113  * Networks, Inc. and many individuals on behalf of Vovida Networks,
00114  * Inc.  For more information on Vovida Networks, Inc., please see
00115  * <http://www.vovida.org/>.
00116  *
00117  */