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 * $Revision: 21788 $ 00027 * $Author: rjongbloed $ 00028 * $Date: 2008-12-11 23:42:13 -0600 (Thu, 11 Dec 2008) $ 00029 */ 00030 00031 #ifndef PTLIB_GUID_H 00032 #define PTLIB_GUID_H 00033 00034 #ifdef P_USE_PRAGMA 00035 #pragma interface 00036 #endif 00037 00038 class PASN_OctetString; 00039 00040 00042 00048 class PGloballyUniqueID : public PBYTEArray 00049 { 00050 PCLASSINFO(PGloballyUniqueID, PBYTEArray); 00051 00052 public: 00059 PGloballyUniqueID(); 00060 00066 PGloballyUniqueID( 00067 const char * cstr 00068 ); 00071 PGloballyUniqueID( 00072 const PString & str 00073 ); 00074 #if P_ASN 00075 00077 PGloballyUniqueID( 00078 const PASN_OctetString & ostr 00079 ); 00080 #endif 00081 00082 00089 virtual void PrintOn( 00090 ostream & strm 00091 ) const; 00092 00097 virtual void ReadFrom( 00098 istream & strm 00099 ); 00100 00105 virtual PObject * Clone() const; 00106 00111 virtual PINDEX HashFunction() const; 00113 00118 PString AsString() const; 00119 00122 PBoolean IsNULL() const; 00123 00124 PBoolean operator!() const { return !IsNULL(); } 00126 }; 00127 00128 00129 #endif // PTLIB_GUID_H 00130 00131 00132 // End Of File ///////////////////////////////////////////////////////////////