1 | # Copyright (c) 2001, Stanford University
|
---|
2 | # All rights reserved.
|
---|
3 | #
|
---|
4 | # See the file LICENSE.txt for information on redistributing this software.
|
---|
5 |
|
---|
6 | import sys
|
---|
7 |
|
---|
8 | import apiutil
|
---|
9 |
|
---|
10 | apiutil.CopyrightC()
|
---|
11 |
|
---|
12 | print """
|
---|
13 | /* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY server_dispatch_header.py SCRIPT */
|
---|
14 | #ifndef SERVER_DISPATCH_HEADER
|
---|
15 | #define SERVER_DISPATCH_HEADER
|
---|
16 |
|
---|
17 | #ifdef WINDOWS
|
---|
18 | #define SERVER_DISPATCH_APIENTRY __stdcall
|
---|
19 | #else
|
---|
20 | #define SERVER_DISPATCH_APIENTRY
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | #include "chromium.h"
|
---|
24 | #include "state/cr_statetypes.h"
|
---|
25 |
|
---|
26 | #if defined(__cplusplus)
|
---|
27 | extern "C" {
|
---|
28 | #endif
|
---|
29 |
|
---|
30 | """
|
---|
31 |
|
---|
32 | keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
|
---|
33 |
|
---|
34 | for func_name in keys:
|
---|
35 | if ("get" in apiutil.Properties(func_name) or
|
---|
36 | apiutil.FindSpecial( "server", func_name ) or
|
---|
37 | apiutil.FindSpecial( sys.argv[1]+"/../state_tracker/state", func_name )):
|
---|
38 |
|
---|
39 | params = apiutil.Parameters(func_name)
|
---|
40 | return_type = apiutil.ReturnType(func_name)
|
---|
41 |
|
---|
42 | print '%s SERVER_DISPATCH_APIENTRY crServerDispatch%s( %s );' % (return_type, func_name, apiutil.MakeDeclarationString( params ))
|
---|
43 |
|
---|
44 | print """
|
---|
45 | #if defined(__cplusplus)
|
---|
46 | }
|
---|
47 | #endif
|
---|
48 |
|
---|
49 | #endif /* SERVER_DISPATCH_HEADER */
|
---|
50 | """
|
---|