MmGdbusModemMessaging

MmGdbusModemMessaging — Generated C code for the org.freedesktop.ModemManager1.Modem.Messaging D-Bus interface

Functions

Properties

guint default-storage Read / Write
GStrv messages Read / Write
GVariant * supported-storages Read / Write

Signals

Types and Values

Object Hierarchy

    GInterface
    ╰── MmGdbusModemMessaging

Prerequisites

MmGdbusModemMessaging requires GObject.

Known Implementations

MmGdbusModemMessaging is implemented by MMModemMessaging, MmGdbusModemMessagingProxy and MmGdbusModemMessagingSkeleton.

Description

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

Functions

mm_gdbus_modem_messaging_get_messages ()

const gchar *const *
mm_gdbus_modem_messaging_get_messages (MmGdbusModemMessaging *object);

Gets the value of the "Messages" 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_modem_messaging_dup_messages() if on another thread.

[skip]

Parameters

object

A MmGdbusModemMessaging.

 

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

gchar **
mm_gdbus_modem_messaging_dup_messages (MmGdbusModemMessaging *object);

Gets a copy of the "Messages" 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 MmGdbusModemMessaging.

 

Returns

The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

[transfer full][nullable]


mm_gdbus_modem_messaging_get_supported_storages ()

GVariant *
mm_gdbus_modem_messaging_get_supported_storages
                               (MmGdbusModemMessaging *object);

Gets the value of the "SupportedStorages" 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_modem_messaging_dup_supported_storages() if on another thread.

[skip]

Parameters

object

A MmGdbusModemMessaging.

 

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

GVariant *
mm_gdbus_modem_messaging_dup_supported_storages
                               (MmGdbusModemMessaging *object);

Gets a copy of the "SupportedStorages" 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 MmGdbusModemMessaging.

 

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

guint
mm_gdbus_modem_messaging_get_default_storage
                               (MmGdbusModemMessaging *object);

Gets the value of the "DefaultStorage" 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 MmGdbusModemMessaging.

 

Returns

The property value.


mm_gdbus_modem_messaging_call_create ()

