From 1574f506f942c0d11f58c05e2d64443d892441d5 Mon Sep 17 00:00:00 2001 From: Adrian Muzyka Date: Tue, 29 Oct 2024 07:37:13 +0100 Subject: [PATCH] Add IAnalytics interface --- interfaces/IAnalytics.h | 39 +++++++++++++++++++++++++++++++++++++++ interfaces/Ids.h | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 interfaces/IAnalytics.h diff --git a/interfaces/IAnalytics.h b/interfaces/IAnalytics.h new file mode 100644 index 00000000..59ef101e --- /dev/null +++ b/interfaces/IAnalytics.h @@ -0,0 +1,39 @@ +#pragma once + +#include "Module.h" + +// @stubgen:include + +namespace WPEFramework { +namespace Exchange { + // @json 1.0.0 @text:keep + struct EXTERNAL IAnalytics : virtual public Core::IUnknown { + enum { ID = ID_ANALYTICS }; + + virtual ~IAnalytics() override = default; + + using IStringIterator = RPC::IIteratorType; + + + // @alt sendEvent + // @brief Send an event to the analytics server + // @param eventName: Name of the event + // @param eventVersion: Version of the event + // @param eventSource: Source of the event + // @param eventSourceVersion: Version of the event source + // @param cetList: List of CETs + // @param epochTimestamp: Epoch timestamp of the event + // @param uptimeTimestamp: Uptime timestamp of the event + // @param eventPayload: Payload of the event + + virtual Core::hresult SendEvent(const string& eventName /* @in */, + const string& eventVersion /* @in */, + const string& eventSource /* @in */, + const string& eventSourceVersion /* @in */, + IStringIterator* const& cetList /* @in */, + const uint64_t epochTimestamp /* @in */, + const uint64_t uptimeTimestamp /* @in */, + const string& eventPayload /* @in */ ) = 0; + }; +} +} diff --git a/interfaces/Ids.h b/interfaces/Ids.h index de7df752..9f038782 100644 --- a/interfaces/Ids.h +++ b/interfaces/Ids.h @@ -387,6 +387,8 @@ namespace Exchange { ID_SYSTEMAUDIOPLAYER = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x520, ID_SYSTEMAUDIOPLAYER_NOTIFICATION = ID_SYSTEMAUDIOPLAYER + 1, + + ID_ANALYTICS = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x530, }; } }