tizen 2.3 release
[apps/home/minicontrol.git] / include / minicontrol-internal-handler.h
1 /*
2  * Copyright (c)  2013-2015 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 #ifndef _MINICTRL_HANDLER_INTERNAL_H_
18 #define _MINICTRL_HANDLER_INTERNAL_H_
19
20 #include <dbus/dbus.h>
21 #include <bundle.h>
22 #include "minicontrol-type.h"
23 #include "minicontrol-handler.h"
24
25 struct _minicontrol_h {
26         bundle *data;
27 };
28
29 /*!
30  * contructor/deconstructor
31  */
32 minicontrol_error_e _minictrl_handler_create(minicontrol_h *handler);
33 minicontrol_error_e _minictrl_handler_destroy(minicontrol_h handler);
34 minicontrol_error_e _minictrl_handler_clone(minicontrol_h handler, minicontrol_h *handler_new);
35 minicontrol_error_e _minictrl_handler_check_validation(minicontrol_h handler);
36
37 /*!
38  * pre-defined properties
39  */
40 minicontrol_error_e _minictrl_handler_set_service_name(minicontrol_h handler, const char *name);
41 minicontrol_error_e _minictrl_handler_get_service_name(minicontrol_h handler, char **name);
42 minicontrol_error_e _minictrl_handler_set_category(minicontrol_h handler, const char *category);
43 minicontrol_error_e _minictrl_handler_get_category(minicontrol_h handler, char **category);
44 minicontrol_error_e _minictrl_handler_set_operation(minicontrol_h handler, const char *operation);
45 minicontrol_error_e _minictrl_handler_get_operation(minicontrol_h handler, char **operation);
46 minicontrol_error_e _minictrl_handler_set_priority(minicontrol_h handler, const char *priority);
47 minicontrol_error_e _minictrl_handler_get_priority(minicontrol_h handler, char **priority);
48 minicontrol_error_e _minictrl_handler_set_pid(minicontrol_h handler);
49 minicontrol_error_e _minictrl_handler_get_pid(minicontrol_h handler, int *pid);
50 minicontrol_error_e _minictrl_handler_set_timestamp(minicontrol_h handler, time_t timestamp);
51 minicontrol_error_e _minictrl_handler_get_timestamp(minicontrol_h handler, time_t *timestamp);
52
53 /*!
54  * user-defined properties
55  */
56 minicontrol_error_e _minictrl_handler_add_extradata(minicontrol_h handler, const char *key, const char *value);
57 minicontrol_error_e _minictrl_handler_remove_extradata(minicontrol_h handler, const char *key);
58 minicontrol_error_e _minictrl_handler_get_extradata(minicontrol_h handler, const char *key, char **value);
59
60 /*!
61  * utility functions
62  */
63 minicontrol_error_e _minictrl_handler_get_raw_data(minicontrol_h handler, char **raw_data, int *length);
64 minicontrol_error_e _minictrl_handler_get_handler_from_raw_data(minicontrol_h *handler, char *raw_data, int length);
65
66 #endif /* _MINICTRL_INTERNAL_H_ */
67