#include <channelstatus.h>
A concrete implemenation of IChannelStatus.
◆ DisposerFunc
◆ UploadProfileImageCallback
◆ State
| Enumerator |
|---|
| Uninitialized | |
| Initialized | |
| ShuttingDown | |
| Inert | The component doesn't require shutting down.
|
◆ ChannelStatus()
| ttv::ChannelStatus::ChannelStatus |
( |
const std::shared_ptr< User > & |
user, |
|
|
ChannelId |
channelId |
|
) |
| |
◆ AddTopic()
| virtual void ttv::PubSubComponentBase::AddTopic |
( |
const std::string & |
topic | ) |
|
|
protectedvirtualinherited |
◆ CheckShutdown()
| virtual bool ttv::ChannelStatus::CheckShutdown |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ CompleteShutdown()
| virtual void ttv::ChannelStatus::CompleteShutdown |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ CompleteTask()
| void ttv::Component::CompleteTask |
( |
Task * |
task | ) |
|
|
protectedinherited |
◆ Dispose()
This should be called when the application is done with the instance.
Implements ttv::IChannelStatus.
◆ GetComponentName()
| static std::string ttv::ChannelStatus::GetComponentName |
( |
| ) |
|
|
inlinestatic |
◆ GetLoggerName()
| virtual std::string ttv::ChannelStatus::GetLoggerName |
( |
| ) |
const |
|
overridevirtual |
◆ GetState()
| virtual State ttv::Component::GetState |
( |
| ) |
const |
|
overridevirtualinherited |
◆ GetTaskRunner()
| std::shared_ptr<TaskRunner> ttv::Component::GetTaskRunner |
( |
| ) |
|
|
inlineinherited |
◆ Initialize()
◆ IsTaskRunning()
| bool ttv::Component::IsTaskRunning |
( |
Task * |
task | ) |
const |
|
protectedinherited |
◆ Log()
| void ttv::UserComponent::Log |
( |
TTV_MessageLevel |
level, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
|
protectedinherited |
◆ OnTopicListenerRemoved()
| virtual void ttv::PubSubComponentBase::OnTopicListenerRemoved |
( |
const std::string & |
topic, |
|
|
TTV_ErrorCode |
ec |
|
) |
| |
|
virtualinherited |
◆ OnTopicMessageReceived()
| void ttv::ChannelStatus::OnTopicMessageReceived |
( |
const std::string & |
topic, |
|
|
const json::Value & |
msg |
|
) |
| |
|
overridevirtual |
◆ OnTopicSubscribeStateChanged()
◆ OnUserAuthenticationIssue()
| virtual void ttv::UserComponent::OnUserAuthenticationIssue |
( |
std::shared_ptr< const OAuthToken > |
oauthToken, |
|
|
TTV_ErrorCode |
ec |
|
) |
| |
|
protectedvirtualinherited |
◆ OnUserInfoFetchComplete()
| virtual void ttv::UserComponent::OnUserInfoFetchComplete |
( |
TTV_ErrorCode |
ec | ) |
|
|
protectedvirtualinherited |
◆ OnUserLogInComplete()
| virtual void ttv::UserComponent::OnUserLogInComplete |
( |
TTV_ErrorCode |
ec | ) |
|
|
protectedvirtualinherited |
◆ OnUserLogOutComplete()
| virtual void ttv::UserComponent::OnUserLogOutComplete |
( |
TTV_ErrorCode |
ec | ) |
|
|
protectedvirtualinherited |
◆ SetClientState()
| virtual void ttv::Component::SetClientState |
( |
State |
state | ) |
|
|
protectedvirtualinherited |
◆ SetDisposer()
| void ttv::PubSubComponentBase::SetDisposer |
( |
DisposerFunc && |
func | ) |
|
|
inlineinherited |
◆ SetListener()
◆ SetServerState()
| virtual void ttv::Component::SetServerState |
( |
State |
state | ) |
|
|
protectedvirtualinherited |
◆ SetState()
| virtual void ttv::Component::SetState |
( |
State |
state | ) |
|
|
protectedvirtualinherited |
◆ SetTaskRunner()
| virtual void ttv::Component::SetTaskRunner |
( |
std::shared_ptr< TaskRunner > |
taskRunner | ) |
|
|
virtualinherited |
◆ Shutdown()
◆ StartTask()
◆ SubscribeTopics()
| virtual TTV_ErrorCode ttv::PubSubComponentBase::SubscribeTopics |
( |
| ) |
|
|
protectedvirtualinherited |
◆ Update()
| virtual void ttv::ChannelStatus::Update |
( |
| ) |
|
|
overridevirtual |
◆ UploadProfileImage()
Uploads a new profile image for the current user asynchronously. Only one request can be in progress at a time. This function will call HttpRequest::SendHttpRequest: the client implementation of this must be able to send raw bytes (and not apply any encoding such as UTF-16).
- Parameters
-
| [in] | imageBuffer | A buffer containing the image data to be uploaded. |
| [in] | size | The size of the image to be uploaded (in bytes). |
| [in] | callback | The callback to be called upon completion of the upload (whether successful or not) The callback has several error codes that it can return:
- TTV_EC_SUCCESS: We have successfully uploaded and updated the profile image.
- TTV_EC_API_REQUEST_FAILED: The API requests to upload the profile image have failed.
- TTV_EC_PROFILEIMAGE_IMAGE_VALIDATION_FAILED: The profile image was uploaded, but is not a valid image.
- TTV_EC_PROFILEIMAGE_FORMAT_VALIDATION_FAILED: The profile image was uploaded, but is not in a valid image format.
- TTV_EC_PROFILEIMAGE_SIZE_VALIDATION_FAILED: The profile image was uploaded, but it is too big to be used (over 5 MB). The callback will also return a vector of the profile image in different dimensions if the upload was successful.
- Each ProfileImage object in the vector contains the dimensions, url, and image format.
|
- Returns
- TTV_EC_SUCCESS: We've initialized and started the profile image upload successfully.
- TTV_EC_NOT_INITIALIZED: We haven't initialized properly.
- TTV_EC_NEED_TO_LOGIN: We aren't logged in properly.
- TTV_EC_INVALID_ARG: If any input arguments are invalid.
- TTV_EC_REQUEST_PENDING: If a request is already pending.
- TTV_EC_API_REQUEST_FAILED: The API requests to upload the profile image have failed.
Implements ttv::IChannelStatus.
◆ mChannelId
◆ mComponentContainer
◆ mDisposerFunc
◆ mListener
◆ mOAuthIssue
| bool ttv::UserComponent::mOAuthIssue |
|
protectedinherited |
Whether or not the internal updates of the component are on hold because of an issue with the OAuth token.
◆ mPubSub
| std::shared_ptr<PubSubClient> ttv::PubSubComponentBase::mPubSub |
|
protectedinherited |
◆ mPubSubTopic
| std::string ttv::ChannelStatus::mPubSubTopic |
|
private |
◆ mPubSubTopicListener
◆ mPubSubTopicListenerHelper
◆ mPubSubTopics
| std::vector<std::string> ttv::PubSubComponentBase::mPubSubTopics |
|
protectedinherited |
◆ mRunningTasks
| std::vector<std::shared_ptr<Task> > ttv::Component::mRunningTasks |
|
protectedinherited |
◆ mShutdownTimeMilliseconds
| uint64_t ttv::Component::mShutdownTimeMilliseconds |
|
protectedinherited |
◆ mState
◆ mTaskMutex
| std::mutex ttv::Component::mTaskMutex |
|
mutableprotectedinherited |
◆ mTaskRunner
| std::shared_ptr<TaskRunner> ttv::Component::mTaskRunner |
|
protectedinherited |
◆ mUser
| std::weak_ptr<User> ttv::UserComponent::mUser |
|
protectedinherited |
The documentation for this class was generated from the following file: