michael@0: /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: namespace bluetooth { michael@0: michael@0: /** michael@0: * Value structure for returns from bluetooth. Currently modeled after dbus michael@0: * returns, which can be a 32-bit int, an UTF16 string, a bool, or an array of michael@0: * UTF16 strings. Can also hold key-value pairs for dictionary-ish access. michael@0: * michael@0: */ michael@0: union BluetoothValue michael@0: { michael@0: uint32_t; michael@0: nsString; michael@0: bool; michael@0: nsString[]; michael@0: uint8_t[]; michael@0: BluetoothNamedValue[]; michael@0: }; michael@0: michael@0: /** michael@0: * Key-value pair for dicts returned by the bluetooth backend. Used for things michael@0: * like property updates, where the property will have a name and a type. michael@0: * michael@0: */ michael@0: struct BluetoothNamedValue michael@0: { michael@0: nsString name; michael@0: BluetoothValue value; michael@0: }; michael@0: michael@0: struct BluetoothSignal michael@0: { michael@0: nsString name; michael@0: nsString path; michael@0: BluetoothValue value; michael@0: }; michael@0: michael@0: struct BluetoothReplySuccess michael@0: { michael@0: BluetoothValue value; michael@0: }; michael@0: michael@0: struct BluetoothReplyError michael@0: { michael@0: nsString error; michael@0: }; michael@0: michael@0: union BluetoothReply michael@0: { michael@0: BluetoothReplySuccess; michael@0: BluetoothReplyError; michael@0: }; michael@0: michael@0: } michael@0: } michael@0: }