Subversion Repositories HelenOS

Rev

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

Rev 3443 Rev 3452
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 60... Line 72...
60
proto_t *proto_new(char *name);
72
proto_t *proto_new(char *name);
61
void proto_delete(proto_t *proto);
73
void proto_delete(proto_t *proto);
62
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);
63
oper_t *proto_get_oper(proto_t *proto, int method);
75
oper_t *proto_get_oper(proto_t *proto, int method);
64
 
76
 
65
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
 
66
 
80
 
67
 
81
 
68
#endif
82
#endif
69
 
83
 
70
/** @}
84
/** @}