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.
5 #ifndef POWER_POWER_INSTANCE_DESKTOP_H_
6 #define POWER_POWER_INSTANCE_DESKTOP_H_
10 #include "common/extension.h"
11 #include "power/power_types.h"
17 class PowerInstanceDesktop
18 : public common::Instance {
20 PowerInstanceDesktop();
21 virtual ~PowerInstanceDesktop();
23 void OnScreenStateChanged(ResourceState state);
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();
36 friend void OnScreenProxyCreatedThunk(GObject* source, GAsyncResult*,
38 GDBusProxy* screen_proxy_;
41 #endif // POWER_POWER_INSTANCE_DESKTOP_H_