Blame lib/bluetooth-enums.h

Packit 8fb625
/*
Packit 8fb625
 *
Packit 8fb625
 *  BlueZ - Bluetooth protocol stack for Linux
Packit 8fb625
 *
Packit 8fb625
 *  Copyright (C) 2005-2008  Marcel Holtmann <marcel@holtmann.org>
Packit 8fb625
 *
Packit 8fb625
 *
Packit 8fb625
 *  This library is free software; you can redistribute it and/or
Packit 8fb625
 *  modify it under the terms of the GNU Lesser General Public
Packit 8fb625
 *  License as published by the Free Software Foundation; either
Packit 8fb625
 *  version 2.1 of the License, or (at your option) any later version.
Packit 8fb625
 *
Packit 8fb625
 *  This library is distributed in the hope that it will be useful,
Packit 8fb625
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 8fb625
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 8fb625
 *  Lesser General Public License for more details.
Packit 8fb625
 *
Packit 8fb625
 *  You should have received a copy of the GNU Lesser General Public
Packit 8fb625
 *  License along with this library; if not, write to the Free Software
Packit 8fb625
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Packit 8fb625
 *
Packit 8fb625
 */
Packit 8fb625
Packit 8fb625
#ifndef __BLUETOOTH_ENUMS_H
Packit 8fb625
#define __BLUETOOTH_ENUMS_H
Packit 8fb625
Packit 8fb625
#include <glib.h>
Packit 8fb625
Packit 8fb625
G_BEGIN_DECLS
Packit 8fb625
Packit 8fb625
/**
Packit 8fb625
 * SECTION:bluetooth-enums
Packit 8fb625
 * @short_description: Bluetooth related enumerations
Packit 8fb625
 * @stability: Stable
Packit 8fb625
 * @include: bluetooth-enums.h
Packit 8fb625
 *
Packit 8fb625
 * Enumerations related to Bluetooth.
Packit 8fb625
 **/
Packit 8fb625
Packit 8fb625
/**
Packit 8fb625
 * BluetoothCategory:
Packit 8fb625
 * @BLUETOOTH_CATEGORY_ALL: all devices
Packit 8fb625
 * @BLUETOOTH_CATEGORY_PAIRED: paired devices
Packit 8fb625
 * @BLUETOOTH_CATEGORY_TRUSTED: trusted devices
Packit 8fb625
 * @BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED: neither paired, nor trusted devices
Packit 8fb625
 * @BLUETOOTH_CATEGORY_PAIRED_OR_TRUSTED: paired and/or trusted devices
Packit 8fb625
 *
Packit 8fb625
 * The category of a Bluetooth devices.
Packit 8fb625
 **/
Packit 8fb625
typedef enum {
Packit 8fb625
	BLUETOOTH_CATEGORY_ALL,
Packit 8fb625
	BLUETOOTH_CATEGORY_PAIRED,
Packit 8fb625
	BLUETOOTH_CATEGORY_TRUSTED,
Packit 8fb625
	BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED,
Packit 8fb625
	BLUETOOTH_CATEGORY_PAIRED_OR_TRUSTED,
Packit 8fb625
	/* < private > */
Packit 8fb625
	BLUETOOTH_CATEGORY_NUM_CATEGORIES /*< skip >*/
Packit 8fb625
} BluetoothCategory;
Packit 8fb625
Packit 8fb625
/**
Packit 8fb625
 * BluetoothType:
Packit 8fb625
 * @BLUETOOTH_TYPE_ANY: any device, or a device of an unknown type
Packit 8fb625
 * @BLUETOOTH_TYPE_PHONE: a telephone (usually a cell/mobile phone)
Packit 8fb625
 * @BLUETOOTH_TYPE_MODEM: a modem
Packit 8fb625
 * @BLUETOOTH_TYPE_COMPUTER: a computer, can be a laptop, a wearable computer, etc.
Packit 8fb625
 * @BLUETOOTH_TYPE_NETWORK: a network device, such as a router
Packit 8fb625
 * @BLUETOOTH_TYPE_HEADSET: a headset (usually a hands-free device)
Packit 8fb625
 * @BLUETOOTH_TYPE_HEADPHONES: headphones (covers two ears)
Packit 8fb625
 * @BLUETOOTH_TYPE_OTHER_AUDIO: another type of audio device
Packit 8fb625
 * @BLUETOOTH_TYPE_KEYBOARD: a keyboard
Packit 8fb625
 * @BLUETOOTH_TYPE_MOUSE: a mouse
Packit 8fb625
 * @BLUETOOTH_TYPE_CAMERA: a camera (still or moving)
Packit 8fb625
 * @BLUETOOTH_TYPE_PRINTER: a printer
Packit 8fb625
 * @BLUETOOTH_TYPE_JOYPAD: a joypad, joystick, or other game controller
Packit 8fb625
 * @BLUETOOTH_TYPE_TABLET: a drawing tablet
Packit 8fb625
 * @BLUETOOTH_TYPE_VIDEO: a video device, such as a webcam
Packit 8fb625
 * @BLUETOOTH_TYPE_REMOTE_CONTROL: a remote control
Packit 8fb625
 * @BLUETOOTH_TYPE_SCANNER: a scanner
Packit 8fb625
 * @BLUETOOTH_TYPE_DISPLAY: a display
Packit 8fb625
 * @BLUETOOTH_TYPE_WEARABLE: a wearable computer
Packit 8fb625
 * @BLUETOOTH_TYPE_TOY: a toy or game
Packit 8fb625
 *
Packit 8fb625
 * The type of a Bluetooth device. See also %BLUETOOTH_TYPE_INPUT and %BLUETOOTH_TYPE_AUDIO
Packit 8fb625
 **/
