blob: 090ca6de648b22772e5fce02e19e0d3228ef8f30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//
// Copyright 2005 The Android Open Source Project
//
#ifndef ANDROID_SERVICE_MANAGER_H
#define ANDROID_SERVICE_MANAGER_H
#include <binder/IServiceManager.h>
#include <utils/KeyedVector.h>
#include <utils/threads.h>
namespace android {
// ----------------------------------------------------------------------
class BServiceManager : public BnServiceManager
{
public:
BServiceManager();
virtual sp<IBinder> getService( const String16& name) const;
virtual sp<IBinder> checkService( const String16& name) const;
virtual status_t addService( const String16& name,
const sp<IBinder>& service);
virtual Vector<String16> listServices();
private:
mutable Mutex mLock;
mutable Condition mChanged;
sp<IPermissionController> mPermissionController;
KeyedVector<String16, sp<IBinder> > mServices;
};
// ----------------------------------------------------------------------
}; // namespace android
#endif // ANDROID_SERVICE_MANAGER_H
|