Home | History | Annotate | Download | only in audio

Lines Matching refs:call

79 /* CSD CALL plugin D-Bus definitions */
80 #define CSD_CALL_BUS_NAME "com.nokia.csd.Call"
81 #define CSD_CALL_INTERFACE "com.nokia.csd.Call"
82 #define CSD_CALL_INSTANCE "com.nokia.csd.Call.Instance"
83 #define CSD_CALL_CONFERENCE "com.nokia.csd.Call.Conference"
84 #define CSD_CALL_PATH "/com/nokia/csd/call"
85 #define CSD_CALL_CONFERENCE_PATH "/com/nokia/csd/call/conference"
87 /* Call status values as exported by the CSD CALL plugin */
153 /* Reference count for determining the call indicator status */
168 /* Supported set of call hold operations */
173 * 0 = incoming call is put on hold in the AG
174 * 1 = held incoming call is accepted in the AG
175 * 2 = held incoming call is rejected in the AG
181 /* Timer for tracking call creation requests */
190 { "call", "0,1", 0, TRUE },
223 struct csd_call *call = l->data;
225 if (g_str_equal(call->object_path, path))
226 return call;
237 struct csd_call *call = l->data;
239 if (call->status == CSD_CALL_STATUS_IDLE)
242 if (call->status != CSD_CALL_STATUS_HOLD)
243 return call;
254 struct csd_call *call = l->data;
256 if (call->status != CSD_CALL_STATUS_IDLE)
257 return call;
268 struct csd_call *call = l->data;
270 if (call->status == status)
271 return call;
281 DBG("telephony-maemo6: releasing conference call");
297 static int release_call(struct csd_call *call)
302 call->object_path,
315 static int answer_call(struct csd_call *call)
320 call->object_path,
333 static int split_call(struct csd_call *call)
338 call->object_path,
351 static int unhold_call(struct csd_call *call)
368 static int hold_call(struct csd_call *call)
500 struct csd_call *call;
503 call = find_call_with_status(CSD_CALL_STATUS_ACTIVE);
504 if (!call)
505 call = find_non_idle_call();
507 if (!call) {
508 error("No active call");
514 if (call->conference)
517 err = release_call(call);
528 struct csd_call *call;
530 call = find_call_with_status(CSD_CALL_STATUS_COMING);
531 if (!call)
532 call = find_call_with_status(CSD_CALL_STATUS_MT_ALERTING);
534 if (!call)
535 call = find_call_with_status(CSD_CALL_STATUS_PROCEEDING);
537 if (!call)
538 call = find_call_with_status(CSD_CALL_STATUS_WAITING);
540 if (!call) {
546 if (answer_call(call) < 0)
559 DBusPendingCall *call;
583 if (!dbus_connection_send_with_reply(connection, msg, &call, -1)) {
589 dbus_pending_call_set_notify(call, cb, user_data, NULL);
590 dbus_pending_call_unref(call);
675 static int csd_status_to_hfp(struct csd_call *call)
677 switch (call->status) {
689 if (call->originating)
721 struct csd_call *call = l->data;
724 status = csd_status_to_hfp(call);
728 direction = call->originating ?
731 multiparty = call->conference ?
736 call->number,
737 number_type(call->number));
751 int (*func)(struct csd_call *call))
756 struct csd_call *call = l->data;
758 if (call->status == status)
759 func(call);
766 struct csd_call *call;
769 DBG("telephony-maemo6: got call hold request %s", cmd);
777 call = g_slist_nth_data(calls, strtol(idx, NULL, 0) - 1);
779 call = NULL;
789 if (call)
790 err = release_call(call);
794 call = find_call_with_status(CSD_CALL_STATUS_WAITING);
795 if (call)
796 err = answer_call(call);
800 if (call)
801 err = split_call(call);
805 call = find_call_with_status(CSD_CALL_STATUS_ACTIVE);
811 else if (call && held)
814 if (call)
815 err = hold_call(call);
830 DBG("Unknown call hold request");
888 struct csd_call *call;
894 error("Unexpected parameters in Call.Coming() signal");
898 call = find_call(call_path);
899 if (!call) {
900 error("Didn't find any matching call object for %s",
905 DBG("Incoming call to %s from number %s", call_path, number);
907 g_free(call->number);
908 call->number = g_strdup(number);
914 telephony_call_waiting_ind(call->number,
915 number_type(call->number));
917 telephony_incoming_call_ind(call->number,
918 number_type(call->number));
924 struct csd_call *call;
930 error("Unexpected parameters in Call.Created() signal");
934 call = find_call(call_path);
935 if (!call) {
936 error("Didn't find any matching call object for %s",
941 DBG("Outgoing call from %s to number %s", call_path, number);
943 g_free(call->number);
944 call->number = g_strdup(number);
965 DBG("Call.CreateRequested()");
978 struct csd_call *call;
991 call = find_call(call_path);
992 if (!call) {
993 error("Didn't find any matching call object for %s",
999 error("Invalid call status %u", status);
1003 DBG("Call %s changed from %s to %s", call_path,
1004 call_status_str[call->status], call_status_str[status]);
1006 if (call->status == (int) status) {
1007 DBG("Ignoring CSD Call state change to existing state");
1011 call->status = (int) status;
1015 if (call->setup) {
1019 if (!call->originating)
1023 g_free(call->number);
1024 call->number = NULL;
1025 call->originating = FALSE;
1026 call->emergency = FALSE;
1027 call->on_hold = FALSE;
1028 call->conference = FALSE;
1029 call->setup = FALSE;
1032 call->originating = TRUE;
1033 call->setup = TRUE;
1036 call->originating = FALSE;
1037 call->setup = TRUE;
1052 if (call->on_hold) {
1053 call->on_hold = FALSE;
1063 if (!g_slist_find(active_calls, call))
1064 active_calls = g_slist_prepend(active_calls, call);
1067 "call",
1077 if (!call->originating)
1079 call->setup = FALSE;
1084 active_calls = g_slist_remove(active_calls, call);
1086 telephony_update_indicator(maemo_indicators, "call",
1092 call->on_hold = TRUE;
1107 if (call->on_hold &&
1121 error("Unknown call status %u", status);
1129 struct csd_call *call;
1139 call = find_call(path);
1140 if (!call) {
1141 error("Conference signal for unknown call %s", path);
1145 DBG("Call %s %s the conference", path, joined ? "joined" : "left");
1147 call->conference = joined;
1297 static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
1304 reply = dbus_pending_call_steal_reply(call);
1411 static void csd_call_free(struct csd_call *call)
1413 if (!call)
1416 g_free(call->object_path);
1417 g_free(call->number);
1419 g_free(call);
1426 struct csd_call *call;
1448 error("Parsing call D-Bus parameters failed");
1452 call = find_call(object_path);
1453 if (!call) {
1454 call = g_new0(struct csd_call, 1);
1455 call->object_path = g_strdup(object_path);
1456 call->status = (int) status;
1457 calls = g_slist_append(calls, call);
1458 DBG("telephony-maemo6: new csd call instance at %s",
1462 if (call->status == CSD_CALL_STATUS_IDLE)
1466 if ((call->status != CSD_CALL_STATUS_HOLD && on_hold) ||
1467 (call->status == CSD_CALL_STATUS_HOLD &&
1469 error("Conflicting call status and on_hold property!");
1470 on_hold = call->status == CSD_CALL_STATUS_HOLD;
1473 call->originating = originating;
1474 call->on_hold = on_hold;
1475 call->conference = conf;
1476 g_free(call->number);
1477 call->number = g_strdup(number);
1493 static void get_property_reply(DBusPendingCall *call, void *user_data)
1500 reply = dbus_pending_call_steal_reply(call);
1568 static void call_info_reply(DBusPendingCall *call, void *user_data)
1576 reply = dbus_pending_call_steal_reply(call);
1603 static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
1612 reply = dbus_pending_call_steal_reply(call);
1657 static void phonebook_read_reply(DBusPendingCall *call, void *user_data)
1665 reply = dbus_pending_call_steal_reply(call);
1715 error("Unable to sent GetCallInfoAll method call");
1750 "Invalid arguments in method call");
1829 error("telephony-maemo6: invalid argument %s for method call"
1869 static void modem_state_reply(DBusPendingCall *call, void *user_data)
1871 DBusMessage *reply = dbus_pending_call_steal_reply(call);
1987 error("Unable to send HAL method call");