Migrate to openssl 3.0
[platform/core/telephony/tel-plugin-manager.git] / src / desc-manager.c
1 /*
2  * tel-plugin-manager
3  *
4  * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Suresh Kumar N <suresh.n@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 #include <glib.h>
22 #include <tcore.h>
23 #include <plugin.h>
24
25 #include "manager_core.h"
26
27 static gboolean on_load()
28 {
29         dbg("Load!!!");
30
31         return TRUE;
32 }
33
34 static gboolean on_init(TcorePlugin *plugin)
35 {
36         gboolean ret;
37
38         dbg("Init!!!");
39
40         if (plugin == NULL)
41                 return FALSE;
42
43         /* Initialize Manager core */
44         ret = manager_core_init(plugin);
45         info("Init - [%s]", ret ? "Success" : "Fail");
46
47         return ret;
48 }
49
50 static void on_unload(TcorePlugin *plugin)
51 {
52         dbg("Unload!!!");
53
54         if (plugin == NULL)
55                 return;
56
57         return manager_core_deinit(plugin);
58 }
59
60 /* Manager Plug-in Descriptor */
61 EXPORT_API struct tcore_plugin_define_desc plugin_define_desc = {
62         .name = "manager",
63         .priority = TCORE_PLUGIN_PRIORITY_MID + 2,
64         .version = 1,
65         .load = on_load,
66         .init = on_init,
67         .unload = on_unload
68 };
69