Merge pull request #4775 from jmarshallnz/empty_episode_playcount
[vuplus_xbmc] / xbmc / win32 / WMIInterface.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include <Wbemidl.h>
24 #pragma comment(lib, "wbemuuid.lib")
25 #pragma comment(lib, "comsuppw.lib")
26
27
28 class CWIN32Wmi
29 {
30 public:
31   CWIN32Wmi(void);
32   virtual ~CWIN32Wmi(void);
33
34   bool Connect();
35   void Release();
36   void testquery();
37
38   std::vector<CStdString> GetWMIStrVector(CStdString& strQuery, CStdStringW& strProperty);
39   CStdString GetWMIString(CStdString& strQuery, CStdStringW& strProperty);
40
41
42
43 private:
44
45   HRESULT hres;
46         IWbemLocator *pLoc;
47         IWbemServices *pSvc;
48         IEnumWbemClassObject    *pEnumerator;
49   IWbemClassObject *pclsObj;
50
51   bool bconnected;
52
53
54 };