at_call: add call module skeleton
authorCaiwen Zhang <caiwen.zhang@intel.com>
Thu, 20 Dec 2012 15:53:00 +0000 (23:53 +0800)
committerwootak.jung <wootak.jung@samsung.com>
Sun, 24 Mar 2013 06:49:10 +0000 (15:49 +0900)
Change-Id: I379b7a5322b5ceadec14fc6ee81cfb78812c88a7

include/at_call.h
src/at_call.c

index e69de29..f04f01a 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_CALL_H__
+#define __AT_CALL_H__
+
+gboolean at_call_init(TcorePlugin *p);
+void at_call_exit(TcorePlugin *p);
+
+#endif
index e69de29..ed60006 100644 (file)
@@ -0,0 +1,149 @@
+/*
+ * 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 <glib.h>
+
+#include <tcore.h>
+#include <hal.h>
+#include <core_object.h>
+#include <plugin.h>
+#include <queue.h>
+#include <server.h>
+#include <co_call.h>
+
+static TReturn call_dial(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_answer(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_release(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_hold(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_active(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_swap(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_join(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_split(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_deflect(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_transfer(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn send_dtmf(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_mute(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_unmute(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static TReturn call_get_mute_status(CoreObject *co, UserRequest *ur)
+{
+       return TCORE_RETURN_ENOSYS;
+}
+
+static struct tcore_call_operations call_ops = {
+       .dial = call_dial,
+       .answer = call_answer,
+       .end = call_release,
+       .hold = call_hold,
+       .active = call_active,
+       .swap = call_swap,
+       .join = call_join,
+       .split = call_split,
+       .deflect = call_deflect,
+       .transfer = call_transfer,
+       .send_dtmf = send_dtmf,
+       .set_sound_path = NULL,
+       .set_sound_volume_level = NULL,
+       .get_sound_volume_level = NULL,
+       .mute = call_mute,
+       .unmute = call_unmute,
+       .get_mute_status = call_get_mute_status,
+       .set_sound_recording = NULL,
+       .set_sound_equalization = NULL,
+       .set_sound_noise_reduction = NULL,
+};
+
+gboolean at_call_init(TcorePlugin *p)
+{
+       CoreObject *co = NULL;
+
+       co = tcore_call_new(p, "call", &call_ops, NULL);
+       if (NULL == co)
+               return FALSE;
+
+       return TRUE;
+}
+
+void at_call_exit(TcorePlugin *p)
+{
+       CoreObject *co;
+
+       if (NULL == p)
+               return;
+
+       co = tcore_plugin_ref_core_object(p, "call");
+       if (NULL == co)
+               return;
+
+       tcore_call_free(co);
+}