~ubuntu-branches/ubuntu/saucy/bluez/saucy

« back to all changes in this revision

Viewing changes to attrib/att-database.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-07-04 13:28:49 UTC
  • mfrom: (1.1.38)
  • Revision ID: package-import@ubuntu.com-20120704132849-tmwu1x7p2vxcclt1
Tags: 4.101-0ubuntu1
* New upstream release
* debian/libbluetooth3.symbols:
  - Updated
* debian/patches/10-unregister_interface_on_exit.patch:
* debian/patches/11-explicitly_close.patch:
* debian/patches/python3.patch:
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  BlueZ - Bluetooth protocol stack for Linux
 
4
 *
 
5
 *  Copyright (C) 2012 Texas Instruments Corporation
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU General Public License as published by
 
9
 *  the Free Software Foundation; either version 2 of the License, or
 
10
 *  (at your option) any later version.
 
11
 *
 
12
 *  This program is distributed in the hope that it will be useful,
 
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 *  GNU General Public License for more details.
 
16
 *
 
17
 *  You should have received a copy of the GNU General Public License
 
18
 *  along with this program; if not, write to the Free Software
 
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
20
 *
 
21
 */
 
22
 
 
23
/* Requirements for read/write operations */
 
24
enum {
 
25
        ATT_NONE,               /* No restrictions */
 
26
        ATT_AUTHENTICATION,     /* Authentication required */
 
27
        ATT_AUTHORIZATION,      /* Authorization required */
 
28
        ATT_NOT_PERMITTED,      /* Operation not permitted */
 
29
};
 
30
 
 
31
struct attribute {
 
32
        uint16_t handle;
 
33
        bt_uuid_t uuid;
 
34
        int read_reqs;
 
35
        int write_reqs;
 
36
        uint8_t (*read_cb)(struct attribute *a, struct btd_device *device,
 
37
                                                        gpointer user_data);
 
38
        uint8_t (*write_cb)(struct attribute *a, struct btd_device *device,
 
39
                                                        gpointer user_data);
 
40
        gpointer cb_user_data;
 
41
        int len;
 
42
        uint8_t *data;
 
43
};