2 * Copyright (C) 2007 Martin Willi
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 manager manager
19 * @defgroup manager_controller controller
22 * @defgroup manager_i manager
34 typedef struct manager_t manager_t
;
37 * The manager, manages multiple gateways.
42 * implements context_t interface
47 * Create an enumerator over all configured gateways.
49 * enumerate() arguments: int id, char *name, int port, char *address
50 * If port is 0, address is a Unix socket address.
54 enumerator_t
* (*create_gateway_enumerator
)(manager_t
*this);
59 * If id is 0, the previously selected gateway is returned. If none has
60 * been selected yet, NULL is returned.
62 * @param id id of the gateway (from enumerate), or 0
63 * @return selected gateway, or NULL
65 gateway_t
* (*select_gateway
)(manager_t
*this, int id
);
70 * @param username username
71 * @param password cleartext password
72 * @return TRUE if login successful
74 bool (*login
)(manager_t
*this, char *username
, char *password
);
77 * Check if user logged in.
79 * @return TRUE if logged in
81 bool (*logged_in
)(manager_t
*this);
86 void (*logout
)(manager_t
*this);
90 * Create a manager instance.
92 manager_t
*manager_create(storage_t
*storage
);
94 #endif /** MANAGER_H_ @}*/