bug fix: TC-1152
[profile/ivi/ico-uxf-homescreen.git] / lib / common / CicoGKeyFileConfig.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
10 //==========================================================================
11 /**
12  *  @file   CicoGKeyFileConfig
13  *
14  *  @brief  This file is definition of CicoGKeyFileConfig class
15  */
16 //==========================================================================
17 #ifndef __CICO_G_KEY_FILE_CONFIG_H__
18 #define __CICO_G_KEY_FILE_CONFIG_H__
19
20 #include <glib.h>
21
22 //==========================================================================
23 //  definition
24 //==========================================================================
25 #define ICO_HOMESCREEN_CONFIG_FILE "homescreen.conf"
26 #define ICO_ONSCREEN_CONFIG_FILE   "onscreen.conf"
27 #define ICO_STATUSBAR_CONFIG_FILE  "statusbar.conf"
28
29 #define ICO_TEMP_BUF_SIZE        (256)
30
31 //--------------------------------------------------------------------------
32 /**
33  *  @brief
34  */
35 //--------------------------------------------------------------------------
36 class CicoGKeyFileConfig
37 {
38 public:
39     // constructor
40     CicoGKeyFileConfig();
41
42     // destructor
43     ~CicoGKeyFileConfig();
44
45     // intialize
46     bool Initialize(const char *conf, const char *pkgname = NULL);
47
48     // get integer value
49     int ConfigGetInteger(const char *group_name,
50                          const char *key,
51                          int        default_value);
52
53     // get string value
54     const char* ConfigGetString(const char *group_name,
55                                 const char *key,
56                                 const char *default_value);
57     const char* ConfigGetFilePath(const char *group_name,
58                                   const char *key,
59                                   const char *subdir,
60                                   const char *confdir,
61                                   const char *default_path);
62
63 private:
64     // assignment operator
65     CicoGKeyFileConfig operator=(const CicoGKeyFileConfig&);
66
67     // copy constructor
68     CicoGKeyFileConfig(const CicoGKeyFileConfig&);
69
70 private:
71     GKeyFile *m_gKeyFile;
72 };
73 #endif  // __CICO_G_KEY_FILE_CONFIG_H__
74 // vim: set expandtab ts=4 sw=4: