PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsIASN1Object.h

http://firefox-mac-pdf.googlecode.com/
C Header | 232 lines | 127 code | 55 blank | 50 comment | 0 complexity | 47d0245f28028cf2e2282f729108d090 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/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 NS_SCRIPTABLE nsIASN1Object : public nsISupports {
  31. public:
  32. NS_DECLARE_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_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType) = 0;
  64. NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetTag(PRUint32 *aTag) = 0;
  70. NS_SCRIPTABLE NS_IMETHOD SetTag(PRUint32 aTag) = 0;
  71. /**
  72. * "displayName" contains a human readable explanatory label.
  73. */
  74. /* attribute AString displayName; */
  75. NS_SCRIPTABLE NS_IMETHOD GetDisplayName(nsAString & aDisplayName) = 0;
  76. NS_SCRIPTABLE NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) = 0;
  77. /**
  78. * "displayValue" contains the human readable value.
  79. */
  80. /* attribute AString displayValue; */
  81. NS_SCRIPTABLE NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) = 0;
  82. NS_SCRIPTABLE NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) = 0;
  83. };
  84. NS_DEFINE_STATIC_IID_ACCESSOR(nsIASN1Object, NS_IASN1OBJECT_IID)
  85. /* Use this macro when declaring classes that implement this interface. */
  86. #define NS_DECL_NSIASN1OBJECT \
  87. NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType); \
  88. NS_SCRIPTABLE NS_IMETHOD SetType(PRUint32 aType); \
  89. NS_SCRIPTABLE NS_IMETHOD GetTag(PRUint32 *aTag); \
  90. NS_SCRIPTABLE NS_IMETHOD SetTag(PRUint32 aTag); \
  91. NS_SCRIPTABLE NS_IMETHOD GetDisplayName(nsAString & aDisplayName); \
  92. NS_SCRIPTABLE NS_IMETHOD SetDisplayName(const nsAString & aDisplayName); \
  93. NS_SCRIPTABLE NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue); \
  94. NS_SCRIPTABLE NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue);
  95. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  96. #define NS_FORWARD_NSIASN1OBJECT(_to) \
  97. NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType) { return _to GetType(aType); } \
  98. NS_SCRIPTABLE NS_IMETHOD SetType(PRUint32 aType) { return _to SetType(aType); } \
  99. NS_SCRIPTABLE NS_IMETHOD GetTag(PRUint32 *aTag) { return _to GetTag(aTag); } \
  100. NS_SCRIPTABLE NS_IMETHOD SetTag(PRUint32 aTag) { return _to SetTag(aTag); } \
  101. NS_SCRIPTABLE NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return _to GetDisplayName(aDisplayName); } \
  102. NS_SCRIPTABLE NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return _to SetDisplayName(aDisplayName); } \
  103. NS_SCRIPTABLE NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) { return _to GetDisplayValue(aDisplayValue); } \
  104. NS_SCRIPTABLE NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) { return _to SetDisplayValue(aDisplayValue); }
  105. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  106. #define NS_FORWARD_SAFE_NSIASN1OBJECT(_to) \
  107. NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  108. NS_SCRIPTABLE NS_IMETHOD SetType(PRUint32 aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \
  109. NS_SCRIPTABLE NS_IMETHOD GetTag(PRUint32 *aTag) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTag(aTag); } \
  110. NS_SCRIPTABLE NS_IMETHOD SetTag(PRUint32 aTag) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTag(aTag); } \
  111. NS_SCRIPTABLE NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayName(aDisplayName); } \
  112. NS_SCRIPTABLE NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayName(aDisplayName); } \
  113. NS_SCRIPTABLE NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayValue(aDisplayValue); } \
  114. NS_SCRIPTABLE NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayValue(aDisplayValue); }
  115. #if 0
  116. /* Use the code below as a template for the implementation class for this interface. */
  117. /* Header file */
  118. class nsASN1Object : public nsIASN1Object
  119. {
  120. public:
  121. NS_DECL_ISUPPORTS
  122. NS_DECL_NSIASN1OBJECT
  123. nsASN1Object();
  124. private:
  125. ~nsASN1Object();
  126. protected:
  127. /* additional members */
  128. };
  129. /* Implementation file */
  130. NS_IMPL_ISUPPORTS1(nsASN1Object, nsIASN1Object)
  131. nsASN1Object::nsASN1Object()
  132. {
  133. /* member initializers and constructor code */
  134. }
  135. nsASN1Object::~nsASN1Object()
  136. {
  137. /* destructor code */
  138. }
  139. /* attribute unsigned long type; */
  140. NS_IMETHODIMP nsASN1Object::GetType(PRUint32 *aType)
  141. {
  142. return NS_ERROR_NOT_IMPLEMENTED;
  143. }
  144. NS_IMETHODIMP nsASN1Object::SetType(PRUint32 aType)
  145. {
  146. return NS_ERROR_NOT_IMPLEMENTED;
  147. }
  148. /* attribute unsigned long tag; */
  149. NS_IMETHODIMP nsASN1Object::GetTag(PRUint32 *aTag)
  150. {
  151. return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153. NS_IMETHODIMP nsASN1Object::SetTag(PRUint32 aTag)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* attribute AString displayName; */
  158. NS_IMETHODIMP nsASN1Object::GetDisplayName(nsAString & aDisplayName)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. NS_IMETHODIMP nsASN1Object::SetDisplayName(const nsAString & aDisplayName)
  163. {
  164. return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166. /* attribute AString displayValue; */
  167. NS_IMETHODIMP nsASN1Object::GetDisplayValue(nsAString & aDisplayValue)
  168. {
  169. return NS_ERROR_NOT_IMPLEMENTED;
  170. }
  171. NS_IMETHODIMP nsASN1Object::SetDisplayValue(const nsAString & aDisplayValue)
  172. {
  173. return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175. /* End of implementation class template. */
  176. #endif
  177. #endif /* __gen_nsIASN1Object_h__ */