00001 /* 00002 * guid.h 00003 * 00004 * Globally Unique Identifier 00005 * 00006 * Open H323 Library 00007 * 00008 * Copyright (c) 1998-2001 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Open H323 Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Contributor(s): ______________________________________. 00025 * 00026 * $Log: guid.h,v $ 00027 * Revision 1.1 2007/08/06 20:50:48 shorne 00028 * First commit of h323plus 00029 * 00030 * Revision 1.6 2005/11/30 13:05:01 csoutheren 00031 * Changed tags for Doxygen 00032 * 00033 * Revision 1.5 2004/04/18 04:38:16 rjongbloed 00034 * Changed all operators that return BOOL to return standard type bool. This is primarily 00035 * for improved compatibility with std STL usage removing many warnings. 00036 * 00037 * Revision 1.4 2002/09/16 01:14:15 robertj 00038 * Added #define so can select if #pragma interface/implementation is used on 00039 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00040 * 00041 * Revision 1.3 2002/08/05 10:03:47 robertj 00042 * Cosmetic changes to normalise the usage of pragma interface/implementation. 00043 * 00044 * Revision 1.2 2001/03/19 05:51:35 robertj 00045 * Added ! operator to do !IsNULL(), so cannot use it accidentally. 00046 * 00047 * Revision 1.1 2001/03/02 06:59:57 robertj 00048 * Enhanced the globally unique identifier class. 00049 * 00050 */ 00051 00052 #ifndef __OPAL_GUID_H 00053 #define __OPAL_GUID_H 00054 00055 #ifdef P_USE_PRAGMA 00056 #pragma interface 00057 #endif 00058 00059 00060 class PASN_OctetString; 00061 00062 00064 00070 class OpalGloballyUniqueID : public PBYTEArray 00071 { 00072 PCLASSINFO(OpalGloballyUniqueID, PBYTEArray); 00073 00074 public: 00081 OpalGloballyUniqueID(); 00082 00088 OpalGloballyUniqueID( 00089 const char * cstr 00090 ); 00093 OpalGloballyUniqueID( 00094 const PString & str 00095 ); 00098 OpalGloballyUniqueID( 00099 const PASN_OctetString & ostr 00100 ); 00102 00109 virtual void PrintOn( 00110 ostream & strm 00111 ) const; 00112 00117 virtual void ReadFrom( 00118 istream & strm 00119 ); 00120 00125 virtual PObject * Clone() const; 00126 00131 virtual PINDEX HashFunction() const; 00133 00138 PString AsString() const; 00139 00142 BOOL IsNULL() const; 00143 00144 bool operator!() const { return !IsNULL(); } 00146 }; 00147 00148 00149 #endif // __OPAL_GUID_H 00150 00151
1.5.2