# 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
FastConnectable=false
# Just an example of potential config options for the other interfaces
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
[A2DP]
SBCSources=1
#else
#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
guint dc_timer;
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
guint rfcomm_io_id;
#endif
gboolean hfp_active;
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;
{ "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 },
return FALSE;
hs = device->headset;
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
if (!hs)
return FALSE;
#endif
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);
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;
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;
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 \
#include "gdbus.h"
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
#include "log.h"
#else
#define info(fmt...)
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
if (sk < 0)
return -1;
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
err = ioctl(sk, SIOCBRADDBR, bridge);
if (err < 0)
{
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
};
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
return NULL;
}
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
static struct network_session *find_session(GSList *list, GIOChannel *io)
{
GSList *l;
info("Added new connection: %s", devname);
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
{
guint watch = 0;
session_free(setup);
}
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
static gboolean server_disconnected_cb(GIOChannel *chan,
GIOCondition cond, gpointer user_data)
{
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
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);
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);
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);
{ }
};
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
static GDBusSignalTable server_signals[] = {
{ "PeerConnected", "ss" },
{ "PeerDisconnected", "ss" },
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)) {
%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 \
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) {
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);
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);
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);
DBusMessage *msg;
GIOChannel *io;
guint listener_id;
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
guint cancel_by_user;
#endif
struct btd_device *device;
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",
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;
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;
if (device->authr)
device_cancel_authentication(device, FALSE);
-#ifdef __SAMSUNG_PATCH__
+#ifdef __TIZEN_PATCH__
if (bonding->cancel_by_user)
{
info("Bonding Cancel by user");
{
/* 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;
# 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
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
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;
{ "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},
int fd, i;
unsigned long flags = 0;
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__)
int power;
#endif
cfmakeraw(&ti);
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#ifndef __BROADCOM_PATCH__
ti.c_cflag |= CLOCAL;
if (u->flags & FLOW_CTL)
usleep(500000);
}
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__)
/* Power up the BRF chip */
power = 1;
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] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
#else
sigset_t sigs;
char dev[PATH_MAX];
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__)
int power;
#endif
to = atoi(optarg);
break;
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#ifdef __TI_PATCH__
case 'g':
device_param = (uint16_t)strtol(optarg, NULL, 16);
}
n = argc - optind;
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#ifdef __TI_PATCH__
if (!reset_device || (reset_device && n < 1))
#endif
break;
}
}
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#ifdef __TI_PATCH__
if (reset_device)
{
exit(1);
}
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#if defined(__TI_PATCH__) || defined(__BROADCOM_PATCH__)
/* Power down the BRF or BCMchip */
power = 0;
#define TI_MANUFACTURER_ID 13
-/* __SAMSUNG_PATCH__ */
+/* __TIZEN_PATCH__ */
#ifdef __TI_PATCH__
#define FIRMWARE_DIRECTORY1 "/mnt/mmc/"
#define FIRMWARE_DIRECTORY2 "/usr/etc/bluetooth/"
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);