at_sms: Add sms module skeleton
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>
Mon, 3 Dec 2012 15:28:49 +0000 (16:28 +0100)
committerwootak.jung <wootak.jung@samsung.com>
Sun, 24 Mar 2013 06:49:04 +0000 (15:49 +0900)
Change-Id: Ibc817934ef6d3db73314f6d294dc15bf30b88d90

include/at_sms.h
src/at_sms.c

index e69de29..00f63bb 100644 (file)
@@ -0,0 +1,25 @@
+/*
+ * tel-plugin-at_standard
+ *
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __AT_SMS_H__
+#define __AT_SMS_H__
+
+gboolean at_sms_init(TcorePlugin *p);
+void at_sms_exit(TcorePlugin *p);
+
+#endif
index e69de29..22a6325 100644 (file)
@@ -0,0 +1,166 @@
+/*
+ * tel-plugin-at_standard
+ *
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <glib.h>
+
+#include <tcore.h>
+#include <server.h>
+#include <plugin.h>
+#include <core_object.h>
+
+#include <co_sms.h>
+
+#include "at_sms.h"
+
+static TReturn send_umts_msg(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn read_msg(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn save_msg(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn delete_msg(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn get_storedMsgCnt(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn get_sca(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_sca(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn get_cb_config(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_cb_config(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_mem_status(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn get_pref_brearer(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_pref_brearer(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_delivery_report(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_msg_status(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn get_sms_params(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn set_sms_params(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn get_paramcnt(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn send_cdma_msg(CoreObject *co_sms, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static struct tcore_sms_operations sms_ops = {
+       .send_umts_msg = send_umts_msg,
+       .read_msg = read_msg,
+       .save_msg = save_msg,
+       .delete_msg = delete_msg,
+       .get_storedMsgCnt = get_storedMsgCnt,
+       .get_sca = get_sca,
+       .set_sca = set_sca,
+       .get_cb_config = get_cb_config,
+       .set_cb_config = set_cb_config,
+       .set_mem_status = set_mem_status,
+       .get_pref_brearer = get_pref_brearer,
+       .set_pref_brearer = set_pref_brearer,
+       .set_delivery_report = set_delivery_report,
+       .set_msg_status = set_msg_status,
+       .get_sms_params = get_sms_params,
+       .set_sms_params = set_sms_params,
+       .get_paramcnt = get_paramcnt,
+       .send_cdma_msg = send_cdma_msg,
+};
+
+gboolean at_sms_init(TcorePlugin *p)
+{
+       CoreObject *co_sms;
+
+       co_sms = tcore_sms_new(p, "umts_sms", &sms_ops, NULL);
+       if (NULL == co_sms)
+               return FALSE;
+
+       return TRUE;
+}
+
+void at_sms_exit(TcorePlugin *p)
+{
+       CoreObject *co_sms;
+
+       co_sms = tcore_plugin_ref_core_object(p, "umts_sms");
+       if (NULL == co_sms)
+               return;
+
+       tcore_sms_free(co_sms);
+}