зеркало из https://github.com/mozilla/gecko-dev.git
Commented out template because linux isn't happy with it.
This commit is contained in:
Родитель
9b1eaba4d3
Коммит
088146892f
|
@ -133,6 +133,8 @@ public:
|
||||||
//
|
//
|
||||||
// and the automatic destructor will take care of releasing the service.
|
// and the automatic destructor will take care of releasing the service.
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
template<class T> class nsService {
|
template<class T> class nsService {
|
||||||
protected:
|
protected:
|
||||||
const nsCID mCID;
|
const nsCID mCID;
|
||||||
|
@ -180,6 +182,26 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define NS_WITH_SERVICE(T, serv, isupports, cid, rv) \
|
||||||
|
{ \
|
||||||
|
T* serv; \
|
||||||
|
const nsCID& _aClass = (cid); \
|
||||||
|
nsISupports* _isupp = (isupports); \
|
||||||
|
nsIServiceManager* _servMgr; \
|
||||||
|
*(rv) = (_isupp)->QueryInterface(nsIServiceManager::GetIID(), (void**)&_servMgr); \
|
||||||
|
if (NS_SUCCEEDED(*rv)) { \
|
||||||
|
*(rv) = _servMgr->GetService(_aClass, T::GetIID(), (nsISupports**)&(serv)); \
|
||||||
|
NS_RELEASE(_servMgr); \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#define NS_END_WITH_SERVICE(cid, serv) \
|
||||||
|
_servMgr->ReleaseService(cid, serv); \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define NS_ISHUTDOWNLISTENER_IID \
|
#define NS_ISHUTDOWNLISTENER_IID \
|
||||||
|
|
|
@ -133,6 +133,8 @@ public:
|
||||||
//
|
//
|
||||||
// and the automatic destructor will take care of releasing the service.
|
// and the automatic destructor will take care of releasing the service.
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
template<class T> class nsService {
|
template<class T> class nsService {
|
||||||
protected:
|
protected:
|
||||||
const nsCID mCID;
|
const nsCID mCID;
|
||||||
|
@ -180,6 +182,26 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define NS_WITH_SERVICE(T, serv, isupports, cid, rv) \
|
||||||
|
{ \
|
||||||
|
T* serv; \
|
||||||
|
const nsCID& _aClass = (cid); \
|
||||||
|
nsISupports* _isupp = (isupports); \
|
||||||
|
nsIServiceManager* _servMgr; \
|
||||||
|
*(rv) = (_isupp)->QueryInterface(nsIServiceManager::GetIID(), (void**)&_servMgr); \
|
||||||
|
if (NS_SUCCEEDED(*rv)) { \
|
||||||
|
*(rv) = _servMgr->GetService(_aClass, T::GetIID(), (nsISupports**)&(serv)); \
|
||||||
|
NS_RELEASE(_servMgr); \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#define NS_END_WITH_SERVICE(cid, serv) \
|
||||||
|
_servMgr->ReleaseService(cid, serv); \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define NS_ISHUTDOWNLISTENER_IID \
|
#define NS_ISHUTDOWNLISTENER_IID \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче