2
* This file is part of oFono - Open Source Telephony
4
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* version 2 as published by the Free Software Foundation.
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24
#ifndef __GISI_CLIENT_H
25
#define __GISI_CLIENT_H
35
typedef struct _GIsiClient GIsiClient;
38
typedef struct _GIsiRequest GIsiRequest;
40
typedef bool (*GIsiResponseFunc)(GIsiClient *client,
41
const void *restrict data, size_t len,
42
uint16_t object, void *opaque);
44
typedef void (*GIsiIndicationFunc) (GIsiClient *client,
45
const void *restrict data, size_t len,
46
uint16_t object, void *opaque);
48
GIsiClient *g_isi_client_create(uint8_t resource);
50
void g_isi_client_destroy(GIsiClient *client);
52
int g_isi_client_error(const GIsiClient *client);
54
GIsiRequest *g_isi_request_make(GIsiClient *client, const void *data,
55
size_t len, unsigned timeout,
56
GIsiResponseFunc func, void *opaque);
58
void g_isi_request_cancel(GIsiRequest *req);
60
int g_isi_subscribe(GIsiClient *client, uint8_t type,
61
GIsiIndicationFunc func, void *opaque);
63
void g_isi_unsubscribe(GIsiClient *client, uint8_t type);
69
#endif /* __GISI_CLIENT_H */