EvdService

EvdService

Synopsis

struct              EvdService;
struct              EvdServiceClass;
enum                EvdServiceValidate;
void                evd_service_add_listener            (EvdService *self,
                                                         EvdSocket *socket);
gboolean            evd_service_get_tls_autostart       (EvdService *self);
EvdTlsCredentials * evd_service_get_tls_credentials     (EvdService *self);
void                evd_service_listen                  (EvdService *self,
                                                         const gchar *address,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            evd_service_listen_finish           (EvdService *self,
                                                         GAsyncResult *result,
                                                         GError **error);
EvdService *        evd_service_new                     (void);
gboolean            evd_service_remove_listener         (EvdService *self,
                                                         EvdSocket *socket);
void                evd_service_set_io_stream_type      (EvdService *self,
                                                         GType io_stream_type);
void                evd_service_set_tls_autostart       (EvdService *self,
                                                         gboolean autostart);
void                evd_service_set_tls_credentials     (EvdService *self,
                                                         EvdTlsCredentials *credentials);

Object Hierarchy

  GObject
   +----EvdIoStreamGroup
         +----EvdService
               +----EvdWebService
               +----EvdReproxy

Properties

  "tls-autostart"            gboolean              : Read / Write
  "tls-credentials"          EvdTlsCredentials*    : Read / Write

Signals

  "validate-connection"                            : Action

Description

Details

struct EvdService

struct EvdService;


struct EvdServiceClass

struct EvdServiceClass {
  EvdIoStreamGroupClass parent_class;

  /* virtual methods */
  void (* connection_accepted) (EvdService     *self,
                                EvdConnection  *conn);
  void (* connection_closed)   (EvdService     *self,
                                EvdConnection  *conn);

  /* signal prototypes */
  guint (* validate_connection) (EvdService    *self,
                                 EvdConnection *socket,
                                 gpointer       user_data);

  /* padding for future expansion */
  void (* _padding_0_) (void);
  void (* _padding_1_) (void);
  void (* _padding_2_) (void);
  void (* _padding_3_) (void);
  void (* _padding_4_) (void);
  void (* _padding_5_) (void);
  void (* _padding_6_) (void);
  void (* _padding_7_) (void);
};


enum EvdServiceValidate

typedef enum {
  EVD_SERVICE_VALIDATE_ACCEPT,
  EVD_SERVICE_VALIDATE_REJECT,
  EVD_SERVICE_VALIDATE_PENDING
} EvdServiceValidate;


evd_service_add_listener ()

void                evd_service_add_listener            (EvdService *self,
                                                         EvdSocket *socket);


evd_service_get_tls_autostart ()

gboolean            evd_service_get_tls_autostart       (EvdService *self);


evd_service_get_tls_credentials ()

EvdTlsCredentials * evd_service_get_tls_credentials     (EvdService *self);

Returns :

The EvdTlsCredentials object of this session. [transfer none]

evd_service_listen ()

void                evd_service_listen                  (EvdService *self,
                                                         const gchar *address,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

cancellable :

. [allow-none]

callback :

. [allow-none]

user_data :

. [allow-none]

evd_service_listen_finish ()

gboolean            evd_service_listen_finish           (EvdService *self,
                                                         GAsyncResult *result,
                                                         GError **error);


evd_service_new ()

EvdService *        evd_service_new                     (void);


evd_service_remove_listener ()

gboolean            evd_service_remove_listener         (EvdService *self,
                                                         EvdSocket *socket);


evd_service_set_io_stream_type ()

void                evd_service_set_io_stream_type      (EvdService *self,
                                                         GType io_stream_type);


evd_service_set_tls_autostart ()

void                evd_service_set_tls_autostart       (EvdService *self,
                                                         gboolean autostart);


evd_service_set_tls_credentials ()

void                evd_service_set_tls_credentials     (EvdService *self,
                                                         EvdTlsCredentials *credentials);

Property Details

The "tls-autostart" property

  "tls-autostart"            gboolean              : Read / Write

Returns TRUE if TLS upgrade should be performed automatically upon incoming connections.

Default value: FALSE


The "tls-credentials" property

  "tls-credentials"          EvdTlsCredentials*    : Read / Write

The TLS credentials that will be passed to the connections of the service.

Signal Details

The "validate-connection" signal

guint               user_function                      (EvdService    *evdservice,
                                                        EvdConnection *arg1,
                                                        gpointer       user_data)       : Action

evdservice :

the object which received the signal.

user_data :

user data set when the signal handler was connected.