GeneralName.h

Go to the documentation of this file.
00001 
00009 #ifndef __GeneralName_H__
00010 #define __GeneralName_H__
00011 
00012 #if _MSC_VER > 1000
00013 #pragma once
00014 #endif // _MSC_VER > 1000
00015 
00016 #include "PKIFdll.h"
00017 #define CAC_API_FACTORY 
00018 
00019 #include <vector>
00020 #include <iosfwd>
00021 
00022 // forward declaration
00023 struct CPKIFGeneralNameImpl;
00024 FD_SMART_PTR(CPKIFName);
00025 FD_SMART_PTR(CPKIFBuffer);
00026 FD_SMART_PTR(CPKIFOID);
00027 
00052 class CAC_API CPKIFGeneralName
00053 {
00054 public:
00055     enum GENNAMETYPE {NOTSET, OTHERNAME, RFC822, DNSNAME, X400ADDRESS, DIRECTORYNAME, EDIPARTYNAME, URI, IPADDRESS, OID};
00056 
00057     CPKIFGeneralName();
00058     CPKIFGeneralName(const CPKIFNamePtr& name);
00059     //CPKIFGeneralName(const CACX509V3GeneralName& name);
00060     CPKIFGeneralName(const CPKIFBufferPtr& name);
00061     virtual ~CPKIFGeneralName();
00062     CPKIFBufferPtr otherName() const;
00063     const char* rfc822Name() const;
00064     const char* dnsName() const;
00065     CPKIFBufferPtr x400Address() const;
00066     CPKIFNamePtr directoryName() const;
00067 //  CPKIFStringPtr ediPartyName() const;
00068     const char* uri() const;
00069     CPKIFBufferPtr ipAddress() const;
00070     CPKIFOIDPtr oid() const;
00071 
00072     bool operator==(const CPKIFGeneralName& rhs);
00073 
00074     GENNAMETYPE GetType() const;
00075 
00076     void Decode(CPKIFBufferPtr& bp);
00077 
00078     CPKIFBufferPtr Encoded();
00079 
00080 private:
00081     CPKIFGeneralName(const CPKIFGeneralName& name);
00082     CPKIFGeneralName& operator=(const CPKIFGeneralName& rhs); //added 4/6/2004
00083 
00084     struct CPKIFGeneralNameImpl *m_impl;
00085 };
00086 DECLARE_SMART_POINTERS(CPKIFGeneralName);
00087 typedef std::vector<CPKIFGeneralNamePtr, PKIFAlloc<CPKIFGeneralNamePtr> > CPKIFGeneralNameList;
00088 DECLARE_SMART_POINTERS(CPKIFGeneralNameList);
00089 typedef CPKIFGeneralNameList CPKIFGeneralNames;
00090 DECLARE_SMART_POINTERS(CPKIFGeneralNames);
00091 
00092 CAC_API std::ostream& operator<<(std::ostream & os, const CPKIFGeneralNamePtr & gn);
00093 CAC_API std::ostream& operator<<(std::ostream & os, const CPKIFGeneralName & gn);
00094 CAC_API std::ostream& operator<<(std::ostream & os, const CPKIFGeneralNamesPtr & gns);
00095 CAC_API std::ostream& operator<<(std::ostream & os, const CPKIFGeneralNames & gns);
00096 
00097 #endif

Generated on Mon Nov 15 11:15:51 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6