X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bt-oal%2Fbluez_hal%2Fsrc%2Fbt-hal-dbus-common-utils.h;h=aa7fcc5b5df2908d9852172d71d28f8073021b45;hb=cdb0a76b987d717fdd61a4b5d5c022cafbd0ba9e;hp=dd2febfd65076690f5c2fcf401c770d6efed4d9d;hpb=03548067142482d5cd5968f8342b36b2074ec0a9;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git diff --git a/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.h b/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.h index dd2febf..aa7fcc5 100644 --- a/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.h +++ b/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.h @@ -46,10 +46,10 @@ extern "C" { #define BT_HAL_MAX_DBUS_TIMEOUT 45000 #define BT_HAL_TIMEOUT_MESSAGE "Did not receive a reply. Possible causes include: " \ - "the remote application did not send a reply, " \ - "the message bus security policy blocked the reply, " \ - "the reply timeout expired, or the network connection " \ - "was broken." + "the remote application did not send a reply, " \ + "the message bus security policy blocked the reply, " \ + "the reply timeout expired, or the network connection " \ + "was broken." #define BT_HAL_ACCESS_DENIED_MSG "Rejected send message" #define BT_HAL_DISCOVERY_FINISHED_DELAY 200 @@ -115,364 +115,364 @@ extern "C" { #define BT_HAL_NAME_OWNER_CHANGED "NameOwnerChanged" #define BT_HAL_PROPERTIES_CHANGED "PropertiesChanged" -/** - * This is Bluetooth error code - */ + /** + * This is Bluetooth error code + */ #define BT_HAL_ERROR_BASE ((int)0) /**< Error code base */ #define BT_HAL_ERROR_NONE ((int)0) /**< No error #0 */ #define BT_HAL_ERROR_CANCEL ((int)BT_HAL_ERROR_BASE - 0x01) - /**< cancelled */ + /**< cancelled */ #define BT_HAL_ERROR_INVALID_CALLBACK ((int)BT_HAL_ERROR_BASE - 0x02) - /**< Callback error */ + /**< Callback error */ #define BT_HAL_ERROR_INVALID_PARAM ((int)BT_HAL_ERROR_BASE - 0x03) - /**< invalid paramerror */ + /**< invalid paramerror */ #define BT_HAL_ERROR_INVALID_DATA ((int)BT_HAL_ERROR_BASE - 0x04) - /**< invalid data error */ + /**< invalid data error */ #define BT_HAL_ERROR_MEMORY_ALLOCATION ((int)BT_HAL_ERROR_BASE - 0x05) - /**< Memory allocation error */ + /**< Memory allocation error */ #define BT_HAL_ERROR_OUT_OF_MEMORY ((int)BT_HAL_ERROR_BASE - 0x06) - /**< out of memory error */ + /**< out of memory error */ #define BT_HAL_ERROR_TIMEOUT ((int)BT_HAL_ERROR_BASE - 0x07) - /**< timeout error */ + /**< timeout error */ #define BT_HAL_ERROR_NO_RESOURCES ((int)BT_HAL_ERROR_BASE - 0x08) - /**< No resource error */ + /**< No resource error */ #define BT_HAL_ERROR_INTERNAL ((int)BT_HAL_ERROR_BASE - 0x09) - /**< internal error */ + /**< internal error */ #define BT_HAL_ERROR_NOT_SUPPORT ((int)BT_HAL_ERROR_BASE - 0x0a) - /**< Not supported error */ + /**< Not supported error */ #define BT_HAL_ERROR_DEVICE_NOT_ENABLED ((int)BT_HAL_ERROR_BASE - 0x0b) - /**< Operation is failed because - of not enabled BT Adapter */ + /**< Operation is failed because + of not enabled BT Adapter */ #define BT_HAL_ERROR_DEVICE_ALREADY_ENABLED ((int)BT_HAL_ERROR_BASE - 0x0c) - /**< Enabling is failed because of - already enabled BT Adapter */ + /**< Enabling is failed because of + already enabled BT Adapter */ #define BT_HAL_ERROR_DEVICE_BUSY ((int)BT_HAL_ERROR_BASE - 0x0d) - /**< Operation is failed because of - other on going operation */ + /**< Operation is failed because of + other on going operation */ #define BT_HAL_ERROR_ACCESS_DENIED ((int)BT_HAL_ERROR_BASE - 0x0e) - /**< access denied error */ + /**< access denied error */ #define BT_HAL_ERROR_MAX_CLIENT ((int)BT_HAL_ERROR_BASE - 0x0f) - /**< max client error */ + /**< max client error */ #define BT_HAL_ERROR_NOT_FOUND ((int)BT_HAL_ERROR_BASE - 0x10) - /**< not found error */ + /**< not found error */ #define BT_HAL_ERROR_SERVICE_SEARCH_ERROR ((int)BT_HAL_ERROR_BASE - 0x11) - /**< service search fail */ + /**< service search fail */ #define BT_HAL_ERROR_PARING_FAILED ((int)BT_HAL_ERROR_BASE - 0x12) - /**< pairing failed error */ + /**< pairing failed error */ #define BT_HAL_ERROR_NOT_PAIRED ((int)BT_HAL_ERROR_BASE - 0x13) - /**< Not paired error */ + /**< Not paired error */ #define BT_HAL_ERROR_SERVICE_NOT_FOUND ((int)BT_HAL_ERROR_BASE - 0x14) - /**< no service error */ + /**< no service error */ #define BT_HAL_ERROR_NOT_CONNECTED ((int)BT_HAL_ERROR_BASE - 0x15) - /**< no connection error */ + /**< no connection error */ #define BT_HAL_ERROR_ALREADY_CONNECT ((int)BT_HAL_ERROR_BASE - 0x16) - /**< alread connected error */ + /**< alread connected error */ #define BT_HAL_ERROR_CONNECTION_BUSY ((int)BT_HAL_ERROR_BASE - 0x17) - /**< connection busy error */ + /**< connection busy error */ #define BT_HAL_ERROR_CONNECTION_ERROR ((int)BT_HAL_ERROR_BASE - 0x18) - /**< connection error */ + /**< connection error */ #define BT_HAL_ERROR_MAX_CONNECTION ((int)BT_HAL_ERROR_BASE - 0x19) - /**< max connection error*/ + /**< max connection error*/ #define BT_HAL_ERROR_NOT_IN_OPERATION ((int)BT_HAL_ERROR_BASE - 0x1a) - /**< Not in operation */ + /**< Not in operation */ #define BT_HAL_ERROR_CANCEL_BY_USER ((int)BT_HAL_ERROR_BASE - 0x1b) - /**< Cancelled by user */ + /**< Cancelled by user */ #define BT_HAL_ERROR_REGISTRATION_FAILED ((int)BT_HAL_ERROR_BASE - 0x1c) - /**< Service record registration failed */ + /**< Service record registration failed */ #define BT_HAL_ERROR_IN_PROGRESS ((int)BT_HAL_ERROR_BASE - 0x1d) - /**< Operation in progress */ + /**< Operation in progress */ #define BT_HAL_ERROR_AUTHENTICATION_FAILED ((int)BT_HAL_ERROR_BASE - 0x1e) - /**< authentication failed error when paring*/ + /**< authentication failed error when paring*/ #define BT_HAL_ERROR_HOST_DOWN ((int)BT_HAL_ERROR_BASE - 0x1f) - /**< Remote host is down */ + /**< Remote host is down */ #define BT_HAL_ERROR_END_OF_DEVICE_LIST ((int)BT_HAL_ERROR_BASE - 0x20) - /**< End of device list */ + /**< End of device list */ #define BT_HAL_ERROR_AGENT_ALREADY_EXIST ((int)BT_HAL_ERROR_BASE - 0x21) - /**< Obex agent already exists */ + /**< Obex agent already exists */ #define BT_HAL_ERROR_AGENT_DOES_NOT_EXIST ((int)BT_HAL_ERROR_BASE - 0x22) - /**< Obex agent does not exist */ + /**< Obex agent does not exist */ #define BT_HAL_ERROR_ALREADY_INITIALIZED ((int)BT_HAL_ERROR_BASE - 0x23) - /**< Already initialized */ + /**< Already initialized */ #define BT_HAL_ERROR_PERMISSION_DEINED ((int)BT_HAL_ERROR_BASE - 0x24) - /**< Permission deined */ + /**< Permission deined */ #define BT_HAL_ERROR_ALREADY_DEACTIVATED ((int)BT_HAL_ERROR_BASE - 0x25) - /**< Nap already done */ + /**< Nap already done */ #define BT_HAL_ERROR_NOT_INITIALIZED ((int)BT_HAL_ERROR_BASE - 0x26) - /**< Not initialized */ + /**< Not initialized */ #define BT_HAL_ERROR_DEVICE_POLICY_RESTRICTION ((int)BT_HAL_ERROR_BASE - 0x27) - /**< Device Policy Restricted */ -/** -* Service class part of class of device returned from device discovery -*/ -typedef enum { - BT_HAL_DEVICE_SERVICE_CLASS_LIMITED_DISCOVERABLE_MODE = 0x002000, - BT_HAL_DEVICE_SERVICE_CLASS_POSITIONING = 0x010000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_NETWORKING = 0x020000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_RENDERING = 0x040000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_CAPTURING = 0x080000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_OBJECT_TRANSFER = 0x100000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_AUDIO = 0x200000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_TELEPHONY = 0x400000, /**< */ - BT_HAL_DEVICE_SERVICE_CLASS_INFORMATION = 0x800000, /**< */ -} bt_hal_device_service_class_t; - -/** - * Major device mask (For device discovery) - */ -typedef enum { - BT_HAL_DEVICE_MAJOR_MASK_MISC = 0x00, - BT_HAL_DEVICE_MAJOR_MASK_COMPUTER = 0x0001, - BT_HAL_DEVICE_MAJOR_MASK_PHONE = 0x0002, - BT_HAL_DEVICE_MAJOR_MASK_LAN_ACCESS_POINT = 0x0004, - BT_HAL_DEVICE_MAJOR_MASK_AUDIO = 0x0008, - BT_HAL_DEVICE_MAJOR_MASK_PERIPHERAL = 0x0010, - BT_HAL_DEVICE_MAJOR_MASK_IMAGING = 0x0020, - BT_HAL_DEVICE_MAJOR_MASK_WEARABLE = 0x0040, - BT_HAL_DEVICE_MAJOR_MASK_TOY = 0x0080, - BT_HAL_DEVICE_MAJOR_MASK_HEALTH = 0x0100, -} bt_hal_device_major_mask_t; - -/** - * Major device class (part of Class of Device) - */ -typedef enum { - BT_HAL_DEVICE_MAJOR_CLASS_MISC = 0x00, /**< Miscellaneous major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_COMPUTER = 0x01, /**< Computer major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_PHONE = 0x02, /**< Phone major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_LAN_ACCESS_POINT = 0x03, /**< LAN major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_AUDIO = 0x04, /**< AUDIO major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_PERIPHERAL = 0x05, /**< Peripheral major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_IMAGING = 0x06, /**< Imaging major device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_WEARABLE = 0x07, /**< Wearable device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_TOY = 0x08, /**< Toy device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_HEALTH = 0x09, /**< Health device class*/ - BT_HAL_DEVICE_MAJOR_CLASS_UNCLASSIFIED = 0x1F /**< Unknown major device class*/ -} bt_hal_device_major_class_t; - - -typedef enum { - BT_HAL_DEVICE_MINOR_CLASS_UNCLASSIFIED = 0x00, /**< unclassified minor class */ - - /* About Computer Major class */ - BT_HAL_DEVICE_MINOR_CLASS_DESKTOP_WORKSTATION = 0x04, /**< desktop workstation - minor class */ - BT_HAL_DEVICE_MINOR_CLASS_SERVER_CLASS_COMPUTER = 0x08, /**< server minor class */ - BT_HAL_DEVICE_MINOR_CLASS_LAPTOP = 0x0C, /**< laptop minor class */ - BT_HAL_DEVICE_MINOR_CLASS_HANDHELD_PC_OR_PDA = 0x10, /**< PDA minor class */ - BT_HAL_DEVICE_MINOR_CLASS_PALM_SIZED_PC_OR_PDA = 0x14, /**< PALM minor class */ - BT_HAL_DEVICE_MINOR_CLASS_WEARABLE_COMPUTER = 0x18, /**< Wearable PC minor class */ - - /* About Phone Major class */ - BT_HAL_DEVICE_MINOR_CLASS_CELLULAR = 0x04, /**< Cellular minor class */ - BT_HAL_DEVICE_MINOR_CLASS_CORDLESS = 0x08, /**< cordless minor class */ - BT_HAL_DEVICE_MINOR_CLASS_SMART_PHONE = 0x0C, /**< smart phone minor class */ - BT_HAL_DEVICE_MINOR_CLASS_WIRED_MODEM_OR_VOICE_GATEWAY = 0x10, - /**< voice gateway minor class */ - BT_HAL_DEVICE_MINOR_CLASS_COMMON_ISDN_ACCESS = 0x14, /**< ISDN minor class */ - - /* About LAN/Network Access Point Major class */ - BT_HAL_DEVICE_MINOR_CLASS_FULLY_AVAILABLE = 0x04, /**< Fully available minor class */ - BT_HAL_DEVICE_MINOR_CLASS_1_TO_17_PERCENT_UTILIZED = 0x20, /**< 1-17% utilized minor class */ - BT_HAL_DEVICE_MINOR_CLASS_17_TO_33_PERCENT_UTILIZED = 0x40, /**< 17-33% utilized minor class */ - BT_HAL_DEVICE_MINOR_CLASS_33_TO_50_PERCENT_UTILIZED = 0x60, /**< 33-50% utilized minor class */ - BT_HAL_DEVICE_MINOR_CLASS_50_to_67_PERCENT_UTILIZED = 0x80, /**< 50-67% utilized minor class */ - BT_HAL_DEVICE_MINOR_CLASS_67_TO_83_PERCENT_UTILIZED = 0xA0, /**< 67-83% utilized minor class */ - BT_HAL_DEVICE_MINOR_CLASS_83_TO_99_PERCENT_UTILIZED = 0xC0, /**< 83-99% utilized minor class */ - BT_HAL_DEVICE_MINOR_CLASS_NO_SERVICE_AVAILABLE = 0xE0, /**< No service available minor class */ - - /* About Audio/Video Major class */ - BT_HAL_DEVICE_MINOR_CLASS_HEADSET_PROFILE = 0x04, /**< Headset minor class */ - BT_HAL_DEVICE_MINOR_CLASS_HANDSFREE = 0x08, /**< Handsfree minor class*/ - - BT_HAL_DEVICE_MINOR_CLASS_MICROPHONE = 0x10, /**< Microphone minor class */ - BT_HAL_DEVICE_MINOR_CLASS_LOUD_SPEAKER = 0x14, /**< Loud Speaker minor class */ - BT_HAL_DEVICE_MINOR_CLASS_HEADPHONES = 0x18, /**< Headphones minor class */ - BT_HAL_DEVICE_MINOR_CLASS_PORTABLE_AUDIO = 0x1C, /**< Portable Audio minor class */ - BT_HAL_DEVICE_MINOR_CLASS_CAR_AUDIO = 0x20, /**< Car Audio minor class */ - BT_HAL_DEVICE_MINOR_CLASS_SET_TOP_BOX = 0x24, /**< Set top box minor class */ - BT_HAL_DEVICE_MINOR_CLASS_HIFI_AUDIO_DEVICE = 0x28, /**< Hifi minor class */ - BT_HAL_DEVICE_MINOR_CLASS_VCR = 0x2C, /**< VCR minor class */ - BT_HAL_DEVICE_MINOR_CLASS_VIDEO_CAMERA = 0x30, /**< Video Camera minor class */ - BT_HAL_DEVICE_MINOR_CLASS_CAM_CORDER = 0x34, /**< CAM Corder minor class */ - BT_HAL_DEVICE_MINOR_CLASS_VIDEO_MONITOR = 0x38, /**