nsIASN1Object.h 6.8 KB

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