libmm-glib Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties | Signals |
MmGdbusBearerMmGdbusBearer — Generated C code for the org.freedesktop.ModemManager1.Bearer D-Bus interface |
Synopsis
MmGdbusBearer; struct MmGdbusBearerIface; const gchar * mm_gdbus_bearer_get_interface (MmGdbusBearer *object
); gchar * mm_gdbus_bearer_dup_interface (MmGdbusBearer *object
); GVariant * mm_gdbus_bearer_get_ip4_config (MmGdbusBearer *object
); GVariant * mm_gdbus_bearer_dup_ip4_config (MmGdbusBearer *object
); GVariant * mm_gdbus_bearer_get_ip6_config (MmGdbusBearer *object
); GVariant * mm_gdbus_bearer_dup_ip6_config (MmGdbusBearer *object
); guint mm_gdbus_bearer_get_ip_timeout (MmGdbusBearer *object
); GVariant * mm_gdbus_bearer_get_properties (MmGdbusBearer *object
); GVariant * mm_gdbus_bearer_dup_properties (MmGdbusBearer *object
); gboolean mm_gdbus_bearer_get_connected (MmGdbusBearer *object
); gboolean mm_gdbus_bearer_get_suspended (MmGdbusBearer *object
); void mm_gdbus_bearer_call_connect (MmGdbusBearer *proxy
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean mm_gdbus_bearer_call_connect_finish (MmGdbusBearer *proxy
,GAsyncResult *res
,GError **error
); gboolean mm_gdbus_bearer_call_connect_sync (MmGdbusBearer *proxy
,GCancellable *cancellable
,GError **error
); void mm_gdbus_bearer_call_disconnect (MmGdbusBearer *proxy
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean mm_gdbus_bearer_call_disconnect_finish (MmGdbusBearer *proxy
,GAsyncResult *res
,GError **error
); gboolean mm_gdbus_bearer_call_disconnect_sync (MmGdbusBearer *proxy
,GCancellable *cancellable
,GError **error
);
Known Implementations
MmGdbusBearer is implemented by MMBearer, MmGdbusBearerProxy and MmGdbusBearerSkeleton.
Properties
"connected" gboolean : Read / Write "interface" gchar* : Read / Write "ip-timeout" guint : Read / Write "ip4-config" GVariant* : Read / Write "ip6-config" GVariant* : Read / Write "properties" GVariant* : Read / Write "suspended" gboolean : Read / Write
Description
This section contains code for working with the org.freedesktop.ModemManager1.Bearer D-Bus interface in C.
Details
MmGdbusBearer
typedef struct _MmGdbusBearer MmGdbusBearer;
Abstract interface type for the D-Bus interface org.freedesktop.ModemManager1.Bearer.
struct MmGdbusBearerIface
struct MmGdbusBearerIface { GTypeInterface parent_iface; gboolean (*handle_connect) ( MmGdbusBearer *object, GDBusMethodInvocation *invocation); gboolean (*handle_disconnect) ( MmGdbusBearer *object, GDBusMethodInvocation *invocation); gboolean (*get_connected) (MmGdbusBearer *object); const gchar * (*get_interface) (MmGdbusBearer *object); GVariant * (*get_ip4_config) (MmGdbusBearer *object); GVariant * (*get_ip6_config) (MmGdbusBearer *object); guint (*get_ip_timeout) (MmGdbusBearer *object); GVariant * (*get_properties) (MmGdbusBearer *object); gboolean (*get_suspended) (MmGdbusBearer *object); };
Virtual table for the D-Bus interface org.freedesktop.ModemManager1.Bearer.
GTypeInterface |
The parent interface. |
Handler for the "handle-connect" signal. | |
Handler for the "handle-disconnect" signal. | |
Getter for the "connected" property. | |
Getter for the "interface" property. | |
Getter for the "ip4-config" property. | |
Getter for the "ip6-config" property. | |
Getter for the "ip-timeout" property. | |
Getter for the "properties" property. | |
Getter for the "suspended" property. |
mm_gdbus_bearer_get_interface ()
const gchar * mm_gdbus_bearer_get_interface (MmGdbusBearer *object
);
Gets the value of the "Interface" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
Warning
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread whereobject
was constructed. Use mm_gdbus_bearer_dup_interface()
if on another thread.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. Do not free the returned value, it belongs to object . [transfer none]
|
mm_gdbus_bearer_dup_interface ()
gchar * mm_gdbus_bearer_dup_interface (MmGdbusBearer *object
);
Gets a copy of the "Interface" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. The returned value should be freed with g_free() . [transfer full]
|
mm_gdbus_bearer_get_ip4_config ()
GVariant * mm_gdbus_bearer_get_ip4_config (MmGdbusBearer *object
);
Gets the value of the "Ip4Config" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
Warning
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread whereobject
was constructed. Use mm_gdbus_bearer_dup_ip4_config()
if on another thread.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. Do not free the returned value, it belongs to object . [transfer none]
|
mm_gdbus_bearer_dup_ip4_config ()
GVariant * mm_gdbus_bearer_dup_ip4_config (MmGdbusBearer *object
);
Gets a copy of the "Ip4Config" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref() . [transfer full]
|
mm_gdbus_bearer_get_ip6_config ()
GVariant * mm_gdbus_bearer_get_ip6_config (MmGdbusBearer *object
);
Gets the value of the "Ip6Config" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
Warning
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread whereobject
was constructed. Use mm_gdbus_bearer_dup_ip6_config()
if on another thread.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. Do not free the returned value, it belongs to object . [transfer none]
|
mm_gdbus_bearer_dup_ip6_config ()
GVariant * mm_gdbus_bearer_dup_ip6_config (MmGdbusBearer *object
);
Gets a copy of the "Ip6Config" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref() . [transfer full]
|
mm_gdbus_bearer_get_ip_timeout ()
guint mm_gdbus_bearer_get_ip_timeout (MmGdbusBearer *object
);
Gets the value of the "IpTimeout" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value. |
mm_gdbus_bearer_get_properties ()
GVariant * mm_gdbus_bearer_get_properties (MmGdbusBearer *object
);
Gets the value of the "Properties" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
Warning
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread whereobject
was constructed. Use mm_gdbus_bearer_dup_properties()
if on another thread.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. Do not free the returned value, it belongs to object . [transfer none]
|
mm_gdbus_bearer_dup_properties ()
GVariant * mm_gdbus_bearer_dup_properties (MmGdbusBearer *object
);
Gets a copy of the "Properties" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref() . [transfer full]
|
mm_gdbus_bearer_get_connected ()
gboolean mm_gdbus_bearer_get_connected (MmGdbusBearer *object
);
Gets the value of the "Connected" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value. |
mm_gdbus_bearer_get_suspended ()
gboolean mm_gdbus_bearer_get_suspended (MmGdbusBearer *object
);
Gets the value of the "Suspended" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusBearer. |
Returns : |
The property value. |
mm_gdbus_bearer_call_connect ()
void mm_gdbus_bearer_call_connect (MmGdbusBearer *proxy
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the Connect()
proxy
.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call mm_gdbus_bearer_call_connect_finish()
to get the result of the operation.
See mm_gdbus_bearer_call_connect_sync()
for the synchronous, blocking version of this method.
|
A MmGdbusBearerProxy. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
mm_gdbus_bearer_call_connect_finish ()
gboolean mm_gdbus_bearer_call_connect_finish (MmGdbusBearer *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_gdbus_bearer_call_connect()
.
|
A MmGdbusBearerProxy. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_gdbus_bearer_call_connect() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the call succeded, FALSE if error is set. [skip]
|
mm_gdbus_bearer_call_connect_sync ()
gboolean mm_gdbus_bearer_call_connect_sync (MmGdbusBearer *proxy
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the Connect()
proxy
. The calling thread is blocked until a reply is received.
See mm_gdbus_bearer_call_connect()
for the asynchronous version of this method.
|
A MmGdbusBearerProxy. |
|
A GCancellable or NULL . [allow-none]
|
|
Return location for error or NULL . |
Returns : |
TRUE if the call succeded, FALSE if error is set. [skip]
|
mm_gdbus_bearer_call_disconnect ()
void mm_gdbus_bearer_call_disconnect (MmGdbusBearer *proxy
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the Disconnect()
proxy
.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call mm_gdbus_bearer_call_disconnect_finish()
to get the result of the operation.
See mm_gdbus_bearer_call_disconnect_sync()
for the synchronous, blocking version of this method.
|
A MmGdbusBearerProxy. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
mm_gdbus_bearer_call_disconnect_finish ()
gboolean mm_gdbus_bearer_call_disconnect_finish (MmGdbusBearer *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_gdbus_bearer_call_disconnect()
.
|
A MmGdbusBearerProxy. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_gdbus_bearer_call_disconnect() . |
|
Return location for error or NULL . |
Returns : |
TRUE if the call succeded, FALSE if error is set. [skip]
|
mm_gdbus_bearer_call_disconnect_sync ()
gboolean mm_gdbus_bearer_call_disconnect_sync (MmGdbusBearer *proxy
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the Disconnect()
proxy
. The calling thread is blocked until a reply is received.
See mm_gdbus_bearer_call_disconnect()
for the asynchronous version of this method.
|
A MmGdbusBearerProxy. |
|
A GCancellable or NULL . [allow-none]
|
|
Return location for error or NULL . |
Returns : |
TRUE if the call succeded, FALSE if error is set. [skip]
|
Property Details
The "connected"
property
"connected" gboolean : Read / Write
Represents the D-Bus property "Connected".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Default value: FALSE
The "interface"
property
"interface" gchar* : Read / Write
Represents the D-Bus property "Interface".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Default value: NULL
The "ip-timeout"
property
"ip-timeout" guint : Read / Write
Represents the D-Bus property "IpTimeout".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Default value: 0
The "ip4-config"
property
"ip4-config" GVariant* : Read / Write
Represents the D-Bus property "Ip4Config".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Allowed values: GVariant<a{sv}>
Default value: NULL
The "ip6-config"
property
"ip6-config" GVariant* : Read / Write
Represents the D-Bus property "Ip6Config".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Allowed values: GVariant<a{sv}>
Default value: NULL
The "properties"
property
"properties" GVariant* : Read / Write
Represents the D-Bus property "Properties".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Allowed values: GVariant<a{sv}>
Default value: NULL
The "suspended"
property
"suspended" gboolean : Read / Write
Represents the D-Bus property "Suspended".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Default value: FALSE
Signal Details
The "handle-connect"
signal
gboolean user_function (MmGdbusBearer *object,
GDBusMethodInvocation *invocation,
gpointer user_data) : Run Last
Signal emitted when a remote caller is invoking the Connect()
If a signal handler returns TRUE
, it means the signal handler will handle the invocation (e.g. take a reference to invocation
and eventually call mm_gdbus_bearer_complete_connect()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
|
A MmGdbusBearer. |
|
A GDBusMethodInvocation. |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the invocation was handled, FALSE to let other signal handlers run. |
The "handle-disconnect"
signal
gboolean user_function (MmGdbusBearer *object,
GDBusMethodInvocation *invocation,
gpointer user_data) : Run Last
Signal emitted when a remote caller is invoking the Disconnect()
If a signal handler returns TRUE
, it means the signal handler will handle the invocation (e.g. take a reference to invocation
and eventually call mm_gdbus_bearer_complete_disconnect()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
|
A MmGdbusBearer. |
|
A GDBusMethodInvocation. |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the invocation was handled, FALSE to let other signal handlers run. |