KInit
klauncher_cmds.h
Go to the documentation of this file.00001 /* 00002 This file is part of the KDE libraries 00003 Copyright (c) 1999 Waldo Bastian <bastian@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef _KLAUNCHER_CMDS_H_ 00021 #define _KLAUNCHER_CMDS_H_ 00022 00023 typedef struct 00024 { 00025 long cmd; 00026 long arg_length; 00027 } klauncher_header; 00028 00029 /* Launcher commands: */ 00030 00031 #define LAUNCHER_EXEC 1 00032 /* 00033 * LAUNCHER_EXEC 00034 * 00035 * Start a new process. Try using LAUNCHER_EXEC_NEW instead. 00036 * There will be no app startup notification. 00037 * 00038 * long argc: number of arguments 00039 * char *args: arguments, argument 0 is the program to start. 00040 */ 00041 00042 00043 #define LAUNCHER_SETENV 2 00044 /* 00045 * LAUNCHER_SETENV 00046 * 00047 * Change environment of future processes launched via kdeinit. 00048 * DON'T use this if you want to change environment only for one 00049 * application you're going to start. 00050 * 00051 * char *env_name; 00052 * char *env_value; 00053 */ 00054 00055 #define LAUNCHER_DIED 3 00056 /* 00057 * LAUNCHER_DIED 00058 * 00059 * Notification A child of kdeinit died. 00060 * 00061 * long pid; 00062 * long exit_code; 00063 */ 00064 00065 #define LAUNCHER_OK 4 00066 /* 00067 * LAUNCHER_OK 00068 * 00069 * Notification Last process launched ok. 00070 * 00071 * long pid; 00072 */ 00073 00074 #define LAUNCHER_ERROR 5 00075 /* 00076 * LAUNCHER_ERROR 00077 * 00078 * Notification Last process could not be launched. 00079 * 00080 * char *error msg (utf8) 00081 */ 00082 00083 #define LAUNCHER_SHELL 6 00084 /* 00085 * LAUNCHER_SHELL 00086 * 00087 * Start a new process and use given environment. 00088 * Starts app-startup notification. 00089 * 00090 * long argc: number of arguments 00091 * char *args: arguments, argument 0 is the program to start. 00092 * char *cwd: Working directory. 00093 * long envc: number of environment vars 00094 * char *envs: environment strings. 00095 * int avoid_loops : avoid using the first path in $PATH where 00096 * this process binary is found in order to avoid 00097 * infinite loop by binary->kdeinit_wrapper link in $PATH 00098 * char* startup_id: app startup notification id, "0" for none, 00099 * "" ( empty string ) is the default 00100 */ 00101 00102 #define LAUNCHER_TERMINATE_KDE 7 00103 00104 /* 00105 * LAUNCHER_TERMINATE_KDEINIT 00106 * 00107 * Suicide is painless 00108 */ 00109 #define LAUNCHER_TERMINATE_KDEINIT 8 00110 00111 #define LAUNCHER_DEBUG_WAIT 9 00112 /* 00113 * LAUNCHER_DEBUG_WAIT 00114 * 00115 * Next process started will do a sleep(1000000) 00116 * before calling main()/kdemain() 00117 * 00118 * (Used for debugging io-slaves) 00119 */ 00120 00121 #define LAUNCHER_EXT_EXEC 10 00122 /* 00123 * LAUNCHER_EXT_EXEC 00124 * 00125 * Start a new process. The given environment variables will 00126 * be added to its environment before starting it. 00127 * Starts app-startup notification. 00128 * 00129 * long argc: number of arguments 00130 * char *args: arguments, argument 0 is the program to start. 00131 * long envc: number of environment vars 00132 * char *envs: environment strings. 00133 * int avoid_loops : avoid using the first path in $PATH where 00134 * this process binary is found in order to avoid 00135 * infinite loop by binary->kdeinit_wrapper link in $PATH 00136 * char* startup_id: app startup notification id, "0" for none, 00137 * "" ( empty string ) is the default 00138 * 00139 */ 00140 00141 00142 #define LAUNCHER_KWRAPPER 11 00143 /* 00144 * LAUNCHER_KWRAPPER 00145 * 00146 * Start a new process, use given environment, pass signals and output. 00147 * Starts app-startup notification. 00148 * 00149 * long argc: number of arguments 00150 * char *args: arguments, argument 0 is the program to start. 00151 * char *cwd: Working directory. 00152 * long envc: number of environment vars 00153 * char *envs: environment strings. 00154 * char *tty: tty to redirect stdout/stderr to. 00155 * int avoid_loops : avoid using the first path in $PATH where 00156 * this process binary is found in order to avoid 00157 * infinite loop by binary->kdeinit_wrapper link in $PATH 00158 * char* startup_id: app startup notification id, "0" for none, 00159 * "" ( empty string ) is the default 00160 */ 00161 00162 #define LAUNCHER_EXEC_NEW 12 00163 /* 00164 * LAUNCHER_EXEC_NEW 00165 * 00166 * Start a new process. An improved version of LAUNCHER_EXEC. 00167 * The given environment variables will be added 00168 * to its environment before starting it. 00169 * There will be no app startup notification. 00170 * 00171 * long argc: number of arguments 00172 * char *args: arguments, argument 0 is the program to start. 00173 * long envc: number of environment vars 00174 * char *envs: environment strings. 00175 * int avoid_loops : avoid using the first path in $PATH where 00176 * this process binary is found in order to avoid 00177 * infinite loop by binary->kdeinit_wrapper link in $PATH 00178 */ 00179 00180 #define LAUNCHER_FD 42 00181 /* 00182 * File descriptor to use for communication with kdeinit. 00183 */ 00184 00185 #endif