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