Changeset 7715994 in mainline for uspace/srv/net/modules.h


Ignore:
Timestamp:
2010-03-13T12:17:02Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ba20a6b
Parents:
d0febca (diff), 2070570 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rd0febca r7715994  
    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 /** Connects to the needed module.
    67  *  @param[in] need The needed module service.
    68  *  @returns The phone of the needed service.
     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.
    6971 */
    70 int 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  */
    78 int connect_to_service_timeout( services_t need, suseconds_t timeout );
     72void answer_call(ipc_callid_t callid, int result, ipc_call_t * answer, int answer_count);
    7973
    8074/** Creates bidirectional connection with the needed module service and registers the message receiver.
     
    8781 *  @returns Other error codes as defined for the ipc_connect_to_me() function.
    8882 */
    89 int     bind_service( services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver );
     83int bind_service(services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver);
    9084
    9185/** Creates bidirectional connection with the needed module service and registers the message receiver.
     
    10094 *  @returns Other error codes as defined for the ipc_connect_to_me() function.
    10195 */
    102 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 );
     96int bind_service_timeout(services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver, suseconds_t timeout);
    10397
    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.
     98/** Connects to the needed module.
     99 *  @param[in] need The needed module service.
     100 *  @returns The phone of the needed service.
    109101 */
    110 void    answer_call( ipc_callid_t callid, int result, ipc_call_t * answer, int answer_count );
     102int connect_to_service(services_t need);
    111103
    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.
     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.
    116109 */
    117 void    refresh_answer( ipc_call_t * answer, int * answer_count );
     110int connect_to_service_timeout(services_t need, suseconds_t timeout);
    118111
    119112/** Receives data from the other party.
     
    127120 *  @returns Other error codes as defined for the async_data_write_finalize() function.
    128121 */
    129 int data_receive( void ** data, size_t * length );
     122int data_receive(void ** data, size_t * length);
    130123
    131124/** Replies the data to the other party.
     
    137130 *  @returns Other error codes as defined for the async_data_read_finalize() function.
    138131 */
    139 int data_reply( void * data, size_t data_length );
     132int 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 */
     139void refresh_answer(ipc_call_t * answer, int * answer_count);
    140140
    141141#endif
Note: See TracChangeset for help on using the changeset viewer.