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

ngfd-plugin

request.h
Go to the documentation of this file.
1/*
2 * ngfd - Non-graphic feedback daemon
3 *
4 * Copyright (C) 2010 Nokia Corporation.
5 * Contact: Xun Chen <xun.chen@nokia.com>
6 *
7 * This work is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This work is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this work; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef N_REQUEST_H
23#define N_REQUEST_H
24
26 typedef struct _NRequest NRequest;
27
28#include <ngf/proplist.h>
29#include <ngf/event.h>
30
34 NRequest* n_request_new ();
35
39 NRequest* n_request_copy (const NRequest *request);
40
45 NRequest* n_request_new_with_event (const char *event);
46
50 void n_request_free (NRequest *request);
51
56 unsigned int n_request_get_id (NRequest *request);
57
62 const char* n_request_get_name (NRequest *request);
63
68 void n_request_set_properties (NRequest *request, NProplist *properties);
69
74 const NProplist* n_request_get_properties (NRequest *request);
75
80 const NEvent* n_request_get_event (NRequest *request);
81
87 void n_request_set_timeout (NRequest *request, guint timeout);
88
94guint n_request_get_timeout (NRequest *request);
95
101 void n_request_store_data (NRequest *request, const char *key, void *data);
102
108 void* n_request_get_data (NRequest *request, const char *key);
109
114 int n_request_is_paused (NRequest *request);
115
121 NRequest* n_request_new_with_event_and_properties (const char *event, const NProplist *properties);
122
127 int n_request_is_fallback (NRequest *request);
128
129#endif /* N_REQUEST_H */
event.h
NEvent
struct _NEvent NEvent
Internal event structure.
Definition event.h:26
proplist.h
NProplist
struct _NProplist NProplist
Internal proplist structure.
Definition proplist.h:26
n_request_get_event
const NEvent * n_request_get_event(NRequest *request)
Get associated event from request.
n_request_set_properties
void n_request_set_properties(NRequest *request, NProplist *properties)
Set properties to request.
n_request_get_timeout
guint n_request_get_timeout(NRequest *request)
Get a timeout value for the request.
n_request_get_properties
const NProplist * n_request_get_properties(NRequest *request)
Get properties from request.
n_request_new
NRequest * n_request_new()
Create empty request.
n_request_store_data
void n_request_store_data(NRequest *request, const char *key, void *data)
Store key/value pair to request.
n_request_free
void n_request_free(NRequest *request)
Free request.
n_request_get_id
unsigned int n_request_get_id(NRequest *request)
Get request id.
NRequest
struct _NRequest NRequest
Internal request structure.
Definition request.h:26
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.
n_request_get_name
const char * n_request_get_name(NRequest *request)
Get request name.
n_request_new_with_event
NRequest * n_request_new_with_event(const char *event)
Create request with event.
n_request_is_paused
int n_request_is_paused(NRequest *request)
Check if the request is paused.
n_request_set_timeout
void n_request_set_timeout(NRequest *request, guint timeout)
Set the timeout value for the request.
n_request_copy
NRequest * n_request_copy(const NRequest *request)
Copy request.
n_request_get_data
void * n_request_get_data(NRequest *request, const char *key)
Get data stored to request by key.
n_request_is_fallback
int n_request_is_fallback(NRequest *request)
Request is a fallback request.