1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // Registrar.h: Schnittstelle f�r die Klasse Registrar.
4 //////////////////////////////////////////////////////////////////////
6 #ifndef _REGISTRAR_HXX_
7 #define _REGISTRAR_HXX_
9 #include "registry.hxx"
10 #include "registrationcontextinformation.hxx"
12 #include "constants.hxx"
18 Registrar(const RegistrationContextInformation
& RegContext
);
22 bool IsRegisteredFor(int State
) const;
24 virtual void RegisterForMsWord() const;
25 virtual void UnregisterForMsWord() const;
26 virtual bool QueryPreselectMsWordRegistration() const;
28 virtual void RegisterForMsExcel() const;
29 virtual void UnregisterForMsExcel() const;
30 virtual bool QueryPreselectMsExcelRegistration() const;
32 virtual void RegisterForMsPowerPoint() const;
33 virtual void UnregisterForMsPowerPoint() const;
34 virtual bool QueryPreselectMsPowerPointRegistration() const;
36 virtual void RegisterAsHtmlEditorForInternetExplorer() const;
37 virtual void UnregisterAsHtmlEditorForInternetExplorer() const;
39 virtual void RegisterAsDefaultHtmlEditorForInternetExplorer() const;
40 virtual void UnregisterAsDefaultHtmlEditorForInternetExplorer() const;
42 virtual void RegisterAsDefaultShellHtmlEditor() const;
43 virtual void UnregisterAsDefaultShellHtmlEditor() const;
45 /** Restore the last registration state (necessary for
48 virtual void RepairRegistrationState() const;
50 /** Unregisters all and delete all Registry keys we have written
52 virtual void UnregisterAllAndCleanUpRegistry() const;
56 virtual void RegisterForMsOfficeApplication(
57 const std::wstring
& FileExtension
,
58 const std::wstring
& DocumentDisplayName
,
59 const std::wstring
& DefaultIconEntry
,
60 const std::wstring
& DefaultShellCommand
,
61 const std::wstring
& ShellNewCommandDisplayName
,
62 const RegistrationContextInformation::OFFICE_APPLICATION eOfficeApp
) const;
64 virtual void UnregisterForMsOfficeApplication(
65 const std::wstring
& FileExtension
) const;
67 virtual RegistryKey
GetRootKeyForDefHtmlEditorForIERegistration() const;
69 void SaveRegisteredFor(int State
) const;
70 void SaveNotRegisteredFor(int State
) const;
72 int GetRegisterState() const;
73 void SetRegisterState(int NewState
) const;
75 virtual bool QueryPreselectForMsApplication(const std::wstring
& file_extension
) const;
77 /** A helper function (for readability) returns true if OpenOffice is already
78 registered for a MS application
80 @param DocumentExtensionDefValue
81 The default value of the appropriate document extension Registry key
83 bool IsOpenOfficeRegisteredForMsApplication(const std::wstring
& DocumentExtensionDefValue
) const;
86 const RegistrationContextInformation
& m_ContextInformation
;
88 const std::wstring FORWARD_KEY_PREFIX
;
89 const std::wstring DEFAULT_VALUE_NAME
;
90 const std::wstring BACKUP_VALUE_NAME
;
91 const std::wstring PRIVATE_BACKUP_KEY_NAME
;
92 const std::wstring REGISTRATION_STATE
;
94 RegistryKey m_RootKey
;
96 // prevent copy/assignment
98 Registrar(const Registrar
&);
99 Registrar
& operator=(const Registrar
&);
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */