summaryrefslogtreecommitdiffstats
path: root/cmds/runtime/ServiceManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/runtime/ServiceManager.h')
-rw-r--r--cmds/runtime/ServiceManager.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/cmds/runtime/ServiceManager.h b/cmds/runtime/ServiceManager.h
new file mode 100644
index 0000000..d09cec8
--- /dev/null
+++ b/cmds/runtime/ServiceManager.h
@@ -0,0 +1,38 @@
+//
+// Copyright 2005 The Android Open Source Project
+//
+#ifndef ANDROID_SERVICE_MANAGER_H
+#define ANDROID_SERVICE_MANAGER_H
+
+#include <utils/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