Packit 8fb625
typedef enum {
Packit 8fb625
	BLUETOOTH_TYPE_ANY		= 1 << 0,
Packit 8fb625
	BLUETOOTH_TYPE_PHONE		= 1 << 1,
Packit 8fb625
	BLUETOOTH_TYPE_MODEM		= 1 << 2,
Packit 8fb625
	BLUETOOTH_TYPE_COMPUTER		= 1 << 3,
Packit 8fb625
	BLUETOOTH_TYPE_NETWORK		= 1 << 4,
Packit 8fb625
	BLUETOOTH_TYPE_HEADSET		= 1 << 5,
Packit 8fb625
	BLUETOOTH_TYPE_HEADPHONES	= 1 << 6,
Packit 8fb625
	BLUETOOTH_TYPE_OTHER_AUDIO	= 1 << 7,
Packit 8fb625
	BLUETOOTH_TYPE_KEYBOARD		= 1 << 8,
Packit 8fb625
	BLUETOOTH_TYPE_MOUSE		= 1 << 9,
Packit 8fb625
	BLUETOOTH_TYPE_CAMERA		= 1 << 10,
Packit 8fb625
	BLUETOOTH_TYPE_PRINTER		= 1 << 11,
Packit 8fb625
	BLUETOOTH_TYPE_JOYPAD		= 1 << 12,
Packit 8fb625
	BLUETOOTH_TYPE_TABLET		= 1 << 13,
Packit 8fb625
	BLUETOOTH_TYPE_VIDEO		= 1 << 14,
Packit 8fb625
	BLUETOOTH_TYPE_REMOTE_CONTROL	= 1 << 15,
Packit 8fb625
	BLUETOOTH_TYPE_SCANNER		= 1 << 16,
Packit 8fb625
	BLUETOOTH_TYPE_DISPLAY		= 1 << 17,
Packit 8fb625
	BLUETOOTH_TYPE_WEARABLE		= 1 << 18,
Packit 8fb625
	BLUETOOTH_TYPE_TOY		= 1 << 19
Packit 8fb625
} BluetoothType;
Packit 8fb625
Packit 8fb625
#define _BLUETOOTH_TYPE_NUM_TYPES 20
Packit 8fb625
Packit 8fb625
/**
Packit 8fb625
 * BLUETOOTH_TYPE_INPUT:
Packit 8fb625
 *
Packit 8fb625
 * Use this value to select any Bluetooth input device where a #BluetoothType enum is required.
Packit 8fb625
 */
Packit 8fb625
#define BLUETOOTH_TYPE_INPUT (BLUETOOTH_TYPE_KEYBOARD | BLUETOOTH_TYPE_MOUSE | BLUETOOTH_TYPE_TABLET | BLUETOOTH_TYPE_JOYPAD)
Packit 8fb625
/**
Packit 8fb625
 * BLUETOOTH_TYPE_AUDIO:
Packit 8fb625
 *
Packit 8fb625
 * Use this value to select any Bluetooth audio device where a #BluetoothType enum is required.
Packit 8fb625
 */
