AgsConnectable

AgsConnectable — unique access to objects

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── AgsConnectable

Known Implementations

AgsConnectable is implemented by AgsApplicationContext, AgsDestroyWorker, AgsGenericMainLoop, AgsRegistry, AgsReturnableThread, AgsServerApplicationContext, AgsServerStatus, AgsTaskCompletion, AgsTaskLauncher, AgsThread, AgsThreadApplicationContext and AgsWorkerThread.

Includes

#include <ags/object/ags_connectable.h>

Description

The AgsConnectable interface gives you a unique access to all objects and is responsible to set up signal handlers.

Functions

ags_connectable_get_uuid ()

AgsUUID *
ags_connectable_get_uuid (AgsConnectable *connectable);

Get UUID of connectable .

Parameters

connectable

the AgsConnectable

 

Returns

the assigned AgsUUID

Since: 3.0.0


ags_connectable_has_resource ()

gboolean
ags_connectable_has_resource (AgsConnectable *connectable);

Check the connectable to have resources.

Parameters

connectable

the AgsConnectable

 

Returns

TRUE if connectable can be added to registry, otherwise FALSE.

Since: 3.0.0


ags_connectable_is_ready ()

gboolean
ags_connectable_is_ready (AgsConnectable *connectable);

Connect the connectable.

Parameters

connectable

the AgsConnectable

 

Returns

TRUE if is added to registry, otherwise FALSE.

Since: 3.0.0


ags_connectable_add_to_registry ()

void
ags_connectable_add_to_registry (AgsConnectable *connectable);

Add connectable to registry.

Parameters

connectable

the AgsConnectable

 

Since: 3.0.0


ags_connectable_remove_from_registry ()

void
ags_connectable_remove_from_registry (AgsConnectable *connectable);

Remove connectable from registry.

Parameters

connectable

the AgsConnectable

 

Since: 3.0.0


ags_connectable_list_resource ()

xmlNode *
ags_connectable_list_resource (AgsConnectable *connectable);

List resources as an XML element and return it.

Parameters

connectable

the AgsConnectable

 

Returns

the xmlNode.

[transfer none]

Since: 3.0.0


ags_connectable_xml_compose ()

xmlNode *
ags_connectable_xml_compose (AgsConnectable *connectable);

Compose an XML element and return it.

Parameters

connectable

the AgsConnectable

 

Returns

the xmlNode.

[transfer none]

Since: 3.0.0


ags_connectable_xml_parse ()

void
ags_connectable_xml_parse (AgsConnectable *connectable,
                           xmlNode *node);

Parse node as XML element and apply it.

Parameters

connectable

the AgsConnectable

 

node

the xmlNode.

[transfer none]

Since: 3.0.0


ags_connectable_is_connected ()

gboolean
ags_connectable_is_connected (AgsConnectable *connectable);

Check if the connectable was connected.

Parameters

connectable

the AgsConnectable

 

Returns

TRUE if is connected, otherwise FALSE.

Since: 3.0.0


ags_connectable_connect ()

void
ags_connectable_connect (AgsConnectable *connectable);

Connect the connectable.

Parameters

connectable

the AgsConnectable

 

Since: 3.0.0


ags_connectable_disconnect ()

void
ags_connectable_disconnect (AgsConnectable *connectable);

Disconnect the connectable.

Parameters

connectable

the AgsConnectable

 

Since: 3.0.0


ags_connectable_connect_connection ()

void
ags_connectable_connect_connection (AgsConnectable *connectable,
                                    GObject *connection);

Disconnect the connectable.

Parameters

connectable

the AgsConnectable

 

connection

the connection

 

Since: 3.0.0


ags_connectable_disconnect_connection ()

void
ags_connectable_disconnect_connection (AgsConnectable *connectable,
                                       GObject *connection);

Disconnect the connectable.

Parameters

connectable

the AgsConnectable

 

connection

the connection

 

Since: 3.0.0


AGS_CONNECTABLE()

#define AGS_CONNECTABLE(obj)                    (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONNECTABLE, AgsConnectable))

AGS_CONNECTABLE_GET_INTERFACE()

#define AGS_CONNECTABLE_GET_INTERFACE(obj)      (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_CONNECTABLE, AgsConnectableInterface))

AGS_CONNECTABLE_INTERFACE()

#define AGS_CONNECTABLE_INTERFACE(vtable)       (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_CONNECTABLE, AgsConnectableInterface))

AGS_IS_CONNECTABLE()

#define AGS_IS_CONNECTABLE(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CONNECTABLE))

AGS_IS_CONNECTABLE_INTERFACE()

#define AGS_IS_CONNECTABLE_INTERFACE(vtable)    (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_CONNECTABLE))

ags_connectable_get_type ()

GType
ags_connectable_get_type ();

Types and Values

AGS_TYPE_CONNECTABLE

#define AGS_TYPE_CONNECTABLE                    (ags_connectable_get_type())

AgsConnectable

typedef struct _AgsConnectable AgsConnectable;

struct AgsConnectableInterface

struct AgsConnectableInterface {
  GTypeInterface ginterface;

  AgsUUID* (*get_uuid)(AgsConnectable *connectable);
  gboolean (*has_resource)(AgsConnectable *connectable);

  gboolean (*is_ready)(AgsConnectable *connectable);
  void (*add_to_registry)(AgsConnectable *connectable);
  void (*remove_from_registry)(AgsConnectable *connectable);

  xmlNode* (*list_resource)(AgsConnectable *connectable);

  xmlNode* (*xml_compose)(AgsConnectable *connectable);
  void (*xml_parse)(AgsConnectable *connectable,
		    xmlNode *node);

  gboolean (*is_connected)(AgsConnectable *connectable);
  void (*connect)(AgsConnectable *connectable);
  void (*disconnect)(AgsConnectable *connectable);

  void (*connect_connection)(AgsConnectable *connectable,
			     GObject *connection);
  void (*disconnect_connection)(AgsConnectable *connectable,
				GObject *connection);
};