Fix issue detected by static analysis tool
[platform/core/uifw/libscl-ui.git] / sclres / sclres_manager.h
1 /*
2  * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #ifndef __SCLRES_MANAGER__
19 #define __SCLRES_MANAGER__
20 #include "sclres_type.h"
21
22 class SclResParserManager{
23     public:
24         ~SclResParserManager();
25         static SclResParserManager* get_instance();
26
27     public:
28         void init(const SCLParserType parser_type, const char *entry_filepath);
29
30         /* These functions are for dynamic (lazy) loading layouts */
31         void load(int layout_id);
32         void unload();
33         bool loaded(int layout_id);
34
35         void reload();
36
37         PSclInputModeConfigure get_input_mode_configure_table();
38         PSclLayout get_layout_table();
39         PSclLayoutKeyCoordinatePointerTable get_key_coordinate_pointer_frame();
40         PSclModifierDecoration get_modifier_decoration_table();
41         PSclLabelPropertiesTable get_label_properties_frame();
42         PSclDefaultConfigure get_default_configure();
43         PSclAutoPopupConfigure get_autopopup_configure();
44         PSclMagnifierWndConfigure get_magnifier_configure();
45
46         const char* get_resource_directory();
47         int get_inputmode_id(const char* name);
48         const char* get_inputmode_name(int id);
49         int get_inputmode_size();
50         int get_layout_size();
51         int get_layout_id(const char *name);
52         int get_labelproperty_size();
53         int get_modifier_decoration_id(const char *name);
54         bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info);
55
56         const char* get_name();
57         void destroy();
58
59     private:
60         SclResParserManager();
61         bool m_initialized;
62 };
63
64 #endif