RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
Declare the methods in the above class, required to implement the functionality of the plugin
These methods are used to place collection of plugin JSON interface methods to register & unregister with JSON RPCs APIs
Code Block | ||
---|---|---|
| ||
void RegisterAll(); void UnregisterAll(); |
These methods are used to initialize and deinitialize the handlers for the plug-in service
Code Block |
---|
virtual const string Initialize(PluginHost::IShell* service); virtual void Deinitialize(PluginHost::IShell* service); |
These are are the JSON interface (get/set) methods to communicate with plugin
Code Block |
---|
uint32_t get_method(JsonData::Plugin::ClassName& response) const; uint32_t set_method(JsonData::Plugin::ClassName& response) const; |
This method is used to process the REST APIs request such as GET/POST/SET and return the response
Code Block |
---|
virtual Core::ProxyType<Web::Response> Process(const Web::Request& request) override; |
2.7) <PluginName>.cpp: This class does contains all the definitions for the methods declared in the Plugin.h and those definitions should be defined inside the below namespace.
...
Code Block |
---|
namespace WPEFramework { namespace Plugin { SERVICE_REGISTRATION(Plugin, 1, 0); //All the methods declared in Plugin.h should be defined here } } |
...
2.8) <PluginName>JsonRpc.cpp: This class is used to register the methods with JSON RPC interface as below
...