## InfcRequest InfcRequest — Requests sent to server |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

                        InfcRequest;
    struct              InfcRequestClass;
    guint               infc_request_get_seq                (InfcRequest *request);
    const gchar *       infc_request_get_name               (InfcRequest *request);
    void                infc_request_failed                 (InfcRequest *request,
                                                             GError *error);

## Object Hierarchy

      GObject
       +----InfcRequest
             +----InfcExploreRequest
             +----InfcNodeRequest
             +----InfcUserRequest

## Properties

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

## Signals

      "failed"                                         : Run Last

## 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.

## Details

### InfcRequest

    typedef struct _InfcRequest InfcRequest;

### struct InfcRequestClass

    struct InfcRequestClass {
      GObjectClass parent_class;

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

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

### infc_request_get_seq ()

    guint               infc_request_get_seq                (InfcRequest *request);

Returns the sequence identifier for this request.

`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.

`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`.

`request` : | A InfcRequest.
`error` : | A GError.

## Property Details

### The `"name"` property

      "name"                     gchar*                : Read / Write / Construct Only

Name of the request.

Default value: NULL

### The `"seq"` property

      "seq"                      guint                 : Read / Write / Construct Only

Identifier for this request.

Default value: 0

## Signal Details

### The `"failed"` signal

    void                user_function                      (InfcRequest *request,
                                                            gpointer     error,
                                                            gpointer     user_data)      : Run Last

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

`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.

## See Also

InfcUserRequest, InfcNodeRequest, InfcExploreRequest