libmm-glib: methods to create MMSms objects
We need them, as received messages are signaled just with their path, so the program listening to those signals will need to create the proxy objects itself.
This commit is contained in:
@@ -327,3 +327,40 @@ mm_sms_send_sync (MMSms *self,
|
||||
cancellable,
|
||||
error);
|
||||
}
|
||||
|
||||
void
|
||||
mm_sms_new (GDBusConnection *connection,
|
||||
const gchar *path,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
return mm_gdbus_sms_proxy_new (connection,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||
MM_DBUS_SERVICE,
|
||||
path,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
|
||||
MMSms *
|
||||
mm_sms_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
return mm_gdbus_sms_proxy_new_finish (res, error);
|
||||
}
|
||||
|
||||
MMSms *
|
||||
mm_sms_new_sync (GDBusConnection *connection,
|
||||
const gchar *path,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
return mm_gdbus_sms_proxy_new_sync (connection,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||
MM_DBUS_SERVICE,
|
||||
path,
|
||||
cancellable,
|
||||
error);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,19 @@ typedef MmGdbusSms MMSms;
|
||||
const gchar *mm_sms_get_path (MMSms *self);
|
||||
gchar *mm_sms_dup_path (MMSms *self);
|
||||
|
||||
void mm_sms_new (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSms *mm_sms_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
MMSms *mm_sms_new_sync (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void mm_sms_send (MMSms *self,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
|
||||
Reference in New Issue
Block a user