at_call: add call module skeleton
[platform/core/telephony/tel-plugin-at_standard.git] / src / at_sms.c
1 /*
2  * tel-plugin-at_standard
3  *
4  * Copyright (c) 2012 Intel Corporation. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <unistd.h>
23
24 #include <glib.h>
25
26 #include <tcore.h>
27 #include <server.h>
28 #include <plugin.h>
29 #include <core_object.h>
30
31 #include <co_sms.h>
32
33 #include "at_sms.h"
34
35 static TReturn send_umts_msg(CoreObject *co_sms, UserRequest *ur)
36 {
37         return TCORE_RETURN_ENOSYS;
38 }
39
40 static TReturn read_msg(CoreObject *co_sms, UserRequest *ur)
41 {
42         return TCORE_RETURN_ENOSYS;
43 }
44
45 static TReturn save_msg(CoreObject *co_sms, UserRequest *ur)
46 {
47         return TCORE_RETURN_ENOSYS;
48 }
49
50 static TReturn delete_msg(CoreObject *co_sms, UserRequest *ur)
51 {
52         return TCORE_RETURN_ENOSYS;
53 }
54
55 static TReturn get_storedMsgCnt(CoreObject *co_sms, UserRequest *ur)
56 {
57         return TCORE_RETURN_ENOSYS;
58 }
59
60 static TReturn get_sca(CoreObject *co_sms, UserRequest *ur)
61 {
62         return TCORE_RETURN_ENOSYS;
63 }
64
65 static TReturn set_sca(CoreObject *co_sms, UserRequest *ur)
66 {
67         return TCORE_RETURN_ENOSYS;
68 }
69
70 static TReturn get_cb_config(CoreObject *co_sms, UserRequest *ur)
71 {
72         return TCORE_RETURN_ENOSYS;
73 }
74
75 static TReturn set_cb_config(CoreObject *co_sms, UserRequest *ur)
76 {
77         return TCORE_RETURN_ENOSYS;
78 }
79
80 static TReturn set_mem_status(CoreObject *co_sms, UserRequest *ur)
81 {
82         return TCORE_RETURN_ENOSYS;
83 }
84
85 static TReturn get_pref_brearer(CoreObject *co_sms, UserRequest *ur)
86 {
87         return TCORE_RETURN_ENOSYS;
88 }
89
90 static TReturn set_pref_brearer(CoreObject *co_sms, UserRequest *ur)
91 {
92         return TCORE_RETURN_ENOSYS;
93 }
94
95 static TReturn set_delivery_report(CoreObject *co_sms, UserRequest *ur)
96 {
97         return TCORE_RETURN_ENOSYS;
98 }
99
100 static TReturn set_msg_status(CoreObject *co_sms, UserRequest *ur)
101 {
102         return TCORE_RETURN_ENOSYS;
103 }
104
105 static TReturn get_sms_params(CoreObject *co_sms, UserRequest *ur)
106 {
107         return TCORE_RETURN_ENOSYS;
108 }
109
110 static TReturn set_sms_params(CoreObject *co_sms, UserRequest *ur)
111 {
112         return TCORE_RETURN_ENOSYS;
113 }
114
115 static TReturn get_paramcnt(CoreObject *co_sms, UserRequest *ur)
116 {
117         return TCORE_RETURN_ENOSYS;
118 }
119
120 static TReturn send_cdma_msg(CoreObject *co_sms, UserRequest *ur)
121 {
122         return TCORE_RETURN_ENOSYS;
123 }
124
125 static struct tcore_sms_operations sms_ops = {
126         .send_umts_msg = send_umts_msg,
127         .read_msg = read_msg,
128         .save_msg = save_msg,
129         .delete_msg = delete_msg,
130         .get_storedMsgCnt = get_storedMsgCnt,
131         .get_sca = get_sca,
132         .set_sca = set_sca,
133         .get_cb_config = get_cb_config,
134         .set_cb_config = set_cb_config,
135         .set_mem_status = set_mem_status,
136         .get_pref_brearer = get_pref_brearer,
137         .set_pref_brearer = set_pref_brearer,
138         .set_delivery_report = set_delivery_report,
139         .set_msg_status = set_msg_status,
140         .get_sms_params = get_sms_params,
141         .set_sms_params = set_sms_params,
142         .get_paramcnt = get_paramcnt,
143         .send_cdma_msg = send_cdma_msg,
144 };
145
146 gboolean at_sms_init(TcorePlugin *p)
147 {
148         CoreObject *co_sms;
149
150         co_sms = tcore_sms_new(p, "umts_sms", &sms_ops, NULL);
151         if (NULL == co_sms)
152                 return FALSE;
153
154         return TRUE;
155 }
156
157 void at_sms_exit(TcorePlugin *p)
158 {
159         CoreObject *co_sms;
160
161         co_sms = tcore_plugin_ref_core_object(p, "umts_sms");
162         if (NULL == co_sms)
163                 return;
164
165         tcore_sms_free(co_sms);
166 }