Subversion Repositories HelenOS

Rev

Rev 3435 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3435 Rev 3471
Line 34... Line 34...
34
 
34
 
35
#ifndef PROTO_H_
35
#ifndef PROTO_H_
36
#define PROTO_H_
36
#define PROTO_H_
37
 
37
 
38
#include <libadt/hash_table.h>
38
#include <libadt/hash_table.h>
-
 
39
#include <ipc/ipc.h>
-
 
40
#include "trace.h"
-
 
41
 
-
 
42
#define OPER_MAX_ARGS (IPC_CALL_LEN - 1)
39
 
43
 
40
typedef struct {
44
typedef struct {
41
    char *name;
45
    char *name;
-
 
46
 
-
 
47
    int argc;
-
 
48
    val_type_t arg_type[OPER_MAX_ARGS];
-
 
49
 
-
 
50
    val_type_t rv_type;
-
 
51
 
-
 
52
    int respc;
-
 
53
    val_type_t resp_type[OPER_MAX_ARGS];
42
} oper_t;
54
} oper_t;
43
 
55
 
44
typedef struct {
56
typedef struct {
45
    /** Protocol name */
57
    /** Protocol name */
46
    char *name;
58
    char *name;
Line 56... Line 68...
56
void proto_cleanup(void);
68
void proto_cleanup(void);
57
 
69
 
58
void proto_register(int srv, proto_t *proto);
70
void proto_register(int srv, proto_t *proto);
59
proto_t *proto_get_by_srv(int srv);
71
proto_t *proto_get_by_srv(int srv);
60
proto_t *proto_new(char *name);
72
proto_t *proto_new(char *name);
-
 
73
void proto_delete(proto_t *proto);
61
void proto_add_oper(proto_t *proto, int method, oper_t *oper);
74
void proto_add_oper(proto_t *proto, int method, oper_t *oper);
62
oper_t *proto_get_oper(proto_t *proto, int method);
75
oper_t *proto_get_oper(proto_t *proto, int method);
63
 
76
 
64
oper_t *oper_new(char *name);
77
oper_t *oper_new(char *name, int argc, val_type_t *arg_types,
-
 
78
    val_type_t rv_type, int respc, val_type_t *resp_types);
-
 
79
 
65
 
80
 
66
 
81
 
67
#endif
82
#endif
68
 
83
 
69
/** @}
84
/** @}