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

ngfd-plugin

inputinterface.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_INPUT_INTERFACE_H
23#define N_INPUT_INTERFACE_H
24
26 typedef struct _NInputInterface NInputInterface;
27
28#include <ngf/core.h>
29#include <ngf/request.h>
30
32 typedef struct _NInputInterfaceDecl
33{
35 const char *name;
36
41 int (*initialize) (NInputInterface *iface);
42
46 void (*shutdown) (NInputInterface *iface);
47
53 void (*send_error) (NInputInterface *iface, NRequest *request, const char *err_msg);
54
60 void (*send_reply) (NInputInterface *iface, NRequest *request, int ret_code);
61} NInputInterfaceDecl;
62
67 NCore* n_input_interface_get_core (NInputInterface *iface);
68
74 int n_input_interface_play_request (NInputInterface *iface, NRequest *request);
75
81 int n_input_interface_pause_request (NInputInterface *iface, NRequest *request);
82
89 void n_input_interface_stop_request (NInputInterface *iface, NRequest *request, guint timeout);
90
95 void n_input_interface_set_userdata (NInputInterface *iface, void *userdata);
96
101 void* n_input_interface_get_userdata (NInputInterface *iface);
102
103#endif /* N_INPUT_INTERFACE_H */
core.h
NCore
struct _NCore NCore
Internal core structure.
Definition core.h:26
NInputInterfaceDecl
struct _NInputInterfaceDecl NInputInterfaceDecl
Interface declaration structure.
n_input_interface_get_core
NCore * n_input_interface_get_core(NInputInterface *iface)
Get core to which interface is associated to.
n_input_interface_set_userdata
void n_input_interface_set_userdata(NInputInterface *iface, void *userdata)
Stores userdata for the interface.
n_input_interface_pause_request
int n_input_interface_pause_request(NInputInterface *iface, NRequest *request)
Pauses playback of the request.
n_input_interface_stop_request
void n_input_interface_stop_request(NInputInterface *iface, NRequest *request, guint timeout)
Stops playback of the request.
NInputInterface
struct _NInputInterface NInputInterface
Internal inputinterface structure.
Definition inputinterface.h:26
n_input_interface_get_userdata
void * n_input_interface_get_userdata(NInputInterface *iface)
Returns userdata stored to the interface.
n_input_interface_play_request
int n_input_interface_play_request(NInputInterface *iface, NRequest *request)
Start playback of the request.
request.h
NRequest
struct _NRequest NRequest
Internal request structure.
Definition request.h:26
_NInputInterfaceDecl
Interface declaration structure.
Definition inputinterface.h:33
_NInputInterfaceDecl::send_error
void(* send_error)(NInputInterface *iface, NRequest *request, const char *err_msg)
Error sending function.
Definition inputinterface.h:53
_NInputInterfaceDecl::send_reply
void(* send_reply)(NInputInterface *iface, NRequest *request, int ret_code)
Reply sending function.
Definition inputinterface.h:60
_NInputInterfaceDecl::initialize
int(* initialize)(NInputInterface *iface)
Initialization function.
Definition inputinterface.h:41
_NInputInterfaceDecl::name
const char * name
Name of the interface.
Definition inputinterface.h:35
_NInputInterfaceDecl::shutdown
void(* shutdown)(NInputInterface *iface)
Shutdown function.
Definition inputinterface.h:46