|
Twitch SDK (Internal)
|
#include <presence.h>
Classes | |
| class | IListener |
| class | PubSubTopicListener |
Public Types | |
| using | PostPresenceCallback = std::function< void(TTV_ErrorCode ec)> |
| using | FetchPresenceSettingsCallback = std::function< void(TTV_ErrorCode ec, const PresenceSettings &settings)> |
| using | SetPresenceSettingsCallback = std::function< void(TTV_ErrorCode ec)> |
| enum | State { State::Uninitialized, State::Initialized, State::ShuttingDown, State::Inert } |
Static Public Member Functions | |
| static std::string | GetComponentName () |
Protected Member Functions | |
| virtual bool | CheckShutdown () override |
| virtual void | CompleteShutdown () override |
| virtual void | OnUserLogInComplete (TTV_ErrorCode ec) |
| virtual void | OnUserLogOutComplete (TTV_ErrorCode ec) |
| virtual void | OnUserAuthenticationIssue (std::shared_ptr< const OAuthToken > oauthToken, TTV_ErrorCode ec) |
| void | Log (TTV_MessageLevel level, const char *format,...) |
| TTV_ErrorCode | StartTask (std::shared_ptr< Task > task) |
| void | CompleteTask (Task *task) |
| bool | IsTaskRunning (Task *task) const |
| virtual void | SetState (State state) |
| virtual void | SetClientState (State state) |
| virtual void | SetServerState (State state) |
Protected Attributes | |
| std::weak_ptr< User > | mUser |
| bool | mOAuthIssue |
| Whether or not the internal updates of the component are on hold because of an issue with the OAuth token. More... | |
| ClientServerValue< State > | mState |
| std::shared_ptr< TaskRunner > | mTaskRunner |
| std::vector< std::shared_ptr< Task > > | mRunningTasks |
| std::mutex | mTaskMutex |
| uint64_t | mShutdownTimeMilliseconds |
Private Member Functions | |
| void | OnTopicSubscribeStateChanged (const std::string &topic, PubSubClient::SubscribeState::Enum state, TTV_ErrorCode ec) |
| void | OnTopicMessageReceived (const std::string &topic, const json::Value &msg) |
| void | OnTopicListenerRemoved (const std::string &topic, TTV_ErrorCode ec) |
| virtual void | OnUserInfoFetchComplete (TTV_ErrorCode ec) override |
| TTV_ErrorCode | SubscribeTopics () |
| TTV_ErrorCode | UpdateSettings () |
| void | SetSettings (const PresenceSettings &settings) |
| void | PresenceChanged () |
| uint32_t | InsertActivity (std::unique_ptr< PresenceActivity > &&activity) |
Private Attributes | |
| std::shared_ptr< UserRepository > | mUserRepository |
| std::shared_ptr< PubSubClient > | mPubSub |
| std::shared_ptr< PubSubTopicListener > | mPubSubTopicListener |
| std::shared_ptr< PubSubTopicListenerHelper > | mPubSubTopicListenerHelper |
| std::shared_ptr< Task > | mSocialSettingsTask |
| std::shared_ptr< Task > | mSocialPostPresenceTask |
| EventSource< IListener > | mListeners |
| WaitForExpiry | mPresencePostTimer |
| WaitForExpiry | mSettingsFetchTimer |
| uint64_t | mPostIntervalMilliseconds |
| std::map< PresenceActivityToken, std::unique_ptr< PresenceActivity > > | mActivities |
| std::string | mSessionGuid |
| std::string | mPresenceTopic |
| PresenceActivityToken | mActivityTokenCounter |
| std::unique_ptr< PresenceSettings > | mSettings |
| CallbackQueue< FetchPresenceSettingsCallback > | mFetchSettingsCallbacks |
| PresenceSessionAvailability | mAvailability |
| bool | mEnableAutomaticPosting |
Manages a local user's presence state.
| using ttv::social::Presence::FetchPresenceSettingsCallback = std::function<void(TTV_ErrorCode ec, const PresenceSettings& settings)> |
| using ttv::social::Presence::PostPresenceCallback = std::function<void(TTV_ErrorCode ec)> |
| using ttv::social::Presence::SetPresenceSettingsCallback = std::function<void(TTV_ErrorCode ec)> |
|
stronginherited |
| ttv::social::Presence::Presence | ( | std::shared_ptr< User > | user | ) |
|
virtual |
| void ttv::social::Presence::AddListener | ( | std::shared_ptr< IListener > | listener | ) |
| TTV_ErrorCode ttv::social::Presence::AddPlayingActivity | ( | GameId | gameId, |
| const std::string & | gameDisplayContext, | ||
| PresenceActivityToken & | activityToken | ||
| ) |
| TTV_ErrorCode ttv::social::Presence::AddWatchingActivity | ( | ChannelId | channelId, |
| PresenceActivityToken & | activityToken | ||
| ) |
|
overrideprotectedvirtual |
Reimplemented from ttv::Component.
|
overrideprotectedvirtual |
Reimplemented from ttv::UserComponent.
|
protectedinherited |
| TTV_ErrorCode ttv::social::Presence::FetchSettings | ( | const FetchPresenceSettingsCallback & | callback | ) |
| TTV_ErrorCode ttv::social::Presence::GetAutomaticPresencePostingEnabled | ( | bool & | enabled | ) |
|
inlinestatic |
|
overridevirtual |
Implements ttv::Component.
|
overridevirtualinherited |
Implements ttv::IComponent.
|
inlineinherited |
|
inline |
|
overridevirtual |
Reimplemented from ttv::UserComponent.
|
private |
|
protectedinherited |
|
protectedinherited |
|
private |
|
private |
|
private |
|
protectedvirtualinherited |
|
overrideprivatevirtual |
Reimplemented from ttv::UserComponent.
|
protectedvirtualinherited |
|
protectedvirtualinherited |
| TTV_ErrorCode ttv::social::Presence::PostPresence | ( | const PostPresenceCallback & | callback | ) |
|
private |
| TTV_ErrorCode ttv::social::Presence::RemoveActivity | ( | PresenceActivityToken | activityToken | ) |
| void ttv::social::Presence::RemoveListener | ( | std::shared_ptr< IListener > | listener | ) |
| TTV_ErrorCode ttv::social::Presence::SetAutomaticPresencePostingEnabled | ( | bool | enabled | ) |
|
protectedvirtualinherited |
| TTV_ErrorCode ttv::social::Presence::SetPresenceSettings | ( | const PresenceSettings & | settings, |
| const SetPresenceSettingsCallback & | callback | ||
| ) |
|
protectedvirtualinherited |
| TTV_ErrorCode ttv::social::Presence::SetSessionAvailability | ( | PresenceSessionAvailability | availability | ) |
|
private |
|
protectedvirtualinherited |
|
virtualinherited |
Reimplemented in ttv::broadcast::Streamer, and ttv::social::FriendList.
|
inline |
|
overridevirtual |
Reimplemented from ttv::Component.
|
protectedinherited |
|
private |
|
overridevirtual |
Reimplemented from ttv::Component.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedinherited |
Whether or not the internal updates of the component are on hold because of an issue with the OAuth token.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedinherited |
|
private |
|
private |
|
private |
|
protectedinherited |
|
private |
|
private |
|
protectedinherited |
|
mutableprotectedinherited |
|
protectedinherited |
|
protectedinherited |
|
private |
1.8.13