OpenVPN
msica_arg.h
Go to the documentation of this file.
1 /*
2  * openvpnmsica -- Custom Action DLL to provide OpenVPN-specific support to MSI packages
3  * https://community.openvpn.net/openvpn/wiki/OpenVPNMSICA
4  *
5  * Copyright (C) 2018-2024 Simon Rozman <simon@rozman.si>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2
9  * as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef MSICA_ARG_H
22 #define MSICA_ARG_H
23 
24 #include <windows.h>
25 #include <tchar.h>
26 #include "../tapctl/basic.h"
27 
28 
29 #ifdef _MSC_VER
30 #pragma warning(push)
31 #pragma warning(disable: 4200) /* Using zero-sized arrays in struct/union. */
32 #endif
33 
34 
38 struct msica_arg
39 {
40  struct msica_arg *next;
41  TCHAR val[];
42 };
43 
44 
49 {
50  struct msica_arg *head;
51  struct msica_arg *tail;
52 };
53 
54 
60 void
62 
63 
69 void
71 
72 
80 void
82  _Inout_ struct msica_arg_seq *seq,
83  _In_z_ LPCTSTR argument);
84 
85 
93 void
95  _Inout_ struct msica_arg_seq *seq,
96  _Inout_ LPCTSTR argument);
97 
105 LPTSTR
106 msica_arg_seq_join(_In_ const struct msica_arg_seq *seq);
107 
108 #ifdef _MSC_VER
109 #pragma warning(pop)
110 #endif
111 
112 #endif /* ifndef MSICA_ARG_H */
msica_arg
Argument list.
Definition: msica_arg.h:38
msica_arg_seq
Argument sequence.
Definition: msica_arg.h:48
msica_arg_seq_init
void msica_arg_seq_init(_Inout_ struct msica_arg_seq *seq)
Initializes argument sequence.
Definition: msica_arg.c:34
msica_arg_seq_join
LPTSTR msica_arg_seq_join(_In_ const struct msica_arg_seq *seq)
Join arguments of the argument sequence into a space delimited string.
Definition: msica_arg.c:94
msica_arg::next
struct msica_arg * next
Definition: msica_arg.h:40
_In_
#define _In_
Definition: basic.h:42
_Inout_
#define _Inout_
Definition: basic.h:51
msica_arg_seq::head
struct msica_arg * head
Definition: msica_arg.h:50
msica_arg_seq::tail
struct msica_arg * tail
Pointer to the first argument in the sequence.
Definition: msica_arg.h:51
msica_arg_seq_free
void msica_arg_seq_free(_Inout_ struct msica_arg_seq *seq)
Frees argument sequence.
Definition: msica_arg.c:42
_In_z_
#define _In_z_
Definition: basic.h:48
msica_arg_seq_add_head
void msica_arg_seq_add_head(_Inout_ struct msica_arg_seq *seq, _In_z_ LPCTSTR argument)
Inserts argument to the beginning of the argument sequence.
Definition: msica_arg.c:55
msica_arg::val
TCHAR val[]
Pointer to the next argument in the sequence.
Definition: msica_arg.h:41
msica_arg_seq_add_tail
void msica_arg_seq_add_tail(_Inout_ struct msica_arg_seq *seq, _Inout_ LPCTSTR argument)
Appends argument to the end of the argument sequence.
Definition: msica_arg.c:76