~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to src/hcid.h

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *
5
5
 *  Copyright (C) 2000-2001  Qualcomm Incorporated
6
6
 *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com>
7
 
 *  Copyright (C) 2002-2009  Marcel Holtmann <marcel@holtmann.org>
 
7
 *  Copyright (C) 2002-2010  Marcel Holtmann <marcel@holtmann.org>
8
8
 *
9
9
 *
10
10
 *  This program is free software; you can redistribute it and/or modify
23
23
 *
24
24
 */
25
25
 
26
 
/* When all services should trust a remote device */
27
 
#define GLOBAL_TRUST "[all]"
28
 
 
29
26
/*
30
27
 * Scanning modes, used by DEV_SET_MODE
31
28
 * off: remote devices are not allowed to find or connect to this device
39
36
#define MODE_OFF                0x00
40
37
#define MODE_CONNECTABLE        0x01
41
38
#define MODE_DISCOVERABLE       0x02
42
 
#define MODE_LIMITED            0x03
43
39
#define MODE_UNKNOWN            0xff
44
40
 
45
 
/* Timeout for hci_send_req (milliseconds) */
46
 
#define HCI_REQ_TIMEOUT         5000
47
 
 
48
41
struct main_opts {
49
42
        char            host_name[40];
50
43
        unsigned long   flags;
57
50
        uint16_t        link_policy;
58
51
        gboolean        remember_powered;
59
52
        gboolean        reverse_sdp;
 
53
        gboolean        name_resolv;
 
54
        gboolean        debug_keys;
 
55
        gboolean        attrib_server;
 
56
        gboolean        le;
60
57
 
61
58
        uint8_t         scan;
62
59
        uint8_t         mode;
63
 
        uint8_t         inqmode;
 
60
        uint8_t         discov_interval;
64
61
        char            deviceid[15]; /* FIXME: */
 
62
};
65
63
 
66
 
        int             sock;
 
64
enum {
 
65
        HCID_SET_NAME,
 
66
        HCID_SET_CLASS,
 
67
        HCID_SET_PAGETO,
 
68
        HCID_SET_DISCOVTO,
67
69
};
68
70
 
69
71
extern struct main_opts main_opts;
70
72
 
71
 
void hci_req_queue_remove(int dev_id, bdaddr_t *dba);
72
 
 
73
 
void start_security_manager(int hdev);
74
 
void stop_security_manager(int hdev);
75
 
 
76
 
void set_pin_length(bdaddr_t *sba, int length);
77
 
 
78
 
gboolean plugin_init(GKeyFile *config);
 
73
void btd_start_exit_timer(void);
 
74
void btd_stop_exit_timer(void);
 
75
 
 
76
gboolean plugin_init(GKeyFile *config, const char *enable,
 
77
                                                        const char *disable);
79
78
void plugin_cleanup(void);
80
79
 
81
 
void __probe_servers(const char *adapter);
82
 
void __remove_servers(const char *adapter);
 
80
void rfkill_init(void);
 
81
void rfkill_exit(void);