31,6 → 31,7 |
*/ |
|
/** @file |
* Generic module skeleton implementation. |
*/ |
|
#include <async.h> |
41,15 → 42,46 |
|
#include "err.h" |
|
/** External message processing function. |
* Should process the messages. |
* The function has to be defined in each module. |
* @param callid The message identifier. Input parameter. |
* @param call The message parameters. Input parameter. |
* @param answer The message answer parameters. Output parameter. |
* @param answer_count The last parameter for the actual answer in the answer parameter. Output parameter. |
* @returns EOK on success. |
* @returns ENOTSUP if the message is not known. |
* @returns Other error codes as defined for each specific module message function. |
*/ |
extern int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ); |
|
/** External function to print the module name. |
* Should print the module name. |
* The function has to be defined in each module. |
*/ |
extern void module_print_name( void ); |
|
/** External module startup function. |
* Should start and initialize the module and register the given client connection function. |
* The function has to be defined in each module. |
* @param client_connection The client connection functio to be registered. Input parameter. |
*/ |
extern int module_start( async_client_conn_t client_connection ); |
|
/** Default thread for new connections. |
* @param iid The initial message identifier. Input parameter. |
* @param icall The initial message call structure. Input parameter. |
*/ |
void client_connection( ipc_callid_t iid, ipc_call_t * icall ); |
|
/** Starts the module. |
* @param argc The count of the command line arguments. Ignored parameter. |
* @param argv The command line parameters. Ignored parameter. |
* @returns EOK on success. |
* @returns Other error codes as defined for each specific module start function. |
*/ |
int main( int argc, char * argv[] ); |
|
/** Default thread for new connections. |
*/ |
void client_connection( ipc_callid_t iid, ipc_call_t * icall ){ |
ipc_callid_t callid; |
ipc_call_t call; |
95,9 → 127,6 |
} |
} |
|
/** Starts the module. |
* Parameters are ignored. |
*/ |
int main( int argc, char * argv[] ){ |
ERROR_DECLARE; |
|