Tizen 2.1 base
[platform/framework/native/app-service.git] / plugins / alarm-condition-handler / AlarmConditionHandler.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file         alarm_condition_candler.h
20  * @brief       This is the implementation file of the _AlarmConditionHandler class.
21  *
22  */
23
24 #include <FSysAlarm.h>
25 #include <FBaseColHashMap.h>
26
27 #include "FApp_AppLaunchConditionHandlerBase.h"
28
29 /**
30  * @class       _AlarmConditionHandler
31  * @brief       This class implements conditional app launch for alarm condition. (DateTime, DueTime)
32  * @final       This class is not intended for extension.
33  */
34 class _AlarmConditionHandler:
35         public Tizen::App::_AppLaunchConditionHandlerBase
36 {
37
38 public:
39         static _AlarmConditionHandler* GetInstance(void);
40         static void ReleaseInstance(void);
41
42         Tizen::App::_AppLaunchCondition* GetAppLaunchCondition(int alarmId);
43
44         virtual result Register( Tizen::App::_AppLaunchCondition& appLaunchCondition);
45         virtual result Unregister( Tizen::App::_AppLaunchCondition& appLaunchCondition);
46         result Launch(const Tizen::App::_AppLaunchCondition& condition);
47         result Convert(Tizen::App::_AppLaunchCondition& appLaunchCondition, struct tm* pConvertedTime, int& period);
48
49 private:
50         _AlarmConditionHandler(void);
51         virtual ~_AlarmConditionHandler(void);
52
53 private:
54         Tizen::Base::Collection::HashMap        conditionList;
55 };