reSIProcate/stack  9694
Aor.hxx
Go to the documentation of this file.
00001 #if !defined(RESIP_AOR_HXX)
00002 #define RESIP_AOR_HXX 
00003 
00004 #include <iosfwd>
00005 #include "rutil/Data.hxx"
00006 
00007 namespace resip
00008 {
00009 
00010 class Uri;
00011 
00012 class Aor
00013 {
00014    public:
00015       explicit Aor(const Data& value);
00016       Aor();
00017       Aor(const Uri& uri);
00018       Aor(const Aor& aor);
00019       Aor& operator=(const Aor& aor);
00020       
00021       bool operator==(const Aor& other) const;
00022       bool operator!=(const Aor& other) const;
00023       bool operator<(const Aor& other) const;
00024 
00025       const Data& value() const;
00026 
00027       Data& scheme();
00028       const Data& scheme() const;
00029 
00030       Data& host();
00031       const Data& host() const;
00032 
00033       Data& user();
00034       const Data& user() const;
00035 
00036       int& port();
00037       int port() const;
00038       
00039       EncodeStream& operator<<(EncodeStream& str) const;
00040 
00041    private:
00042       mutable Data mValue;
00043 
00044       mutable Data mOldScheme;
00045       mutable Data mOldUser;
00046       mutable Data mOldHost;
00047       mutable int mOldPort;
00048 
00049       // cache for IPV6 host comparison
00050       mutable Data mCanonicalHost;
00051 
00052       Data mScheme;
00053       Data mUser;
00054       Data mHost;
00055       int mPort;
00056 };
00057       
00058 }
00059 
00060 #endif
00061 
00062 /* ====================================================================
00063  * The Vovida Software License, Version 1.0 
00064  * 
00065  * Copyright (c) 2000-2005 Vovida Networks, Inc.  All rights reserved.
00066  * 
00067  * Redistribution and use in source and binary forms, with or without
00068  * modification, are permitted provided that the following conditions
00069  * are met:
00070  * 
00071  * 1. Redistributions of source code must retain the above copyright
00072  *    notice, this list of conditions and the following disclaimer.
00073  * 
00074  * 2. Redistributions in binary form must reproduce the above copyright
00075  *    notice, this list of conditions and the following disclaimer in
00076  *    the documentation and/or other materials provided with the
00077  *    distribution.
00078  * 
00079  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
00080  *    and "Vovida Open Communication Application Library (VOCAL)" must
00081  *    not be used to endorse or promote products derived from this
00082  *    software without prior written permission. For written
00083  *    permission, please contact vocal@vovida.org.
00084  *
00085  * 4. Products derived from this software may not be called "VOCAL", nor
00086  *    may "VOCAL" appear in their name, without prior written
00087  *    permission of Vovida Networks, Inc.
00088  * 
00089  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
00090  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00091  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
00092  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
00093  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
00094  * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
00095  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00096  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00097  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00098  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00099  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00100  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00101  * DAMAGE.
00102  * 
00103  * ====================================================================
00104  * 
00105  * This software consists of voluntary contributions made by Vovida
00106  * Networks, Inc. and many individuals on behalf of Vovida Networks,
00107  * Inc.  For more information on Vovida Networks, Inc., please see
00108  * <http://www.vovida.org/>.
00109  *
00110  */