summaryrefslogtreecommitdiff
path: root/Common/CmptData.h
diff options
context:
space:
mode:
Diffstat (limited to 'Common/CmptData.h')
-rw-r--r--Common/CmptData.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Common/CmptData.h b/Common/CmptData.h
new file mode 100644
index 0000000..985de2d
--- /dev/null
+++ b/Common/CmptData.h
@@ -0,0 +1,49 @@
+// ShutdownData.h: interface for the CShutdownData class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(PROPERTYBAGIMPL_H__6CC5C4C0_1F0A_11D2_B2D4_0020182B97FC__INCLUDED_)
+#define PROPERTYBAGIMPL_H__6CC5C4C0_1F0A_11D2_B2D4_0020182B97FC__INCLUDED_
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif // _MSC_VER >= 1000
+
+#define NS_NO_KEY _T("No Key")
+#define NS_BACKUP_REG_SOURCE _T("Source%.4d")
+#define NS_BACKUP_REG_DEST _T("Destination")
+#define NS_BACKUP_REG_ENGINE _T("Engine")
+#define NS_IGNORE_REG_EXT _T("Ignore%.4d")
+#define NS_ENCRYPT_REG_FILES _T("Path%.4d")
+#define NS_ENCRYPT_REG_DISABLE _T("Disable")
+#define NS_ENCRYPT_REG_READONLY _T("ReadOnly")
+
+class CPropertyBag
+{
+
+public:
+ CPropertyBag();
+ virtual ~CPropertyBag();
+
+ HRESULT DeleteProperty(const string& sKeyName);
+ HRESULT WriteString(const string& sKeyName, const string& sValue);
+ HRESULT WriteInt(const string& sKeyName, int nValue);
+ string GetString(const string& sKeyName, const string& sDefault) const;
+ int GetInt(const string& sKeyName, int nDefault) const;
+
+ // Chooses the first IPropertyBag it finds
+ HRESULT Initialize(int cUnks, IUnknown** ppUnks);
+ HRESULT Initialize(IUnknown* pUnk);
+
+ bool IsInitialized()
+ { return m_pBag != NULL; };
+
+ UINT GetStringSet(const string& sFormat, string_array& asData) const;
+ UINT WriteStringSet(const string& sFormat, const string_array& asData);
+
+// Data
+protected:
+ IPropertyBag* m_pBag;
+};
+
+#endif // !defined(AFX_PROPERTYBAGIMPL_H__6CC5C4C0_1F0A_11D2_B2D4_0020182B97FC__INCLUDED_)