[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / osx / XBMCHelper.h
1 #ifndef __XBMCHELPER_H__
2 #define __XBMCHELPER_H__
3
4 /*
5  *      Copyright (C) 2005-2013 Team XBMC
6  *      http://www.xbmc.org
7  *
8  *  This Program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2, or (at your option)
11  *  any later version.
12  *
13  *  This Program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with XBMC; see the file COPYING.  If not, see
20  *  <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #if !defined(__arm__)
25 class XBMCHelper
26 {
27  public:
28
29   static XBMCHelper& GetInstance();
30
31   void Start();
32   void Stop();
33
34   void Configure();
35
36   bool IsRunning();
37
38   bool IsAlwaysOn() const { return m_alwaysOn; }
39   int  GetMode() const { return m_mode; }
40
41   bool ErrorStarting() { return m_errorStarting; }
42
43 private:
44   XBMCHelper();
45   XBMCHelper(XBMCHelper const& );
46   XBMCHelper& operator=(XBMCHelper const&);
47
48   void Install();
49   void Uninstall();
50
51   bool IsRemoteBuddyInstalled();
52   bool IsSofaControlRunning();
53
54   int GetProcessPid(const char* processName);
55
56   std::string ReadFile(const char* fileName);
57   void WriteFile(const char* fileName, const std::string& data);
58
59   bool m_alwaysOn;
60   int  m_mode;
61   int  m_sequenceDelay;
62   int  m_port;
63   bool m_errorStarting;
64
65   std::string m_configFile;
66   std::string m_launchAgentLocalFile;
67   std::string m_launchAgentInstallFile;
68   std::string m_homepath;
69   std::string m_helperFile;
70
71   static XBMCHelper* smp_instance;
72 };
73
74 #endif
75 #endif