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 2006/09/20 05:03:41 csoutheren 00028 * Migrated GUID functions to PWLib 00029 * 00030 * Revision 2.5 2005/11/30 13:35:26 csoutheren 00031 * Changed tags for Doxygen 00032 * 00033 * Revision 2.4 2004/03/11 06:54:27 csoutheren 00034 * Added ability to disable SIP or H.323 stacks 00035 * 00036 * Revision 2.3 2002/11/10 11:33:17 robertj 00037 * Updated to OpenH323 v1.10.3 00038 * 00039 * Revision 2.2 2002/09/16 02:52:35 robertj 00040 * Added #define so can select if #pragma interface/implementation is used on 00041 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00042 * 00043 * Revision 2.1 2002/09/04 06:01:47 robertj 00044 * Updated to OpenH323 v1.9.6 00045 * 00046 * Revision 2.0 2001/07/27 15:48:24 robertj 00047 * Conversion of OpenH323 to Open Phone Abstraction Library (OPAL) 00048 * 00049 * Revision 1.4 2002/09/16 01:14:15 robertj 00050 * Added #define so can select if #pragma interface/implementation is used on 00051 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00052 * 00053 * Revision 1.3 2002/08/05 10:03:47 robertj 00054 * Cosmetic changes to normalise the usage of pragma interface/implementation. 00055 * 00056 * Revision 1.2 2001/03/19 05:51:35 robertj 00057 * Added ! operator to do !IsNULL(), so cannot use it accidentally. 00058 * 00059 * Revision 1.1 2001/03/02 06:59:57 robertj 00060 * Enhanced the globally unique identifier class. 00061 * 00062 */ 00063 00064 #ifndef _PGUID_H 00065 #define _PGUID_H 00066 00067 #ifdef P_USE_PRAGMA 00068 #pragma interface 00069 #endif 00070 00071 class PASN_OctetString; 00072 00073 00075 00081 class PGloballyUniqueID : public PBYTEArray 00082 { 00083 PCLASSINFO(PGloballyUniqueID, PBYTEArray); 00084 00085 public: 00092 PGloballyUniqueID(); 00093 00099 PGloballyUniqueID( 00100 const char * cstr 00101 ); 00104 PGloballyUniqueID( 00105 const PString & str 00106 ); 00109 PGloballyUniqueID( 00110 const PASN_OctetString & ostr 00111 ); 00113 00120 virtual void PrintOn( 00121 ostream & strm 00122 ) const; 00123 00128 virtual void ReadFrom( 00129 istream & strm 00130 ); 00131 00136 virtual PObject * Clone() const; 00137 00142 virtual PINDEX HashFunction() const; 00144 00149 PString AsString() const; 00150 00153 BOOL IsNULL() const; 00154 00155 BOOL operator!() const { return !IsNULL(); } 00157 }; 00158 00159 00160 #endif // _PGUID_H 00161 00162