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
26typedef struct _NRequest NRequest;
27
28#include <ngf/proplist.h>
29#include <ngf/event.h>
30
35
40
46
50void n_request_free (NRequest *request);
51
56unsigned int n_request_get_id (NRequest *request);
57
62const char* n_request_get_name (NRequest *request);
63
68void n_request_set_properties (NRequest *request, NProplist *properties);
69
75
81
87void n_request_set_timeout (NRequest *request, guint timeout);
88
95
101void n_request_store_data (NRequest *request, const char *key, void *data);
102
108void* n_request_get_data (NRequest *request, const char *key);
109
115
121NRequest* n_request_new_with_event_and_properties (const char *event, const NProplist *properties);
122
128
129#endif /* N_REQUEST_H */
struct _NEvent NEvent
Internal event structure.
Definition event.h:26
struct _NProplist NProplist
Internal proplist structure.
Definition proplist.h:26
const NEvent * n_request_get_event(NRequest *request)
Get associated event from request.
void n_request_set_properties(NRequest *request, NProplist *properties)
Set properties to request.
guint n_request_get_timeout(NRequest *request)
Get a timeout value for the request.
const NProplist * n_request_get_properties(NRequest *request)
Get properties from request.
NRequest * n_request_new()
Create empty request.
void n_request_store_data(NRequest *request, const char *key, void *data)
Store key/value pair to request.
void n_request_free(NRequest *request)
Free request.
unsigned int n_request_get_id(NRequest *request)
Get request id.
struct _NRequest NRequest
Internal request structure.
Definition request.h:26
NRequest * n_request_new_with_event_and_properties(const char *event, const NProplist *properties)
Create new request with event and properties.
const char * n_request_get_name(NRequest *request)
Get request name.
NRequest * n_request_new_with_event(const char *event)
Create request with event.
int n_request_is_paused(NRequest *request)
Check if the request is paused.
void n_request_set_timeout(NRequest *request, guint timeout)
Set the timeout value for the request.
NRequest * n_request_copy(const NRequest *request)
Copy request.
void * n_request_get_data(NRequest *request, const char *key)
Get data stored to request by key.
int n_request_is_fallback(NRequest *request)
Request is a fallback request.