OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0
-Release/WINNT_5.2_Depend/mozilla/security/manager/ssl/public/nsIASN1Object.idl |
| 3 */ |
| 4 |
| 5 #ifndef __gen_nsIASN1Object_h__ |
| 6 #define __gen_nsIASN1Object_h__ |
| 7 |
| 8 |
| 9 #ifndef __gen_nsISupports_h__ |
| 10 #include "nsISupports.h" |
| 11 #endif |
| 12 |
| 13 /* For IDL files that don't want to include root IDL files. */ |
| 14 #ifndef NS_NO_VTABLE |
| 15 #define NS_NO_VTABLE |
| 16 #endif |
| 17 |
| 18 /* starting interface: nsIASN1Object */ |
| 19 #define NS_IASN1OBJECT_IID_STR "ba8bf582-1dd1-11b2-898c-f40246bc9a63" |
| 20 |
| 21 #define NS_IASN1OBJECT_IID \ |
| 22 {0xba8bf582, 0x1dd1, 0x11b2, \ |
| 23 { 0x89, 0x8c, 0xf4, 0x02, 0x46, 0xbc, 0x9a, 0x63 }} |
| 24 |
| 25 /** |
| 26 * This represents an ASN.1 object, |
| 27 * where ASN.1 is "Abstract Syntax Notation number One". |
| 28 * |
| 29 * The additional state information carried in this interface |
| 30 * makes it fit for being used as the data structure |
| 31 * when working with visual reprenstation of ASN.1 objects |
| 32 * in a human user interface, like in a tree widget |
| 33 * where open/close state of nodes must be remembered. |
| 34 * |
| 35 * @status FROZEN |
| 36 */ |
| 37 class NS_NO_VTABLE nsIASN1Object : public nsISupports { |
| 38 public: |
| 39 |
| 40 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IASN1OBJECT_IID) |
| 41 |
| 42 /** |
| 43 * Identifiers for the possible types of object. |
| 44 */ |
| 45 enum { ASN1_END_CONTENTS = 0U }; |
| 46 |
| 47 enum { ASN1_BOOLEAN = 1U }; |
| 48 |
| 49 enum { ASN1_INTEGER = 2U }; |
| 50 |
| 51 enum { ASN1_BIT_STRING = 3U }; |
| 52 |
| 53 enum { ASN1_OCTET_STRING = 4U }; |
| 54 |
| 55 enum { ASN1_NULL = 5U }; |
| 56 |
| 57 enum { ASN1_OBJECT_ID = 6U }; |
| 58 |
| 59 enum { ASN1_ENUMERATED = 10U }; |
| 60 |
| 61 enum { ASN1_UTF8_STRING = 12U }; |
| 62 |
| 63 enum { ASN1_SEQUENCE = 16U }; |
| 64 |
| 65 enum { ASN1_SET = 17U }; |
| 66 |
| 67 enum { ASN1_PRINTABLE_STRING = 19U }; |
| 68 |
| 69 enum { ASN1_T61_STRING = 20U }; |
| 70 |
| 71 enum { ASN1_IA5_STRING = 22U }; |
| 72 |
| 73 enum { ASN1_UTC_TIME = 23U }; |
| 74 |
| 75 enum { ASN1_GEN_TIME = 24U }; |
| 76 |
| 77 enum { ASN1_VISIBLE_STRING = 26U }; |
| 78 |
| 79 enum { ASN1_UNIVERSAL_STRING = 28U }; |
| 80 |
| 81 enum { ASN1_BMP_STRING = 30U }; |
| 82 |
| 83 enum { ASN1_HIGH_TAG_NUMBER = 31U }; |
| 84 |
| 85 enum { ASN1_CONTEXT_SPECIFIC = 32U }; |
| 86 |
| 87 enum { ASN1_APPLICATION = 33U }; |
| 88 |
| 89 enum { ASN1_PRIVATE = 34U }; |
| 90 |
| 91 /** |
| 92 * "type" will be equal to one of the defined object identifiers. |
| 93 */ |
| 94 /* attribute unsigned long type; */ |
| 95 NS_IMETHOD GetType(PRUint32 *aType) = 0; |
| 96 NS_IMETHOD SetType(PRUint32 aType) = 0; |
| 97 |
| 98 /** |
| 99 * This contains a tag as explained in ASN.1 standards documents. |
| 100 */ |
| 101 /* attribute unsigned long tag; */ |
| 102 NS_IMETHOD GetTag(PRUint32 *aTag) = 0; |
| 103 NS_IMETHOD SetTag(PRUint32 aTag) = 0; |
| 104 |
| 105 /** |
| 106 * "displayName" contains a human readable explanatory label. |
| 107 */ |
| 108 /* attribute AString displayName; */ |
| 109 NS_IMETHOD GetDisplayName(nsAString & aDisplayName) = 0; |
| 110 NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) = 0; |
| 111 |
| 112 /** |
| 113 * "displayValue" contains the human readable value. |
| 114 */ |
| 115 /* attribute AString displayValue; */ |
| 116 NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) = 0; |
| 117 NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) = 0; |
| 118 |
| 119 }; |
| 120 |
| 121 /* Use this macro when declaring classes that implement this interface. */ |
| 122 #define NS_DECL_NSIASN1OBJECT \ |
| 123 NS_IMETHOD GetType(PRUint32 *aType); \ |
| 124 NS_IMETHOD SetType(PRUint32 aType); \ |
| 125 NS_IMETHOD GetTag(PRUint32 *aTag); \ |
| 126 NS_IMETHOD SetTag(PRUint32 aTag); \ |
| 127 NS_IMETHOD GetDisplayName(nsAString & aDisplayName); \ |
| 128 NS_IMETHOD SetDisplayName(const nsAString & aDisplayName); \ |
| 129 NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue); \ |
| 130 NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue); |
| 131 |
| 132 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 133 #define NS_FORWARD_NSIASN1OBJECT(_to) \ |
| 134 NS_IMETHOD GetType(PRUint32 *aType) { return _to GetType(aType); } \ |
| 135 NS_IMETHOD SetType(PRUint32 aType) { return _to SetType(aType); } \ |
| 136 NS_IMETHOD GetTag(PRUint32 *aTag) { return _to GetTag(aTag); } \ |
| 137 NS_IMETHOD SetTag(PRUint32 aTag) { return _to SetTag(aTag); } \ |
| 138 NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return _to GetDisplayNam
e(aDisplayName); } \ |
| 139 NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return _to SetDisp
layName(aDisplayName); } \ |
| 140 NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) { return _to GetDisplayV
alue(aDisplayValue); } \ |
| 141 NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) { return _to SetDi
splayValue(aDisplayValue); } |
| 142 |
| 143 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 144 #define NS_FORWARD_SAFE_NSIASN1OBJECT(_to) \ |
| 145 NS_IMETHOD GetType(PRUint32 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _t
o->GetType(aType); } \ |
| 146 NS_IMETHOD SetType(PRUint32 aType) { return !_to ? NS_ERROR_NULL_POINTER : _to
->SetType(aType); } \ |
| 147 NS_IMETHOD GetTag(PRUint32 *aTag) { return !_to ? NS_ERROR_NULL_POINTER : _to-
>GetTag(aTag); } \ |
| 148 NS_IMETHOD SetTag(PRUint32 aTag) { return !_to ? NS_ERROR_NULL_POINTER : _to->
SetTag(aTag); } \ |
| 149 NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return !_to ? NS_ERROR_N
ULL_POINTER : _to->GetDisplayName(aDisplayName); } \ |
| 150 NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return !_to ? NS_E
RROR_NULL_POINTER : _to->SetDisplayName(aDisplayName); } \ |
| 151 NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) { return !_to ? NS_ERROR
_NULL_POINTER : _to->GetDisplayValue(aDisplayValue); } \ |
| 152 NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) { return !_to ? NS
_ERROR_NULL_POINTER : _to->SetDisplayValue(aDisplayValue); } |
| 153 |
| 154 #if 0 |
| 155 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 156 |
| 157 /* Header file */ |
| 158 class nsASN1Object : public nsIASN1Object |
| 159 { |
| 160 public: |
| 161 NS_DECL_ISUPPORTS |
| 162 NS_DECL_NSIASN1OBJECT |
| 163 |
| 164 nsASN1Object(); |
| 165 |
| 166 private: |
| 167 ~nsASN1Object(); |
| 168 |
| 169 protected: |
| 170 /* additional members */ |
| 171 }; |
| 172 |
| 173 /* Implementation file */ |
| 174 NS_IMPL_ISUPPORTS1(nsASN1Object, nsIASN1Object) |
| 175 |
| 176 nsASN1Object::nsASN1Object() |
| 177 { |
| 178 /* member initializers and constructor code */ |
| 179 } |
| 180 |
| 181 nsASN1Object::~nsASN1Object() |
| 182 { |
| 183 /* destructor code */ |
| 184 } |
| 185 |
| 186 /* attribute unsigned long type; */ |
| 187 NS_IMETHODIMP nsASN1Object::GetType(PRUint32 *aType) |
| 188 { |
| 189 return NS_ERROR_NOT_IMPLEMENTED; |
| 190 } |
| 191 NS_IMETHODIMP nsASN1Object::SetType(PRUint32 aType) |
| 192 { |
| 193 return NS_ERROR_NOT_IMPLEMENTED; |
| 194 } |
| 195 |
| 196 /* attribute unsigned long tag; */ |
| 197 NS_IMETHODIMP nsASN1Object::GetTag(PRUint32 *aTag) |
| 198 { |
| 199 return NS_ERROR_NOT_IMPLEMENTED; |
| 200 } |
| 201 NS_IMETHODIMP nsASN1Object::SetTag(PRUint32 aTag) |
| 202 { |
| 203 return NS_ERROR_NOT_IMPLEMENTED; |
| 204 } |
| 205 |
| 206 /* attribute AString displayName; */ |
| 207 NS_IMETHODIMP nsASN1Object::GetDisplayName(nsAString & aDisplayName) |
| 208 { |
| 209 return NS_ERROR_NOT_IMPLEMENTED; |
| 210 } |
| 211 NS_IMETHODIMP nsASN1Object::SetDisplayName(const nsAString & aDisplayName) |
| 212 { |
| 213 return NS_ERROR_NOT_IMPLEMENTED; |
| 214 } |
| 215 |
| 216 /* attribute AString displayValue; */ |
| 217 NS_IMETHODIMP nsASN1Object::GetDisplayValue(nsAString & aDisplayValue) |
| 218 { |
| 219 return NS_ERROR_NOT_IMPLEMENTED; |
| 220 } |
| 221 NS_IMETHODIMP nsASN1Object::SetDisplayValue(const nsAString & aDisplayValue) |
| 222 { |
| 223 return NS_ERROR_NOT_IMPLEMENTED; |
| 224 } |
| 225 |
| 226 /* End of implementation class template. */ |
| 227 #endif |
| 228 |
| 229 |
| 230 #endif /* __gen_nsIASN1Object_h__ */ |
OLD | NEW |