![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Prerequisites | Known Implementations | Properties |
Synopsis
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_
);
Object Hierarchy
GInterface +----ExampleObject
GObject +----GDBusObjectProxy +----ExampleObjectProxy
GObject +----GDBusObjectSkeleton +----ExampleObjectSkeleton
Implemented Interfaces
ExampleObjectProxy implements GDBusObject and ExampleObject.
ExampleObjectSkeleton implements GDBusObject and ExampleObject.
Description
This section contains the ExampleObject, ExampleObjectProxy, and ExampleObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces.
Details
ExampleObject
typedef struct _ExampleObject ExampleObject;
The ExampleObject type is a specialized container of interfaces.
struct ExampleObjectIface
struct ExampleObjectIface { GTypeInterface parent_iface; };
Virtual table for the ExampleObject interface.
GTypeInterface |
The parent interface. |
example_object_get_animal ()
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
example_object_get_cat ()
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]
|
example_object_peek_animal ()
ExampleAnimal * example_object_peek_animal (ExampleObject *object
);
Like example_object_get_animal()
but doesn' increase the reference count on the returned object.
Warning
It is not safe to use the returned object if you are on another thread than the one where the GDBusObjectManagerClient or GDBusObjectManagerServer forobject
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
example_object_peek_cat ()
ExampleCat * example_object_peek_cat (ExampleObject *object
);
Like example_object_get_cat()
but doesn' increase the reference count on the returned object.
Warning
It is not safe to use the returned object if you are on another thread than the one where the GDBusObjectManagerClient or GDBusObjectManagerServer forobject
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
struct ExampleObjectProxy;
The ExampleObjectProxy structure contains only private data and should only be accessed using the provided API.
struct ExampleObjectProxyClass
struct ExampleObjectProxyClass { GDBusObjectProxyClass parent_class; };
Class structure for ExampleObjectProxy.
GDBusObjectProxyClass |
The parent class. |
example_object_proxy_new ()
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
struct ExampleObjectSkeleton;
The ExampleObjectSkeleton structure contains only private data and should only be accessed using the provided API.
struct ExampleObjectSkeletonClass
struct ExampleObjectSkeletonClass { GDBusObjectSkeletonClass parent_class; };
Class structure for ExampleObjectSkeleton.
GDBusObjectSkeletonClass |
The parent class. |
example_object_skeleton_new ()
ExampleObjectSkeleton * example_object_skeleton_new (const gchar *object_path
);
Creates a new skeleton object.
|
An object path. |
Returns : |
The skeleton object. [transfer full] |
example_object_skeleton_set_animal ()
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
example_object_skeleton_set_cat ()
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]
|
Property Details
The "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
The "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.