AgsServer

AgsServer — remote control server

Functions

Properties

AgsApplicationContext * application-context Read / Write
gchar * domain Read / Write
gchar * ip4 Read / Write
gchar * ip6 Read / Write
guint server-port Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── AgsServer

Implemented Interfaces

AgsServer implements AgsConnectable.

Includes

#include <ags/server/ags_server.h>

Description

The AgsServer is a XML-RPC server.

Functions

ags_server_get_class_mutex ()

pthread_mutex_t *
ags_server_get_class_mutex ();

Use this function's returned mutex to access mutex fields.

Returns

the class mutex

Since: 2.0.0


ags_server_test_flags ()

gboolean
ags_server_test_flags (AgsServer *server,
                       guint flags);

Test flags to be set on server .

Parameters

server

the AgsServer

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 2.0.0


ags_server_set_flags ()

void
ags_server_set_flags (AgsServer *server,
                      guint flags);

Enable a feature of server .

Parameters

server

the AgsServer

 

flags

see AgsServerFlags

 

Since: 2.0.0


ags_server_unset_flags ()

void
ags_server_unset_flags (AgsServer *server,
                        guint flags);

Disable a feature of server .

Parameters

server

the AgsServer

 

flags

see AgsServerFlags

 

Since: 2.0.0


ags_server_info_alloc ()

AgsServerInfo *
ags_server_info_alloc (gchar *server_name,
                       gchar *uuid);

Allocate server info.

Parameters

server_name

the server name

 

uuid

the uuid

 

Returns

the allocated AgsServerInfo

Since: 2.0.0


ags_server_start ()

void
ags_server_start (AgsServer *server);

Start the XMLRPC-C abyss server.

Parameters

server

the AgsServer

 

Since: 2.0.0


ags_server_stop ()

void
ags_server_stop (AgsServer *server);

Stop the XMLRPC-C abyss server.

Parameters

server

the AgsServer

 

Since: 2.1.0


ags_server_lookup ()

AgsServer *
ags_server_lookup (AgsServerInfo *server_info);

Lookup AgsServer by server_info .

Parameters

server_info

the AgsServerInfo

 

Returns

the associated AgsServer if found, else NULL

Since: 2.0.0


ags_server_new ()

AgsServer *
ags_server_new (GObject *application_context);

Instantiate AgsServer.

Parameters

application_context

the AgsApplicationContext

 

Returns

a new AgsServer

Since: 2.0.0


AGS_IS_SERVER()

#define AGS_IS_SERVER(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SERVER))

AGS_SERVER()

#define AGS_SERVER(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SERVER, AgsServer))

AGS_SERVER_CLASS()

#define AGS_SERVER_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SERVER, AgsServerClass))

AGS_SERVER_GET_CLASS()

#define AGS_SERVER_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SERVER, AgsServerClass))

ags_server_get_type ()

GType
ags_server_get_type ();

Types and Values

AGS_SERVER_DEFAULT_SERVER_PORT

#define AGS_SERVER_DEFAULT_SERVER_PORT (8080)

AGS_SERVER_DEFAULT_DOMAIN

#define AGS_SERVER_DEFAULT_DOMAIN "localhost"

AGS_SERVER_DEFAULT_INET4_ADDRESS

#define AGS_SERVER_DEFAULT_INET4_ADDRESS "127.0.0.1"

AGS_SERVER_DEFAULT_INET6_ADDRESS

#define AGS_SERVER_DEFAULT_INET6_ADDRESS "::1"

AGS_SERVER_DEFAULT_AUTH_MODULE

#define AGS_SERVER_DEFAULT_AUTH_MODULE "ags-xml-password-store"

enum AgsServerFlags

Enum values to control the behavior or indicate internal state of AgsServer by enable/disable as flags.

Members

AGS_SERVER_ADDED_TO_REGISTRY

indicates the application context was added to AgsRegistry

 

AGS_SERVER_CONNECTED

the server was connected by AgsConnectable::connect()

 

AGS_SERVER_STARTED

the server was started

 

AGS_SERVER_RUNNING

the server is up and running

 

AGS_SERVER_INET4

use IPv4

 

AGS_SERVER_INET6

use IPv6

 

AGS_SERVER_ANY_ADDRESS

listen on any address

 

struct AgsServerInfo

struct AgsServerInfo {
  gchar *uuid;
  gchar *server_name;
};

AgsServerInfo does identify the server and provides some basic information about it.

Members

gchar *uuid;

the assigned uuid

 

gchar *server_name;

the server's name

 

AGS_TYPE_SERVER

#define AGS_TYPE_SERVER                (ags_server_get_type())

struct AgsServer

struct AgsServer;

struct AgsServerClass

struct AgsServerClass {
  GObjectClass object;
  
  void (*start)(AgsServer *server);
  void (*stop)(AgsServer *server);
};

Property Details

The “application-context” property

  “application-context”      AgsApplicationContext *

The assigned AgsApplicationContext

Flags: Read / Write

Since: 2.0.0


The “domain” property

  “domain”                   gchar *

The domain to use.

Flags: Read / Write

Default value: NULL

Since: 2.1.0


The “ip4” property

  “ip4”                      gchar *

The IPv4 address as string of the server.

Flags: Read / Write

Default value: NULL

Since: 2.1.0


The “ip6” property

  “ip6”                      gchar *

The IPv6 address as string of the server.

Flags: Read / Write

Default value: NULL

Since: 2.1.0


The “server-port” property

  “server-port”              guint

The server port to use.

Flags: Read / Write

Default value: 8080

Since: 2.1.0

Signal Details

The “start” signal

void
user_function (AgsServer *server,
               gpointer   user_data)

The ::start signal is emitted as the server starts.

Parameters

server

the AgsServer

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “stop” signal

void
user_function (AgsServer *server,
               gpointer   user_data)

The ::stop signal is emitted as the server stops.

Parameters

server

the AgsServer

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.1.0