From 35642311ff6939370f06072e54375ae4c62a6a3d Mon Sep 17 00:00:00 2001 From: Pierre Wielders Date: Sun, 30 Jul 2023 11:09:09 +0200 Subject: [PATCH] [JSONRPC] Allow the IDictionary interface to auto generate the JSONRPC interface. --- definitions/Definitions.vcxproj | 10 ++++++++++ definitions/Definitions.vcxproj.filters | 3 +++ interfaces/IDictionary.h | 10 +++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/definitions/Definitions.vcxproj b/definitions/Definitions.vcxproj index c47b886e..230deff2 100644 --- a/definitions/Definitions.vcxproj +++ b/definitions/Definitions.vcxproj @@ -24,6 +24,16 @@ + + $(ProjectDir)../interfaces/json/JDictionary.h + None + $(ProjectDir)../interfaces/json/JDictionary.h + None + $(ProjectDir)../interfaces/json/JDictionary.h + None + $(ProjectDir)../interfaces/json/JDictionary.h + None + $(ProjectDir)../interfaces/json/JMath.h diff --git a/definitions/Definitions.vcxproj.filters b/definitions/Definitions.vcxproj.filters index d874d345..d8423717 100644 --- a/definitions/Definitions.vcxproj.filters +++ b/definitions/Definitions.vcxproj.filters @@ -189,5 +189,8 @@ Interfaces + + Interfaces + \ No newline at end of file diff --git a/interfaces/IDictionary.h b/interfaces/IDictionary.h index c57294e2..73fe30df 100644 --- a/interfaces/IDictionary.h +++ b/interfaces/IDictionary.h @@ -25,9 +25,11 @@ namespace Exchange { // This interface gives direct access to a Browser to change // Browser specific properties like displayed URL. + /* @json 1.0.0 */ struct EXTERNAL IDictionary : virtual public Core::IUnknown { enum { ID = ID_DICTIONARY }; + // @event struct EXTERNAL INotification : virtual public Core::IUnknown { enum { ID = ID_DICTIONARY_NOTIFICATION }; @@ -58,9 +60,11 @@ namespace Exchange { virtual void Unregister(const string& nameSpace, struct IDictionary::INotification* sink) = 0; // Getters and Setters for the dictionary. - virtual bool Get(const string& nameSpace, const string& key, string& value /* @out */) const = 0; - virtual bool Set(const string& nameSpace, const string& key, const string& value) = 0; - virtual IIterator* Get(const string& nameSpace) const = 0; + virtual Core::hresult Get(const string& nameSpace, const string& key, string& value /* @out */) const = 0; + virtual Core::hresult Set(const string& nameSpace, const string& key, const string& value) = 0; + + // @json:omit + virtual IIterator* Get(const string& nameSpace) const = 0; }; } }