27 #include "nsISupports.idl"
29 interface nsIPropertyBag;
40 [scriptable,
uuid(b4b7ed5d-85f2-4d0b-a7c6-f235acad3fc0)]
46 readonly attribute nsIDPtr
id;
51 readonly attribute AString
name;
104 #include "nsCOMPtr.h"
105 #include "nsIComponentManager.h"
106 #include "nsICategoryManager.h"
107 #include "nsIServiceManager.h"
108 #include "nsStringGlue.h"
109 #include "nsXPCOMCID.h"
112 struct nsModuleComponentInfo;
114 #define SB_DEVICE_CONTROLLER_CATEGORY "songbird-device-controller"
137 #define SB_DEVICE_CONTROLLER_REGISTERSELF(_name) \
139 NS_METHOD _name##RegisterSelf(nsIComponentManager* aCompMgr, \
141 const char* registryLocation, \
142 const char* componentType, \
143 const nsModuleComponentInfo* info); \
145 NS_METHOD _name##UnregisterSelf(nsIComponentManager* aCompMgr, \
147 const char* registryLocation, \
148 const nsModuleComponentInfo* info)
153 #define SB_DEVICE_CONTROLLER_REGISTERSELF_IMPL(_name, _desc) \
156 _name##RegisterSelf(nsIComponentManager* aCompMgr, \
158 const char* registryLocation, \
159 const char* componentType, \
160 const nsModuleComponentInfo* info) \
163 nsCOMPtr<nsICategoryManager> catMan = \
164 do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
165 NS_ENSURE_SUCCESS(rv, rv); \
166 nsCAutoString prevEntry; \
167 rv = catMan->AddCategoryEntry(SB_DEVICE_CONTROLLER_CATEGORY, \
171 getter_Copies(prevEntry)); \
172 NS_ENSURE_SUCCESS(rv, rv); \
173 NS_WARN_IF_FALSE(prevEntry.IsEmpty(), \
174 "Another controller was registered with that id!"); \
179 _name##UnregisterSelf(nsIComponentManager* aCompMgr, \
181 const char* registryLocation, \
182 const nsModuleComponentInfo* info) \
185 nsCOMPtr<nsICategoryManager> catMan = \
186 do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
187 NS_ENSURE_SUCCESS(rv, rv); \
188 rv = catMan->DeleteCategoryEntry(SB_DEVICE_CONTROLLER_CATEGORY, \
191 NS_ENSURE_SUCCESS(rv, rv); \
boolean controlsDevice(in sbIDevice aDevice)
readonly attribute nsIDPtr marshallId
readonly attribute AString name
readonly attribute nsIDPtr id
[UNIMPLEMENTED UNTIL AFTER 0.3]
[UNIMPLEMENTED UNTIL AFTER 0.3]
sbIDeviceCompatibility getCompatibility(in nsIPropertyBag aParams)
void releaseDevice(in sbIDevice aDevice)
sbIDevice createDevice(in nsIPropertyBag aParams)
readonly attribute nsIArray devices