Merge pull request #4630 from Red-F/gotham-resume-pvr-lastplayedposition
[vuplus_xbmc] / xbmc / LangInfo.h
index ee14706..b432da7 100644 (file)
  *
  */
 
-#include "settings/ISettingCallback.h"
+#include "settings/lib/ISettingCallback.h"
 #include "utils/StdString.h"
 
 #include <map>
 
+#ifdef TARGET_WINDOWS
+#ifdef GetDateFormat
+#undef GetDateFormat
+#endif // GetDateFormat
+#ifdef GetTimeFormat
+#undef GetTimeFormat
+#endif // GetTimeFormat
+#endif // TARGET_WINDOWS
+
 class TiXmlNode;
 
 class CLangInfo : public ISettingCallback
@@ -34,7 +43,7 @@ public:
 
   virtual void OnSettingChanged(const CSetting *setting);
 
-  bool Load(const CStdString& strFileName);
+  bool Load(const std::string& strFileName, bool onlyCheckLanguage = false);
 
   CStdString GetGuiCharSet() const;
   CStdString GetSubtitleCharSet() const;
@@ -43,19 +52,20 @@ public:
   const CStdString& GetLanguageCode() const { return m_languageCodeGeneral; }
 
   bool SetLanguage(const std::string &strLanguage);
+  bool CheckLoadLanguage(const std::string &language);
 
   const CStdString& GetAudioLanguage() const;
   // language can either be a two char language code as defined in ISO639
   // or a three char language code
   // or a language name in english (as used by XBMC)
-  void SetAudioLanguage(const CStdString &language);
+  void SetAudioLanguage(const std::string& language);
   
   // three char language code (not win32 specific)
   const CStdString& GetSubtitleLanguage() const;
   // language can either be a two char language code as defined in ISO639
   // or a three char language code
   // or a language name in english (as used by XBMC)
-  void SetSubtitleLanguage(const CStdString &language);
+  void SetSubtitleLanguage(const std::string& language);
 
   const std::string GetDVDMenuLanguage() const;
   const std::string GetDVDAudioLanguage() const;
@@ -118,6 +128,8 @@ public:
   void SetCurrentRegion(const CStdString& strName);
   const CStdString& GetCurrentRegion() const;
 
+  static bool CheckLanguage(const std::string& language);
+
   static void LoadTokens(const TiXmlNode* pTokens, std::vector<CStdString>& vecTokens);
 
   static void SettingOptionsLanguagesFiller(const CSetting *setting, std::vector< std::pair<std::string, std::string> > &list, std::string &current);