3 * Copyright (C) 2005-2013 Team XBMC
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, or (at your option)
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.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
22 #include "utils/StdString.h"
23 #include "GUIPassword.h"
32 /*! \brief Class for handling lock status
37 CLock(LockType type = LOCK_MODE_EVERYONE, const CStdString &password = "");
51 CProfile(const CStdString &directory = "", const CStdString &name = "", const int id = -1);
54 void Load(const TiXmlNode *node, int nextIdProfile);
55 void Save(TiXmlNode *root) const;
57 const CStdString& getDate() const { return m_date;}
58 const int getId() const { return m_id; }
59 const CStdString& getName() const { return m_name;}
60 const CStdString& getDirectory() const { return m_directory;}
61 const CStdString& getThumb() const { return m_thumb;}
62 const CStdString& getLockCode() const { return m_locks.code;}
63 LockType getLockMode() const { return m_locks.mode; }
65 bool hasDatabases() const { return m_bDatabases; }
66 bool canWriteDatabases() const { return m_bCanWrite; }
67 bool hasSources() const { return m_bSources; }
68 bool canWriteSources() const { return m_bCanWriteSources; }
69 bool hasAddons() const { return m_bAddons; }
70 bool settingsLocked() const { return m_locks.settings; }
71 bool addonmanagerLocked() const { return m_locks.addonManager; }
72 bool musicLocked() const { return m_locks.music; }
73 bool videoLocked() const { return m_locks.video; }
74 bool picturesLocked() const { return m_locks.pictures; }
75 bool filesLocked() const { return m_locks.files; }
76 bool programsLocked() const { return m_locks.programs; }
77 const CLock &GetLocks() const { return m_locks; }
79 void setName(const CStdString& name) {m_name = name;}
80 void setDirectory(const CStdString& directory) {m_directory = directory;}
81 void setDate(const CStdString& strDate) { m_date = strDate;}
83 void setThumb(const CStdString& thumb) {m_thumb = thumb;}
84 void setDatabases(bool bHas) { m_bDatabases = bHas; }
85 void setWriteDatabases(bool bCan) { m_bCanWrite = bCan; }
86 void setSources(bool bHas) { m_bSources = bHas; }
87 void setWriteSources(bool bCan) { m_bCanWriteSources = bCan; }
88 void SetLocks(const CLock &locks);
91 CStdString m_directory;
99 bool m_bCanWriteSources;