nsIProfile.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsIProfile : public nsISupports {
  39. public:
  40. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILE_IID)
  41. /* readonly attribute long profileCount; */
  42. NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) = 0;
  43. /* void getProfileList (out unsigned long length, [array, size_is (length), retval] out wstring profileNames); */
  44. NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) = 0;
  45. /* boolean profileExists (in wstring profileName); */
  46. NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) = 0;
  47. /* attribute wstring currentProfile; */
  48. NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) = 0;
  49. 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_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) = 0;
  54. /* void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); */
  55. 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_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) = 0;
  58. /* void deleteProfile (in wstring name, in boolean canDeleteFiles); */
  59. NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) = 0;
  60. /* void cloneProfile (in wstring profileName); */
  61. NS_IMETHOD CloneProfile(const PRUnichar *profileName) = 0;
  62. };
  63. /* Use this macro when declaring classes that implement this interface. */
  64. #define NS_DECL_NSIPROFILE \
  65. NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount); \
  66. NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames); \
  67. NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval); \
  68. NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile); \
  69. NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile); \
  70. NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType); \
  71. NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir); \
  72. NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName); \
  73. NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles); \
  74. NS_IMETHOD CloneProfile(const PRUnichar *profileName);
  75. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  76. #define NS_FORWARD_NSIPROFILE(_to) \
  77. NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) { return _to GetProfileCount(aProfileCount); } \
  78. NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) { return _to GetProfileList(length, profileNames); } \
  79. NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) { return _to ProfileExists(profileName, _retval); } \
  80. NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) { return _to GetCurrentProfile(aCurrentProfile); } \
  81. NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) { return _to SetCurrentProfile(aCurrentProfile); } \
  82. NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) { return _to ShutDownCurrentProfile(shutDownType); } \
  83. NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) { return _to CreateNewProfile(profileName, nativeProfileDir, langcode, useExistingDir); } \
  84. NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) { return _to RenameProfile(oldName, newName); } \
  85. NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) { return _to DeleteProfile(name, canDeleteFiles); } \
  86. NS_IMETHOD CloneProfile(const PRUnichar *profileName) { return _to CloneProfile(profileName); }
  87. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  88. #define NS_FORWARD_SAFE_NSIPROFILE(_to) \
  89. NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileCount(aProfileCount); } \
  90. NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileList(length, profileNames); } \
  91. NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ProfileExists(profileName, _retval); } \
  92. NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentProfile(aCurrentProfile); } \
  93. NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentProfile(aCurrentProfile); } \
  94. NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShutDownCurrentProfile(shutDownType); } \
  95. 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); } \
  96. NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RenameProfile(oldName, newName); } \
  97. NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteProfile(name, canDeleteFiles); } \
  98. NS_IMETHOD CloneProfile(const PRUnichar *profileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneProfile(profileName); }
  99. #if 0
  100. /* Use the code below as a template for the implementation class for this interface. */
  101. /* Header file */
  102. class nsProfile : public nsIProfile
  103. {
  104. public:
  105. NS_DECL_ISUPPORTS
  106. NS_DECL_NSIPROFILE
  107. nsProfile();
  108. private:
  109. ~nsProfile();
  110. protected:
  111. /* additional members */
  112. };
  113. /* Implementation file */
  114. NS_IMPL_ISUPPORTS1(nsProfile, nsIProfile)
  115. nsProfile::nsProfile()
  116. {
  117. /* member initializers and constructor code */
  118. }
  119. nsProfile::~nsProfile()
  120. {
  121. /* destructor code */
  122. }
  123. /* readonly attribute long profileCount; */
  124. NS_IMETHODIMP nsProfile::GetProfileCount(PRInt32 *aProfileCount)
  125. {
  126. return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128. /* void getProfileList (out unsigned long length, [array, size_is (length), retval] out wstring profileNames); */
  129. NS_IMETHODIMP nsProfile::GetProfileList(PRUint32 *length, PRUnichar ***profileNames)
  130. {
  131. return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133. /* boolean profileExists (in wstring profileName); */
  134. NS_IMETHODIMP nsProfile::ProfileExists(const PRUnichar *profileName, PRBool *_retval)
  135. {
  136. return NS_ERROR_NOT_IMPLEMENTED;
  137. }
  138. /* attribute wstring currentProfile; */
  139. NS_IMETHODIMP nsProfile::GetCurrentProfile(PRUnichar * *aCurrentProfile)
  140. {
  141. return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143. NS_IMETHODIMP nsProfile::SetCurrentProfile(const PRUnichar * aCurrentProfile)
  144. {
  145. return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147. /* void shutDownCurrentProfile (in unsigned long shutDownType); */
  148. NS_IMETHODIMP nsProfile::ShutDownCurrentProfile(PRUint32 shutDownType)
  149. {
  150. return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152. /* void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); */
  153. NS_IMETHODIMP nsProfile::CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* void renameProfile (in wstring oldName, in wstring newName); */
  158. NS_IMETHODIMP nsProfile::RenameProfile(const PRUnichar *oldName, const PRUnichar *newName)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. /* void deleteProfile (in wstring name, in boolean canDeleteFiles); */
  163. NS_IMETHODIMP nsProfile::DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles)
  164. {
  165. return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167. /* void cloneProfile (in wstring profileName); */
  168. NS_IMETHODIMP nsProfile::CloneProfile(const PRUnichar *profileName)
  169. {
  170. return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172. /* End of implementation class template. */
  173. #endif
  174. #endif /* __gen_nsIProfile_h__ */