2 #ifndef GS_CONNECTION_H
3 #define GS_CONNECTION_H
6 struct s_gs_connection;
7 struct s_gs_net_driver;
10 enum e_gs_connection_direction {
11 e_gs_connection_direction_unknown = 0,
12 e_gs_connection_direction_outgoing,
13 e_gs_connection_direction_incoming
16 struct s_gs_connection_ops {
19 (*_init) (struct s_gs_connection *p_connection,
23 (*_exit) (struct s_gs_connection *p_connection);
26 (*write) (struct s_gs_connection *p_connection,
31 (*read) (struct s_gs_connection *p_connection,
36 (*flush) (struct s_gs_connection *p_connection);
39 struct s_gs_connection {
40 struct s_gs_connection_ops *connection_ops;
41 struct s_gs_net_driver *p_net_driver;
42 enum e_gs_connection_direction direction;
47 #endif /* GS_CONNECTION_H */