Packit 8fb625
#define BLUETOOTH_TYPE_AUDIO (BLUETOOTH_TYPE_HEADSET | BLUETOOTH_TYPE_HEADPHONES | BLUETOOTH_TYPE_OTHER_AUDIO)
Packit 8fb625
Packit 8fb625
/**
Packit 8fb625
 * BluetoothColumn:
Packit 8fb625
 * @BLUETOOTH_COLUMN_PROXY: a #GDBusProxy object
Packit 8fb625
 * @BLUETOOTH_COLUMN_PROPERTIES: Used to be #GDBusProxy object for DBus.Properties, now always %NULL
Packit 8fb625
 * @BLUETOOTH_COLUMN_ADDRESS: a string representing a Bluetooth address
Packit 8fb625
 * @BLUETOOTH_COLUMN_ALIAS: a string to use for display (the name of the device, or its address if the name is not known). Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_NAME: a string representing the device or adapter's name
Packit 8fb625
 * @BLUETOOTH_COLUMN_TYPE: the #BluetoothType of the device. Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_ICON: a string representing the icon name for the device. Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_DEFAULT: whether the adapter is the default one. Only available for adapters.
Packit 8fb625
 * @BLUETOOTH_COLUMN_PAIRED: whether the device is paired to its parent adapter. Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_TRUSTED: whether the device is trusted. Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_CONNECTED: whether the device is connected. Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_DISCOVERABLE: whether the adapter is discoverable/visible. Only available for adapters.
Packit 8fb625
 * @BLUETOOTH_COLUMN_DISCOVERING: whether the adapter is discovering. Only available for adapters.
Packit 8fb625
 * @BLUETOOTH_COLUMN_LEGACYPAIRING: whether the device does not support Bluetooth 2.1 Simple Secure Pairing. Only available for devices.
Packit 8fb625
 * @BLUETOOTH_COLUMN_POWERED: whether the adapter is powered. Only available for adapters.
Packit 8fb625
 * @BLUETOOTH_COLUMN_SERVICES: an array of service names and #BluetoothStatus connection statuses.
Packit 8fb625
 * @BLUETOOTH_COLUMN_UUIDS: a string array of human-readable UUIDs.
Packit 8fb625
 *
Packit 8fb625
 * A column identifier to pass to bluetooth_chooser_get_selected_device_info().
Packit 8fb625
 **/
Packit 8fb625
typedef enum {
Packit 8fb625
	BLUETOOTH_COLUMN_PROXY,
Packit 8fb625
	BLUETOOTH_COLUMN_PROPERTIES,
Packit 8fb625
	BLUETOOTH_COLUMN_ADDRESS,
Packit 8fb625
	BLUETOOTH_COLUMN_ALIAS,
Packit 8fb625
	BLUETOOTH_COLUMN_NAME,
Packit 8fb625
	BLUETOOTH_COLUMN_TYPE,
Packit 8fb625
	BLUETOOTH_COLUMN_ICON,
Packit 8fb625
	BLUETOOTH_COLUMN_DEFAULT,
Packit 8fb625
	BLUETOOTH_COLUMN_PAIRED,
Packit 8fb625
	BLUETOOTH_COLUMN_TRUSTED,
Packit 8fb625
	BLUETOOTH_COLUMN_CONNECTED,
Packit 8fb625
	BLUETOOTH_COLUMN_DISCOVERABLE,
Packit 8fb625
	BLUETOOTH_COLUMN_DISCOVERING,
Packit 8fb625
	BLUETOOTH_COLUMN_LEGACYPAIRING,
Packit 8fb625
	BLUETOOTH_COLUMN_POWERED,
Packit 8fb625
	BLUETOOTH_COLUMN_SERVICES,
Packit 8fb625
	BLUETOOTH_COLUMN_UUIDS,
Packit 8fb625
} BluetoothColumn;
Packit 8fb625
Packit 8fb625
#define _BLUETOOTH_NUM_COLUMNS (BLUETOOTH_COLUMN_UUIDS + 1)
Packit 8fb625
Packit 8fb625
/**
Packit 8fb625
 * BluetoothStatus:
Packit 8fb625
 * @BLUETOOTH_STATUS_INVALID: whether the status has been set yet
Packit 8fb625
 * @BLUETOOTH_STATUS_DISCONNECTED: whether the service is disconnected
Packit 8fb625
 * @BLUETOOTH_STATUS_CONNECTED: whether the service is connected
Packit 8fb625
 * @BLUETOOTH_STATUS_CONNECTING: whether the service is connecting
Packit 8fb625
 * @BLUETOOTH_STATUS_PLAYING: whether the service is playing (only used by the audio service)
Packit 8fb625
 *
Packit 8fb625
 * The connection status of a service on a particular device. Note that @BLUETOOTH_STATUS_CONNECTING and @BLUETOOTH_STATUS_PLAYING might not be available for all services.
Packit 8fb625
 **/
Packit 8fb625
typedef enum {
Packit 8fb625
	BLUETOOTH_STATUS_INVALID = 0,
Packit 8fb625
	BLUETOOTH_STATUS_DISCONNECTED,
Packit 8fb625
	BLUETOOTH_STATUS_CONNECTED,
Packit 8fb625
	BLUETOOTH_STATUS_CONNECTING,
Packit 8fb625
	BLUETOOTH_STATUS_PLAYING
Packit 8fb625
} BluetoothStatus;
Packit 8fb625
Packit 8fb625
G_END_DECLS
Packit 8fb625
Packit 8fb625
#endif /* __BLUETOOTH_ENUMS_H */