2 * Copyright (C) 2012 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup network_manager network_manager
18 * @{ @ingroup kernel_android
21 #ifndef NETWORK_MANAGER_H_
22 #define NETWORK_MANAGER_H_
27 #include <utils/host.h>
29 typedef struct network_manager_t network_manager_t
;
32 * NetworkManager, used to retrieve local IP addresses.
34 * Communicates with NetworkManager via JNI
36 struct network_manager_t
{
41 * @param ipv4 TRUE to get an IPv4 address
42 * @return the address or NULL if none available
44 host_t
*(*get_local_address
)(network_manager_t
*this, bool ipv4
);
47 * Destroy a network_manager_t instance
49 void (*destroy
)(network_manager_t
*this);
53 * Create a network_manager_t instance
55 * @return network_manager_t instance
57 network_manager_t
*network_manager_create();
59 #endif /** NETWORK_MANAGER_H_ @}*/