~ubuntu-branches/ubuntu/oneiric/bluez/oneiric-201105191013

« back to all changes in this revision

Viewing changes to .pc/02_disable_hal.patch/audio/telephony-maemo5.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-12-20 16:08:47 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20101220160847-wc1907sgz6x3vjz7
Tags: 4.82-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#include "log.h"
40
40
#include "telephony.h"
 
41
#include "error.h"
41
42
 
42
43
/* SSC D-Bus definitions */
43
44
#define SSC_DBUS_NAME  "com.nokia.phone.SSC"
209
210
/* Supported set of call hold operations */
210
211
static const char *chld_str = "0,1,1x,2,2x,3,4";
211
212
 
212
 
/* Response and hold state
213
 
 * -1 = none
214
 
 *  0 = incoming call is put on hold in the AG
215
 
 *  1 = held incoming call is accepted in the AG
216
 
 *  2 = held incoming call is rejected in the AG
217
 
 */
218
 
static int response_and_hold = -1;
219
 
 
220
213
static char *last_dialed_number = NULL;
221
214
 
222
215
/* Timer for tracking call creation requests */
516
509
 
517
510
void telephony_response_and_hold_req(void *telephony_device, int rh)
518
511
{
519
 
        response_and_hold = rh;
520
 
 
521
 
        telephony_response_and_hold_ind(response_and_hold);
522
 
 
523
 
        telephony_response_and_hold_rsp(telephony_device, CME_ERROR_NONE);
 
512
        telephony_response_and_hold_rsp(telephony_device,
 
513
                                                CME_ERROR_NOT_SUPPORTED);
524
514
}
525
515
 
526
516
void telephony_last_dialed_number_req(void *telephony_device)
1880
1870
        }
1881
1871
}
1882
1872
 
1883
 
static inline DBusMessage *invalid_args(DBusMessage *msg)
1884
 
{
1885
 
        return g_dbus_create_error(msg,"org.bluez.Error.InvalidArguments",
1886
 
                                        "Invalid arguments in method call");
1887
 
}
1888
 
 
1889
1873
static uint32_t get_callflag(const char *callerid_setting)
1890
1874
{
1891
1875
        if (callerid_setting != NULL) {
1950
1934
        if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING,
1951
1935
                                                &callerid_setting,
1952
1936
                                                DBUS_TYPE_INVALID) == FALSE)
1953
 
                return invalid_args(msg);
 
1937
                return btd_error_invalid_args(msg);
1954
1938
 
1955
1939
        if (g_str_equal(callerid_setting, "allowed") ||
1956
1940
                        g_str_equal(callerid_setting, "restricted") ||
1964
1948
 
1965
1949
        error("telephony-maemo: invalid argument %s for method call"
1966
1950
                                        " SetCallerId", callerid_setting);
1967
 
                return invalid_args(msg);
 
1951
                return btd_error_invalid_args(msg);
1968
1952
}
1969
1953
 
1970
1954
static GDBusMethodTable telephony_maemo_methods[] = {
2091
2075
        DBG("telephony-maemo registering %s interface on path %s",
2092
2076
                        TELEPHONY_MAEMO_INTERFACE, TELEPHONY_MAEMO_PATH);
2093
2077
 
2094
 
        telephony_ready_ind(features, maemo_indicators, response_and_hold,
 
2078
        telephony_ready_ind(features, maemo_indicators, BTRH_NOT_SUPPORTED,
2095
2079
                                                                chld_str);
2096
2080
        if (send_method_call("org.freedesktop.Hal",
2097
2081
                                "/org/freedesktop/Hal/Manager",
2115
2099
 
2116
2100
        dbus_connection_unref(connection);
2117
2101
        connection = NULL;
 
2102
 
 
2103
        telephony_deinit();
2118
2104
}