2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef WRTDEVICEAPIS_POWER_EVENTLOW_H_
17 #define WRTDEVICEAPIS_POWER_EVENTLOW_H_
19 #include <dpl/shared_ptr.h>
20 #include <Commons/ListenerEvent.h>
21 #include <Commons/ListenerEventEmitter.h>
23 namespace WrtDeviceApis {
28 * Events emitted when battery reaches low power level.
30 class EventLow : public Commons::ListenerEvent<EventLow>
37 * Gets remaining battery power (in percents).
38 * @return Remaining battery power.
39 * @remarks Read on the side that receives this event.
41 unsigned int getResult() const;
44 * Sets remaining battery power.
45 * @param result Remining battery power.
46 * @remarks Set on the side that emits this event.
48 void setResult(unsigned int result);
51 unsigned int m_result; ///< Remaining battery power (in percents).
54 typedef DPL::SharedPtr<EventLow> EventLowPtr;
55 typedef Commons::ListenerEventEmitter<EventLow> EventLowEmitter;
56 typedef DPL::SharedPtr<EventLowEmitter> EventLowEmitterPtr;
62 #endif /* WRTDEVICEAPIS_POWER_EVENTLOW_H_ */