#define MAX_DEVICE_ID_LENGHT
15 // The number of device ID bytes.
#define MD5_LENGHT
32 // The number of MD5 bytes.
#define LOCAL_TCP_VERSION 0x1000005 // TCP transport protocol version.
#define LOCAL_UDP_VERSION 0x1000005 // UDP transport protocol version.
2. Packet command type, error code type
enum CmdType
{
kUnknown = -1,
kTcpHeartbeatAsk = 0x005f, ///< TCP
heartbeat packet request.
kTcpHeartbeatAnswer = 0x0060, ///<
TCP heartbeat packet response.
kSearchDeviceAsk = 0x1001, ///< Search
for device request.
kSearchDeviceAnswer = 0x1002,
///< Search for device response.
kErrorAnswer = 0x2000,
///< Error response.
kSDKServiceAsk =
0x2001, ///<
SDK version request.
kSDKServiceAnswer = 0x2002, ///<
SDK version response.
kSDKCmdAsk =
0x2003, ///<
SDK
command request.
kSDKCmdAnswer =
0x2004, ///<
SDK command response.
kFileStartAsk =
0x8001, ///< Start to
transfer file request.
kFileStartAnswer
= 0x8002, ///< Start to
transfer file response.
kFileContentAsk = 0x8003, ///< Transfer
file content request.
kFileContentAnswer = 0x8004, ///< Transfer
file content response.
This instruction is ignored.
kFileEndAsk =
0x8005, ///< End the
file transfer
request.
kFileEndAnswer =
0x8006, ///< End
the file transfer
response.
kReadFileAsk = 0x8007,
///< Read
file request.
kReadFileAnswer =
0x8008,
///< Read file
response.
};
enum ErrorCode
{
kUnknown = -1,
kSuccess = 0,
kWriteFinish,
///< Finish writing
to
the file.
kProcessError,
///< Process
Error
kVersionTooLow, ///< The
version
is too low.
kDeviceOccupa, ///< The
device is
occupied.
kFileOccupa,
///< The
file
is occupied.
kReadFileExcessive, ///< Too many users reading
back the file.
kInvalidPacketLen, ///<
Invalid packet length.
kInvalidParam,
///< Invalid
parameter.
kNotSpaceToSave, ///< Storage
capacity
is not enough.
kCreateFileFailed, ///< Failed
to create file.
kWriteFileFailed, ///< Failed
to write file.
kReadFileFailed, ///< Failed
to read file.
kInvalidFileData, ///<
Invalid file data.
kFileContentError, ///< The file
content is incorrect.
kOpenFileFailed, ///< Failed
to open file.
kSeekFileFailed, ///< Failed
to seek file.
kRenameFailed, ///<
Failed
to rename
file.
kFileNotFound, ///<
Failed
to find
file.
kFileNotFinish, ///< The file
did not
complete the
transfer.
kXmlCmdTooLong, ///< The xml
command
is too
long.
kInvalidXmlIndex, ///<
Invalid Xml index
kParseXmlFailed, ///<
Error parsing xml.
kInvalidMethod, ///< Invalid
method
kMemoryFailed,
///< Memory
error.
kSystemError,
///<
System error
kUnsupportVideo,
///< Unsupported video.
kNotMediaFile, ///< Not
a multimedia
file.
kParseVideoFailed, ///< Failed to parse
the video file.
kUnsupportFrameRate, ///<
Unsupported frame rate.
kUnsupportResolution, ///<
Unsupported resolution (video).
kUnsupportFormat, ///<
Unsupported format (video).
kUnsupportDuration, ///< Unsupported length
of time (video).
kDownloadFileFailed, ///< Download file failed.
kScreenNodeIsNull,
kNodeExist,
kNodeNotExist,
kPluginNotExist,
kCheckLicenseFailed,
kNotFoundWifiModule,
kTestWifiUnsuccessful,
kRunningError,
kUnsupportMethod,
kInvalidGUID,
kDelayRespond,
kShortlyReturn,
KConnectionFailed
kCount,
}