summaryrefslogtreecommitdiffstats
path: root/tdeinit/tdelauncher_cmds.h
blob: dc28c6fff8f14e9bfa74014b80390e341282c01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/*
   This file is part of the KDE libraries
   Copyright (c) 1999 Waldo Bastian <bastian@kde.org>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License version 2 as published by the Free Software Foundation.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef _TDELAUNCHER_CMDS_H_
#define _TDELAUNCHER_CMDS_H_

typedef struct
{
   long cmd;
   long arg_length;
} tdelauncher_header;

/* Launcher commands: */

#define LAUNCHER_EXEC	1
/*
 * LAUNCHER_EXEC
 *
 * Start a new process. Try using LAUNCHER_EXEC_NEW instead.
 * There will be no app startup notification.
 *
 * long argc: number of arguments
 * char *args: arguments, argument 0 is the program to start.
 */


#define LAUNCHER_SETENV	2
/*
 * LAUNCHER_SETENV
 *
 * Change environment of future processes launched via tdeinit.
 * DON'T use this if you want to change environment only for one
 * application you're going to start.
 *
 * char *env_name;
 * char *env_value;
 */

#define LAUNCHER_DIED 3
/*
 * LAUNCHER_DIED
 *
 * Notification A child of tdeinit died.
 *
 * long pid;
 * long exit_code;
 */

#define LAUNCHER_OK 4
/*
 * LAUNCHER_OK
 *
 * Notification Last process launched ok.
 *
 * long pid;
 */

#define LAUNCHER_ERROR 5
/*
 * LAUNCHER_ERROR
 *
 * Notification Last process could not be launched.
 *
 * char *error msg (utf8)
 */

#define LAUNCHER_SHELL	6
/*
 * LAUNCHER_SHELL
 *
 * Start a new process and use given environment.
 * Starts app-startup notification.
 *
 * long argc: number of arguments
 * char *args: arguments, argument 0 is the program to start.
 * char *cwd: Working directory.
 * long envc: number of environment vars
 * char *envs: environment strings.
 * int avoid_loops : avoid using the first path in $PATH where
 *    this process binary is found in order to avoid
 *    infinite loop by binary->tdeinit_wrapper link in $PATH
 * char* startup_id: app startup notification id, "0" for none,
 *   "" ( empty string ) is the default
 */

#define LAUNCHER_TERMINATE_KDE 7

/*
 * LAUNCHER_TERMINATE_TDEINIT
 *
 * Suicide is painless
 */
#define LAUNCHER_TERMINATE_TDEINIT	8

#define LAUNCHER_DEBUG_WAIT		9
/*
 * LAUNCHER_DEBUG_WAIT
 *
 * Next process started will do a sleep(1000000)
 * before calling main()/kdemain()
 *
 * (Used for debugging io-slaves)
 */

#define LAUNCHER_EXT_EXEC	10
/*
 * LAUNCHER_EXT_EXEC
 *
 * Start a new process. The given environment variables will
 * be added to its environment before starting it.
 * Starts app-startup notification.
 *
 * long argc: number of arguments
 * char *args: arguments, argument 0 is the program to start.
 * long envc: number of environment vars
 * char *envs: environment strings.
 * int avoid_loops : avoid using the first path in $PATH where
 *    this process binary is found in order to avoid
 *    infinite loop by binary->tdeinit_wrapper link in $PATH
 * char* startup_id: app startup notification id, "0" for none,
 *   "" ( empty string ) is the default
 * 
 */


#define LAUNCHER_KWRAPPER	11
/*
 * LAUNCHER_KWRAPPER
 *
 * Start a new process, use given environment, pass signals and output.
 * Starts app-startup notification.
 *
 * long argc: number of arguments
 * char *args: arguments, argument 0 is the program to start.
 * char *cwd: Working directory.
 * long envc: number of environment vars
 * char *envs: environment strings.
 * char *tty: tty to redirect stdout/stderr to.
 * int avoid_loops : avoid using the first path in $PATH where
 *    this process binary is found in order to avoid
 *    infinite loop by binary->tdeinit_wrapper link in $PATH
 * char* startup_id: app startup notification id, "0" for none,
 *   "" ( empty string ) is the default
 */

#define LAUNCHER_EXEC_NEW	12
/*
 * LAUNCHER_EXEC_NEW
 *
 * Start a new process. An improved version of LAUNCHER_EXEC.
 * The given environment variables will be added
 *  to its environment before starting it.
 * There will be no app startup notification.
 *
 * long argc: number of arguments
 * char *args: arguments, argument 0 is the program to start.
 * long envc: number of environment vars
 * char *envs: environment strings.
 * int avoid_loops : avoid using the first path in $PATH where
 *    this process binary is found in order to avoid
 *    infinite loop by binary->tdeinit_wrapper link in $PATH
 */

#define LAUNCHER_FD	42
/*
 * File descriptor to use for communication with tdeinit.
 */

#endif