nsIComponentManager.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIComponentManager.idl
  3. */
  4. #ifndef __gen_nsIComponentManager_h__
  5. #define __gen_nsIComponentManager_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. class nsIFactory; /* forward declaration */
  14. /* starting interface: nsIComponentManager */
  15. #define NS_ICOMPONENTMANAGER_IID_STR "a88e5a60-205a-4bb1-94e1-2628daf51eae"
  16. #define NS_ICOMPONENTMANAGER_IID \
  17. {0xa88e5a60, 0x205a, 0x4bb1, \
  18. { 0x94, 0xe1, 0x26, 0x28, 0xda, 0xf5, 0x1e, 0xae }}
  19. class NS_NO_VTABLE nsIComponentManager : public nsISupports {
  20. public:
  21. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMPONENTMANAGER_IID)
  22. /**
  23. * getClassObject
  24. *
  25. * Returns the factory object that can be used to create instances of
  26. * CID aClass
  27. *
  28. * @param aClass The classid of the factory that is being requested
  29. */
  30. /* void getClassObject (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  31. NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) = 0;
  32. /**
  33. * getClassObjectByContractID
  34. *
  35. * Returns the factory object that can be used to create instances of
  36. * CID aClass
  37. *
  38. * @param aClass The classid of the factory that is being requested
  39. */
  40. /* void getClassObjectByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  41. NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) = 0;
  42. /**
  43. * createInstance
  44. *
  45. * Create an instance of the CID aClass and return the interface aIID.
  46. *
  47. * @param aClass : ClassID of object instance requested
  48. * @param aDelegate : Used for aggregation
  49. * @param aIID : IID of interface requested
  50. */
  51. /* void createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  52. NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) = 0;
  53. /**
  54. * createInstanceByContractID
  55. *
  56. * Create an instance of the CID that implements aContractID and return the
  57. * interface aIID.
  58. *
  59. * @param aContractID : aContractID of object instance requested
  60. * @param aDelegate : Used for aggregation
  61. * @param aIID : IID of interface requested
  62. */
  63. /* void createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  64. NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) = 0;
  65. };
  66. /* Use this macro when declaring classes that implement this interface. */
  67. #define NS_DECL_NSICOMPONENTMANAGER \
  68. NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result); \
  69. NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result); \
  70. NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result); \
  71. NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result);
  72. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  73. #define NS_FORWARD_NSICOMPONENTMANAGER(_to) \
  74. NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) { return _to GetClassObject(aClass, aIID, result); } \
  75. NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return _to GetClassObjectByContractID(aContractID, aIID, result); } \
  76. NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return _to CreateInstance(aClass, aDelegate, aIID, result); } \
  77. NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return _to CreateInstanceByContractID(aContractID, aDelegate, aIID, result); }
  78. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  79. #define NS_FORWARD_SAFE_NSICOMPONENTMANAGER(_to) \
  80. NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObject(aClass, aIID, result); } \
  81. NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObjectByContractID(aContractID, aIID, result); } \
  82. NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aClass, aDelegate, aIID, result); } \
  83. NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstanceByContractID(aContractID, aDelegate, aIID, result); }
  84. #if 0
  85. /* Use the code below as a template for the implementation class for this interface. */
  86. /* Header file */
  87. class nsComponentManager : public nsIComponentManager
  88. {
  89. public:
  90. NS_DECL_ISUPPORTS
  91. NS_DECL_NSICOMPONENTMANAGER
  92. nsComponentManager();
  93. private:
  94. ~nsComponentManager();
  95. protected:
  96. /* additional members */
  97. };
  98. /* Implementation file */
  99. NS_IMPL_ISUPPORTS1(nsComponentManager, nsIComponentManager)
  100. nsComponentManager::nsComponentManager()
  101. {
  102. /* member initializers and constructor code */
  103. }
  104. nsComponentManager::~nsComponentManager()
  105. {
  106. /* destructor code */
  107. }
  108. /* void getClassObject (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  109. NS_IMETHODIMP nsComponentManager::GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result)
  110. {
  111. return NS_ERROR_NOT_IMPLEMENTED;
  112. }
  113. /* void getClassObjectByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  114. NS_IMETHODIMP nsComponentManager::GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result)
  115. {
  116. return NS_ERROR_NOT_IMPLEMENTED;
  117. }
  118. /* void createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  119. NS_IMETHODIMP nsComponentManager::CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result)
  120. {
  121. return NS_ERROR_NOT_IMPLEMENTED;
  122. }
  123. /* void createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
  124. NS_IMETHODIMP nsComponentManager::CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result)
  125. {
  126. return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128. /* End of implementation class template. */
  129. #endif
  130. #ifdef MOZILLA_INTERNAL_API
  131. #include "nsComponentManagerUtils.h"
  132. #endif
  133. #endif /* __gen_nsIComponentManager_h__ */