PageRenderTime 52ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsICategoryManager.h

http://firefox-mac-pdf.googlecode.com/
C Header | 192 lines | 91 code | 37 blank | 64 comment | 0 complexity | f4f66ce36c84a7dc543ab3de09bcdb39 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/xpcom/components/nsICategoryManager.idl
  3. */
  4. #ifndef __gen_nsICategoryManager_h__
  5. #define __gen_nsICategoryManager_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. #ifndef __gen_nsISimpleEnumerator_h__
  10. #include "nsISimpleEnumerator.h"
  11. #endif
  12. /* For IDL files that don't want to include root IDL files. */
  13. #ifndef NS_NO_VTABLE
  14. #define NS_NO_VTABLE
  15. #endif
  16. /* starting interface: nsICategoryManager */
  17. #define NS_ICATEGORYMANAGER_IID_STR "3275b2cd-af6d-429a-80d7-f0c5120342ac"
  18. #define NS_ICATEGORYMANAGER_IID \
  19. {0x3275b2cd, 0xaf6d, 0x429a, \
  20. { 0x80, 0xd7, 0xf0, 0xc5, 0x12, 0x03, 0x42, 0xac }}
  21. class NS_NO_VTABLE NS_SCRIPTABLE nsICategoryManager : public nsISupports {
  22. public:
  23. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICATEGORYMANAGER_IID)
  24. /**
  25. * Get the value for the given category's entry.
  26. * @param aCategory The name of the category ("protocol")
  27. * @param aEntry The entry you're looking for ("http")
  28. * @return The value.
  29. */
  30. /* string getCategoryEntry (in string aCategory, in string aEntry); */
  31. NS_SCRIPTABLE NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) = 0;
  32. /**
  33. * Add an entry to a category.
  34. * @param aCategory The name of the category ("protocol")
  35. * @param aEntry The entry to be added ("http")
  36. * @param aValue The value for the entry ("moz.httprulez.1")
  37. * @param aPersist Should this data persist between invocations?
  38. * @param aReplace Should we replace an existing entry?
  39. * @return Previous entry, if any
  40. */
  41. /* string addCategoryEntry (in string aCategory, in string aEntry, in string aValue, in boolean aPersist, in boolean aReplace); */
  42. NS_SCRIPTABLE NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) = 0;
  43. /**
  44. * Delete an entry from the category.
  45. * @param aCategory The name of the category ("protocol")
  46. * @param aEntry The entry to be added ("http")
  47. * @param aPersist Delete persistent data from registry, if present?
  48. */
  49. /* void deleteCategoryEntry (in string aCategory, in string aEntry, in boolean aPersist); */
  50. NS_SCRIPTABLE NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) = 0;
  51. /**
  52. * Delete a category and all entries.
  53. * @param aCategory The category to be deleted.
  54. */
  55. /* void deleteCategory (in string aCategory); */
  56. NS_SCRIPTABLE NS_IMETHOD DeleteCategory(const char *aCategory) = 0;
  57. /**
  58. * Enumerate the entries in a category.
  59. * @param aCategory The category to be enumerated.
  60. * @return a simple enumerator, each result QIs to
  61. * nsISupportsCString.
  62. */
  63. /* nsISimpleEnumerator enumerateCategory (in string aCategory); */
  64. NS_SCRIPTABLE NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) = 0;
  65. /**
  66. * Enumerate all existing categories
  67. * @param aCategory The category to be enumerated.
  68. * @return a simple enumerator, each result QIs to
  69. * nsISupportsCString.
  70. */
  71. /* nsISimpleEnumerator enumerateCategories (); */
  72. NS_SCRIPTABLE NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval) = 0;
  73. };
  74. NS_DEFINE_STATIC_IID_ACCESSOR(nsICategoryManager, NS_ICATEGORYMANAGER_IID)
  75. /* Use this macro when declaring classes that implement this interface. */
  76. #define NS_DECL_NSICATEGORYMANAGER \
  77. NS_SCRIPTABLE NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval); \
  78. NS_SCRIPTABLE NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval); \
  79. NS_SCRIPTABLE NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist); \
  80. NS_SCRIPTABLE NS_IMETHOD DeleteCategory(const char *aCategory); \
  81. NS_SCRIPTABLE NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval); \
  82. NS_SCRIPTABLE NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval);
  83. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  84. #define NS_FORWARD_NSICATEGORYMANAGER(_to) \
  85. NS_SCRIPTABLE NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) { return _to GetCategoryEntry(aCategory, aEntry, _retval); } \
  86. NS_SCRIPTABLE NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) { return _to AddCategoryEntry(aCategory, aEntry, aValue, aPersist, aReplace, _retval); } \
  87. NS_SCRIPTABLE NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) { return _to DeleteCategoryEntry(aCategory, aEntry, aPersist); } \
  88. NS_SCRIPTABLE NS_IMETHOD DeleteCategory(const char *aCategory) { return _to DeleteCategory(aCategory); } \
  89. NS_SCRIPTABLE NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) { return _to EnumerateCategory(aCategory, _retval); } \
  90. NS_SCRIPTABLE NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval) { return _to EnumerateCategories(_retval); }
  91. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  92. #define NS_FORWARD_SAFE_NSICATEGORYMANAGER(_to) \
  93. NS_SCRIPTABLE NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCategoryEntry(aCategory, aEntry, _retval); } \
  94. NS_SCRIPTABLE NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddCategoryEntry(aCategory, aEntry, aValue, aPersist, aReplace, _retval); } \
  95. NS_SCRIPTABLE NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCategoryEntry(aCategory, aEntry, aPersist); } \
  96. NS_SCRIPTABLE NS_IMETHOD DeleteCategory(const char *aCategory) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCategory(aCategory); } \
  97. NS_SCRIPTABLE NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCategory(aCategory, _retval); } \
  98. NS_SCRIPTABLE NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCategories(_retval); }
  99. #if 0
  100. /* Use the code below as a template for the implementation class for this interface. */
  101. /* Header file */
  102. class nsCategoryManager : public nsICategoryManager
  103. {
  104. public:
  105. NS_DECL_ISUPPORTS
  106. NS_DECL_NSICATEGORYMANAGER
  107. nsCategoryManager();
  108. private:
  109. ~nsCategoryManager();
  110. protected:
  111. /* additional members */
  112. };
  113. /* Implementation file */
  114. NS_IMPL_ISUPPORTS1(nsCategoryManager, nsICategoryManager)
  115. nsCategoryManager::nsCategoryManager()
  116. {
  117. /* member initializers and constructor code */
  118. }
  119. nsCategoryManager::~nsCategoryManager()
  120. {
  121. /* destructor code */
  122. }
  123. /* string getCategoryEntry (in string aCategory, in string aEntry); */
  124. NS_IMETHODIMP nsCategoryManager::GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval)
  125. {
  126. return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128. /* string addCategoryEntry (in string aCategory, in string aEntry, in string aValue, in boolean aPersist, in boolean aReplace); */
  129. NS_IMETHODIMP nsCategoryManager::AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval)
  130. {
  131. return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133. /* void deleteCategoryEntry (in string aCategory, in string aEntry, in boolean aPersist); */
  134. NS_IMETHODIMP nsCategoryManager::DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist)
  135. {
  136. return NS_ERROR_NOT_IMPLEMENTED;
  137. }
  138. /* void deleteCategory (in string aCategory); */
  139. NS_IMETHODIMP nsCategoryManager::DeleteCategory(const char *aCategory)
  140. {
  141. return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143. /* nsISimpleEnumerator enumerateCategory (in string aCategory); */
  144. NS_IMETHODIMP nsCategoryManager::EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval)
  145. {
  146. return NS_ERROR_NOT_IMPLEMENTED;
  147. }
  148. /* nsISimpleEnumerator enumerateCategories (); */
  149. NS_IMETHODIMP nsCategoryManager::EnumerateCategories(nsISimpleEnumerator **_retval)
  150. {
  151. return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153. /* End of implementation class template. */
  154. #endif
  155. #endif /* __gen_nsICategoryManager_h__ */