~phablet-team/ofono/ofono-bug-updates

« back to all changes in this revision

Viewing changes to gisi/client.h

  • Committer: Aki Niemi
  • Date: 2009-06-15 08:27:16 UTC
  • Revision ID: git-v1:e5f0290ddb17f368cf21bc0262a531e67486c409
Rename ISI client and PhoNet netlink APIs

- Add g_ prefix to functions
- Add G-prefix and use CamelCasing in types

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of oFono - Open Source Telephony
 
3
 *
 
4
 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
 
5
 *
 
6
 * Contact: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
 
7
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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
 
20
 * 02110-1301 USA
 
21
 *
 
22
 */
 
23
 
 
24
#ifndef __GISI_CLIENT_H
 
25
#define __GISI_CLIENT_H
 
26
 
 
27
#ifdef __cplusplus
 
28
extern "C" {
 
29
#endif
 
30
 
 
31
#include <stdint.h>
 
32
#include <stdbool.h>
 
33
 
 
34
struct _GIsiClient;
 
35
typedef struct _GIsiClient GIsiClient;
 
36
 
 
37
struct _GIsiRequest;
 
38
typedef struct _GIsiRequest GIsiRequest;
 
39
 
 
40
typedef bool (*GIsiResponseFunc)(GIsiClient *client,
 
41
                const void *restrict data, size_t len,
 
42
                uint16_t object, void *opaque);
 
43
 
 
44
typedef void (*GIsiIndicationFunc) (GIsiClient *client,
 
45
                const void *restrict data, size_t len,
 
46
                uint16_t object, void *opaque);
 
47
 
 
48
GIsiClient *g_isi_client_create(uint8_t resource);
 
49
 
 
50
void g_isi_client_destroy(GIsiClient *client);
 
51
 
 
52
int g_isi_client_error(const GIsiClient *client);
 
53
 
 
54
GIsiRequest *g_isi_request_make(GIsiClient *client, const void *data,
 
55
                                size_t len, unsigned timeout,
 
56
                                GIsiResponseFunc func, void *opaque);
 
57
 
 
58
void g_isi_request_cancel(GIsiRequest *req);
 
59
 
 
60
int g_isi_subscribe(GIsiClient *client, uint8_t type,
 
61
                        GIsiIndicationFunc func, void *opaque);
 
62
 
 
63
void g_isi_unsubscribe(GIsiClient *client, uint8_t type);
 
64
 
 
65
#ifdef __cplusplus
 
66
}
 
67
#endif
 
68
 
 
69
#endif /* __GISI_CLIENT_H */