Safe Haskell | None |
---|---|
Language | Haskell2010 |
- (</>) :: Text -> Text -> Text
- parentPath :: Text -> Text
- data UUID = UUID UUID
- baseUUID :: String
- data Any where
- MkAny :: forall a. Representable a => a -> Any
- data WithObjectPath a = WOP {}
- type AnyDBusDict = TypeDict TypeString TypeVariant
- data Descriptor = Descriptor {}
- data AdvertisingPacketType
- data CharacteristicProperty
- chrPropPairs :: [(CharacteristicProperty, Text)]
- data CharacteristicOptions = CharacteristicOptions {}
- type CharacteristicBS = Characteristic ByteString
- data Characteristic typ = Characteristic {
- characteristicUuid :: UUID
- characteristicProperties :: [CharacteristicProperty]
- characteristicReadValue :: Maybe (Handler typ)
- characteristicWriteValue :: Maybe (typ -> Handler Bool)
- characteristicIsNotifying :: UUID -> MVar Bool
- objectPathOf :: UUID -> IORef (Maybe ObjectPath)
- characteristicObjectPath :: ObjectPath -> Int -> ObjectPath
- data Service = Service {}
- data Application = Application {}
- serviceObjectPath :: ObjectPath -> Int -> ObjectPath
- data AdvertisementType
- data Advertisement = Advertisement {}
- data Connection = Connection {
- dbusConn :: DBusConnection
- addObject :: ObjectPath -> Object -> IO ()
- connectionName :: Connection -> Text
- connect :: IO Connection
- data Error
- newtype BluetoothM a = BluetoothM (ReaderT Connection (ExceptT Error IO) a)
- runBluetoothM :: BluetoothM a -> Connection -> IO (Either Error a)
- toBluetoothM :: (Connection -> IO (Either MethodError a)) -> BluetoothM a
- newtype ApplicationRegistered = ApplicationRegistered ObjectPath
- data Status
Documentation
parentPath :: Text -> Text Source #
UUID
UUIDs, used for services and characteristics.
Unofficial UUIDs will have 128-bits, and will look this:
d45e83fb-c772-459e-91a8-43cbf1443af4
Official UUIDs will have either 32 or 16 bits.
See ITU-T Rec. X.677 for more information on the format and generation of these UUIDs. You can use the Online UUID Generator to generate UUIDs.
Eq UUID Source # | |
Ord UUID Source # | |
Show UUID Source # | |
IsString UUID Source # | |
Generic UUID Source # | |
Representable UUID Source # | |
Random UUID Source # | |
HasUuid Service UUID Source # | |
HasSolicitUUIDs Advertisement [UUID] Source # | |
HasServiceUUIDs Advertisement [UUID] Source # | |
HasServiceData Advertisement (Map UUID ByteString) Source # | |
HasUuid (Characteristic typ0) UUID Source # | |
type Rep UUID Source # | |
type RepType UUID Source # | |
Any
A Haskell existential type corresponding to DBus' Variant
.
MkAny :: forall a. Representable a => a -> Any |
data WithObjectPath a Source #
type AnyDBusDict = TypeDict TypeString TypeVariant Source #
Method
Descriptor
data Descriptor Source #
data AdvertisingPacketType Source #
Characteristic
data CharacteristicProperty Source #
chrPropPairs :: [(CharacteristicProperty, Text)] Source #
data CharacteristicOptions Source #
data Characteristic typ Source #
Characteristic | |
|
HasCharacteristics Service [CharacteristicBS] Source # | |
IsString (Characteristic a) Source # | |
Generic (Characteristic typ) Source # | |
Representable (WithObjectPath (Characteristic a)) Source # | |
HasUuid (Characteristic typ0) UUID Source # | |
HasInterface (WithObjectPath CharacteristicBS) GattCharacteristic Source # | |
HasInterface (WithObjectPath CharacteristicBS) Properties Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> Handler Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (Handler typ0)) Source # | |
HasProperties (Characteristic typ0) [CharacteristicProperty] Source # | |
type Rep (Characteristic typ) Source # | |
type RepType (WithObjectPath (Characteristic a)) Source # | |
objectPathOf :: UUID -> IORef (Maybe ObjectPath) Source #
characteristicObjectPath :: ObjectPath -> Int -> ObjectPath Source #
Service
Application
data Application Source #
An application. Can be created from it's IsString
instance.
The string (application path) is used only for the DBus API, and will not
have relevance within Bluetooth.
serviceObjectPath :: ObjectPath -> Int -> ObjectPath Source #
Advertisement
data AdvertisementType Source #
data Advertisement Source #
An advertisement can be generated automatically with advertisementFor
,
or with the IsList
instance. Both of these by default assume the
advertisement is for a peripheral.
You can also, of course, use the constructor.
Connection
data Connection Source #
Connection | |
|
connectionName :: Connection -> Text Source #
The unique DBus connection name, Useful for monitoring activity with 'dbus-monitor'. For information on how to setup dbus-monitor for debugging, see DebuggingDBus.
Since: 0.1.3.0
connect :: IO Connection Source #
Creates a connection to DBus. This does *not* represent Bluetooth connection.
BluetoothM
newtype BluetoothM a Source #
BluetoothM (ReaderT Connection (ExceptT Error IO) a) |
runBluetoothM :: BluetoothM a -> Connection -> IO (Either Error a) Source #
toBluetoothM :: (Connection -> IO (Either MethodError a)) -> BluetoothM a Source #
Assorted
newtype ApplicationRegistered Source #
This datatype, which is kept opaque, is returned when an application is successfully registered, and required as an argument from functions that should only be called after the application has been registered.