Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira...
[reactos.git] / base / applications / network / net / main.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS net command
4 * FILE:
5 * PURPOSE:
6 *
7 * PROGRAMMERS: Magnus Olsen (greatlord@reactos.org)
8 */
9
10 #include "net.h"
11
12 typedef struct _COMMAND
13 {
14 WCHAR *name;
15 INT (*func)(INT, WCHAR**);
16 // VOID (*help)(INT, WCHAR**);
17 } COMMAND, *PCOMMAND;
18
19 COMMAND cmds[] =
20 {
21 {L"accounts", unimplemented},
22 {L"computer", unimplemented},
23 {L"config", unimplemented},
24 {L"continue", cmdContinue},
25 {L"file", unimplemented},
26 {L"group", unimplemented},
27 {L"help", cmdHelp},
28 {L"helpmsg", cmdHelpMsg},
29 {L"localgroup", unimplemented},
30 {L"name", unimplemented},
31 {L"print", unimplemented},
32 {L"pause", cmdPause},
33 {L"send", unimplemented},
34 {L"session", unimplemented},
35 {L"share", unimplemented},
36 {L"start", cmdStart},
37 {L"statistics", unimplemented},
38 {L"stop", cmdStop},
39 {L"time", unimplemented},
40 {L"use", unimplemented},
41 {L"user", unimplemented},
42 {L"view", unimplemented},
43 {NULL, NULL}
44 };
45
46 int wmain(int argc, WCHAR **argv)
47 {
48 PCOMMAND cmdptr;
49
50 if (argc < 2)
51 {
52 help();
53 return 1;
54 }
55
56 /* Scan the command table */
57 for (cmdptr = cmds; cmdptr->name; cmdptr++)
58 {
59 if (_wcsicmp(argv[1], cmdptr->name) == 0)
60 {
61 return cmdptr->func(argc, argv);
62 }
63 }
64
65 help();
66
67 return 1;
68 }
69
70 INT unimplemented(INT argc, WCHAR **argv)
71 {
72 puts("This command is not implemented yet");
73 return 1;
74 }