--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CONTEXT_WAKE_LOCK_H__
+#define __CONTEXT_WAKE_LOCK_H__
+
+#include <ContextTypes.h>
+
+namespace ctx {
+
+ class EXPORT_API WakeLock {
+ public:
+ WakeLock();
+ ~WakeLock();
+ };
+
+}
+
+#endif /* __CONTEXT_WAKE_LOCK_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <atomic>
+#include <WakeLock.h>
+
+using namespace ctx;
+
+static std::atomic_uint __refCount(0);
+
+static void __acquire()
+{
+ _I("Acquiring a WakeLock");
+ // TODO
+}
+
+static void __release()
+{
+ _I("Releasing the WakeLock");
+ // TODO
+}
+
+WakeLock::WakeLock()
+{
+ if (__refCount++ == 0)
+ __acquire();
+
+ _D("#wakelocks: %u", __refCount.load());
+}
+
+WakeLock::~WakeLock()
+{
+ if (__refCount-- == 1)
+ __release();
+
+ _D("#wakelocks: %u", __refCount.load());
+}