Bump version to 0.127
[platform/framework/web/tizen-extensions-crosswalk.git] / power / power_instance_desktop.h
1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef POWER_POWER_INSTANCE_DESKTOP_H_
6 #define POWER_POWER_INSTANCE_DESKTOP_H_
7
8 #include <gio/gio.h>
9
10 #include "common/extension.h"
11 #include "power/power_types.h"
12
13 namespace picojson {
14 class value;
15 }
16
17 class PowerInstanceDesktop
18     : public common::Instance {
19  public:
20   PowerInstanceDesktop();
21   virtual ~PowerInstanceDesktop();
22
23   void OnScreenStateChanged(ResourceState state);
24
25  private:
26   // common::Instance implementation.
27   virtual void HandleMessage(const char* msg);
28   virtual void HandleSyncMessage(const char* msg);
29   void HandleRequest(const picojson::value& msg);
30   void HandleRelease(const picojson::value& msg);
31   void HandleSetScreenBrightness(const picojson::value& msg);
32   void HandleGetScreenBrightness();
33   void HandleSetScreenEnabled(const picojson::value& msg);
34   void HandleGetScreenState();
35
36   friend void OnScreenProxyCreatedThunk(GObject* source, GAsyncResult*,
37                                         gpointer);
38   GDBusProxy* screen_proxy_;
39 };
40
41 #endif  // POWER_POWER_INSTANCE_DESKTOP_H_