void
mm_gdbus_modem_messaging_call_create (MmGdbusModemMessaging *proxy,
                                      GVariant *arg_properties,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously invokes the Create() 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_modem_messaging_call_create_finish() to get the result of the operation.

See mm_gdbus_modem_messaging_call_create_sync() for the synchronous, blocking version of this method.

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

arg_properties

Argument to pass with the method invocation.

 

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

gboolean
mm_gdbus_modem_messaging_call_create_finish
                               (MmGdbusModemMessaging *proxy,
                                gchar **out_path,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_gdbus_modem_messaging_call_create().

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

out_path

Return location for return parameter or NULL to ignore.

[out][optional]

res

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

 

error

Return location for error or NULL.

 

Returns

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

[skip]


mm_gdbus_modem_messaging_call_create_sync ()

gboolean
mm_gdbus_modem_messaging_call_create_sync
                               (MmGdbusModemMessaging *proxy,
                                GVariant *arg_properties,
                                gchar **out_path,
                                GCancellable *cancellable,
                                GError **error);

Synchronously invokes the Create() D-Bus method on proxy . The calling thread is blocked until a reply is received.

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

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

arg_properties

Argument to pass with the method invocation.

 

out_path

Return location for return parameter or NULL to ignore.

[out][optional]

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

void
mm_gdbus_modem_messaging_call_delete (MmGdbusModemMessaging *proxy,
                                      const gchar *arg_path,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously invokes the Delete() 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_modem_messaging_call_delete_finish() to get the result of the operation.

See mm_gdbus_modem_messaging_call_delete_sync() for the synchronous, blocking version of this method.

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

arg_path

Argument to pass with the method invocation.

 

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

gboolean
mm_gdbus_modem_messaging_call_delete_finish
                               (MmGdbusModemMessaging *proxy,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_gdbus_modem_messaging_call_delete().

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

res

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

 

error

Return location for error or NULL.

 

Returns

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

[skip]


mm_gdbus_modem_messaging_call_delete_sync ()

gboolean
mm_gdbus_modem_messaging_call_delete_sync
                               (MmGdbusModemMessaging *proxy,
                                const gchar *arg_path,
                                GCancellable *cancellable,
                                GError **error);

Synchronously invokes the Delete() D-Bus method on proxy . The calling thread is blocked until a reply is received.

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

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

arg_path

Argument to pass with the method invocation.

 

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

void
mm_gdbus_modem_messaging_call_list (MmGdbusModemMessaging *proxy,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously invokes the List() 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_modem_messaging_call_list_finish() to get the result of the operation.

See mm_gdbus_modem_messaging_call_list_sync() for the synchronous, blocking version of this method.

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

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

gboolean
mm_gdbus_modem_messaging_call_list_finish
                               (MmGdbusModemMessaging *proxy,
                                gchar ***out_result,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_gdbus_modem_messaging_call_list().

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

out_result

Return location for return parameter or NULL to ignore.

[out][optional][array zero-terminated=1]

res

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

 

error

Return location for error or NULL.

 

Returns

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

[skip]


mm_gdbus_modem_messaging_call_list_sync ()

gboolean
mm_gdbus_modem_messaging_call_list_sync
                               (MmGdbusModemMessaging *proxy,
                                gchar ***out_result,
                                GCancellable *cancellable,
                                GError **error);

Synchronously invokes the List() D-Bus method on proxy . The calling thread is blocked until a reply is received.

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

Parameters

proxy

A MmGdbusModemMessagingProxy.

 

out_result

Return location for return parameter or NULL to ignore.

[out][optional][array zero-terminated=1]

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

MmGdbusModemMessaging

typedef struct _MmGdbusModemMessaging MmGdbusModemMessaging;

Abstract interface type for the D-Bus interface org.freedesktop.ModemManager1.Modem.Messaging.


struct MmGdbusModemMessagingIface

struct MmGdbusModemMessagingIface {
  GTypeInterface parent_iface;

  gboolean (*handle_create) (
    MmGdbusModemMessaging *object,
    GDBusMethodInvocation *invocation,
    GVariant *arg_properties);

  gboolean (*handle_delete) (
    MmGdbusModemMessaging *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_path);

  gboolean (*handle_list) (
    MmGdbusModemMessaging *object,
    GDBusMethodInvocation *invocation);

  guint  (*get_default_storage) (MmGdbusModemMessaging *object);

  const gchar *const * (*get_messages) (MmGdbusModemMessaging *object);

  GVariant * (*get_supported_storages) (MmGdbusModemMessaging *object);

  void (*added) (
    MmGdbusModemMessaging *object,
    const gchar *arg_path,
    gboolean arg_received);

  void (*deleted) (
    MmGdbusModemMessaging *object,
    const gchar *arg_path);
};

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

Members

GTypeInterface parent_iface;

The parent interface.

 

handle_create ()

Handler for the “handle-create” signal.

 

handle_delete ()

Handler for the “handle-delete” signal.

 

handle_list ()

Handler for the “handle-list” signal.

 

get_default_storage ()

Getter for the “default-storage” property.

 

get_messages ()

Getter for the “messages” property.

 

get_supported_storages ()

Getter for the “supported-storages” property.

 

added ()

Handler for the “added” signal.

 

deleted ()

Handler for the “deleted” signal.

 

Property Details

The “default-storage” property

  “default-storage”          guint

Represents the D-Bus property "DefaultStorage".

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: MmGdbusModemMessaging

Flags: Read / Write

Default value: 0


The “messages” property

  “messages”                 GStrv

Represents the D-Bus property "Messages".

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: MmGdbusModemMessaging

Flags: Read / Write


The “supported-storages” property

  “supported-storages”       GVariant *

Represents the D-Bus property "SupportedStorages".

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: MmGdbusModemMessaging

Flags: Read / Write

Allowed values: GVariant<au>

Default value: NULL

Signal Details

The “added” signal

void
user_function (MmGdbusModemMessaging *object,
               char                  *arg_path,
               gboolean               arg_received,
               gpointer               user_data)

On the client-side, this signal is emitted whenever the D-Bus signal "Added" is received.

On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

Parameters

object

A MmGdbusModemMessaging.

 

arg_path

Argument.

 

arg_received

Argument.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “deleted” signal

void
user_function (MmGdbusModemMessaging *object,
               char                  *arg_path,
               gpointer               user_data)

On the client-side, this signal is emitted whenever the D-Bus signal "Deleted" is received.

On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

Parameters

object

A MmGdbusModemMessaging.

 

arg_path

Argument.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “handle-create” signal

gboolean
user_function (MmGdbusModemMessaging *object,
               GDBusMethodInvocation *invocation,
               GVariant              *arg_properties,
               gpointer               user_data)

Signal emitted when a remote caller is invoking the Create() 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_modem_messaging_complete_create() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

Parameters

object

A MmGdbusModemMessaging.

 

invocation

A GDBusMethodInvocation.

 

arg_properties

Argument passed by remote caller.

 

user_data

user data set when the signal handler was connected.

 

Returns

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

Flags: Run Last


The “handle-delete” signal

gboolean
user_function (MmGdbusModemMessaging *object,
               GDBusMethodInvocation *invocation,
               char                  *arg_path,
               gpointer               user_data)

Signal emitted when a remote caller is invoking the Delete() 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_modem_messaging_complete_delete() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

Parameters

object

A MmGdbusModemMessaging.

 

invocation

A GDBusMethodInvocation.

 

arg_path

Argument passed by remote caller.

 

user_data

user data set when the signal handler was connected.

 

Returns

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

Flags: Run Last


The “handle-list” signal

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

Signal emitted when a remote caller is invoking the List() 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_modem_messaging_complete_list() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

Parameters

object

A MmGdbusModemMessaging.

 

invocation

A GDBusMethodInvocation.

 

user_data

user data set when the signal handler was connected.

 

Returns

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

Flags: Run Last