Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 namespace mozilla {
8 namespace dom {
9 namespace bluetooth {
11 /**
12 * Value structure for returns from bluetooth. Currently modeled after dbus
13 * returns, which can be a 32-bit int, an UTF16 string, a bool, or an array of
14 * UTF16 strings. Can also hold key-value pairs for dictionary-ish access.
15 *
16 */
17 union BluetoothValue
18 {
19 uint32_t;
20 nsString;
21 bool;
22 nsString[];
23 uint8_t[];
24 BluetoothNamedValue[];
25 };
27 /**
28 * Key-value pair for dicts returned by the bluetooth backend. Used for things
29 * like property updates, where the property will have a name and a type.
30 *
31 */
32 struct BluetoothNamedValue
33 {
34 nsString name;
35 BluetoothValue value;
36 };
38 struct BluetoothSignal
39 {
40 nsString name;
41 nsString path;
42 BluetoothValue value;
43 };
45 struct BluetoothReplySuccess
46 {
47 BluetoothValue value;
48 };
50 struct BluetoothReplyError
51 {
52 nsString error;
53 };
55 union BluetoothReply
56 {
57 BluetoothReplySuccess;
58 BluetoothReplyError;
59 };
61 }
62 }
63 }