Updated Request send APIs (to provide normal and extended APIs) 24/19624/1
authorSuresh Kumar N <suresh.n@samsung.com>
Thu, 10 Apr 2014 09:50:10 +0000 (15:20 +0530)
committerDongchul Lim <dc7.lim@samsung.com>
Thu, 17 Apr 2014 02:04:35 +0000 (11:04 +0900)
Change-Id: I13746b8f87ca3060bfa9ae9ae7e080a6758b3f9c

include/at.h
src/at.c

index b7bbacb..e5d365e 100644 (file)
@@ -87,11 +87,10 @@ gchar *tcore_at_tok_extract(const gchar *src);
 gchar *tcore_at_tok_nth(GSList *tokens, guint index);
 
 TelReturn tcore_at_prepare_and_send_request(CoreObject *co,
-       const gchar *cmd, const gchar *prefix, TcoreAtCommandType type,
-       TcorePendingPriority priority, void *request,
+       const gchar *cmd, const gchar *prefix,
+       TcoreAtCommandType type, void *request,
        TcorePendingResponseCallback resp_cb, void *resp_cb_data,
-       TcorePendingSendCallback send_cb, void *send_cb_data,
-       guint timeout, TcorePendingTimeoutCallback timeout_cb, void *timeout_cb_data);
+       TcorePendingSendCallback send_cb, void *send_cb_data);
 TelReturn tcore_at_prepare_and_send_request_ex(CoreObject *co,
        const gchar *cmd, const gchar *prefix, TcoreAtCommandType type,
        TcorePendingPriority priority, void *request,
index a297e75..1c4c42b 100644 (file)
--- a/src/at.c
+++ b/src/at.c
@@ -1019,11 +1019,10 @@ gboolean tcore_at_add_hook(TcoreHal *hal, void *hook_func)
 }
 
 TelReturn tcore_at_prepare_and_send_request(CoreObject *co,
-       const gchar *cmd, const gchar *prefix, TcoreAtCommandType type,
-       TcorePendingPriority priority, void *request,
+       const gchar *cmd, const gchar *prefix,
+       TcoreAtCommandType type, void *request,
        TcorePendingResponseCallback resp_cb, void *resp_cb_data,
-       TcorePendingSendCallback send_cb, void *send_cb_data,
-       guint timeout, TcorePendingTimeoutCallback timeout_cb, void *timeout_cb_data)
+       TcorePendingSendCallback send_cb, void *send_cb_data)
 {
        TcorePending *pending;
        TcoreAtRequest *at_req;
@@ -1056,21 +1055,21 @@ TelReturn tcore_at_prepare_and_send_request(CoreObject *co,
        tcore_pending_set_request_data(pending, 0, at_req);
        tcore_pending_link_request(pending, request);
 
-       tcore_pending_set_priority(pending, priority);
+       tcore_pending_set_priority(pending, TCORE_PENDING_PRIORITY_DEFAULT);
 
        tcore_pending_set_response_callback(pending, resp_cb, resp_cb_data);
        tcore_pending_set_send_callback(pending, send_cb, send_cb_data);
 
-       if (timeout > 0)
-               tcore_pending_set_timeout(pending, timeout);
-       tcore_pending_set_timeout_callback(pending, timeout_cb, timeout_cb_data);
-
        ret = tcore_hal_send_request(hal, pending);
        dbg("ret: [0x%x]", ret);
 
        return ret;
 }
 
+/*
+ * Extended API
+ *     Provides more control on the AT-Command request being sent
+ */
 TelReturn tcore_at_prepare_and_send_request_ex(CoreObject *co,
        const gchar *cmd, const gchar *prefix, TcoreAtCommandType type,
        TcorePendingPriority priority, void *request,