Changes in uspace/srv/net/modules.h [aadf01e:1a0fb3f8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/modules.h
raadf01e r1a0fb3f8 50 50 * @param[in] count The number units of the source type size. 51 51 */ 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 )) 53 53 54 54 /** Registers the module service at the name server. … … 56 56 * @param[out] phonehash The created phone hash. 57 57 */ 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 )) 59 59 60 60 /** Connect to the needed module function type definition. … … 62 62 * @returns The phone of the needed service. 63 63 */ 64 typedef int connect_module_t( services_t need);64 typedef int connect_module_t( services_t need ); 65 65 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. 71 69 */ 72 void answer_call(ipc_callid_t callid, int result, ipc_call_t * answer, int answer_count); 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 ); 73 79 74 80 /** Creates bidirectional connection with the needed module service and registers the message receiver. … … 81 87 * @returns Other error codes as defined for the ipc_connect_to_me() function. 82 88 */ 83 int bind_service(services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver);89 int bind_service( services_t need, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, async_client_conn_t client_receiver ); 84 90 85 91 /** Creates bidirectional connection with the needed module service and registers the message receiver. … … 94 100 * @returns Other error codes as defined for the ipc_connect_to_me() function. 95 101 */ 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);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 ); 97 103 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. 101 109 */ 102 int connect_to_service(services_t need);110 void answer_call( ipc_callid_t callid, int result, ipc_call_t * answer, int answer_count ); 103 111 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. 109 116 */ 110 int connect_to_service_timeout(services_t need, suseconds_t timeout);117 void refresh_answer( ipc_call_t * answer, int * answer_count ); 111 118 112 119 /** Receives data from the other party. … … 120 127 * @returns Other error codes as defined for the async_data_write_finalize() function. 121 128 */ 122 int data_receive( void ** data, size_t * length);129 int data_receive( void ** data, size_t * length ); 123 130 124 131 /** Replies the data to the other party. … … 130 137 * @returns Other error codes as defined for the async_data_read_finalize() function. 131 138 */ 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); 139 int data_reply( void * data, size_t data_length ); 140 140 141 141 #endif
Note:
See TracChangeset
for help on using the changeset viewer.