PageRenderTime 33ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIProfile.h

http://firefox-mac-pdf.googlecode.com/
C Header | 221 lines | 136 code | 46 blank | 39 comment | 0 complexity | 5969b05d63c616ccf7618c31f2b4aebd MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/profile/public/nsIProfile.idl
  3. */
  4. #ifndef __gen_nsIProfile_h__
  5. #define __gen_nsIProfile_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. #ifndef __gen_nsIFile_h__
  10. #include "nsIFile.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. #define NS_PROFILE_CID \
  17. { /* {02b0625b-e7f3-11d2-9f5a-006008a6efe9} */ \
  18. 0x02b0625b, \
  19. 0xe7f3, \
  20. 0x11d2, \
  21. { 0x9f, 0x5a, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9 } \
  22. }
  23. #define NS_PROFILE_CONTRACTID \
  24. "@mozilla.org/profile/manager;1"
  25. #define NS_PROFILE_STARTUP_CATEGORY \
  26. "profile-startup-category"
  27. /* starting interface: nsIProfile */
  28. #define NS_IPROFILE_IID_STR "02b0625a-e7f3-11d2-9f5a-006008a6efe9"
  29. #define NS_IPROFILE_IID \
  30. {0x02b0625a, 0xe7f3, 0x11d2, \
  31. { 0x9f, 0x5a, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9 }}
  32. /**
  33. * nsIProfile
  34. *
  35. * @status FROZEN
  36. * @version 1.0
  37. */
  38. class NS_NO_VTABLE NS_SCRIPTABLE nsIProfile : public nsISupports {
  39. public:
  40. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPROFILE_IID)
  41. /* readonly attribute long profileCount; */
  42. NS_SCRIPTABLE NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) = 0;
  43. /* void getProfileList (out unsigned long length, [array, size_is (length), retval] out wstring profileNames); */
  44. NS_SCRIPTABLE NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) = 0;
  45. /* boolean profileExists (in wstring profileName); */
  46. NS_SCRIPTABLE NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) = 0;
  47. /* attribute wstring currentProfile; */
  48. NS_SCRIPTABLE NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) = 0;
  49. NS_SCRIPTABLE NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) = 0;
  50. enum { SHUTDOWN_PERSIST = 1U };
  51. enum { SHUTDOWN_CLEANSE = 2U };
  52. /* void shutDownCurrentProfile (in unsigned long shutDownType); */
  53. NS_SCRIPTABLE NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) = 0;
  54. /* void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); */
  55. NS_SCRIPTABLE NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) = 0;
  56. /* void renameProfile (in wstring oldName, in wstring newName); */
  57. NS_SCRIPTABLE NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) = 0;
  58. /* void deleteProfile (in wstring name, in boolean canDeleteFiles); */
  59. NS_SCRIPTABLE NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) = 0;
  60. /* void cloneProfile (in wstring profileName); */
  61. NS_SCRIPTABLE NS_IMETHOD CloneProfile(const PRUnichar *profileName) = 0;
  62. };
  63. NS_DEFINE_STATIC_IID_ACCESSOR(nsIProfile, NS_IPROFILE_IID)
  64. /* Use this macro when declaring classes that implement this interface. */
  65. #define NS_DECL_NSIPROFILE \
  66. NS_SCRIPTABLE NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount); \
  67. NS_SCRIPTABLE NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames); \
  68. NS_SCRIPTABLE NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval); \
  69. NS_SCRIPTABLE NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile); \
  70. NS_SCRIPTABLE NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile); \
  71. NS_SCRIPTABLE NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType); \
  72. NS_SCRIPTABLE NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir); \
  73. NS_SCRIPTABLE NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName); \
  74. NS_SCRIPTABLE NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles); \
  75. NS_SCRIPTABLE NS_IMETHOD CloneProfile(const PRUnichar *profileName);
  76. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  77. #define NS_FORWARD_NSIPROFILE(_to) \
  78. NS_SCRIPTABLE NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) { return _to GetProfileCount(aProfileCount); } \
  79. NS_SCRIPTABLE NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) { return _to GetProfileList(length, profileNames); } \
  80. NS_SCRIPTABLE NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) { return _to ProfileExists(profileName, _retval); } \
  81. NS_SCRIPTABLE NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) { return _to GetCurrentProfile(aCurrentProfile); } \
  82. NS_SCRIPTABLE NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) { return _to SetCurrentProfile(aCurrentProfile); } \
  83. NS_SCRIPTABLE NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) { return _to ShutDownCurrentProfile(shutDownType); } \
  84. NS_SCRIPTABLE NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) { return _to CreateNewProfile(profileName, nativeProfileDir, langcode, useExistingDir); } \
  85. NS_SCRIPTABLE NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) { return _to RenameProfile(oldName, newName); } \
  86. NS_SCRIPTABLE NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) { return _to DeleteProfile(name, canDeleteFiles); } \
  87. NS_SCRIPTABLE NS_IMETHOD CloneProfile(const PRUnichar *profileName) { return _to CloneProfile(profileName); }
  88. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  89. #define NS_FORWARD_SAFE_NSIPROFILE(_to) \
  90. NS_SCRIPTABLE NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileCount(aProfileCount); } \
  91. NS_SCRIPTABLE NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileList(length, profileNames); } \
  92. NS_SCRIPTABLE NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ProfileExists(profileName, _retval); } \
  93. NS_SCRIPTABLE NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentProfile(aCurrentProfile); } \
  94. NS_SCRIPTABLE NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentProfile(aCurrentProfile); } \
  95. NS_SCRIPTABLE NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShutDownCurrentProfile(shutDownType); } \
  96. NS_SCRIPTABLE NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewProfile(profileName, nativeProfileDir, langcode, useExistingDir); } \
  97. NS_SCRIPTABLE NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RenameProfile(oldName, newName); } \
  98. NS_SCRIPTABLE NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteProfile(name, canDeleteFiles); } \
  99. NS_SCRIPTABLE NS_IMETHOD CloneProfile(const PRUnichar *profileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneProfile(profileName); }
  100. #if 0
  101. /* Use the code below as a template for the implementation class for this interface. */
  102. /* Header file */
  103. class nsProfile : public nsIProfile
  104. {
  105. public:
  106. NS_DECL_ISUPPORTS
  107. NS_DECL_NSIPROFILE
  108. nsProfile();
  109. private:
  110. ~nsProfile();
  111. protected:
  112. /* additional members */
  113. };
  114. /* Implementation file */
  115. NS_IMPL_ISUPPORTS1(nsProfile, nsIProfile)
  116. nsProfile::nsProfile()
  117. {
  118. /* member initializers and constructor code */
  119. }
  120. nsProfile::~nsProfile()
  121. {
  122. /* destructor code */
  123. }
  124. /* readonly attribute long profileCount; */
  125. NS_IMETHODIMP nsProfile::GetProfileCount(PRInt32 *aProfileCount)
  126. {
  127. return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129. /* void getProfileList (out unsigned long length, [array, size_is (length), retval] out wstring profileNames); */
  130. NS_IMETHODIMP nsProfile::GetProfileList(PRUint32 *length, PRUnichar ***profileNames)
  131. {
  132. return NS_ERROR_NOT_IMPLEMENTED;
  133. }
  134. /* boolean profileExists (in wstring profileName); */
  135. NS_IMETHODIMP nsProfile::ProfileExists(const PRUnichar *profileName, PRBool *_retval)
  136. {
  137. return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139. /* attribute wstring currentProfile; */
  140. NS_IMETHODIMP nsProfile::GetCurrentProfile(PRUnichar * *aCurrentProfile)
  141. {
  142. return NS_ERROR_NOT_IMPLEMENTED;
  143. }
  144. NS_IMETHODIMP nsProfile::SetCurrentProfile(const PRUnichar * aCurrentProfile)
  145. {
  146. return NS_ERROR_NOT_IMPLEMENTED;
  147. }
  148. /* void shutDownCurrentProfile (in unsigned long shutDownType); */
  149. NS_IMETHODIMP nsProfile::ShutDownCurrentProfile(PRUint32 shutDownType)
  150. {
  151. return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153. /* void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); */
  154. NS_IMETHODIMP nsProfile::CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir)
  155. {
  156. return NS_ERROR_NOT_IMPLEMENTED;
  157. }
  158. /* void renameProfile (in wstring oldName, in wstring newName); */
  159. NS_IMETHODIMP nsProfile::RenameProfile(const PRUnichar *oldName, const PRUnichar *newName)
  160. {
  161. return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163. /* void deleteProfile (in wstring name, in boolean canDeleteFiles); */
  164. NS_IMETHODIMP nsProfile::DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles)
  165. {
  166. return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168. /* void cloneProfile (in wstring profileName); */
  169. NS_IMETHODIMP nsProfile::CloneProfile(const PRUnichar *profileName)
  170. {
  171. return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173. /* End of implementation class template. */
  174. #endif
  175. #endif /* __gen_nsIProfile_h__ */