#include <ManagedGVariant.h>
A wrapper std::shared class for GLib's GVariant objects. This class is not thread safe. This class does not increase the reference count of the variant, but will descrease it in destructor. Floating references are converted to normal ones effectively extending their lifetime to the lifetime of the ManagedGVariant
instance.
◆ ~ManagedGVariant()
alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::~ManagedGVariant |
( |
| ) |
|
|
inline |
◆ ManagedGVariant() [1/2]
alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::ManagedGVariant |
( |
| ) |
|
|
inline |
◆ ManagedGVariant() [2/2]
alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::ManagedGVariant |
( |
GVariant * |
variant | ) |
|
|
inlineexplicit |
A constructor attaching to an existing GVariant*
. If variant
is a floating reference, it will be converted to normal one, extending its lifetime to the lifetime of the ManagedGVariant
instance.
- Parameters
-
variant | Variant to be attached. |
◆ asOutputParameter()
GVariant ** alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::asOutputParameter |
( |
| ) |
|
|
inline |
Get a pointer to the internal GVariant*
variable
- Returns
- A pointer to the internal variable holding the GVariant*. The pointer is valid while the
ManagedGVariant
instance is valid.
◆ dumpToString()
std::string alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::dumpToString |
( |
bool |
withAnnotations | ) |
|
|
inline |
Method that dumps the contents of the wrapped variant to a string. Returns "<NULL>" if no variant attached.
- Parameters
-
withAnnotations | true if type information should be added to the output |
- Returns
- A string with the textual representation of the variant
◆ get()
GVariant * alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::get |
( |
| ) |
|
|
inline |
Returns a raw GVariant*
attached to this object
- Returns
- A raw
GVariant*
attached to this object. This pointer is valid as long as this ManagedGVariant
instance if valid.
◆ hasValue()
bool alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::hasValue |
( |
| ) |
|
|
inline |
A helper conversion operator to allow checking if object has any variant attached
- Returns
- true if variant is not null
◆ swap()
void alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::swap |
( |
ManagedGVariant & |
other | ) |
|
|
inline |
Swap the GVariant*
values with another instance of ManagedGVariant
.
- Parameters
-
◆ unbox()
ManagedGVariant alexaClientSDK::bluetoothImplementations::blueZ::ManagedGVariant::unbox |
( |
| ) |
|
|
inline |
A helper method to extract variant contained in the variant attached to the object. This method is useful when Parsing variant containers where child elements could be boxed into the wrapper variant.
- Returns
- A variant contained in the variant attached.
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/ManagedGVariant.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0