00001
00002
00010 #ifndef EXAMPLE_SERVER_H
00011 #define EXAMPLE_SERVER_H
00012
00013 #include "example_minirpc.h"
00014
00018 extern const struct mrpc_protocol * const example_server;
00019
00028 struct example_server_operations {
00052 mrpc_status_t (*choose_color)(void *conn_data,
00053 struct mrpc_message *msg, example_color_choice *in);
00054
00084 mrpc_status_t (*get_num_colors)(void *conn_data,
00085 struct mrpc_message *msg, example_count *out);
00086
00100 void (*crayon_selected)(void *conn_data, struct mrpc_message *msg,
00101 example_color *in);
00102 };
00103
00121 int example_server_set_operations(struct mrpc_connection *conn,
00122 const struct example_server_operations *ops);
00123
00133 mrpc_status_t example_choose_color_send_async_reply(struct mrpc_message *request);
00134
00148 mrpc_status_t example_get_num_colors_send_async_reply(struct mrpc_message *request,
00149 example_count *out);
00150
00162 mrpc_status_t example_choose_color_send_async_reply_error(struct mrpc_message *request,
00163 mrpc_status_t status);
00164
00176 mrpc_status_t example_get_num_colors_send_async_reply_error(struct mrpc_message *request,
00177 mrpc_status_t status);
00178
00183 #endif