HomeScreen: Adding a config to adjust background of menu window
[profile/ivi/ico-uxf-homescreen.git] / lib / common / CicoAilItems.h
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9 #ifndef CICOAILITEMS_H
10 #define CICOAILITEMS_H
11 #include <glib.h>
12 #include <string>
13 #include <vector>
14
15
16 #define DINITm_nodeID -1
17 #define DINITm_kindID -1
18 #define DINITm_categoryID -1
19 #define DINITm_display -1
20 #define DINITm_layer -1
21 #define DINITm_displayZone -1
22 #define DINITm_soundZone -1
23 #define DINITm_sound -1
24 #define DINITm_inputDev -1
25 #define DINITm_switch -1
26 #define DINITm_animationTime 0
27 #define DINITm_invisibleCPU 0
28
29 /**
30  * @brief AIL information data class
31  *
32  */
33
34 class CicoAilItems {
35 public: // member method
36     CicoAilItems();
37     CicoAilItems(const char* pkg, const char* icon, const char* nam,
38                    const char* ctgry, const char* typ, const char* exe,
39                    std::string categorys, bool ndisp);
40     CicoAilItems(const CicoAilItems& rAilItems);
41     ~CicoAilItems();
42
43     void init();
44     void setup(const char* pkg, const char* icon, const char* nam,
45                const char* ctgry, const char* typ, const char* exe,
46                std::string categorys, bool ndisp);
47
48     const CicoAilItems* p() const;
49
50 protected: // member method
51     void categoryParse(const std::string categorys);
52     bool categoryParseRun(const std::string& s);
53     bool categoryParseKind(const std::string& s);
54     bool categoryParseCategory(const std::string& s);
55     bool categoryParseGetValue(const std::string& s, const std::string& k,
56                                std::string & val);
57     bool categoryGetDisplay(const std::string& disp, const std::string& layer,
58                             const std::string& zone);
59     bool categoryGetSound(const std::string& sound, const std::string& zone);
60     bool categoryGetInput(const std::string& inputDev,
61                           const std::string& sw);
62     bool categoryParseNodisplay(const std::string& s);
63     bool categoryParseAnimation(const std::string& s);
64     bool categoryParseInvisiblecpu(const std::string& s);
65     bool categoryParseNoconfigure(const std::string& s);
66     bool categoryParseMenuoverlap(const std::string& s);
67     bool categoryParseAuto(const std::string& s);
68     bool categoryParseNoauto(const std::string& s);
69
70 private: // member method
71
72 public: // member aria
73     std::string m_appid;      // PACKAGE NAME
74     std::string m_icon;       // ICON
75     std::string m_name;       // NAME
76     std::string m_execPath;   // EXEC
77     std::string m_type;       // TYPE
78
79     std::string m_categories; // CATEGORIES
80
81     int  m_nodeID;      // "run=xxx" xxx change to id
82     int  m_kindID;      // "kind=xxx" xxx change to id
83     int  m_categoryID;  // "category=xxx" xxx change to id
84
85     int  m_display;   //
86     int  m_layer;
87     int  m_displayZone; // display zone
88     int  m_soundZone;  // sound zone
89     int  m_sound;
90     int  m_inputDev;   // input device
91     int  m_switch;
92     bool m_noIcon;
93     std::string m_animation;
94     int  m_animationTime;
95     int  m_invisibleCPU;
96     bool m_memnuOverlap;
97     bool m_autoStart; // auto start flag
98
99
100     std::string m_group;
101     std::string m_location;
102     bool m_resumeShow;
103 };
104
105 inline const CicoAilItems* CicoAilItems::p() const
106 {
107     return this;
108 }
109
110 #endif // CICOAILITEMS_H
111 // vim:set expandtab ts=4 sw=4: