Debian Codegraph @

terps/tads/tads3/vmbifnet.h

raw symbols SCIP
1 /* Copyright (c) 2005 by Michael J. Roberts. All Rights Reserved. */
2 /*
3 Name
4 vmbifnet.h - function set definition - TADS Networking
5 Function
6 The networking function set provides access to the HTTP server feature,
7 which allows running the UI in a web browser.
8 Notes
9
10 Modified
11 03/02/05 MJRoberts - Creation
12 */
13
14 #ifndef VMBIFNET_H
15 #define VMBIFNET_H
16
17 #include "os.h"
18 #include "vmbif.h"
19 #include "utf8.h"
20
21 class CVmBifNet: public CVmBif
22 {
23 public:
24 /* function vector */
25 static vm_bif_desc bif_table[];
26
27 /* attach/detach - static initialization and cleanup */
28 static void attach(VMG0_);
29 static void detach(VMG0_);
30
31 /* connect to the web UI */
32 static void connect_ui(VMG_ uint argc);
33
34 /* get a network event */
35 static void get_event(VMG_ uint argc);
36
37 /* get the local host name */
38 static void get_hostname(VMG_ uint argc);
39
40 /* get the local host IP address */
41 static void get_host_ip(VMG_ uint argc);
42
43 /* get the storage server URL */
44 static void get_storage_url(VMG_ uint argc);
45
46 /* get the launch host address */
47 static void get_launch_host_addr(VMG_ uint argc);
48
49 /* send a network request */
50 static void send_net_request(VMG_ uint argc);
51 };
52
53
54 #endif /* VMBIFNET_H */
55
56 /* ------------------------------------------------------------------------ */
57 /*
58 * Function set vector. Define this only if VMBIF_DEFINE_VECTOR has been
59 * defined, so that this file can be included for the prototypes alone
60 * without defining the function vector.
61 *
62 * Note that this vector is specifically defined outside of the section of
63 * the file protected against multiple inclusion.
64 */
65 #ifdef VMBIF_DEFINE_VECTOR
66
67 /* TADS input/output extension functions */
68 vm_bif_desc CVmBifNet::bif_table[] =
69 {
70 { &CVmBifNet::connect_ui, 2, 0, FALSE },
71 { &CVmBifNet::get_event, 0, 1, FALSE },
72 { &CVmBifNet::get_hostname, 0, 0, FALSE },
73 { &CVmBifNet::get_host_ip, 0, 0, FALSE },
74 { &CVmBifNet::get_storage_url, 0, 0, FALSE },
75 { &CVmBifNet::get_launch_host_addr, 0, 0, FALSE },
76 { &CVmBifNet::send_net_request, 2, 0, TRUE }
77 };
78
79 #endif /* VMBIF_DEFINE_VECTOR */