/**
* @file SccDef.h
* @brief SCC engine defines
* @details Smart Communication Cloud engine
* @version 2.5.0
* @author Boll.Chen
* @copyright 2017 by TechBridge-inc Ltd.
* @date 2017-05-01
*
* @par
* @verbatim
*--------------------------------------------------------------------------*
* Change History : *
*
| | | *
*--------------------------------------------------------------------------*
* 2017/05/01 | 2.5.0 | Boll.Chen | Create file *
*--------------------------------------------------------------------------*
* @endverbatim
*/
#ifndef __SCC_SCCDEF_H__
#define __SCC_SCCDEF_H__
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include
#ifndef strcasecmp
#define strcasecmp _stricmp
#endif
#ifndef strncasecmp
#define strncasecmp _strnicmp
#endif
#endif /*_WIN32*/
#include
#include
#include
#define __STDC_FORMAT_MACROS
#include
#include
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
/*!
* /namespace scc
*/
namespace scc
{
/*!
* @brief scc log level
*/
typedef enum
{
SCC_LOG_FATAL = 0, ///< fatal level
SCC_LOG_ERROR, ///< error level
SCC_LOG_WARNING, ///< warning level
SCC_LOG_INFO, ///< info level
SCC_LOG_VERBOS, ///< verbos level
SCC_LOG_DEBUG, ///< debug level
} SccLogLevel;
typedef uint64_t roomId_t;
typedef uint32_t uid_t;
typedef uint64_t wbId_t;
typedef unsigned long long ssAntId_t;
typedef uint64_t docId_t;
typedef unsigned long long pageId_t;
#if defined(_WIN32)
typedef HWND canvas_t;
#elif defined(__APPLE__)
typedef void* canvas_t;
#elif defined(__ANDROID__)
typedef void* canvas_t;
#elif defined(__linux__) || defined(__linux)
typedef unsigned long canvas_t;
#else
typedef void* canvas_t;
#endif
static const int kMaxAppKeyLength = 256; ///< appkey max length constant
static const int kMaxURILength = 256; ///< server URI max length constant
static const int kMaxClientTagLength = 100; ///< client tag max length constant
static const int kMaxDeviceIDLength = 256; ///< device id max length constant
static const int kMaxDeviceNameLength = 256; ///< device name max length constant
static const int kMaxSourceIDLength = 256; ///< source id max length constant
static const int kMaxCodecImplNameLength = 256;
static const int kMaxColorLength = 128; ///< color length constant
static const char kDefaultVideoSource[] = "video-default"; ///< default video source name constant
static const int kMaxPlaneCount = 4; ///< video plane max count constant
static const int64_t kDefaultDumpFileSize = -1; ///< Default not limit dump file size
static const int kMaxFileURILength = 1024; ///< file/image URI max length constant
static const int kMaxLiveSeiLength = 4096; ///< live sei max length constant
static const int kMaxFilePathLength = 1024; ///< file path max length constant
enum SccChatCallState
{
kChatCallIdle = 0,
kChatCallConnecting,
kChatCallConnected,
kChatCallFailed,
};
/*!
* @brief chat msg type
*/
enum SccChatMsgType
{
kChatMsgNone = 0, ///< none
kChatMsgText, ///< text
kChatMsgVoice, ///< voice
kChatMsgImg, ///< image
kChatMsgOther = 10, ///< other
};
/*!
* @brief audio device type
*/
enum SccAudioDeviceType
{
kAudioDeviceUnknown = 0, ///< unknown
kAudioDeviceRecord, ///< record device
kAudioDevicePlayback, ///< playback device
};
/*!
* @brief audio device state
*/
enum SccAudioDeviceState
{
kAudioDeviceActive = 0, ///< device active
kAudioDeviceUnactive, ///< device unactive, include disable, notpresent, unplugged and so on.
};
/*!
* @brief video device type
*/
enum SccVideoDeviceType
{
kVideoDeviceUnknown = 0, ///< unknown
kVideoDeviceCapture, ///< capture device
};
/*!
* @brief video device state
*/
enum SccVideoDeviceState
{
kVideoDeviceAdded = 0, ///< device added
kVideoDeviceRemoved, ///< device removed
};
/*!
* @brief video device position
*/
enum SccVideoDevicePosition
{
kVideoDevicePositionUnspecified = 0, ///< unspecified
kVideoDevicePositionBack, ///< back
kVideoDevicePositionFront, ///< front
};
/*!
* @brief user leave cause
*/
enum SccUserLeaveCause
{
kUserLeaveQuit = 0, ///< user leaves normally
kUserLeaveDropped, ///< dropped
};
/*!
* @brief room failover state
*/
enum SccFailoverState {
kFailoverStateReconnecting = 0, ///