PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 6ms RepoModel.GetById 34ms app.codeStats 1ms

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