include: Add taskschd.idl.

Dmitry Timoshkov dmitry at baikal.ru
Tue Dec 10 03:12:26 CST 2013


---
 include/Makefile.in  |   1 +
 include/taskschd.idl | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 186 insertions(+)
 create mode 100644 include/taskschd.idl

diff --git a/include/Makefile.in b/include/Makefile.in
index d10ffc5..1f25159 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -99,6 +99,7 @@ PUBLIC_IDL_H_SRCS = \
 	shtypes.idl \
 	strmif.idl \
 	structuredquerycondition.idl \
+	taskschd.idl \
 	textstor.idl \
 	tlogstg.idl \
 	tom.idl \
diff --git a/include/taskschd.idl b/include/taskschd.idl
new file mode 100644
index 0000000..71d4d32
--- /dev/null
+++ b/include/taskschd.idl
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2013 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "oaidl.idl";
+import "oleidl.idl";
+
+cpp_quote("DEFINE_GUID(CLSID_TaskScheduler, 0xf87369f,0xa4e5,0x4cfc,0xbd,0x3e,0x73,0xe6,0x15,0x45,0x72,0xdd);")
+
+typedef enum _TASK_STATE
+{
+    TASK_STATE_UNKNOWN = 0,
+    TASK_STATE_DISABLED = 1,
+    TASK_STATE_QUEUED = 2,
+    TASK_STATE_READY = 3,
+    TASK_STATE_RUNNING = 4
+} TASK_STATE;
+
+typedef enum _TASK_ENUM_FLAGS
+{
+    TASK_ENUM_HIDDEN = 0x0001
+} TASK_ENUM_FLAGS;
+
+typedef enum _TASK_LOGON_TYPE
+{
+    TASK_LOGON_NONE = 0,
+    TASK_LOGON_PASSWORD = 1,
+    TASK_LOGON_S4U = 2,
+    TASK_LOGON_INTERACTIVE_TOKEN = 3,
+    TASK_LOGON_GROUP = 4,
+    TASK_LOGON_SERVICE_ACCOUNT = 5,
+    TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD = 6
+} TASK_LOGON_TYPE;
+
+typedef enum _TASK_RUNLEVEL
+{
+    TASK_RUNLEVEL_LUA = 0,
+    TASK_RUNLEVEL_HIGHEST = 1
+} TASK_RUNLEVEL_TYPE;
+
+interface ITaskService;
+interface IRegisteredTask;
+interface IRegisteredTaskCollection;
+interface ITaskFolder;
+interface ITaskFolderCollection;
+interface ITaskDefinition;
+interface IRunningTask;
+interface IRunningTaskCollection;
+
+[
+    object,
+    oleautomation,
+    uuid(2faba4c7-4da9-4013-9697-20cc3fd40f85)
+]
+interface ITaskService : IDispatch
+{
+    HRESULT GetFolder([in] BSTR path, [out, retval] ITaskFolder **folder );
+    HRESULT GetRunningTasks([in] LONG flags, [out, retval] IRunningTaskCollection **tasks );
+    HRESULT NewTask([in] DWORD flags, [out, retval] ITaskDefinition **definition );
+    HRESULT Connect([in, optional] VARIANT server, [in, optional] VARIANT user, [in, optional] VARIANT domain, [in, optional] VARIANT password);
+    HRESULT get_Connected([out, retval] VARIANT_BOOL *connected);
+    HRESULT get_TargetServer([out, retval] BSTR *server);
+    HRESULT get_ConnectedUser([out, retval] BSTR *user);
+    HRESULT get_ConnectedDomain([out, retval] BSTR *domain);
+    HRESULT get_HighestVersion([out, retval] DWORD *version);
+}
+
+[
+    object,
+    oleautomation,
+    uuid(9c86f320-dee3-4dd1-b972-a303f26b061e)
+]
+interface IRegisteredTask : IDispatch
+{
+    HRESULT get_Name([out, retval] BSTR *name);
+    HRESULT get_Path([out, retval] BSTR *path);
+    HRESULT get_State([out, retval] TASK_STATE *state);
+    HRESULT get_Enabled([out, retval] VARIANT_BOOL *enabled);
+    HRESULT put_Enabled(VARIANT_BOOL enabled);
+    HRESULT Run([in] VARIANT params, [out, retval] IRunningTask **task);
+    HRESULT RunEx([in] VARIANT params, [in] LONG flags, [in] LONG sessionID, [in] BSTR user, [out, retval] IRunningTask **task);
+    HRESULT GetInstances([in] LONG flags, [out, retval] IRunningTaskCollection **tasks);
+    HRESULT get_LastRunTime([out, retval] DATE *date);
+    HRESULT get_LastTaskResult([out, retval] LONG *result);
+    HRESULT get_NumberOfMissedRuns([out, retval] LONG *runs);
+    HRESULT get_NextRunTime([out, retval] DATE *date);
+    HRESULT get_Definition([out, retval] ITaskDefinition **task);
+    HRESULT get_Xml([out, retval] BSTR *xml);
+    HRESULT GetSecurityDescriptor([in] LONG info, [out, retval] BSTR *sddl);
+    HRESULT SetSecurityDescriptor([in] BSTR sddl, [in] LONG flags);
+    HRESULT Stop([in] LONG flags);
+    HRESULT GetRunTimes([in] const LPSYSTEMTIME start, [in] const LPSYSTEMTIME end, [in, out] DWORD *count, [out] LPSYSTEMTIME *time);
+}
+
+[
+    object,
+    oleautomation,
+    uuid(86627eb4-42a7-41e4-a4d9-ac33a72f2d52)
+]
+interface IRegisteredTaskCollection : IDispatch
+{
+    HRESULT get_Count([out, retval] LONG *count);
+    HRESULT get_Item([in] VARIANT index, [out, retval] IRegisteredTask **task);
+    HRESULT get__NewEnum([out, retval] IUnknown **penum);
+}
+
+[
+    object,
+    oleautomation,
+    uuid(8cfac062-a080-4c15-9a88-aa7c2af80dfc)
+]
+interface ITaskFolder : IDispatch
+{
+    HRESULT get_Name([out, retval] BSTR *name);
+    HRESULT get_Path([out, retval] BSTR *path);
+    HRESULT GetFolder([in] BSTR path, [out, retval] ITaskFolder **folder);
+    HRESULT GetFolders([in] LONG flags, [out, retval] ITaskFolderCollection **folders);
+    HRESULT CreateFolder([in] BSTR name, [in] VARIANT sddl, [out, retval] ITaskFolder **folder);
+    HRESULT DeleteFolder([in] BSTR name, [in] LONG flags);
+    HRESULT GetTask([in] BSTR path, [out, retval] IRegisteredTask **task);
+    HRESULT GetTasks([in] LONG flags, [out, retval] IRegisteredTaskCollection **tasks);
+    HRESULT DeleteTask([in] BSTR name, [in] LONG flags);
+    HRESULT RegisterTask([in] BSTR path, [in] BSTR xml, [in] LONG flags, [in] VARIANT user, [in] VARIANT password,
+                         [in] TASK_LOGON_TYPE logonType, [in] VARIANT sddl, [out, retval] IRegisteredTask **task);
+    HRESULT RegisterTaskDefinition([in] BSTR path, [in] ITaskDefinition *definition, [in] LONG flags,
+                                   [in] VARIANT user,  [in] VARIANT password,  [in] TASK_LOGON_TYPE logon,
+                                   [in] VARIANT sddl, [out, retval] IRegisteredTask **task);
+    HRESULT GetSecurityDescriptor(LONG info, [out, retval] BSTR *sddl);
+    HRESULT SetSecurityDescriptor([in] BSTR sddl, [in] LONG flags);
+}
+
+[
+    object,
+    oleautomation,
+    uuid(79184a66-8664-423f-97f1-637356a5d812)
+]
+interface ITaskFolderCollection : IDispatch
+{
+    HRESULT get_Count([out, retval] LONG *count);
+    HRESULT get_Item([in] VARIANT index, [out, retval] ITaskFolder **folder);
+    HRESULT get__NewEnum([out, retval] IUnknown **penum);
+}
+
+[
+    object,
+    oleautomation,
+    uuid(653758fb-7b9a-4f1e-a471-beeb8e9b834e)
+]
+interface IRunningTask : IDispatch
+{
+    HRESULT get_Name([out, retval] BSTR *name);
+    HRESULT get_InstanceGuid([out, retval] BSTR *guid);
+    HRESULT get_Path([out, retval] BSTR *path);
+    HRESULT get_State([out, retval] TASK_STATE *state);
+    HRESULT get_CurrentAction([out, retval] BSTR *name);
+    HRESULT Stop(void );
+    HRESULT Refresh(void );
+    HRESULT get_EnginePID([out, retval] DWORD *pid);
+}
+
+[
+    object,
+    oleautomation,
+    uuid(6a67614b-6828-4fec-aa54-6d52e8f1f2db)
+]
+interface IRunningTaskCollection : IDispatch
+{
+    HRESULT get_Count([out, retval] LONG *count);
+    HRESULT get_Item([in] VARIANT index, [out, retval] IRunningTask **task);
+    HRESULT get__NewEnum([out, retval] IUnknown **penum);
+}
-- 
1.8.5.1




More information about the wine-patches mailing list