From f0d120a009f62de3c6cac2bdbea4b86b0307ade3 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 21 Feb 2012 17:52:15 +0900 Subject: [PATCH] __SAMSUNG_PATCH__ --> __TIZEN_PATCH__ --- audio/audio.conf | 6 +++--- audio/avdtp.c | 2 +- audio/headset.c | 16 ++++++++-------- debian/rules | 2 +- gdbus/object.c | 4 ++-- network/common.c | 2 +- network/server.c | 24 ++++++++++++------------ packaging/bluez.spec | 2 +- src/adapter.c | 2 +- src/agent.c | 6 +++--- src/device.c | 10 +++++----- src/main.c | 2 +- src/main.conf | 2 +- tools/hciattach.c | 24 ++++++++++++------------ tools/hciattach_ti.c | 4 ++-- 15 files changed, 54 insertions(+), 54 deletions(-) diff --git a/audio/audio.conf b/audio/audio.conf index ec90131..55e5d0d 100644 --- a/audio/audio.conf +++ b/audio/audio.conf @@ -11,12 +11,12 @@ # Defaults to supporting all implemented services #Disable=Control,Source -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ Enable=Socket #endif # SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA) -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ SCORouting=PCM #else # Defaults to HCI @@ -48,7 +48,7 @@ MaxConnected=1 FastConnectable=false # Just an example of potential config options for the other interfaces -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ [A2DP] SBCSources=1 #else diff --git a/audio/avdtp.c b/audio/avdtp.c index 45cd41f..5b7ba90 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -89,7 +89,7 @@ #define AVDTP_MSG_TYPE_ACCEPT 0x02 #define AVDTP_MSG_TYPE_REJECT 0x03 -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ #define REQ_TIMEOUT 10 #else #define REQ_TIMEOUT 6 diff --git a/audio/headset.c b/audio/headset.c index ee4fa90..59d2068 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -166,7 +166,7 @@ struct headset { guint dc_timer; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ guint rfcomm_io_id; #endif gboolean hfp_active; @@ -1204,7 +1204,7 @@ static int voice_dial(struct audio_device *device, const char *buf) return 0; } -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ int telephony_list_phonebook_store_rsp(void *telephony_device, const char *buf, cme_error_t err) { struct audio_device *device = telephony_device; @@ -1551,8 +1551,8 @@ static struct event event_callbacks[] = { { "AT+BVRA", voice_dial }, { "AT+XAPL", apple_command }, { "AT+IPHONEACCEV", apple_command }, -#ifdef __SAMSUNG_PATCH__ - /*SAMSUNG PATCH Starts here*/ +#ifdef __TIZEN_PATCH__ + /*TIZEN PATCH Starts here*/ { "AT+CPBS", select_phonebook_memory }, { "AT+CPBR", read_phonebook_entries}, { "AT+CPBF", find_phonebook_entires }, @@ -1608,7 +1608,7 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, return FALSE; hs = device->headset; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (!hs) return FALSE; #endif @@ -1730,7 +1730,7 @@ void headset_connect_cb(GIOChannel *chan, GError *err, gpointer user_data) else hs->auto_dc = FALSE; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ hs->rfcomm_io_id = g_io_add_watch(chan, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, (GIOFunc) rfcomm_io_cb, dev); @@ -1958,7 +1958,7 @@ static int rfcomm_connect(struct audio_device *dev, headset_stream_cb_t cb, DBG("%s: Connecting to %s channel %d", dev->path, address, hs->rfcomm_ch); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (hs->rfcomm_io_id) { g_source_remove(hs->rfcomm_io_id); hs->rfcomm_io_id = 0; @@ -2492,7 +2492,7 @@ static int headset_close_rfcomm(struct audio_device *dev) hs->rfcomm = NULL; } -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (hs->rfcomm_io_id) { g_source_remove(hs->rfcomm_io_id); hs->rfcomm_io_id = 0; diff --git a/debian/rules b/debian/rules index 99d9cc4..807407c 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,7 @@ config.status: configure dh_testdir # Add here commands to configure the package. - CFLAGS="$(CFLAGS) -D__SAMSUNG_PATCH__ $(BT_CHIP_CFLAGS)" \ + CFLAGS="$(CFLAGS) -D__TIZEN_PATCH__ $(BT_CHIP_CFLAGS)" \ LDFLAGS="$(LDFLAGS) -Wl,--warn-unresolved-symbols" \ ./configure --prefix=$(PREFIX) \ --sysconfdir=$(PREFIX)/etc \ diff --git a/gdbus/object.c b/gdbus/object.c index f0f5613..bb57ce5 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -33,7 +33,7 @@ #include "gdbus.h" -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ #include "log.h" #else #define info(fmt...) @@ -448,7 +448,7 @@ static DBusHandlerResult generic_message(DBusConnection *connection, iface->user_data) == TRUE) return DBUS_HANDLER_RESULT_HANDLED; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ DBG("%s: %s.%s()",dbus_message_get_path(message), iface->name,method->name); #endif diff --git a/network/common.c b/network/common.c index eb24eda..bc6441d 100644 --- a/network/common.c +++ b/network/common.c @@ -250,7 +250,7 @@ int bnep_add_to_bridge(const char *devname, const char *bridge) if (sk < 0) return -1; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ err = ioctl(sk, SIOCBRADDBR, bridge); if (err < 0) { diff --git a/network/server.c b/network/server.c index 5048efe..52590fb 100644 --- a/network/server.c +++ b/network/server.c @@ -79,7 +79,7 @@ struct network_server { GSList *sessions; /* Active connections */ struct network_adapter *na; /* Adapter reference */ guint watch_id; /* Client service watch */ -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ char dev[16]; /* Interface name */ #endif }; @@ -88,7 +88,7 @@ static DBusConnection *connection = NULL; static GSList *adapters = NULL; static gboolean security = TRUE; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ static gboolean server_disconnected_cb(GIOChannel *chan, GIOCondition cond, gpointer user_data); #endif @@ -118,7 +118,7 @@ static struct network_server *find_server(GSList *list, uint16_t id) return NULL; } -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ static struct network_session *find_session(GSList *list, GIOChannel *io) { GSList *l; @@ -302,7 +302,7 @@ static int server_connadd(struct network_server *ns, info("Added new connection: %s", devname); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ { guint watch = 0; @@ -400,7 +400,7 @@ static void setup_destroy(void *user_data) session_free(setup); } -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ static gboolean server_disconnected_cb(GIOChannel *chan, GIOCondition cond, gpointer user_data) { @@ -457,7 +457,7 @@ static gboolean bnep_setup(GIOChannel *chan, struct bnep_setup_conn_req *req = (void *) packet; uint16_t src_role, dst_role, rsp = BNEP_CONN_NOT_ALLOWED; int n, sk; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ gboolean connected = TRUE; #endif @@ -523,13 +523,13 @@ static gboolean bnep_setup(GIOChannel *chan, if (server_connadd(ns, na->setup, dst_role) < 0) goto reply; -#ifndef __SAMSUNG_PATCH__ +#ifndef __TIZEN_PATCH__ na->setup = NULL; #endif rsp = BNEP_SUCCESS; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ { // Emit connected signal to BT application const gchar* adapter_path = adapter_get_path(na->adapter); @@ -730,7 +730,7 @@ static DBusMessage *register_server(DBusConnection *conn, g_free(ns->bridge); ns->bridge = g_strdup(bridge); -#ifndef __SAMSUNG_PATCH__ +#ifndef __TIZEN_PATCH__ ns->watch_id = g_dbus_add_disconnect_watch(conn, dbus_message_get_sender(msg), server_disconnect, ns, NULL); @@ -761,7 +761,7 @@ static DBusMessage *unregister_server(DBusConnection *conn, server_disconnect(conn, ns); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ /* Down the bnep interface, and disconnect all connection */ bnep_kill_all_connections(); bnep_if_down(ns->dev); @@ -829,7 +829,7 @@ static GDBusMethodTable server_methods[] = { { } }; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ static GDBusSignalTable server_signals[] = { { "PeerConnected", "ss" }, { "PeerDisconnected", "ss" }, @@ -891,7 +891,7 @@ int server_register(struct btd_adapter *adapter) path = adapter_get_path(adapter); -#ifndef __SAMSUNG_PATCH__ +#ifndef __TIZEN_PATCH__ if (!g_dbus_register_interface(connection, path, ns->iface, server_methods, NULL, NULL, ns, path_unregister)) { diff --git a/packaging/bluez.spec b/packaging/bluez.spec index ff56920..87ee15c 100644 --- a/packaging/bluez.spec +++ b/packaging/bluez.spec @@ -105,7 +105,7 @@ Scripts for testing BlueZ and its functionality %build -export CFLAGS="${CFLAGS} -D__SAMSUNG_PATCH__ -D__BROADCOM_PATCH__" +export CFLAGS="${CFLAGS} -D__TIZEN_PATCH__ -D__BROADCOM_PATCH__" %reconfigure --disable-static \ --localstatedir=/opt/var \ --enable-pie \ diff --git a/src/adapter.c b/src/adapter.c index 29eda3c..c101932 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -417,7 +417,7 @@ static DBusMessage *set_powered(DBusConnection *conn, DBusMessage *msg, struct btd_adapter *adapter = data; uint8_t mode; int err; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ mode = powered ? get_mode(&adapter->bdaddr, "on") : MODE_OFF; #else if (powered) { diff --git a/src/agent.c b/src/agent.c index cbd19a2..b80fd74 100644 --- a/src/agent.c +++ b/src/agent.c @@ -258,7 +258,7 @@ static void simple_agent_reply(DBusPendingCall *call, void *user_data) error("Agent replied with an error: %s, %s", err.name, err.message); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (strcmp(err.message, "CanceledbyUser") == 0) { set_cancel_from_authentication_req(req->user_data); @@ -373,7 +373,7 @@ static void pincode_reply(DBusPendingCall *call, void *user_data) error("Agent %s replied with an error: %s, %s", agent->path, err.name, err.message); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (strcmp(err.message, "CanceledbyUser") == 0) { set_cancel_from_authentication_req(req->user_data); @@ -545,7 +545,7 @@ static void passkey_reply(DBusPendingCall *call, void *user_data) if (dbus_set_error_from_message(&err, message)) { error("Agent replied with an error: %s, %s", err.name, err.message); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (strcmp(err.message, "CanceledbyUser") == 0) { set_cancel_from_authentication_req(req->user_data); diff --git a/src/device.c b/src/device.c index a9e6e1d..22e59b5 100644 --- a/src/device.c +++ b/src/device.c @@ -85,7 +85,7 @@ struct bonding_req { DBusMessage *msg; GIOChannel *io; guint listener_id; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ guint cancel_by_user; #endif struct btd_device *device; @@ -2146,7 +2146,7 @@ static DBusMessage *new_authentication_return(DBusMessage *msg, int status) ERROR_INTERFACE ".AuthenticationCanceled", "Authentication Canceled"); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ case 0x2a: /* Cancel by agent */ return dbus_message_new_error(msg, ERROR_INTERFACE ".CanceledbyUser", @@ -2221,7 +2221,7 @@ static void device_agent_removed(struct agent *agent, void *user_data) struct btd_device *device = user_data; device->agent = NULL; -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (device->authr && (device->authr->agent == agent)) { DBG("device->agent is the same with authr->agent"); device->authr->agent = NULL; @@ -2288,7 +2288,7 @@ static void create_bond_req_exit(DBusConnection *conn, void *user_data) device_request_disconnect(device, NULL); } } -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ void set_cancel_from_authentication_req(void *user_data) { struct authentication_req *auth = (struct authentication_req *)user_data; @@ -2473,7 +2473,7 @@ void device_cancel_bonding(struct btd_device *device, uint8_t status) if (device->authr) device_cancel_authentication(device, FALSE); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ if (bonding->cancel_by_user) { info("Bonding Cancel by user"); diff --git a/src/main.c b/src/main.c index 86881eb..ec71c6d 100644 --- a/src/main.c +++ b/src/main.c @@ -239,7 +239,7 @@ static void init_defaults(void) { /* Default HCId settings */ memset(&main_opts, 0, sizeof(main_opts)); -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ main_opts.mode = MODE_DISCOVERABLE; #else main_opts.mode = MODE_CONNECTABLE; diff --git a/src/main.conf b/src/main.conf index 00788c9..2b3738c 100644 --- a/src/main.conf +++ b/src/main.conf @@ -10,7 +10,7 @@ Name = %h-%d # Default device class. Only the major and minor device class bits are # considered. -#ifdef __SAMSUNG_PATCH__ +#ifdef __TIZEN_PATCH__ Class = 0x00020C # Smart phone #else #Class = 0x000100 diff --git a/tools/hciattach.c b/tools/hciattach.c index 77faf02..544ef61 100644 --- a/tools/hciattach.c +++ b/tools/hciattach.c @@ -68,7 +68,7 @@ struct uart_t { int (*init) (int fd, struct uart_t *u, struct termios *ti); int (*post) (int fd, struct uart_t *u, struct termios *ti); -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ uint16_t device_param; #endif @@ -1009,7 +1009,7 @@ static int bcm2035(int fd, struct uart_t *u, struct termios *ti) memset(cmd, 0, sizeof(cmd)); memset(resp, 0, sizeof(resp)); -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifndef __BROADCOM_PATCH__ cmd[0] = HCI_COMMAND_PKT; cmd[1] = 0x18; @@ -1117,7 +1117,7 @@ struct uart_t uart[] = { { "swave", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, DISABLE_PM, NULL, swave }, -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ /* Texas Instruments BRF63xx modules */ { "texas", 0x0000, 0x0000, HCI_UART_LL, 115200,3000000, FLOW_CTL, NULL, texas, NULL/*texas_continue_script*/, BRF_DEEP_SLEEP_OPCODE}, @@ -1227,7 +1227,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) int fd, i; unsigned long flags = 0; -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__) int power; #endif @@ -1249,7 +1249,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) cfmakeraw(&ti); -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifndef __BROADCOM_PATCH__ ti.c_cflag |= CLOCAL; if (u->flags & FLOW_CTL) @@ -1276,7 +1276,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) usleep(500000); } -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__) /* Power up the BRF chip */ power = 1; @@ -1325,7 +1325,7 @@ static void usage(void) printf("hciattach - HCI UART driver initialization utility\n"); printf("Usage:\n"); -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ printf("\thciattach [-n] [-p] [-b] [-g device_param] [-r] [-f] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]\n"); #else @@ -1347,7 +1347,7 @@ int main(int argc, char *argv[]) sigset_t sigs; char dev[PATH_MAX]; -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__) int power; #endif @@ -1382,7 +1382,7 @@ int main(int argc, char *argv[]) to = atoi(optarg); break; -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ case 'g': device_param = (uint16_t)strtol(optarg, NULL, 16); @@ -1418,7 +1418,7 @@ int main(int argc, char *argv[]) } n = argc - optind; -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ if (!reset_device || (reset_device && n < 1)) #endif @@ -1479,7 +1479,7 @@ int main(int argc, char *argv[]) break; } } -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ if (reset_device) { @@ -1582,7 +1582,7 @@ int main(int argc, char *argv[]) exit(1); } -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__) /* Power down the BRF or BCMchip */ power = 0; diff --git a/tools/hciattach_ti.c b/tools/hciattach_ti.c index f087aa9..3546d60 100644 --- a/tools/hciattach_ti.c +++ b/tools/hciattach_ti.c @@ -57,7 +57,7 @@ #define TI_MANUFACTURER_ID 13 -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ #define FIRMWARE_DIRECTORY1 "/mnt/mmc/" #define FIRMWARE_DIRECTORY2 "/usr/etc/bluetooth/" @@ -205,7 +205,7 @@ static const char *get_firmware_name(const uint8_t *respond) if (version & 0x8000) maj_ver |= 0x0008; -/* __SAMSUNG_PATCH__ */ +/* __TIZEN_PATCH__ */ #ifdef __TI_PATCH__ FILE *fp; sprintf(firmware_file_name, FIRMWARE_DIRECTORY1 "TIInit_%d.%d.%d.bts", chip, maj_ver, min_ver); -- 2.7.4