[Widget-manifest-parser] Remove LocalManifestData
[platform/core/appfw/app-installers.git] / src / widget-manifest-parser / widget_manifest_parser.h
1 // Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
2 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE-xwalk file.
5
6 #ifndef WIDGET_MANIFEST_PARSER_WIDGET_MANIFEST_PARSER_H_
7 #define WIDGET_MANIFEST_PARSER_WIDGET_MANIFEST_PARSER_H_
8
9 #include <stdbool.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 // Represents a manifest data
16 struct ManifestData {
17   char* package;
18   char* id;
19   char* name;
20   char* short_name;
21   char* version;
22   char* icon;
23   char* api_version;
24   unsigned int privilege_count;
25   char** privilege_list;
26 };
27
28 // Reads manifest from specified file and filles specified data argument
29 // with read data. Returns true on success or false otherwise. If the error
30 // parameter is specified, it is also filled with proper message.
31 bool ParseManifest(const char* path,
32     const ManifestData** data, const char** error);
33
34 // Releses the data and the error returned by ParseManifest.
35 void ReleaseData(const ManifestData* data, const char* error);
36
37 #ifdef __cplusplus
38 }  // extern "C"
39 #endif
40
41 #endif  // WIDGET_MANIFEST_PARSER_WIDGET_MANIFEST_PARSER_H_