Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/modules.h

    raadf01e r1a0fb3f8  
    5050 *  @param[in] count The number units of the source type size.
    5151 */
    52 #define CONVERT_SIZE(type_from, type_to, count) ((sizeof(type_from) / sizeof(type_to)) * (count))
     52#define CONVERT_SIZE( type_from, type_to, count )       (( sizeof( type_from ) / sizeof( type_to )) * ( count ))
    5353
    5454/** Registers the module service at the name server.
     
    5656 *  @param[out] phonehash The created phone hash.
    5757 */
    58 #define REGISTER_ME(me, phonehash)      ipc_connect_to_me(PHONE_NS, (me), 0, 0, (phonehash))
     58#define REGISTER_ME( me, phonehash )    ipc_connect_to_me( PHONE_NS, ( me ), 0, 0, ( phonehash ))
    5959
    6060/** Connect to the needed module function type definition.
     
    6262 *  @returns The phone of the needed service.
    6363 */
    64 typedef int connect_module_t(services_t need);
     64typedef int connect_module_t( services_t need );
    6565
    66 /** Answers the call.
    67  *  @param[in] callid The call identifier.
    68  *  @param[in] result The message processing result.
    69  *  @param[in] answer The message processing answer.
    70  *  @param[in] answer_count The number of answer parameters.
     66/** Connects to the needed module.
     67 *  @param[in] need The needed module service.
     68 *  @returns The phone of the needed service.
    7169 */
    72 void answer_call(ipc_callid_t callid, int result, ipc_call_t * answer, int answer_count);
     70int connect_to_service( services_t need );
     71
     72/** Connects to the needed module.
     73 *  @param[in] need The needed module service.
     74 *  @param[in] timeout The connection timeout in microseconds. No timeout if set to zero (0).
     75 *  @returns The phone of the needed service.
     76 *  @returns ETIMEOUT if the connection timeouted.
     77 */
     78int connect_to_service_timeout( services_t need, suseconds_t timeout );
    7379
    7480/** Creates bidirectional connection with the needed module service and registers the message receiver.
     
    8187 *  @returns Other error codes as defined for the ipc_connect_to_me() function.
    8288 */
    83 int bind_service(services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver);
     89int     bind_service( services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver );
    8490
    8591/** Creates bidirectional connection with the needed module service and registers the message receiver.
     
    94100 *  @returns Other error codes as defined for the ipc_connect_to_me() function.
    95101 */
    96 int bind_service_timeout(services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver, suseconds_t timeout);
     102int     bind_service_timeout( services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver, suseconds_t timeout );
    97103
    98 /** Connects to the needed module.
    99  *  @param[in] need The needed module service.
    100  *  @returns The phone of the needed service.
     104/** Answers the call.
     105 *  @param[in] callid The call identifier.
     106 *  @param[in] result The message processing result.
     107 *  @param[in] answer The message processing answer.
     108 *  @param[in] answer_count The number of answer parameters.
    101109 */
    102 int connect_to_service(services_t need);
     110void    answer_call( ipc_callid_t callid, int result, ipc_call_t * answer, int answer_count );
    103111
    104 /** Connects to the needed module.
    105  *  @param[in] need The needed module service.
    106  *  @param[in] timeout The connection timeout in microseconds. No timeout if set to zero (0).
    107  *  @returns The phone of the needed service.
    108  *  @returns ETIMEOUT if the connection timeouted.
     112/** Refreshes answer structure and parameters count.
     113 *  Erases all attributes.
     114 *  @param[in,out] answer The message processing answer structure.
     115 *  @param[in,out] answer_count The number of answer parameters.
    109116 */
    110 int connect_to_service_timeout(services_t need, suseconds_t timeout);
     117void    refresh_answer( ipc_call_t * answer, int * answer_count );
    111118
    112119/** Receives data from the other party.
     
    120127 *  @returns Other error codes as defined for the async_data_write_finalize() function.
    121128 */
    122 int data_receive(void ** data, size_t * length);
     129int data_receive( void ** data, size_t * length );
    123130
    124131/** Replies the data to the other party.
     
    130137 *  @returns Other error codes as defined for the async_data_read_finalize() function.
    131138 */
    132 int data_reply(void * data, size_t data_length);
    133 
    134 /** Refreshes answer structure and parameters count.
    135  *  Erases all attributes.
    136  *  @param[in,out] answer The message processing answer structure.
    137  *  @param[in,out] answer_count The number of answer parameters.
    138  */
    139 void refresh_answer(ipc_call_t * answer, int * answer_count);
     139int data_reply( void * data, size_t data_length );
    140140
    141141#endif
Note: See TracChangeset for help on using the changeset viewer.