#include <trackingapi.h>
Provides the main tracking service functionality.
The following properties must be set before calling Initialize().
◆ InitializeCallback
◆ ShutdownCallback
◆ State
| Enumerator |
|---|
| Uninitialized | |
| Initializing | |
| Initialized | |
| ShuttingDown | |
◆ TrackingAPI()
| ttv::tracking::TrackingAPI::TrackingAPI |
( |
| ) |
|
◆ ~TrackingAPI()
| virtual ttv::tracking::TrackingAPI::~TrackingAPI |
( |
| ) |
|
|
virtual |
◆ CheckShutdown()
| virtual bool ttv::tracking::TrackingAPI::CheckShutdown |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ CompleteShutdown()
| virtual void ttv::tracking::TrackingAPI::CompleteShutdown |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ FlushEvents()
Explicitly requests that any batched events are flushed and sent.
◆ FlushEventsInternal()
| TTV_ErrorCode ttv::tracking::TrackingAPI::FlushEventsInternal |
( |
| ) |
|
|
private |
◆ GetComponentContainer()
Returns the common ComponentContainer which hosts all components which live at the module level.
◆ GetModuleName()
| virtual std::string ttv::tracking::TrackingAPI::GetModuleName |
( |
| ) |
const |
|
overridevirtual |
◆ GetState()
| virtual State ttv::ModuleBase::GetState |
( |
| ) |
const |
|
overridevirtualinherited |
Returns the current state of the module.
Implements ttv::IModule.
◆ Initialize()
◆ Invoke()
template<typename T >
| void ttv::ModuleBase::Invoke |
( |
std::function< void(std::shared_ptr< T >)> |
callback | ) |
|
|
inlineprotectedinherited |
Invokes the callback for the module listeners.
◆ NotifyStateChange()
| void ttv::ModuleBase::NotifyStateChange |
( |
| ) |
|
|
protectedinherited |
◆ RegisterInitializeCallback()
◆ RegisterShutdownCallback()
| void ttv::ModuleBase::RegisterShutdownCallback |
( |
const ShutdownCallback & |
callback | ) |
|
|
inlineprotectedinherited |
◆ SetCoreApi()
◆ SetFlushIntervalInMs()
| TTV_ErrorCode ttv::tracking::TrackingAPI::SetFlushIntervalInMs |
( |
uint32_t |
flushInterval | ) |
|
◆ SetListener()
◆ SetMaxBytesInBatch()
| TTV_ErrorCode ttv::tracking::TrackingAPI::SetMaxBytesInBatch |
( |
uint32_t |
batchSize | ) |
|
◆ Shutdown()
◆ TrackEvent() [1/2]
| TTV_ErrorCode ttv::tracking::TrackingAPI::TrackEvent |
( |
const std::string & |
eventName, |
|
|
const std::map< std::string, TrackingValue > & |
params |
|
) |
| |
Enqueues an event for reporting.
◆ TrackEvent() [2/2]
| TTV_ErrorCode ttv::tracking::TrackingAPI::TrackEvent |
( |
const std::string & |
eventName, |
|
|
const std::map< std::string, TrackingValue > & |
params, |
|
|
uint32_t & |
eventId |
|
) |
| |
Enqueues an event for reporting. The returned eventId value can be used to match up with the callbacks if the application would like status of events as they are batched and sent.
◆ TrackEventInternal()
| TTV_ErrorCode ttv::tracking::TrackingAPI::TrackEventInternal |
( |
const std::string & |
eventName, |
|
|
const std::map< std::string, TrackingValue > & |
params, |
|
|
uint32_t & |
eventId |
|
) |
| |
|
private |
◆ Update()
Updates the internal state of the module and fires any pending callbacks.
Reimplemented from ttv::ModuleBase.
◆ kSpadeUrl
| const char* ttv::tracking::TrackingAPI::kSpadeUrl |
|
static |
◆ mBatchEndId
| uint32_t ttv::tracking::TrackingAPI::mBatchEndId |
|
private |
◆ mBatchStartId
| uint32_t ttv::tracking::TrackingAPI::mBatchStartId |
|
private |
◆ mCoreApi
| std::shared_ptr<CoreAPI> ttv::tracking::TrackingAPI::mCoreApi |
|
private |
◆ mCoreApiClient
| std::shared_ptr<CoreApiClient> ttv::tracking::TrackingAPI::mCoreApiClient |
|
private |
◆ mEventStream
| std::stringstream ttv::tracking::TrackingAPI::mEventStream |
|
private |
◆ mFlushIntervalInMs
| uint32_t ttv::tracking::TrackingAPI::mFlushIntervalInMs |
|
private |
◆ mFlushTimer
◆ mLastReportedState
| State ttv::ModuleBase::mLastReportedState |
|
protectedinherited |
◆ mListener
◆ mListeners
The registered listeners. These listeners extend IModuleListener and will be of the type required for the module.
◆ mMaxBytesInBatch
| uint32_t ttv::tracking::TrackingAPI::mMaxBytesInBatch |
|
private |
◆ mMutex
| std::shared_ptr<IMutex> ttv::tracking::TrackingAPI::mMutex |
|
private |
◆ mQueuedBytes
| uint32_t ttv::tracking::TrackingAPI::mQueuedBytes |
|
private |
◆ mState
| State ttv::ModuleBase::mState |
|
protectedinherited |
◆ mTaskRunner
| std::shared_ptr<TaskRunner> ttv::tracking::TrackingAPI::mTaskRunner |
|
private |
The documentation for this class was generated from the following file:
- modules/tracking/tracking_common/include/twitchsdk/tracking/trackingapi.h