InfcRequest

InfcRequest — Requests sent to server

Stability Level

Unstable, unless otherwise indicated

Functions

guint infc_request_get_seq ()
const gchar * infc_request_get_name ()
void infc_request_failed ()

Properties

gchar * name Read / Write / Construct Only
guint seq Read / Write / Construct Only

Signals

void failed Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── InfcRequest
        ├── InfcExploreRequest
        ├── InfcNodeRequest
        ╰── InfcUserRequest

Includes

#include <libinfinity/client/infc-request.h>

Description

A InfcRequest represents a request that was sent to the server. It can be used to get information related to that request and to be notified when the request fails or finishes.

InfcRequest is the base class for other requests and only has the “failed” signal. Use signals from specific requests such as InfcNodeRequest to get further notification. Every request has a name and a sequence number. The sequence number is used in the server reply to refer to a specific request and normally of no use for developers using the infinote API.

Functions

infc_request_get_seq ()

guint
infc_request_get_seq (InfcRequest *request);

Returns the sequence identifier for this request.

Parameters

request

A InfcRequest.

 

Returns

The sequence number for request.


infc_request_get_name ()

const gchar *
infc_request_get_name (InfcRequest *request);

Returns the name of the request.

Parameters

request

A InfcRequest.

 

Returns

The name of request .


infc_request_failed ()

void
infc_request_failed (InfcRequest *request,
                     GError *error);

Emits the "failed" signal on request .

Parameters

request

A InfcRequest.

 

error

A GError.

 

Types and Values

struct InfcRequest

struct InfcRequest;


struct InfcRequestClass

struct InfcRequestClass {
  GObjectClass parent_class;

  /* Signals */
  void (*failed)(InfcRequest* request, GError* error);

  void (*unused1)(void);
  void (*usused2)(void);
};

Property Details

The “name” property

  “name”                     gchar *

Name of the request.

Flags: Read / Write / Construct Only

Default value: NULL


The “seq” property

  “seq”                      guint

Identifier for this request.

Flags: Read / Write / Construct Only

Default value: 0

Signal Details

The “failed” signal

void
user_function (InfcRequest *request,
               gpointer     error,
               gpointer     user_data)

Emitted when the request could not be processed on the server side. error holds additional information on why the request failed.

Parameters

request

The failed InfcRequest.

 

error

A pointer to a GError object with details on the error.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

See Also

InfcUserRequest, InfcNodeRequest, InfcExploreRequest