00001 /** 00002 * This file is part of alarmd 00003 * 00004 * Contact Person: David Weinehall <david.weinehall@nokia.com> 00005 * 00006 * Copyright (C) 2006 Nokia Corporation 00007 * alarmd and libalarm are free software; you can redistribute them 00008 * and/or modify them under the terms of the GNU Lesser General Public 00009 * License version 2.1 as published by the Free Software Foundation. 00010 * 00011 * alarmd and libalarm are distributed in the hope that they will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this software; if not, write to the Free 00018 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00019 * 02110-1301 USA 00020 */ 00021 00022 #ifndef _ACTION_EXEC_H_ 00023 #define _ACTION_EXEC_H_ 00024 00025 #include <glib-object.h> 00026 #include "actiondialog.h" 00027 00028 #define ALARMD_TYPE_ACTION_EXEC (alarmd_action_exec_get_type()) 00029 #define ALARMD_ACTION_EXEC(object) (G_TYPE_CHECK_INSTANCE_CAST((object), ALARMD_TYPE_ACTION_EXEC, AlarmdActionExec)) 00030 #define ALARMD_ACTION_EXEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ALARMD_TYPE_ACTION_EXEC, AlarmdActionExecClass)) 00031 #define ALARMD_IS_ACTION_EXEC(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), ALARMD_TYPE_ACTION_EXEC)) 00032 #define ALARMD_IS_ACTION_EXEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ALARMD_TYPE_ACTION_EXEC)) 00033 #define ALARMD_ACTION_EXEC_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), ALARMD_TYPE_ACTION_EXEC, AlarmdActionExecClass)) 00034 00035 typedef struct _AlarmdActionExec AlarmdActionExec; 00036 struct _AlarmdActionExec 00037 { 00038 AlarmdActionDialog parent_instance; 00039 }; 00040 00041 typedef struct _AlarmdActionExecClass AlarmdActionExecClass; 00042 struct _AlarmdActionExecClass 00043 { 00044 AlarmdActionDialogClass parent_class; 00045 }; 00046 00047 /** 00048 * SECTION:actionexec 00049 * @short_description: An action that runs a command. 00050 * @see_also: #AlarmdAction, #AlarmdActionDbus 00051 * 00052 * #AlarmdActionExec is an action type that, upon firing, runs a command. The 00053 * command is run with #g_spawn_command_line_async, and the command is 00054 * specified in property #AlarmdActionExec:name. The command is done with the 00055 * same priviledges as the daemon is running. 00056 * 00057 * #AlarmdActionExec also includes the dialog showing properties of 00058 * #AlarmdActionDialog, see its documentation for details. The rest of the 00059 * action is only run if the dialog is closed; so on snooze the action will 00060 * be delayed too. 00061 **/ 00062 00063 GType alarmd_action_exec_get_type(void); 00064 00065 /** 00066 * alarmd_action_exec_new: 00067 * 00068 * Creates new exec alarmd action. 00069 * Returns: Newly created #AlarmdActionExec. 00070 **/ 00071 AlarmdAction *alarmd_action_exec_new(void); 00072 00073 #endif /* _ACTION_EXEC_H_ */