source: nscp/modules/CheckTaskSched2/TaskSched.h @ 1f24a1c

0.4.00.4.10.4.2
Last change on this file since 1f24a1c was 1f24a1c, checked in by Michael Medin <michael@…>, 2 years ago

Syncronized streams so all new 0.3.9 features are now in 0.4.x as well

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**************************************************************************
2*   Copyright (C) 2004-2007 by Michael Medin <michael@medin.name>         *
3*                                                                         *
4*   This code is part of NSClient++ - http://trac.nakednuns.org/nscp      *
5*                                                                         *
6*   This program is free software; you can redistribute it and/or modify  *
7*   it under the terms of the GNU General Public License as published by  *
8*   the Free Software Foundation; either version 2 of the License, or     *
9*   (at your option) any later version.                                   *
10*                                                                         *
11*   This program is distributed in the hope that it will be useful,       *
12*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14*   GNU General Public License for more details.                          *
15*                                                                         *
16*   You should have received a copy of the GNU General Public License     *
17*   along with this program; if not, write to the                         *
18*   Free Software Foundation, Inc.,                                       *
19*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20***************************************************************************/
21#pragma once
22
23#define _WIN32_DCOM
24
25#include <string>
26#include <map>
27#include <strEx.h>
28#include <error.hpp>
29#include <filter_framework.hpp>
30#include <error_com.hpp>
31#include <taskschd.h>
32
33#include "filter.hpp"
34
35class TaskSched
36{
37public:
38        class Exception {
39                std::wstring message_;
40        public:
41                Exception(std::wstring str, HRESULT code) {
42                        message_ = str + _T(":") + error::format::from_system(code);
43                }
44                std::wstring getMessage() {
45                        return message_;
46                }
47        };
48
49        void findAll(tasksched_filter::filter_result result, tasksched_filter::filter_argument args, tasksched_filter::filter_engine engine);
50
51};
Note: See TracBrowser for help on using the repository browser.