GIO Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Prerequisites | Known Implementations | Properties |
ExampleObject; struct ExampleObjectIface; ExampleAnimal * example_object_get_animal (ExampleObject *object
); ExampleCat * example_object_get_cat (ExampleObject *object
); ExampleAnimal * example_object_peek_animal (ExampleObject *object
); ExampleCat * example_object_peek_cat (ExampleObject *object
); struct ExampleObjectProxy; struct ExampleObjectProxyClass; ExampleObjectProxy * example_object_proxy_new (GDBusConnection *connection
,const gchar *object_path
); struct ExampleObjectSkeleton; struct ExampleObjectSkeletonClass; ExampleObjectSkeleton * example_object_skeleton_new (const gchar *object_path
); void example_object_skeleton_set_animal (ExampleObjectSkeleton *object
,ExampleAnimal *interface_
); void example_object_skeleton_set_cat (ExampleObjectSkeleton *object
,ExampleCat *interface_
);
GInterface +----ExampleObject
GObject +----GDBusObjectProxy +----ExampleObjectProxy
GObject +----GDBusObjectSkeleton +----ExampleObjectSkeleton
ExampleObjectProxy implements GDBusObject and ExampleObject.
ExampleObjectSkeleton implements GDBusObject and ExampleObject.
This section contains the ExampleObject, ExampleObjectProxy, and ExampleObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces.
typedef struct _ExampleObject ExampleObject;
The ExampleObject type is a specialized container of interfaces.
struct ExampleObjectIface { GTypeInterface parent_iface; };
Virtual table for the ExampleObject interface.
GTypeInterface |
The parent interface. |
ExampleAnimal * example_object_get_animal (ExampleObject *object
);
Gets the ExampleAnimal instance for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal on object
, if any.
|
A ExampleObject. |
Returns : |
A ExampleAnimal that must be freed with g_object_unref() or NULL if object does not implement the interface. [transfer full]
|
Since 2.30
ExampleCat * example_object_get_cat (ExampleObject *object
);
Gets the ExampleCat instance for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Cat on object
, if any.
|
A ExampleObject. |
Returns : |
A ExampleCat that must be freed with g_object_unref() or NULL if object does not implement the interface. [transfer full]
|
ExampleAnimal * example_object_peek_animal (ExampleObject *object
);
Like example_object_get_animal()
but doesn't increase the reference count on the returned object.
object
is running.
|
A ExampleObject. |
Returns : |
A ExampleAnimal or NULL if object does not implement the interface. Do not free the returned object, it is owned by object . [transfer none]
|
Since 2.30
ExampleCat * example_object_peek_cat (ExampleObject *object
);
Like example_object_get_cat()
but doesn't increase the reference count on the returned object.
object
is running.
|
A ExampleObject. |
Returns : |
A ExampleCat or NULL if object does not implement the interface. Do not free the returned object, it is owned by object . [transfer none]
|
struct ExampleObjectProxy;
The ExampleObjectProxy structure contains only private data and should only be accessed using the provided API.
struct ExampleObjectProxyClass { GDBusObjectProxyClass parent_class; };
Class structure for ExampleObjectProxy.
GDBusObjectProxyClass |
The parent class. |
ExampleObjectProxy * example_object_proxy_new (GDBusConnection *connection
,const gchar *object_path
);
Creates a new proxy object.
|
A GDBusConnection. |
|
An object path. |
Returns : |
The proxy object. [transfer full] |
struct ExampleObjectSkeleton;
The ExampleObjectSkeleton structure contains only private data and should only be accessed using the provided API.
struct ExampleObjectSkeletonClass { GDBusObjectSkeletonClass parent_class; };
Class structure for ExampleObjectSkeleton.
GDBusObjectSkeletonClass |
The parent class. |
ExampleObjectSkeleton * example_object_skeleton_new (const gchar *object_path
);
Creates a new skeleton object.
|
An object path. |
Returns : |
The skeleton object. [transfer full] |
void example_object_skeleton_set_animal (ExampleObjectSkeleton *object
,ExampleAnimal *interface_
);
Sets the ExampleAnimal instance for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal on object
.
|
A ExampleObjectSkeleton. |
|
A ExampleAnimal or NULL to clear the interface. [allow-none]
|
Since 2.30
void example_object_skeleton_set_cat (ExampleObjectSkeleton *object
,ExampleCat *interface_
);
Sets the ExampleCat instance for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Cat on object
.
|
A ExampleObjectSkeleton. |
|
A ExampleCat or NULL to clear the interface. [allow-none]
|
"animal"
property"animal" ExampleAnimal* : Read / Write
The ExampleAnimal instance corresponding to the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal, if any.
Connect to the "notify" signal to get informed of property changes.
Since 2.30
"cat"
property"cat" ExampleCat* : Read / Write
The ExampleCat instance corresponding to the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Cat, if any.
Connect to the "notify" signal to get informed of property changes.