ngfd-plugin: /build/ngfd/src/ngfd-1.4.1/src/include/ngf/request.h File Reference

ngfd-plugin

Typedefs | Functions
request.h File Reference
`#include <ngf/proplist.h>`
`#include <ngf/event.h>`

Go to the source code of this file.

## Typedefs
typedef struct _NRequest | NRequest
| Internal request structure.

## Functions
NRequest * | n_request_new ()
| Create empty request.
NRequest * | n_request_copy (const NRequest *request)
| Copy request.
NRequest * | n_request_new_with_event (const char *event)
| Create request with event.
void | n_request_free (NRequest *request)
| Free request.
unsigned int | n_request_get_id (NRequest *request)
| Get request id.
const char * | n_request_get_name (NRequest *request)
| Get request name.
void | n_request_set_properties (NRequest *request, NProplist *properties)
| Set properties to request.
const NProplist * | n_request_get_properties (NRequest *request)
| Get properties from request.
const NEvent * | n_request_get_event (NRequest *request)
| Get associated event from request.
void | n_request_set_timeout (NRequest *request, guint timeout)
| Set the timeout value for the request.
guint | n_request_get_timeout (NRequest *request)
| Get a timeout value for the request.
void | n_request_store_data (NRequest *request, const char *key, void *data)
| Store key/value pair to request.
void * | n_request_get_data (NRequest *request, const char *key)
| Get data stored to request by key.
int | n_request_is_paused (NRequest *request)
| Check if the request is paused.
NRequest * | n_request_new_with_event_and_properties (const char *event, const NProplist *properties)
| Create new request with event and properties.
int | n_request_is_fallback (NRequest *request)
| Request is a fallback request.

## Typedef Documentation

## ◆ NRequest

typedef struct _NRequest NRequest

Internal request structure.

## Function Documentation

## ◆ n_request_copy()

NRequest * n_request_copy | ( | const NRequest * | request | ) |

Copy request.

Returns
  Allocated request structure

## ◆ n_request_free()

void n_request_free | ( | NRequest * | request | ) |

Free request.

Parameters

  request | Request

## ◆ n_request_get_data()

void * n_request_get_data | ( | NRequest * | request,
|  | const char * | key )

Get data stored to request by key.

Parameters

  request | Request
  key | Key

Returns
  Pointer to data or NULL if key is not found

## ◆ n_request_get_event()

const NEvent * n_request_get_event | ( | NRequest * | request | ) |

Get associated event from request.

Parameters

  request | Request

Returns
  Event as NEvent

## ◆ n_request_get_id()

unsigned int n_request_get_id | ( | NRequest * | request | ) |

Get request id.

Parameters

  request | Request

Returns
  Id assigned to request

## ◆ n_request_get_name()

const char * n_request_get_name | ( | NRequest * | request | ) |

Get request name.

Parameters

  request | Request

Returns
  Name of the request

## ◆ n_request_get_properties()

const NProplist * n_request_get_properties | ( | NRequest * | request | ) |

Get properties from request.

Parameters

  request | Request

Returns
  Properties as NProplist

## ◆ n_request_get_timeout()

guint n_request_get_timeout | ( | NRequest * | request | ) |

Get a timeout value for the request.

Parameters

  request | Request

Returns
  Timeout value in milliseconds (ms), or 0 if timeout disabled

## ◆ n_request_is_fallback()

int n_request_is_fallback | ( | NRequest * | request | ) |

Request is a fallback request.

Parameters

  request | Request

Returns
  TRUE if fallback, FALSE if normal.

## ◆ n_request_is_paused()

int n_request_is_paused | ( | NRequest * | request | ) |

Check if the request is paused.

Parameters

  request | Request

Returns
  TRUE if request is currently paused

## ◆ n_request_new()

NRequest * n_request_new | ( |  | ) |

Create empty request.

Returns
  Allocated request structure

## ◆ n_request_new_with_event()

NRequest * n_request_new_with_event | ( | const char * | event | ) |

Create request with event.

Parameters

  event | Event to be added to request

Returns
  Allocated request structure

## ◆ n_request_new_with_event_and_properties()

NRequest * n_request_new_with_event_and_properties | ( | const char * | event,
|  | const NProplist * | properties )

Create new request with event and properties.

Parameters

  event | Event
  properties | Properties as NProplist

Returns
  Newly allocated request

## ◆ n_request_set_properties()

void n_request_set_properties | ( | NRequest * | request,
|  | NProplist * | properties )

Set properties to request.

Parameters

  request | Request
  properties | Properties as NProplist

## ◆ n_request_set_timeout()

void n_request_set_timeout | ( | NRequest * | request,
|  | guint | timeout )

Set the timeout value for the request.

Parameters

  request | Request
  timeout | Timeout value in milliseconds (ms), 0 to disable

## ◆ n_request_store_data()

void n_request_store_data | ( | NRequest * | request,
|  | const char * | key,
|  | void * | data )

Store key/value pair to request.

Parameters

  request | Request
  key | Key
  data | Pointer to data to be stored