MmGdbusBearer

MmGdbusBearer — Generated C code for the org.freedesktop.ModemManager1.Bearer D-Bus interface

Functions

Properties

guint bearer-type Read / Write
gboolean connected Read / Write
char * interface Read / Write
guint ip-timeout Read / Write
GVariant * ip4-config Read / Write
GVariant * ip6-config Read / Write
GVariant * properties Read / Write
GVariant * stats Read / Write
gboolean suspended Read / Write

Signals

Types and Values

Object Hierarchy

    GInterface
    ╰── MmGdbusBearer

Prerequisites

MmGdbusBearer requires GObject.

Known Implementations

MmGdbusBearer is implemented by MMBearer, MmGdbusBearerProxy and MmGdbusBearerSkeleton.

Description

This section contains code for working with the org.freedesktop.ModemManager1.Bearer D-Bus interface in C.

Functions

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.

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 where object was constructed. Use mm_gdbus_bearer_dup_interface() if on another thread.

[skip]

Parameters

object

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][nullable]


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.

[skip]

Parameters

object

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][nullable]


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.

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 where object was constructed. Use mm_gdbus_bearer_dup_ip4_config() if on another thread.

[skip]

Parameters

object

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][nullable]


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.

[skip]

Parameters

object

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][nullable]


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.

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 where object was constructed. Use mm_gdbus_bearer_dup_ip6_config() if on another thread.

[skip]

Parameters

object

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][nullable]


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.

[skip]

Parameters

object

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][nullable]


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.

[skip]

Parameters

object

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.

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 where object was constructed. Use mm_gdbus_bearer_dup_properties() if on another thread.

[skip]

Parameters

object

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][nullable]


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.

[skip]

Parameters

object

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][nullable]


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.

[skip]

Parameters

object

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.

[skip]

Parameters

object

A MmGdbusBearer.

 

Returns

The property value.


mm_gdbus_bearer_get_bearer_type ()

guint
mm_gdbus_bearer_get_bearer_type (MmGdbusBearer *object);

Gets the value of the "BearerType" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

Parameters

object

A MmGdbusBearer.

 

Returns

The property value.


mm_gdbus_bearer_get_stats ()

GVariant *
mm_gdbus_bearer_get_stats (MmGdbusBearer *object);

Gets the value of the "Stats" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

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 where object was constructed. Use mm_gdbus_bearer_dup_stats() if on another thread.

[skip]

Parameters

object

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][nullable]


mm_gdbus_bearer_dup_stats ()

GVariant *
mm_gdbus_bearer_dup_stats (MmGdbusBearer *object);

Gets a copy of the "Stats" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

Parameters

object

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][nullable]


mm_gdbus_bearer_call_connect ()

void
mm_gdbus_bearer_call_connect (MmGdbusBearer *proxy,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

Asynchronously invokes the Connect() D-Bus method on 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 (see g_main_context_push_thread_default()). 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.

Parameters

proxy

A MmGdbusBearerProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

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().

Parameters

proxy

A MmGdbusBearerProxy.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_gdbus_bearer_call_connect().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, 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() D-Bus method on proxy . The calling thread is blocked until a reply is received.

See mm_gdbus_bearer_call_connect() for the asynchronous version of this method.

Parameters

proxy

A MmGdbusBearerProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, 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() D-Bus method on 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 (see g_main_context_push_thread_default()). 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.

Parameters

proxy

A MmGdbusBearerProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

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().

Parameters

proxy

A MmGdbusBearerProxy.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_gdbus_bearer_call_disconnect().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, 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() D-Bus method on proxy . The calling thread is blocked until a reply is received.

See mm_gdbus_bearer_call_disconnect() for the asynchronous version of this method.

Parameters

proxy

A MmGdbusBearerProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.

[skip]

Types and Values

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);

  guint  (*get_bearer_type) (MmGdbusBearer *object);

  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);

  GVariant * (*get_stats) (MmGdbusBearer *object);

  gboolean  (*get_suspended) (MmGdbusBearer *object);
};

Virtual table for the D-Bus interface org.freedesktop.ModemManager1.Bearer.

Members

GTypeInterface parent_iface;

The parent interface.

 

handle_connect ()

Handler for the “handle-connect” signal.

 

handle_disconnect ()

Handler for the “handle-disconnect” signal.

 

get_bearer_type ()

Getter for the “bearer-type” property.

 

get_connected ()

Getter for the “connected” property.

 

get_interface ()

Getter for the “interface” property.

 

get_ip4_config ()

Getter for the “ip4-config” property.

 

get_ip6_config ()

Getter for the “ip6-config” property.

 

get_ip_timeout ()

Getter for the “ip-timeout” property.

 

get_properties ()

Getter for the “properties” property.

 

get_stats ()

Getter for the “stats” property.

 

get_suspended ()

Getter for the “suspended” property.

 

Property Details

The “bearer-type” property

  “bearer-type”              guint

Represents the D-Bus property "BearerType".

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.

Owner: MmGdbusBearer

Flags: Read / Write

Default value: 0


The “connected” property

  “connected”                gboolean

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.

Owner: MmGdbusBearer

Flags: Read / Write

Default value: FALSE


The “interface” property

  “interface”                char *

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.

Owner: MmGdbusBearer

Flags: Read / Write

Default value: NULL


The “ip-timeout” property

  “ip-timeout”               guint

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.

Owner: MmGdbusBearer

Flags: Read / Write

Default value: 0


The “ip4-config” property

  “ip4-config”               GVariant *

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.

Owner: MmGdbusBearer

Flags: Read / Write

Allowed values: GVariant<a{sv}>

Default value: NULL


The “ip6-config” property

  “ip6-config”               GVariant *

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.

Owner: MmGdbusBearer

Flags: Read / Write

Allowed values: GVariant<a{sv}>

Default value: NULL


The “properties” property

  “properties”               GVariant *

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.

Owner: MmGdbusBearer

Flags: Read / Write

Allowed values: GVariant<a{sv}>

Default value: NULL


The “stats” property

  “stats”                    GVariant *

Represents the D-Bus property "Stats".

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.

Owner: MmGdbusBearer

Flags: Read / Write

Allowed values: GVariant<a{sv}>

Default value: NULL


The “suspended” property

  “suspended”                gboolean

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.

Owner: MmGdbusBearer

Flags: Read / Write

Default value: FALSE

Signal Details

The “handle-connect” signal

gboolean
user_function (MmGdbusBearer         *object,
               GDBusMethodInvocation *invocation,
               gpointer               user_data)

Signal emitted when a remote caller is invoking the Connect() D-Bus method.

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.

Parameters

object

A MmGdbusBearer.

 

invocation

A GDBusMethodInvocation.

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE if the invocation was handled, FALSE to let other signal handlers run.

Flags: Run Last


The “handle-disconnect” signal

gboolean
user_function (MmGdbusBearer         *object,
               GDBusMethodInvocation *invocation,
               gpointer               user_data)

Signal emitted when a remote caller is invoking the Disconnect() D-Bus method.

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.

Parameters

object

A MmGdbusBearer.

 

invocation

A GDBusMethodInvocation.

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE if the invocation was handled, FALSE to let other signal handlers run.

Flags: Run Last