- added src/endian.h... still need to add configure support to
[barry.git] / src / protocol.h
blob6fed2fc4edb22f6be3e9b262c3dcc1fa907cdf8c
1 ///
2 /// \file protocol.h
3 /// USB Blackberry bulk protocol API constants
4 ///
6 /*
7 Copyright (C) 2005-2006, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
22 #ifndef __BARRY_PROTOCOL_H__
23 #define __BARRY_PROTOCOL_H__
25 // packet commands (Packet.command: has response codes too)
26 #define SB_COMMAND_SELECT_MODE 0x07
27 #define SB_COMMAND_MODE_SELECTED 0x08
28 #define SB_COMMAND_OPEN_SOCKET 0x0a
29 #define SB_COMMAND_CLOSE_SOCKET 0x0b
30 #define SB_COMMAND_CLOSED_SOCKET 0x0c
31 #define SB_COMMAND_OPENED_SOCKET 0x10
32 #define SB_COMMAND_SEQUENCE_HANDSHAKE 0x13
33 #define SB_COMMAND_DB_DATA 0x40
34 #define SB_COMMAND_DB_FRAGMENTED 0x60
35 #define SB_COMMAND_DB_DONE 0x41
38 // mode constants
39 #define SB_MODE_REQUEST_SOCKET 0x00ff
42 // param command parameters
43 //#define SB_PARAM_DEFAULT 0xff
46 // DB Operation Command
47 #define SB_DBOP_SET_RECORD 0x41
48 #define SB_DBOP_CLEAR_DATABASE 0x43
49 #define SB_DBOP_GET_DBDB 0x4a
50 #define SB_DBOP_OLD_GET_DBDB 0x4c
51 #define SB_DBOP_GET_COUNT 0x4e
52 #define SB_DBOP_GET_RECORDS 0x4f
53 #define SB_DBOP_OLD_GET_RECORDS 0x42
54 #define SB_DBOP_OLD_GET_RECORDS_REPLY 0x44
57 #endif