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 #define KDED_EXENAME "kded4" 00024 00025 typedef struct 00026 { 00027 long cmd; 00028 long arg_length; 00029 } klauncher_header; 00030 00031 /* Launcher commands: */ 00032 00033 #define LAUNCHER_EXEC 1 00034 /* 00035 * LAUNCHER_EXEC 00036 * 00037 * Start a new process. Try using LAUNCHER_EXEC_NEW instead. 00038 * There will be no app startup notification. 00039 * 00040 * long argc: number of arguments 00041 * char *args: arguments, argument 0 is the program to start. 00042 */ 00043 00044 00045 #define LAUNCHER_SETENV 2 00046 /* 00047 * LAUNCHER_SETENV 00048 * 00049 * Change environment of future processes launched via kdeinit. 00050 * DON'T use this if you want to change environment only for one 00051 * application you're going to start. 00052 * 00053 * char *env_name; 00054 * char *env_value; 00055 */ 00056 00057 #define LAUNCHER_CHILD_DIED 3 00058 /* 00059 * LAUNCHER_CHILD_DIED 00060 * 00061 * Notification A child of kdeinit died. 00062 * 00063 * long pid; 00064 * long exit_code; 00065 */ 00066 00067 #define LAUNCHER_OK 4 00068 /* 00069 * LAUNCHER_OK 00070 * 00071 * Notification Last process launched ok. 00072 * 00073 * long pid; 00074 */ 00075 00076 #define LAUNCHER_ERROR 5 00077 /* 00078 * LAUNCHER_ERROR 00079 * 00080 * Notification Last process could not be launched. 00081 * 00082 * char *error msg (utf8) 00083 */ 00084 00085 #define LAUNCHER_SHELL 6 00086 /* 00087 * LAUNCHER_SHELL 00088 * 00089 * Start a new process and use given environment. 00090 * Starts app-startup notification. 00091 * 00092 * long argc: number of arguments 00093 * char *args: arguments, argument 0 is the program to start. 00094 * char *cwd: Working directory. 00095 * long envc: number of environment vars 00096 * char *envs: environment strings. 00097 * int avoid_loops : avoid using the first path in $PATH where 00098 * this process binary is found in order to avoid 00099 * infinite loop by binary->kdeinit_wrapper link in $PATH 00100 * char* startup_id: app startup notification id, "0" for none, 00101 * "" ( empty string ) is the default 00102 */ 00103 00104 #define LAUNCHER_TERMINATE_KDE 7 00105 00106 /* 00107 * LAUNCHER_TERMINATE_KDEINIT 00108 * 00109 * Suicide is painless 00110 */ 00111 #define LAUNCHER_TERMINATE_KDEINIT 8 00112 00113 #define LAUNCHER_DEBUG_WAIT 9 00114 /* 00115 * LAUNCHER_DEBUG_WAIT 00116 * 00117 * Next process started will do a sleep(1000000) 00118 * before calling main()/kdemain() 00119 * 00120 * (Used for debugging io-slaves) 00121 */ 00122 00123 #define LAUNCHER_EXT_EXEC 10 00124 /* 00125 * LAUNCHER_EXT_EXEC 00126 * 00127 * Start a new process. The given environment variables will 00128 * be added to its environment before starting it. 00129 * Starts app-startup notification. 00130 * 00131 * long argc: number of arguments 00132 * char *args: arguments, argument 0 is the program to start. 00133 * long envc: number of environment vars 00134 * char *envs: environment strings. 00135 * int avoid_loops : avoid using the first path in $PATH where 00136 * this process binary is found in order to avoid 00137 * infinite loop by binary->kdeinit_wrapper link in $PATH 00138 * char* startup_id: app startup notification id, "0" for none, 00139 * "" ( empty string ) is the default 00140 * 00141 */ 00142 00143 00144 #define LAUNCHER_KWRAPPER 11 00145 /* 00146 * LAUNCHER_KWRAPPER 00147 * 00148 * Start a new process, use given environment, pass signals and output. 00149 * Starts app-startup notification. 00150 * 00151 * long argc: number of arguments 00152 * char *args: arguments, argument 0 is the program to start. 00153 * char *cwd: Working directory. 00154 * long envc: number of environment vars 00155 * char *envs: environment strings. 00156 * char *tty: tty to redirect stdout/stderr to. 00157 * int avoid_loops : avoid using the first path in $PATH where 00158 * this process binary is found in order to avoid 00159 * infinite loop by binary->kdeinit_wrapper link in $PATH 00160 * char* startup_id: app startup notification id, "0" for none, 00161 * "" ( empty string ) is the default 00162 */ 00163 00164 #define LAUNCHER_EXEC_NEW 12 00165 /* 00166 * LAUNCHER_EXEC_NEW 00167 * 00168 * Start a new process. An improved version of LAUNCHER_EXEC. 00169 * The given environment variables will be added 00170 * to its environment before starting it. 00171 * There will be no app startup notification. 00172 * 00173 * long argc: number of arguments 00174 * char *args: arguments, argument 0 is the program to start. 00175 * long envc: number of environment vars 00176 * char *envs: environment strings. 00177 * int avoid_loops : avoid using the first path in $PATH where 00178 * this process binary is found in order to avoid 00179 * infinite loop by binary->kdeinit_wrapper link in $PATH 00180 */ 00181 00182 #define LAUNCHER_FD 42 00183 /* 00184 * File descriptor to use for communication with kdeinit. 00185 */ 00186 00187 #endif