4 * @brief Interface of session_t.
9 * Copyright (C) 2007 Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
27 #include "controller.h"
29 typedef struct session_t session_t
;
32 * @brief A session, identified by a session ID.
38 * @brief Get the session ID of the session.
42 char* (*get_sid
)(session_t
*this);
45 * @brief Add a controller instance to the session.
47 * @param controller controller to add
49 void (*add_controller
)(session_t
*this, controller_t
*controller
);
52 * @brief Process a request in this session.
54 * @param request request to process
56 void (*process
)(session_t
*this, request_t
*request
);
59 * @brief Destroy the session_t.
61 * @param this calling object
63 void (*destroy
) (session_t
*this);
67 * @brief Create a session.
69 * @param context user defined session context instance
71 session_t
*session_create(context_t
*context
);
73 #endif /* SESSION_H_ */