Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
李勇
/
McuClient
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
李勇
2017-01-26 20:20:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
35460c03a006f9a7d8688c71fe88aea2df6c457b
35460c03
1 parent
dc9310dd
1.增加白板对外接口(插入数据、更新数据、删除数据)
隐藏空白字符变更
内嵌
并排对比
正在显示
9 个修改的文件
包含
497 行增加
和
248 行删除
dist/McuClient.js
src/EngineEntrance.js
src/apes/Ape.js
src/apes/ConferApe.js
src/apes/DocApe.js
src/apes/VideoApe.js
src/apes/WhiteBoardApe.js
src/pdus/PduType.js
src/pdus/pro.js
dist/McuClient.js
查看文件 @
35460c0
...
...
@@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/
}
/******/
var
hotApplyOnUpdate
=
true
;
/******/
var
hotCurrentHash
=
"
989d45d8d3b7a64203cb
"
;
// eslint-disable-line no-unused-vars
/******/
var
hotCurrentHash
=
"
0da528f08f5e38a35aac
"
;
// eslint-disable-line no-unused-vars
/******/
var
hotCurrentModuleData
=
{};
/******/
var
hotCurrentParents
=
[];
// eslint-disable-line no-unused-vars
...
...
@@ -804,11 +804,18 @@ return /******/ (function(modules) { // webpackBootstrap
_this
.
leaveClass
=
_this
.
_leaveClass
;
_this
.
mcuClientStatus
=
_this
.
_mcuClientStatus
;
//
a
pe
//
chatA
pe
_this
.
sendChatMsg
=
_this
.
_sendChatMsg
;
_this
.
playVideoPath
=
_this
.
_playVideoPath
;
_this
.
publishVideoPath
=
_this
.
_publishVideoPath
;
_this
.
sendAnnotaion
=
_this
.
_sendAnnotaion
;
//videoApe
_this
.
getPlayVideoPath
=
_this
.
_getPlayVideoPath
;
_this
.
getPublishVideoPath
=
_this
.
_getPublishVideoPath
;
//whiteBoradApe
_this
.
sendInsertAnnotaion
=
_this
.
_sendInsertAnnotaion
;
_this
.
sendUpdaterAnnotaion
=
_this
.
_sendUpdaterAnnotaion
;
_this
.
sendDeleteAnnotaion
=
_this
.
_sendDeleteAnnotaion
;
_this
.
sendDeleteAllAnnotation
=
_this
.
_sendDeleteAllAnnotation
;
//debug
//this.setDebugData=this._setDebugData;
return
_this
;
...
...
@@ -1035,19 +1042,19 @@ return /******/ (function(modules) { // webpackBootstrap
//VidoeApe
},
{
key
:
'_playVideoPath'
,
value
:
function
_playVideoPath
(
_param
)
{
key
:
'_getPlayVideoPath'
,
value
:
function
_getPlayVideoPath
(
_param
)
{
if
(
_video_ape
)
{
return
_video_ape
.
p
layVideoPath
(
_param
);
return
_video_ape
.
getP
layVideoPath
(
_param
);
}
else
{
return
{
"code"
:
1
,
"data"
:
"获取播放地址失败"
};
}
}
},
{
key
:
'_publishVideoPath'
,
value
:
function
_publishVideoPath
(
_param
)
{
key
:
'_getPublishVideoPath'
,
value
:
function
_getPublishVideoPath
(
_param
)
{
if
(
_video_ape
)
{
return
_video_ape
.
p
ublishVideoPath
(
_param
);
return
_video_ape
.
getP
ublishVideoPath
(
_param
);
}
else
{
return
{
"code"
:
1
,
"data"
:
"获取推流地址失败"
};
}
...
...
@@ -1057,19 +1064,37 @@ return /******/ (function(modules) { // webpackBootstrap
// 添加标注,发送信息
},
{
key
:
'_sendAnnotaion'
,
value
:
function
_sendAnnotaion
(
_param
)
{
key
:
'_sendInsertAnnotaion'
,
value
:
function
_sendInsertAnnotaion
(
_param
)
{
if
(
_whiteboard_ape
)
{
_whiteboard_ape
.
sendInsetAnnotaion
(
_param
);
}
}
//更新标注,发送信息
},
{
key
:
'_sendUpdaterAnnotaion'
,
value
:
function
_sendUpdaterAnnotaion
(
_param
)
{
if
(
_whiteboard_ape
)
{
_whiteboard_ape
.
sendAnnotaion
(
_param
);
_whiteboard_ape
.
send
Updater
Annotaion
(
_param
);
}
}
//删除标注,发送信息
},
{
key
:
'_deleteAnnotaion'
,
value
:
function
_deleteAnnotaion
(
_param
)
{
key
:
'_sendDeleteAnnotaion'
,
value
:
function
_sendDeleteAnnotaion
(
_param
)
{
if
(
_whiteboard_ape
)
{
_whiteboard_ape
.
sendDeleteAnnotaion
(
_param
);
}
}
//删除所有标注
},
{
key
:
'_sendDeleteAllAnnotation'
,
value
:
function
_sendDeleteAllAnnotation
(
_param
)
{
if
(
_whiteboard_ape
)
{
_whiteboard_ape
.
deleteAnnota
ion
(
_param
);
_whiteboard_ape
.
sendDeleteAllAnnotat
ion
(
_param
);
}
}
...
...
@@ -13430,7 +13455,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
_default
=
"\n//start\n// pdu_def.proto\n\n// syntax = \"proto3\";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n DP_TOP = 0;\n DP_HIGH = 1;\n DP_MEDIUM = 2;\n DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n SEG_BEGIN = 0;\n SEG_END = 1;\n SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n TS_NOT_IN_USE = 0;\n TS_SELF_GRABBED = 1;\n TS_OTHER_GRABBED = 2;\n TS_SELF_INHIBITED = 3;\n TS_OTHER_INHIBITED = 4;\n TS_SELF_RECIPIENT = 5;\n TS_SELF_GIVING = 6;\n TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n RCPDU_ROSTER_UPDATE_INDICATION = 60;\n RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n // MCS PDU\n RCPDU_SESSION_JOIN_REQUEST = 90;\n RCPDU_SESSION_JOIN_RESPONSE = 91;\n RCPDU_CHANNEL_GRAB_REQUEST = 100;\n RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n RCPDU_CHANNEL_GRAB_INDICATION = 102;\n RCPDU_CHANNEL_JOIN_REQUEST = 103;\n RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n RCPDU_SEND_DATA_REQUEST = 120;\n RCPDU_SEND_DATA_INDICATION = 121;\n RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n RCPDU_TOKEN_GRAB_REQUEST = 130;\n RCPDU_TOKEN_GRAB_CONFIRM = 131;\n RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n RCPDU_TOKEN_GIVE_REQUEST = 134;\n RCPDU_TOKEN_GIVE_INDICATION = 135;\n RCPDU_TOKEN_GIVE_RESPONSE = 136;\n RCPDU_TOKEN_GIVE_CONFIRM = 137;\n RCPDU_TOKEN_PLEASE_REQUEST = 138;\n RCPDU_TOKEN_PLEASE_INDICATION = 139;\n RCPDU_TOKEN_RELEASE_REQUEST = 140;\n RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n RCPDU_TOKEN_TEST_REQUEST = 142;\n RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n // Registry PDU\n RCPDU_REG_REGISTER_KEY = 200;\n RCPDU_REG_UNREGISTER_KEY = 201;\n RCPDU_REG_REGISTER_ROSTER = 202;\n RCPDU_REG_REGISTER_TOKEN = 203;\n RCPDU_REG_REGISTER_PARAMETER = 204;\n RCPDU_REG_REGISTER_COUNTER = 205;\n RCPDU_REG_REGISTER_TABLE = 206;\n RCPDU_REG_REGISTER_CACHE = 207;\n RCPDU_REG_REGISTER_OBJ = 208;\n RCPDU_REG_UNREGISTER_OBJ = 209;\n RCPDU_REG_UPDATE_OBJ = 210;\n RCPDU_REG_ADAPTER = 211;\n RCPDU_REG_CLEANUP_NODE = 212;\n RCPDU_REG_REGISTER_QUEUE = 213;\n\n // Registry Obj update PDU\n RCPDU_REG_TABLE_INSERT_PDU = 230;\n RCPDU_REG_TABLE_DELETE_PDU = 231;\n RCPDU_REG_TABLE_UPDATE_PDU = 232;\n RCPDU_REG_ROSTER_INSERT_PDU = 240;\n RCPDU_REG_ROSTER_DELETE_PDU = 241;\n RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n RCPDU_REG_QUEUE_INSERT_PDU = 255;\n RCPDU_REG_QUEUE_DELETE_PDU = 256;\n RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n // data\n RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n RCPDU_VOTING_POLL_RECORD = 265;\n\n // Registry resource request or response PDU\n RCPDU_REG_REQUEST_OBJ = 290;\n RCPDU_REG_RESPONSE_OBJ = 291;\n RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n // Index exchange\n RCPDU_INDEX_ADAPTER = 300;\n RCPDU_INDEX_SERVER_USERS = 301;\n RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n RCPDU_INDEX_CONFERENCE_USERS = 304;\n}\n\nenum RCPduNodeType_E {\n NT_TERMINAL = 0;\n NT_MULTIPORT_TERMINAL = 1;\n NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n RSN_USERINITIATED = 0;\n RSN_DISCONNECTED = 1;\n RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n RET_SUCCESS = 0;\n RET_USER_REJECTED = 1;\n RET_INVALID_CONFERENCE = 2;\n RET_INVALID_PASSWORD = 3;\n RET_INVALID_CONVENER_PASSWORD = 4;\n RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n RET_INVALID_CHALLENGE_RESPONSE = 6;\n RET_NO_CONNECTION = 7;\n RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n NC_CONVENTIONAL = 0;\n NC_COUNTED = 1;\n NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n required uint32 id = 1;\n required bytes name = 2;\n optional bytes description = 3;\n //optional string net_address = 4;\n optional uint32 mode = 4;\n optional string password = 5;\n optional uint32 capacity = 6;\n optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n required uint32 id = 1;\n optional uint32 superior_node = 2;\n required RCPduNodeType_E type = 3;\n required string name = 4;\n required uint32 capability = 5;\n optional string net_address = 6;\n optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n required uint32 id = 1; // session id\n required string name = 2;\n required string tag = 3;\n repeated uint32 channel_ids = 4 [packed = true];\n optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n optional RCPduType_E type = 1;\n required uint32 obj_id = 2;\n required string name = 3;\n required string tag = 4;\n optional uint32 owner = 5;\n optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n required RCPduType_E type = 1;\n required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n required uint32 item_idx = 1;\n required uint32 owner = 2;\n required bytes item_data = 3;\n
}\n\nmessage RCRegistryTableInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\n\nmessage RCRegistryRosterInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\n//message RCCleanupNodePdu\n//{\n// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];\n// required uint32 node_id = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n required uint32 value = 2 [default = 0];\n optional uint32 begin_bit = 3 [default = 31];\n optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n required uint32 owner = 1;\n required uint32 item_id = 2;\n optional bytes item_data = 3;\n optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n required uint32 start = 2;\n required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes session_data = 5; //\u805A\u5408\u5728\u4E00\u8D77\u7684registry\u4FE1\u606F\n}\n\nmessage RCSessionJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n required uint32 id = 2;\n optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n required uint32 initiator = 2;\n optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n required uint32 initiator = 2;\n repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n required RCPduType_E sub_type = 2;\n required uint32 initiator = 3;\n required uint32 conf_id = 4;\n required uint32 session_id = 5;\n required uint32 channel_id = 6;\n required bool upward = 7;\n required bool reliability = 8;\n required RCPduPriority_E priority = 9;\n required bytes data = 10;\n optional uint32 peer = 11;\n optional RCPduSegment_E seg = 12;\n optional uint32 total_size = 13;\n optional uint32 site_id = 14;\n optional string user_id = 15;\n optional string user_name = 16;\n optional string user_role = 17;\n optional string device_type = 18;\n optional string site = 19;\n}\n\n// Token management\nmessage RCTokenGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n required uint32 initiator = 2;\n required RCPduNodeType_E node_type = 3;\n required RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n required uint32 conf_id = 2;\n required RCPduResult_E result = 3;\n optional RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n required uint32 initiator = 2;\n required RCConferenceDescriptorPdu conf_desc = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n required RCPduResult_E result = 2;\n optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n required uint32 ejected_node_id = 2;\n required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n required bool full_refresh = 2; // Conference Roster and all\n repeated RCNodeRecordPdu node_record = 3;\n repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n required uint32 from_role = 5;\n required bytes from_name = 6;\n}\n\nmessage RCChatSendH5DataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required string user_data = 4;\n required string from_role = 5;\n required string from_name = 6;\n}\n\nmessage RCDocSendDataRequestPdu {\n required int32 id = 1;\n required string doc_type = 2;\n required string uri = 3;\n optional int32 owner = 4;\n optional int32 from = 5;\n optional string name = 6;\n optional int32 cur_page_no = 7;\n optional int32 cur_H = 8;\n optional int32 cur_V = 9;\n optional int32 scale = 10;\n optional int32 page_num = 11;\n}\n\nmessage RCGiftSendDataRequestPdu {\n optional uint32 initiator = 1;\n required uint32 peer = 2;\n required uint32 index = 3;\n required uint32 num = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bytes user_data = 2;\n}\n\nmessage RCVideoSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bool key_frame = 2;\n required uint32 sequence_id = 3;\n required uint32 slice_id = 4;\n required bytes user_data = 5;\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n required uint32 status = 1;\n required uint32 device_id = 2;\n required uint32 framerate = 3;\n required uint32 bitrate = 4;\n required uint32 codec = 5;\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n optional uint32 status = 1;\n optional uint32 device_id = 2;\n optional uint32 width = 3;\n optional uint32 height = 4;\n optional uint32 framerate = 5;\n optional uint32 bitrate = 6;\n optional uint32 codec = 7;\n optional string peer_id = 8;\n optional string url = 9;\n optional uint32 type = 10;\n optional string shamlive = 11;\n optional uint32 livetype = 12;\n optional uint32 releaseGrab = 13;\n optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n required uint32 node_id = 1;\n required string name = 2;\n required uint32 role = 3;\n required uint32 level = 4;\n repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n optional uint32 status = 7;\n optional bytes user_data = 8;\n optional string user_id = 9;\n optional uint32 handUpTime = 10;\n optional uint32 deviceType = 11;\n optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n required bool timer = 1;\n optional uint32 time_limit = 2;\n optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n required string title = 1;\n required string content = 2;\n optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n required uint32 index = 1;\n required uint32 type = 2;\n required string title = 3;\n repeated string options = 4;\n optional uint32 score = 5;\n optional uint32 time_limit = 6;\n optional string restrict_input = 7;\n optional uint32 char_limit = 8;\n optional string answer = 9;\n repeated uint32 selections = 10;\n repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n required RCVotingPollSettingsPdu settings = 1;\n required string title = 2;\n repeated RCVotingPollResultPdu results = 3;\n repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n optional string qq = 1;\n optional string skype = 2;\n optional string mobile = 3;\n}\n\nmessage RCWhiteboardDataRequestPdu {\n required uint32 id = 1;\n required uint32 type = 2;\n required uint32 initiator = 3;\n optional bytes action = 4;\n optional uint32 uncomprLen = 5;\n}\n\nmessage RCTabUpdateDataRequestPdu {\n optional uint32 id = 1;\n optional bytes action = 2;\n optional uint32 uncomprLen =3;\n}\n\n
\n\n//end\n"
;
var
_default
=
"\n//start\n// pdu_def.proto\n\n// syntax = \"proto3\";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n DP_TOP = 0;\n DP_HIGH = 1;\n DP_MEDIUM = 2;\n DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n SEG_BEGIN = 0;\n SEG_END = 1;\n SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n TS_NOT_IN_USE = 0;\n TS_SELF_GRABBED = 1;\n TS_OTHER_GRABBED = 2;\n TS_SELF_INHIBITED = 3;\n TS_OTHER_INHIBITED = 4;\n TS_SELF_RECIPIENT = 5;\n TS_SELF_GIVING = 6;\n TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n RCPDU_ROSTER_UPDATE_INDICATION = 60;\n RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n // MCS PDU\n RCPDU_SESSION_JOIN_REQUEST = 90;\n RCPDU_SESSION_JOIN_RESPONSE = 91;\n RCPDU_CHANNEL_GRAB_REQUEST = 100;\n RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n RCPDU_CHANNEL_GRAB_INDICATION = 102;\n RCPDU_CHANNEL_JOIN_REQUEST = 103;\n RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n RCPDU_SEND_DATA_REQUEST = 120;\n RCPDU_SEND_DATA_INDICATION = 121;\n RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n RCPDU_TOKEN_GRAB_REQUEST = 130;\n RCPDU_TOKEN_GRAB_CONFIRM = 131;\n RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n RCPDU_TOKEN_GIVE_REQUEST = 134;\n RCPDU_TOKEN_GIVE_INDICATION = 135;\n RCPDU_TOKEN_GIVE_RESPONSE = 136;\n RCPDU_TOKEN_GIVE_CONFIRM = 137;\n RCPDU_TOKEN_PLEASE_REQUEST = 138;\n RCPDU_TOKEN_PLEASE_INDICATION = 139;\n RCPDU_TOKEN_RELEASE_REQUEST = 140;\n RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n RCPDU_TOKEN_TEST_REQUEST = 142;\n RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n // Registry PDU\n RCPDU_REG_REGISTER_KEY = 200;\n RCPDU_REG_UNREGISTER_KEY = 201;\n RCPDU_REG_REGISTER_ROSTER = 202;\n RCPDU_REG_REGISTER_TOKEN = 203;\n RCPDU_REG_REGISTER_PARAMETER = 204;\n RCPDU_REG_REGISTER_COUNTER = 205;\n RCPDU_REG_REGISTER_TABLE = 206;\n RCPDU_REG_REGISTER_CACHE = 207;\n RCPDU_REG_REGISTER_OBJ = 208;\n RCPDU_REG_UNREGISTER_OBJ = 209;\n RCPDU_REG_UPDATE_OBJ = 210;\n RCPDU_REG_ADAPTER = 211;\n RCPDU_REG_CLEANUP_NODE = 212;\n RCPDU_REG_REGISTER_QUEUE = 213;\n\n // Registry Obj update PDU\n RCPDU_REG_TABLE_INSERT_PDU = 230;\n RCPDU_REG_TABLE_DELETE_PDU = 231;\n RCPDU_REG_TABLE_UPDATE_PDU = 232;\n RCPDU_REG_ROSTER_INSERT_PDU = 240;\n RCPDU_REG_ROSTER_DELETE_PDU = 241;\n RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n RCPDU_REG_QUEUE_INSERT_PDU = 255;\n RCPDU_REG_QUEUE_DELETE_PDU = 256;\n RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n // data\n RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n RCPDU_VOTING_POLL_RECORD = 265;\n\n // Registry resource request or response PDU\n RCPDU_REG_REQUEST_OBJ = 290;\n RCPDU_REG_RESPONSE_OBJ = 291;\n RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n // Index exchange\n RCPDU_INDEX_ADAPTER = 300;\n RCPDU_INDEX_SERVER_USERS = 301;\n RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n RCPDU_INDEX_CONFERENCE_USERS = 304;\n}\n\nenum RCPduNodeType_E {\n NT_TERMINAL = 0;\n NT_MULTIPORT_TERMINAL = 1;\n NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n RSN_USERINITIATED = 0;\n RSN_DISCONNECTED = 1;\n RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n RET_SUCCESS = 0;\n RET_USER_REJECTED = 1;\n RET_INVALID_CONFERENCE = 2;\n RET_INVALID_PASSWORD = 3;\n RET_INVALID_CONVENER_PASSWORD = 4;\n RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n RET_INVALID_CHALLENGE_RESPONSE = 6;\n RET_NO_CONNECTION = 7;\n RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n NC_CONVENTIONAL = 0;\n NC_COUNTED = 1;\n NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n required uint32 id = 1;\n required bytes name = 2;\n optional bytes description = 3;\n //optional string net_address = 4;\n optional uint32 mode = 4;\n optional string password = 5;\n optional uint32 capacity = 6;\n optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n required uint32 id = 1;\n optional uint32 superior_node = 2;\n required RCPduNodeType_E type = 3;\n required string name = 4;\n required uint32 capability = 5;\n optional string net_address = 6;\n optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n required uint32 id = 1; // session id\n required string name = 2;\n required string tag = 3;\n repeated uint32 channel_ids = 4 [packed = true];\n optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n optional RCPduType_E type = 1;\n required uint32 obj_id = 2;\n required string name = 3;\n required string tag = 4;\n optional uint32 owner = 5;\n optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n required RCPduType_E type = 1;\n required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n required uint32 item_idx = 1;\n required uint32 owner = 2;\n required bytes item_data = 3;\n
optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryWBUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCWhiteboardDataRequestPdu items = 2;\n}\n//message RCCleanupNodePdu\n//{\n// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];\n// required uint32 node_id = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n required uint32 value = 2 [default = 0];\n optional uint32 begin_bit = 3 [default = 31];\n optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n required uint32 owner = 1;\n required uint32 item_id = 2;\n optional bytes item_data = 3;\n optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n required uint32 start = 2;\n required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes session_data = 5; //\u805A\u5408\u5728\u4E00\u8D77\u7684registry\u4FE1\u606F\n}\n\nmessage RCSessionJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n required uint32 id = 2;\n optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n required uint32 initiator = 2;\n optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n required uint32 initiator = 2;\n repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n required RCPduType_E sub_type = 2;\n required uint32 initiator = 3;\n required uint32 conf_id = 4;\n required uint32 session_id = 5;\n required uint32 channel_id = 6;\n required bool upward = 7;\n required bool reliability = 8;\n required RCPduPriority_E priority = 9;\n required bytes data = 10;\n optional uint32 peer = 11;\n optional RCPduSegment_E seg = 12;\n optional uint32 total_size = 13;\n optional uint32 site_id = 14;\n optional string user_id = 15;\n optional string user_name = 16;\n optional string user_role = 17;\n optional string device_type = 18;\n optional string site = 19;\n}\n\n// Token management\nmessage RCTokenGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n required uint32 initiator = 2;\n required RCPduNodeType_E node_type = 3;\n required RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n required uint32 conf_id = 2;\n required RCPduResult_E result = 3;\n optional RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n required uint32 initiator = 2;\n required RCConferenceDescriptorPdu conf_desc = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n required RCPduResult_E result = 2;\n optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n required uint32 ejected_node_id = 2;\n required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n required bool full_refresh = 2; // Conference Roster and all\n repeated RCNodeRecordPdu node_record = 3;\n repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n required uint32 from_role = 5;\n required bytes from_name = 6;\n}\n\nmessage RCChatSendH5DataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required string user_data = 4;\n required string from_role = 5;\n required string from_name = 6;\n}\n\nmessage RCDocSendDataRequestPdu {\n required int32 id = 1;\n required string doc_type = 2;\n required string uri = 3;\n optional int32 owner = 4;\n optional int32 from = 5;\n optional string name = 6;\n optional int32 cur_page_no = 7;\n optional int32 cur_H = 8;\n optional int32 cur_V = 9;\n optional int32 scale = 10;\n optional int32 page_num = 11;\n}\n\nmessage RCGiftSendDataRequestPdu {\n optional uint32 initiator = 1;\n required uint32 peer = 2;\n required uint32 index = 3;\n required uint32 num = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bytes user_data = 2;\n}\n\nmessage RCVideoSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bool key_frame = 2;\n required uint32 sequence_id = 3;\n required uint32 slice_id = 4;\n required bytes user_data = 5;\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n required uint32 status = 1;\n required uint32 device_id = 2;\n required uint32 framerate = 3;\n required uint32 bitrate = 4;\n required uint32 codec = 5;\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n optional uint32 status = 1;\n optional uint32 device_id = 2;\n optional uint32 width = 3;\n optional uint32 height = 4;\n optional uint32 framerate = 5;\n optional uint32 bitrate = 6;\n optional uint32 codec = 7;\n optional string peer_id = 8;\n optional string url = 9;\n optional uint32 type = 10;\n optional string shamlive = 11;\n optional uint32 livetype = 12;\n optional uint32 releaseGrab = 13;\n optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n required uint32 node_id = 1;\n required string name = 2;\n required uint32 role = 3;\n required uint32 level = 4;\n repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n optional uint32 status = 7;\n optional bytes user_data = 8;\n optional string user_id = 9;\n optional uint32 handUpTime = 10;\n optional uint32 deviceType = 11;\n optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n required bool timer = 1;\n optional uint32 time_limit = 2;\n optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n required string title = 1;\n required string content = 2;\n optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n required uint32 index = 1;\n required uint32 type = 2;\n required string title = 3;\n repeated string options = 4;\n optional uint32 score = 5;\n optional uint32 time_limit = 6;\n optional string restrict_input = 7;\n optional uint32 char_limit = 8;\n optional string answer = 9;\n repeated uint32 selections = 10;\n repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n required RCVotingPollSettingsPdu settings = 1;\n required string title = 2;\n repeated RCVotingPollResultPdu results = 3;\n repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n optional string qq = 1;\n optional string skype = 2;\n optional string mobile = 3;\n}\nmessage RCTabUpdateDataRequestPdu {\n optional uint32 id = 1;\n optional bytes action = 2;\n optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteboardDataRequestPdu {\n required uint32 id = 1;\n required uint32 type = 2;\n required uint32 initiator = 3;\n optional bytes action = 4;\n optional uint32 uncomprLen = 5;\n}\n\nmessage RCWhiteBoardData {\n required uint32 id= 1;\n required uint32 initiator=2;\n optional string data= 3;\n optional uint32 type= 4;\n}
\n\n//end\n"
;
exports
.
default
=
_default
;
;
...
...
@@ -13971,10 +13996,10 @@ return /******/ (function(modules) { // webpackBootstrap
}
},
{
key
:
'tableUpdateHandler'
,
value
:
function
tableUpdateHandler
(
owner
,
recordId
,
record
Data
)
{
value
:
function
tableUpdateHandler
(
owner
,
itemIdx
,
item
Data
)
{
loger
.
log
(
"更新人员列表数据 tableUpdateHandler"
);
try
{
var
tabUpdatePdu
=
_pdus2
.
default
.
RCTabUpdateDataRequestPdu
.
decode
(
record
Data
);
var
tabUpdatePdu
=
_pdus2
.
default
.
RCTabUpdateDataRequestPdu
.
decode
(
item
Data
);
var
uncompressedBytes
=
new
_zlib
.
Zlib
.
Inflate
(
tabUpdatePdu
.
action
.
compact
().
view
).
decompress
();
var
tabInfo
=
_utf2
.
default
.
getStringFromBytes
(
uncompressedBytes
);
var
tabTypeMatches
=
tabInfo
.
match
(
/<TabType>
(
.+
)
<
\/
TabType>/
);
...
...
@@ -14223,8 +14248,9 @@ return /******/ (function(modules) { // webpackBootstrap
var
regPdu
=
_pdus2
.
default
[
'RCAdapterPdu'
].
decode
(
regBuffer
);
var
regItems
=
regPdu
.
item
;
var
regItemSize
=
regItems
.
length
;
loger
.
log
(
this
.
_session_name
+
'数据同步消息'
);
loger
.
log
(
this
.
_session_name
+
'数据同步消息.同步条数'
,
regItemSize
);
//console.log(regPdu);
for
(
var
i
=
0
;
i
<
regItemSize
;
++
i
)
{
var
regItem
=
regItems
[
i
];
...
...
@@ -14248,7 +14274,7 @@ return /******/ (function(modules) { // webpackBootstrap
var
object_id
=
regUpdatedItem
.
objId
;
var
user_data
=
regUpdatedItem
.
userData
;
loger
.
log
(
'REG OBJECT EVENT ->'
,
_pdus2
.
default
.
id2type
(
sub_type
));
loger
.
log
(
'REG OBJECT EVENT ->'
,
_pdus2
.
default
.
id2type
(
sub_type
)
,
regUpdatedItem
);
switch
(
sub_type
)
{
case
_pdus2
.
default
.
RCPDU_REG_ROSTER_INSERT_PDU
:
var
rosterInsertData
=
_pdus2
.
default
[
'RCRegstryRosterInsertItemPdu'
].
decode
(
user_data
);
...
...
@@ -14282,17 +14308,27 @@ return /******/ (function(modules) { // webpackBootstrap
var
tableInsertItemsLen
=
tableInsertItems
.
length
;
for
(
var
_i3
=
0
;
_i3
<
tableInsertItemsLen
;
++
_i3
)
{
var
insertItem
=
tableInsertItems
[
_i3
];
console
.
log
(
"insertItem"
,
insertItem
);
this
.
tableInsertHandler
(
insertItem
.
owner
,
insertItem
.
itemIdx
,
insertItem
.
itemData
);
}
break
;
case
_pdus2
.
default
.
RCPDU_REG_TABLE_DELETE_PDU
:
var
tableDeleteData
=
_pdus2
.
default
[
'RCRegistryTableDeleteItemPdu'
].
decode
(
user_data
);
console
.
log
(
"tableDeleteData"
,
object_id
,
tableDeleteData
);
this
.
tableDeleteHandler
(
object_id
,
tableDeleteData
);
break
;
case
_pdus2
.
default
.
RCPDU_REG_TABLE_UPDATE_PDU
:
/* let tableUpdateData1 = pdu['RCRegistryWBUpdateItemPdu'].decode(user_data);
let rosterUpdateItems1 = tableUpdateData1.items;
let rosterUpdateItemsLen1 = rosterUpdateItems1.length;
console.log("RCRegistryWBUpdateItemPdu "+rosterUpdateItemsLen1);
console.log(rosterUpdateItems1);*/
var
tableUpdateData
=
_pdus2
.
default
[
'RCRegistryTableUpdateItemPdu'
].
decode
(
user_data
);
var
tableUpdateItems
=
tableUpdateData
.
items
;
var
tableUpdateItemsLen
=
tableUpdateItems
.
length
;
console
.
log
(
"RCRegistryTableUpdateItemPdu "
+
tableUpdateItemsLen
);
console
.
log
(
tableUpdateData
);
for
(
var
_i4
=
0
;
_i4
<
tableUpdateItemsLen
;
++
_i4
)
{
var
tableItem
=
tableUpdateItems
[
_i4
];
this
.
tableUpdateHandler
(
tableItem
.
owner
,
tableItem
.
itemIdx
,
tableItem
.
itemData
);
...
...
@@ -14404,7 +14440,7 @@ return /******/ (function(modules) { // webpackBootstrap
this
.
_adapter_pdu
.
item
.
push
(
adapterItemPdu
);
}
// 注册Object对象
// 注册Object对象
等同于flash中的 RCRegistryOperator
},
{
key
:
'registerObj'
,
...
...
@@ -15370,17 +15406,16 @@ return /******/ (function(modules) { // webpackBootstrap
}
},
{
key
:
'tableUpdateHandler'
,
value
:
function
tableUpdateHandler
(
ownerId
,
channelId
,
channelInfo
)
{
value
:
function
tableUpdateHandler
(
owner
,
itemIdx
,
itemData
)
{
// debugger;
var
videoChannelInfo
=
_pdus2
.
default
[
'RCVideoChannelInfoRecordPdu'
].
decode
(
channelInfo
);
videoChannelInfo
.
owner
=
ownerId
;
videoChannelInfo
.
channelId
=
channelId
;
videoChannelInfo
.
status
=
ownerId
===
0
?
_ApeConsts2
.
default
.
CGS_RELEASED
:
videoChannelInfo
.
status
;
var
videoChannelInfo
=
_pdus2
.
default
[
'RCVideoChannelInfoRecordPdu'
].
decode
(
itemData
);
videoChannelInfo
.
owner
=
owner
;
videoChannelInfo
.
channelId
=
itemIdx
;
videoChannelInfo
.
status
=
owner
===
0
?
_ApeConsts2
.
default
.
CGS_RELEASED
:
videoChannelInfo
.
status
;
loger
.
log
(
'视频消息处理 tableUpdateHandler.'
,
videoChannelInfo
);
this
.
videoChannels
[
channelId
]
=
videoChannelInfo
;
this
.
videoChannels
[
itemIdx
]
=
videoChannelInfo
;
switch
(
videoChannelInfo
.
status
)
{
case
_ApeConsts2
.
default
.
CGS_RELEASED
:
case
_ApeConsts2
.
default
.
CGS_PENDING
:
...
...
@@ -15524,9 +15559,9 @@ return /******/ (function(modules) { // webpackBootstrap
}
},
{
key
:
'tableUpdateHandler'
,
value
:
function
tableUpdateHandler
(
owner
,
recordId
,
record
Data
)
{
value
:
function
tableUpdateHandler
(
owner
,
itemIdx
,
item
Data
)
{
try
{
var
recordInfo
=
_pdus2
.
default
[
'RCDocSendDataRequestPdu'
].
decode
(
record
Data
);
var
recordInfo
=
_pdus2
.
default
[
'RCDocSendDataRequestPdu'
].
decode
(
item
Data
);
recordInfo
.
type
=
_ApeConsts2
.
default
.
DOCUMENT_LOAD
;
recordInfo
.
ext
=
recordInfo
.
name
.
substr
(
recordInfo
.
name
.
indexOf
(
'.'
)
+
1
);
...
...
@@ -15542,7 +15577,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
this
.
docList
[
recordId
]
=
recordInfo
;
this
.
_emit
(
_MessageTypes2
.
default
.
DOC_UPDATE
,
recordInfo
);
loger
.
log
(
'Doc update ->'
+
recordId
);
loger
.
log
(
'Doc update ->'
+
itemIdx
);
}
catch
(
e
)
{
loger
.
warn
(
'Doc Table Update Decode包异常'
);
}
...
...
@@ -15635,6 +15670,8 @@ return /******/ (function(modules) { // webpackBootstrap
var
loger
=
_Loger2
.
default
.
getLoger
(
'WhiteBoardApe'
);
var
insertIdx
=
1
;
//table插入新数据的计数id
var
WhiteBoardApe
=
function
(
_Ape
)
{
_inherits
(
WhiteBoardApe
,
_Ape
);
...
...
@@ -15652,138 +15689,226 @@ return /******/ (function(modules) { // webpackBootstrap
// ape listeners
_this
.
on
(
_pdus2
.
default
.
RCPDU_CONFERENCE_SEND_DATA_REQUEST
,
_this
.
whiteboardMsgComingHandler
.
bind
(
_this
));
_this
.
on
(
_pdus2
.
default
.
RCPDU_SESSION_JOIN_RESPONSE
,
_this
.
_joinSessionHandler
.
bind
(
_this
));
// 白板延迟
_this
.
_apeDelayed
=
true
;
return
_this
;
}
// 添加标注,发送信息
_createClass
(
WhiteBoardApe
,
[{
key
:
'_joinSessionHandler'
,
value
:
function
_joinSessionHandler
(
confInfo
)
{
loger
.
log
(
"RCPDU_SESSION_JOIN_RESPONSE"
);
}
/////////////发送数据操作//////////////////////////////////////////////////////
// 添加标注,发送信息
_createClass
(
WhiteBoardApe
,
[{
key
:
'sendAnnotaion'
,
value
:
function
sendAnnotaion
(
_param
)
{
//var objPoint={
// "type":0,
// "id":111111,
// "color":0,
// "thickness":0,
// "radius":0,
// "text":0,
// "fontS":0,
// "fontN":0,
// "pointD":[]
//};
//message RCWhiteboardDataRequest2Pdu {
// required uint32 id = 1;
// required uint32 type = 2;
// required uint32 initiator = 3;
// required bytes drawData = 4;
//}
//message RCWhiteboardCurveLinePdu {
// required uint32 color = 1;
// required uint32 thickness = 2;
// required string pointData = 3;
//}
//
//var coverLine=new pdu['RCWhiteboardCurveLinePdu'];
//coverLine.color=0xff00ff;
//coverLine.thickness=2;
//coverLine.pointData="白板数据测试测试";
//
//var sendData=new pdu['RCWhiteboardDataRequest2Pdu'];
//sendData.id=parseInt(Date.now() / 1000);
//sendData.type=pdu.RCPDU_AUDIO_SEND_DATA_REQUEST;
//sendData.initiator = this._confInfo.nodeId;//发起人
//sendData.peer = parseInt(101);//发送给谁,公聊的时候是0,私聊的时候是指定的用户id
//sendData.isPublic = true;
//sendData.drawData=coverLine.toArrayBuffer();
//console.log("白板发送数据=============================");
//this.sendUniform(sendData);
},
{
key
:
'sendInsetAnnotaion'
,
value
:
function
sendInsetAnnotaion
(
_param
)
{
insertIdx
=
parseInt
(
Date
.
now
()
/
1000
);
var
whiteBoardModelPdu
=
new
_pdus2
.
default
[
'RCWhiteBoardData'
]();
whiteBoardModelPdu
.
id
=
insertIdx
;
whiteBoardModelPdu
.
initiator
=
_GlobalConfig2
.
default
.
nodeId
;
whiteBoardModelPdu
.
data
=
"白板数据 "
+
insertIdx
;
whiteBoardModelPdu
.
type
=
3
;
//required uint32 id= 1;
//required uint32 initiator=2;
//optional string data= 3;
//optional uint32 type= 4;
//RCWhiteBoardData
//com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int
//public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void
//registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO
//tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID
//tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID+insertIdx;
//insertIdx++;
var
tableItemPdu
=
new
_pdus2
.
default
[
'RCRegistryTableItemPdu'
]();
tableItemPdu
.
itemIdx
=
insertIdx
;
//直接用时间戳作为id
tableItemPdu
.
registerObjId
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
tableItemPdu
.
owner
=
0
;
//收到flash的是这个值,不清楚先写固定
//tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();
tableItemPdu
.
itemData
=
whiteBoardModelPdu
.
toArrayBuffer
();
//console.log("解析");
//console.log(pdu['RCWhiteBoardData'].decode(tableItemPdu.itemData));
/* message RCRegistryTableItemPdu {
required uint32 item_idx = 1;
required uint32 owner = 2;
required bytes item_data = 3;
}*/
//insert
var
tableInsertItemPdu
=
new
_pdus2
.
default
[
'RCRegistryTableInsertItemPdu'
]();
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
//repeated RCRegistryTableItemPdu items = 2;
tableInsertItemPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_TABLE_INSERT_PDU
;
//
tableInsertItemPdu
.
items
.
push
(
tableItemPdu
);
var
chatSendPdu
=
new
_pdus2
.
default
[
'RCChatSendDataRequestPdu'
]();
chatSendPdu
.
type
=
_pdus2
.
default
.
RCPDU_CONFERENCE_SEND_DATA_REQUEST
;
chatSendPdu
.
initiator
=
this
.
_confInfo
.
nodeId
;
//发起人
chatSendPdu
.
peer
=
parseInt
(
0
);
//发送给谁,公聊的时候是0,私聊的时候是指定的用户id
chatSendPdu
.
isPublic
=
true
;
chatSendPdu
.
userData
=
this
.
_rCArrayBufferUtil
.
strToUint8Array
(
"h5"
+
"白板测试"
);
chatSendPdu
.
fromName
=
this
.
_rCArrayBufferUtil
.
strToUint8Array
(
"h5"
+
this
.
_confInfo
.
userName
);
chatSendPdu
.
fromRole
=
this
.
_confInfo
.
classRole
;
var
updateObjPdu
=
new
_pdus2
.
default
[
'RCRegistryUpdateObjPdu'
]();
updateObjPdu
.
objId
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
tableInsertItemPdu
.
type
;
updateObjPdu
.
userData
=
tableInsertItemPdu
.
toArrayBuffer
();
//同步
var
adapterItemPdu
=
new
_pdus2
.
default
[
'RCAdapterItemPdu'
]();
adapterItemPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
chatSend
Pdu
.
toArrayBuffer
();
adapterItemPdu
.
itemData
=
updateObj
Pdu
.
toArrayBuffer
();
var
adapterPdu
=
new
_pdus2
.
default
[
'RCAdapterPdu'
]();
adapterPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"白板
发送数据=============================QQ"
);
console
.
log
(
"白板
insert数据======111111111111=tableItemPdu.itemIdx="
+
tableItemPdu
.
itemIdx
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
//删除所有标注
// this.sendUniform(chatSendPdu);
//if (!(chatSendPdu.isPublic || 0 === chatSendPdu.peer)) {
// //发送给制定的人
// this.send(chatSendPdu);
//} else {
// //发送给所有人
// this.sendUniform(chatSendPdu);
//}
},
{
key
:
'sendDeleteAllAnnotation'
,
value
:
function
sendDeleteAllAnnotation
(
_param
)
{
var
len
=
0
;
for
(
var
key
in
this
.
annoInfos
)
{
console
.
log
(
"key:"
+
key
);
console
.
log
(
"删除白板数据,itemIdx:"
+
this
.
annoInfos
[
key
]);
this
.
sendDeleteAnnotaion
({
"itemIdx"
:
key
});
}
}
//删除标注,发送信息
},
{
key
:
'deleteAnnotaion'
,
value
:
function
deleteAnnotaion
(
_param
)
{}
key
:
'sendDeleteAnnotaion'
,
value
:
function
sendDeleteAnnotaion
(
_param
)
{
//delete
var
tableDeleteItemPdu
=
new
_pdus2
.
default
[
'RCRegistryTableDeleteItemPdu'
]();
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];
// repeated uint32 item_idx = 2;
tableDeleteItemPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_TABLE_DELETE_PDU
;
//
tableDeleteItemPdu
.
itemIdx
=
parseInt
(
_param
.
itemIdx
);
//这里需要设置要删除的数据的itemIdx,每条数据的这个id都不一样
var
updateObjPdu
=
new
_pdus2
.
default
[
'RCRegistryUpdateObjPdu'
]();
updateObjPdu
.
objId
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
tableDeleteItemPdu
.
type
;
updateObjPdu
.
userData
=
tableDeleteItemPdu
.
toArrayBuffer
();
//同步
var
adapterItemPdu
=
new
_pdus2
.
default
[
'RCAdapterItemPdu'
]();
adapterItemPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
updateObjPdu
.
toArrayBuffer
();
var
adapterPdu
=
new
_pdus2
.
default
[
'RCAdapterPdu'
]();
adapterPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"白板发送删除数据============="
+
tableDeleteItemPdu
.
itemIdx
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
//更新标注
},
{
key
:
'sendUpdaterAnnotaion'
,
value
:
function
sendUpdaterAnnotaion
(
_param
)
{
var
whiteBoardModelPdu
=
new
_pdus2
.
default
[
'RCWhiteBoardData'
]();
whiteBoardModelPdu
.
id
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
whiteBoardModelPdu
.
initiator
=
_GlobalConfig2
.
default
.
nodeId
;
whiteBoardModelPdu
.
data
=
"白板数据 "
+
insertIdx
;
whiteBoardModelPdu
.
type
=
3
;
var
tableItemPdu
=
new
_pdus2
.
default
[
'RCRegistryTableItemPdu'
]();
/* tableItemPdu.itemIdx =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
tableItemPdu.owner = GlobalConfig.nodeId;
tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();*/
//com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int
//public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void
//registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO
//tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID
tableItemPdu
.
itemIdx
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
tableItemPdu
.
owner
=
0
;
//收到flash的是这个值,不清楚先写固定
tableItemPdu
.
registerObjId
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
tableItemPdu
.
itemData
=
whiteBoardModelPdu
.
toArrayBuffer
();
//updater
var
whiteBoardUpdateItem
=
new
_pdus2
.
default
[
'RCRegistryTableUpdateItemPdu'
]();
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
//repeated RCRegistryTableItemPdu items = 2;
whiteBoardUpdateItem
.
type
=
_pdus2
.
default
.
RCPDU_REG_TABLE_UPDATE_PDU
;
//
whiteBoardUpdateItem
.
items
.
push
(
tableItemPdu
);
var
updateObjPdu
=
new
_pdus2
.
default
[
'RCRegistryUpdateObjPdu'
]();
updateObjPdu
.
objId
=
_ApeConsts2
.
default
.
WHITEBOARD_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
whiteBoardUpdateItem
.
type
;
updateObjPdu
.
userData
=
whiteBoardUpdateItem
.
toArrayBuffer
();
//同步
var
adapterItemPdu
=
new
_pdus2
.
default
[
'RCAdapterItemPdu'
]();
adapterItemPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
updateObjPdu
.
toArrayBuffer
();
var
adapterPdu
=
new
_pdus2
.
default
[
'RCAdapterPdu'
]();
adapterPdu
.
type
=
_pdus2
.
default
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"白板发送更新数据===============22"
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
/////收到消息处理/////////////////////////////////////////////////////////////////////////////////
},
{
key
:
'whiteboardMsgComingHandler'
,
value
:
function
whiteboardMsgComingHandler
(
pdu
)
{
//loger.warn('whiteboardMsgComingHandler needs to be handled.');
console
.
log
(
"白板收到数据=============================QQ"
);
}
},
{
key
:
'wbReceriveHandler'
,
value
:
function
wbReceriveHandler
(
chatBuffer
)
{
console
.
log
(
"白板收到数据=============================QQ"
);
//var chatReceivePdu = pdu['RCChatSendDataRequestPdu'].decode(chatBuffer);
//
//var chatMsg = {};
//chatMsg.fromNodeID = chatReceivePdu.initiator;
//chatMsg.toNodeID = chatReceivePdu.peer;
//chatMsg.message = this._rCArrayBufferUtil.uint8ArrayToStr(chatReceivePdu.userData, 2);
//chatMsg.fromName = this._rCArrayBufferUtil.uint8ArrayToStr(chatReceivePdu.fromName, 2);
//chatMsg.fromRole = chatReceivePdu.fromRole;
//
//loger.log('接收聊天消息.', chatMsg);
//
//this._emit(MessageTypes.CHAT_RECEIVE, chatMsg);
console
.
log
(
"白板收到数据=============================RCPDU_CONFERENCE_SEND_DATA_REQUEST"
);
}
},
{
key
:
'tableInsertHandler'
,
value
:
function
tableInsertHandler
(
tableId
,
record
)
{
this
.
emitDocChange
(
_ApeConsts2
.
default
.
DOCUMENT_DEL
);
value
:
function
tableInsertHandler
(
owner
,
itemIdx
,
itemData
)
{
this
.
annoInfos
[
itemIdx
]
=
itemData
;
console
.
log
(
"白板收到数据==========tableInsertHandler"
);
var
nodeData
=
_pdus2
.
default
[
'RCWhiteBoardData'
].
decode
(
itemData
);
console
.
log
(
"白板收到数据==========tableInsertHandler"
+
nodeData
);
console
.
log
(
nodeData
);
//this.emitDocChange(ApeConsts.DOCUMENT_DEL);
}
},
{
key
:
'tableUpdateHandler'
,
value
:
function
tableUpdateHandler
(
owner
,
recordId
,
recordData
)
{
var
recordInfo
=
_pdus2
.
default
[
'RCWhiteboardDataRequestPdu'
].
decode
(
recordData
);
value
:
function
tableUpdateHandler
(
owner
,
itemIdx
,
itemData
)
{
this
.
annoInfos
[
itemIdx
]
=
itemData
;
console
.
log
(
"白板收到数据===tableUpdateHandler itemData="
+
itemData
);
try
{
console
.
log
(
"白板收到数据===tableUpdateHandler "
);
var
whiteBoardModelPdu
=
_pdus2
.
default
[
'RCWhiteBoardData'
].
decode
(
itemData
);
console
.
log
(
whiteBoardModelPdu
);
}
catch
(
err
)
{
console
.
log
(
"tableUpdateHandler Pdu解析错误,itemIdx="
+
itemIdx
+
" err:"
+
err
.
message
);
}
/*const recordInfo = pdu['RCWhiteboardDataRequestPdu'].decode(recordData);
console.log("recordInfo");
console
.
log
(
recordInfo
);
// 目前只处理 文档标注
if
(
recordInfo
.
type
==
_ApeConsts2
.
default
.
WBA_DOC_ANNOTATION
)
{
var
uncompressedBytes
=
new
_zlib
.
Zlib
.
Inflate
(
recordInfo
.
action
.
compact
().
view
).
decompress
();
var
annoInfo
=
{
loger.log(recordInfo);
// 目前只处理 文档标注
if (recordInfo.type == ApeConsts.WBA_DOC_ANNOTATION) {
const uncompressedBytes = new Zlib.Inflate(recordInfo.action.compact().view).decompress();
const annoInfo = {
id: recordId,
svg
:
_utf2
.
default
.
getStringFromBytes
(
uncompressedBytes
)
svg:
UTF8
.getStringFromBytes(uncompressedBytes)
};
loger.log(annoInfo);
this.annoInfos[recordId] = annoInfo;
this
.
_emit
(
_MessageTypes2
.
default
.
ANNOTATION_UPDATE
,
annoInfo
);
this._emit(
MessageTypes
.ANNOTATION_UPDATE, annoInfo);
} else {
loger
.
log
(
'白板动作忽略,类型:'
,
(
0
,
_ApeConsts2
.
default
)(
recordInfo
.
type
));
}
loger.log('白板动作忽略,类型:', ApeConsts(recordInfo.type));
}*/
}
},
{
key
:
'tableDeleteHandler'
,
value
:
function
tableDeleteHandler
(
object_id
,
tableDeleteData
)
{
console
.
log
(
"白板收到数据=============================tableDeleteHandler"
);
}
}]);
...
...
@@ -15801,6 +15926,8 @@ return /******/ (function(modules) { // webpackBootstrap
__REACT_HOT_LOADER__
.
register
(
loger
,
'loger'
,
'D:/work/McuClient/src/apes/WhiteBoardApe.js'
);
__REACT_HOT_LOADER__
.
register
(
insertIdx
,
'insertIdx'
,
'D:/work/McuClient/src/apes/WhiteBoardApe.js'
);
__REACT_HOT_LOADER__
.
register
(
WhiteBoardApe
,
'WhiteBoardApe'
,
'D:/work/McuClient/src/apes/WhiteBoardApe.js'
);
__REACT_HOT_LOADER__
.
register
(
_default
,
'default'
,
'D:/work/McuClient/src/apes/WhiteBoardApe.js'
);
...
...
src/EngineEntrance.js
查看文件 @
35460c0
...
...
@@ -96,11 +96,18 @@ export default class MessageEntrance extends Emiter {
this
.
leaveClass
=
this
.
_leaveClass
;
this
.
mcuClientStatus
=
this
.
_mcuClientStatus
;
//
a
pe
//
chatA
pe
this
.
sendChatMsg
=
this
.
_sendChatMsg
;
this
.
playVideoPath
=
this
.
_playVideoPath
;
this
.
publishVideoPath
=
this
.
_publishVideoPath
;
this
.
sendAnnotaion
=
this
.
_sendAnnotaion
;
//videoApe
this
.
getPlayVideoPath
=
this
.
_getPlayVideoPath
;
this
.
getPublishVideoPath
=
this
.
_getPublishVideoPath
;
//whiteBoradApe
this
.
sendInsertAnnotaion
=
this
.
_sendInsertAnnotaion
;
this
.
sendUpdaterAnnotaion
=
this
.
_sendUpdaterAnnotaion
;
this
.
sendDeleteAnnotaion
=
this
.
_sendDeleteAnnotaion
;
this
.
sendDeleteAllAnnotation
=
this
.
_sendDeleteAllAnnotation
;
//debug
//this.setDebugData=this._setDebugData;
}
...
...
@@ -285,17 +292,17 @@ export default class MessageEntrance extends Emiter {
}
//VidoeApe
_
p
layVideoPath
(
_param
){
_
getP
layVideoPath
(
_param
){
if
(
_video_ape
){
return
_video_ape
.
p
layVideoPath
(
_param
);
return
_video_ape
.
getP
layVideoPath
(
_param
);
}
else
{
return
{
"code"
:
1
,
"data"
:
"获取播放地址失败"
};
}
}
_
p
ublishVideoPath
(
_param
){
_
getP
ublishVideoPath
(
_param
){
if
(
_video_ape
){
return
_video_ape
.
p
ublishVideoPath
(
_param
);
return
_video_ape
.
getP
ublishVideoPath
(
_param
);
}
else
{
return
{
"code"
:
1
,
"data"
:
"获取推流地址失败"
};
}
...
...
@@ -303,18 +310,29 @@ export default class MessageEntrance extends Emiter {
//WhiteBoardApe
// 添加标注,发送信息
_sendAnnotaion
(
_param
){
_sendInsertAnnotaion
(
_param
){
if
(
_whiteboard_ape
){
_whiteboard_ape
.
sendInsetAnnotaion
(
_param
);
}
}
//更新标注,发送信息
_sendUpdaterAnnotaion
(
_param
){
if
(
_whiteboard_ape
){
_whiteboard_ape
.
sendAnnotaion
(
_param
);
_whiteboard_ape
.
send
Updater
Annotaion
(
_param
);
}
}
//删除标注,发送信息
_
d
eleteAnnotaion
(
_param
){
_
sendD
eleteAnnotaion
(
_param
){
if
(
_whiteboard_ape
){
_whiteboard_ape
.
deleteAnnotaion
(
_param
);
_whiteboard_ape
.
sendDeleteAnnotaion
(
_param
);
}
}
//删除所有标注
_sendDeleteAllAnnotation
(
_param
){
if
(
_whiteboard_ape
){
_whiteboard_ape
.
sendDeleteAllAnnotation
(
_param
);
}
}
// 白板笔记更新(svg)
annoUpdateHandler
(
annoInfo
)
{
...
...
src/apes/Ape.js
查看文件 @
35460c0
...
...
@@ -98,8 +98,9 @@ export default class Ape extends Emiter {
let
regPdu
=
pdu
[
'RCAdapterPdu'
].
decode
(
regBuffer
);
let
regItems
=
regPdu
.
item
;
let
regItemSize
=
regItems
.
length
;
loger
.
log
(
this
.
_session_name
+
'数据同步消息'
);
loger
.
log
(
this
.
_session_name
+
'数据同步消息.同步条数'
,
regItemSize
);
//console.log(regPdu);
for
(
var
i
=
0
;
i
<
regItemSize
;
++
i
)
{
let
regItem
=
regItems
[
i
];
...
...
@@ -123,7 +124,7 @@ export default class Ape extends Emiter {
let
object_id
=
regUpdatedItem
.
objId
;
let
user_data
=
regUpdatedItem
.
userData
;
loger
.
log
(
'REG OBJECT EVENT ->'
,
pdu
.
id2type
(
sub_type
));
loger
.
log
(
'REG OBJECT EVENT ->'
,
pdu
.
id2type
(
sub_type
)
,
regUpdatedItem
);
switch
(
sub_type
)
{
case
pdu
.
RCPDU_REG_ROSTER_INSERT_PDU
:
let
rosterInsertData
=
pdu
[
'RCRegstryRosterInsertItemPdu'
].
decode
(
user_data
);
...
...
@@ -157,17 +158,27 @@ export default class Ape extends Emiter {
let
tableInsertItemsLen
=
tableInsertItems
.
length
;
for
(
let
i
=
0
;
i
<
tableInsertItemsLen
;
++
i
)
{
let
insertItem
=
tableInsertItems
[
i
];
console
.
log
(
"insertItem"
,
insertItem
);
this
.
tableInsertHandler
(
insertItem
.
owner
,
insertItem
.
itemIdx
,
insertItem
.
itemData
);
}
break
;
case
pdu
.
RCPDU_REG_TABLE_DELETE_PDU
:
let
tableDeleteData
=
pdu
[
'RCRegistryTableDeleteItemPdu'
].
decode
(
user_data
);
console
.
log
(
"tableDeleteData"
,
object_id
,
tableDeleteData
);
this
.
tableDeleteHandler
(
object_id
,
tableDeleteData
);
break
;
case
pdu
.
RCPDU_REG_TABLE_UPDATE_PDU
:
/* let tableUpdateData1 = pdu['RCRegistryWBUpdateItemPdu'].decode(user_data);
let rosterUpdateItems1 = tableUpdateData1.items;
let rosterUpdateItemsLen1 = rosterUpdateItems1.length;
console.log("RCRegistryWBUpdateItemPdu "+rosterUpdateItemsLen1);
console.log(rosterUpdateItems1);*/
let
tableUpdateData
=
pdu
[
'RCRegistryTableUpdateItemPdu'
].
decode
(
user_data
);
let
tableUpdateItems
=
tableUpdateData
.
items
;
let
tableUpdateItemsLen
=
tableUpdateItems
.
length
;
let
tableUpdateItemsLen
=
tableUpdateItems
.
length
;
console
.
log
(
"RCRegistryTableUpdateItemPdu "
+
tableUpdateItemsLen
);
console
.
log
(
tableUpdateData
);
for
(
let
i
=
0
;
i
<
tableUpdateItemsLen
;
++
i
)
{
let
tableItem
=
tableUpdateItems
[
i
];
this
.
tableUpdateHandler
(
tableItem
.
owner
,
tableItem
.
itemIdx
,
tableItem
.
itemData
);
...
...
@@ -262,7 +273,7 @@ export default class Ape extends Emiter {
this
.
_adapter_pdu
.
item
.
push
(
adapterItemPdu
);
}
// 注册Object对象
// 注册Object对象
等同于flash中的 RCRegistryOperator
registerObj
(
type
,
id
,
name
,
tag
,
owner
,
user_data
)
{
let
adapterItemPdu
=
new
pdu
[
'RCAdapterItemPdu'
];
adapterItemPdu
.
type
=
pdu
.
RCPDU_REG_REGISTER_OBJ
;
...
...
src/apes/ConferApe.js
查看文件 @
35460c0
...
...
@@ -128,10 +128,10 @@ class ConferApe extends Ape {
this
.
sendUniform
(
adapterPdu
,
true
);
}
tableUpdateHandler
(
owner
,
recordId
,
record
Data
)
{
tableUpdateHandler
(
owner
,
itemIdx
,
item
Data
)
{
loger
.
log
(
"更新人员列表数据 tableUpdateHandler"
);
try
{
let
tabUpdatePdu
=
pdu
.
RCTabUpdateDataRequestPdu
.
decode
(
record
Data
);
let
tabUpdatePdu
=
pdu
.
RCTabUpdateDataRequestPdu
.
decode
(
item
Data
);
const
uncompressedBytes
=
new
Zlib
.
Inflate
(
tabUpdatePdu
.
action
.
compact
().
view
).
decompress
();
let
tabInfo
=
UTF8
.
getStringFromBytes
(
uncompressedBytes
);
let
tabTypeMatches
=
tabInfo
.
match
(
/<TabType>
(
.+
)
<
\/
TabType>/
);
...
...
src/apes/DocApe.js
查看文件 @
35460c0
...
...
@@ -48,9 +48,9 @@ class DocApe extends Ape {
re
.
type
=
ApeConsts
.
DOCUMENT_DEL
;
this
.
_emit
(
MessageTypes
.
DOC_DEL
,
re
);
}
tableUpdateHandler
(
owner
,
recordId
,
record
Data
)
{
tableUpdateHandler
(
owner
,
itemIdx
,
item
Data
)
{
try
{
const
recordInfo
=
pdu
[
'RCDocSendDataRequestPdu'
].
decode
(
record
Data
);
const
recordInfo
=
pdu
[
'RCDocSendDataRequestPdu'
].
decode
(
item
Data
);
recordInfo
.
type
=
ApeConsts
.
DOCUMENT_LOAD
;
recordInfo
.
ext
=
recordInfo
.
name
.
substr
(
recordInfo
.
name
.
indexOf
(
'.'
)
+
1
);
...
...
@@ -66,7 +66,7 @@ class DocApe extends Ape {
}
this
.
docList
[
recordId
]
=
recordInfo
;
this
.
_emit
(
MessageTypes
.
DOC_UPDATE
,
recordInfo
);
loger
.
log
(
'Doc update ->'
+
recordId
);
loger
.
log
(
'Doc update ->'
+
itemIdx
);
}
catch
(
e
)
{
loger
.
warn
(
'Doc Table Update Decode包异常'
);
}
...
...
src/apes/VideoApe.js
查看文件 @
35460c0
...
...
@@ -73,17 +73,16 @@ class VideoChat extends Ape {
}
tableUpdateHandler
(
ownerId
,
channelId
,
channelInfo
)
{
tableUpdateHandler
(
owner
,
itemIdx
,
itemData
)
{
// debugger;
let
videoChannelInfo
=
pdu
[
'RCVideoChannelInfoRecordPdu'
].
decode
(
channelInfo
);
videoChannelInfo
.
owner
=
ownerId
;
videoChannelInfo
.
channelId
=
channelId
;
videoChannelInfo
.
status
=
ownerId
===
0
?
ApeConsts
.
CGS_RELEASED
:
videoChannelInfo
.
status
;
let
videoChannelInfo
=
pdu
[
'RCVideoChannelInfoRecordPdu'
].
decode
(
itemData
);
videoChannelInfo
.
owner
=
owner
;
videoChannelInfo
.
channelId
=
itemIdx
;
videoChannelInfo
.
status
=
owner
===
0
?
ApeConsts
.
CGS_RELEASED
:
videoChannelInfo
.
status
;
loger
.
log
(
'视频消息处理 tableUpdateHandler.'
,
videoChannelInfo
);
this
.
videoChannels
[
channelId
]
=
videoChannelInfo
;
this
.
videoChannels
[
itemIdx
]
=
videoChannelInfo
;
switch
(
videoChannelInfo
.
status
)
{
case
ApeConsts
.
CGS_RELEASED
:
case
ApeConsts
.
CGS_PENDING
:
...
...
src/apes/WhiteBoardApe.js
查看文件 @
35460c0
...
...
@@ -24,6 +24,7 @@ import GlobalConfig from 'GlobalConfig';
let
loger
=
Loger
.
getLoger
(
'WhiteBoardApe'
);
let
insertIdx
=
1
;
//table插入新数据的计数id
class
WhiteBoardApe
extends
Ape
{
constructor
()
{
super
(
...
...
@@ -41,116 +42,194 @@ class WhiteBoardApe extends Ape {
// ape listeners
this
.
on
(
pdu
.
RCPDU_CONFERENCE_SEND_DATA_REQUEST
,
this
.
whiteboardMsgComingHandler
.
bind
(
this
));
this
.
on
(
pdu
.
RCPDU_SESSION_JOIN_RESPONSE
,
this
.
_joinSessionHandler
.
bind
(
this
));
// 白板延迟
this
.
_apeDelayed
=
true
;
}
_joinSessionHandler
(
confInfo
)
{
loger
.
log
(
"RCPDU_SESSION_JOIN_RESPONSE"
);
}
/////////////发送数据操作//////////////////////////////////////////////////////
// 添加标注,发送信息
sendAnnotaion
(
_param
){
//var objPoint={
// "type":0,
// "id":111111,
// "color":0,
// "thickness":0,
// "radius":0,
// "text":0,
// "fontS":0,
// "fontN":0,
// "pointD":[]
//};
//message RCWhiteboardDataRequest2Pdu {
// required uint32 id = 1;
// required uint32 type = 2;
// required uint32 initiator = 3;
// required bytes drawData = 4;
//}
//message RCWhiteboardCurveLinePdu {
// required uint32 color = 1;
// required uint32 thickness = 2;
// required string pointData = 3;
//}
//
//var coverLine=new pdu['RCWhiteboardCurveLinePdu'];
//coverLine.color=0xff00ff;
//coverLine.thickness=2;
//coverLine.pointData="白板数据测试测试";
//
//var sendData=new pdu['RCWhiteboardDataRequest2Pdu'];
//sendData.id=parseInt(Date.now() / 1000);
//sendData.type=pdu.RCPDU_AUDIO_SEND_DATA_REQUEST;
//sendData.initiator = this._confInfo.nodeId;//发起人
//sendData.peer = parseInt(101);//发送给谁,公聊的时候是0,私聊的时候是指定的用户id
//sendData.isPublic = true;
//sendData.drawData=coverLine.toArrayBuffer();
//console.log("白板发送数据=============================");
//this.sendUniform(sendData);
let
chatSendPdu
=
new
pdu
[
'RCChatSendDataRequestPdu'
];
chatSendPdu
.
type
=
pdu
.
RCPDU_CONFERENCE_SEND_DATA_REQUEST
;
chatSendPdu
.
initiator
=
this
.
_confInfo
.
nodeId
;
//发起人
chatSendPdu
.
peer
=
parseInt
(
0
);
//发送给谁,公聊的时候是0,私聊的时候是指定的用户id
chatSendPdu
.
isPublic
=
true
;
chatSendPdu
.
userData
=
this
.
_rCArrayBufferUtil
.
strToUint8Array
(
"h5"
+
"白板测试"
);
chatSendPdu
.
fromName
=
this
.
_rCArrayBufferUtil
.
strToUint8Array
(
"h5"
+
this
.
_confInfo
.
userName
);
chatSendPdu
.
fromRole
=
this
.
_confInfo
.
classRole
;
sendInsetAnnotaion
(
_param
){
insertIdx
=
parseInt
(
Date
.
now
()
/
1000
);
let
whiteBoardModelPdu
=
new
pdu
[
'RCWhiteBoardData'
];
whiteBoardModelPdu
.
id
=
insertIdx
;
whiteBoardModelPdu
.
initiator
=
GlobalConfig
.
nodeId
;
whiteBoardModelPdu
.
data
=
"白板数据 "
+
insertIdx
;
whiteBoardModelPdu
.
type
=
3
;
//required uint32 id= 1;
//required uint32 initiator=2;
//optional string data= 3;
//optional uint32 type= 4;
//RCWhiteBoardData
//com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int
//public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void
//registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO
//tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID
//tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID+insertIdx;
//insertIdx++;
let
tableItemPdu
=
new
pdu
[
'RCRegistryTableItemPdu'
];
tableItemPdu
.
itemIdx
=
insertIdx
;
//直接用时间戳作为id
tableItemPdu
.
registerObjId
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
tableItemPdu
.
owner
=
0
;
//收到flash的是这个值,不清楚先写固定
//tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();
tableItemPdu
.
itemData
=
whiteBoardModelPdu
.
toArrayBuffer
();
//console.log("解析");
//console.log(pdu['RCWhiteBoardData'].decode(tableItemPdu.itemData));
/* message RCRegistryTableItemPdu {
required uint32 item_idx = 1;
required uint32 owner = 2;
required bytes item_data = 3;
}*/
//insert
let
tableInsertItemPdu
=
new
pdu
[
'RCRegistryTableInsertItemPdu'
];
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
//repeated RCRegistryTableItemPdu items = 2;
tableInsertItemPdu
.
type
=
pdu
.
RCPDU_REG_TABLE_INSERT_PDU
;
//
tableInsertItemPdu
.
items
.
push
(
tableItemPdu
);
let
updateObjPdu
=
new
pdu
[
'RCRegistryUpdateObjPdu'
];
updateObjPdu
.
objId
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
tableInsertItemPdu
.
type
;
updateObjPdu
.
userData
=
tableInsertItemPdu
.
toArrayBuffer
();
//同步
let
adapterItemPdu
=
new
pdu
[
'RCAdapterItemPdu'
];
adapterItemPdu
.
type
=
pdu
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
chatSend
Pdu
.
toArrayBuffer
();
adapterItemPdu
.
itemData
=
updateObj
Pdu
.
toArrayBuffer
();
let
adapterPdu
=
new
pdu
[
'RCAdapterPdu'
];
adapterPdu
.
type
=
pdu
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"白板发送数据=============================QQ"
);
this
.
sendUniform
(
adapterPdu
,
true
);
console
.
log
(
"白板insert数据======111111111111=tableItemPdu.itemIdx="
+
tableItemPdu
.
itemIdx
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
//删除所有标注
sendDeleteAllAnnotation
(
_param
){
let
len
=
0
;
for
(
let
key
in
this
.
annoInfos
){
console
.
log
(
"key:"
+
key
);
console
.
log
(
"删除白板数据,itemIdx:"
+
this
.
annoInfos
[
key
]);
this
.
sendDeleteAnnotaion
({
"itemIdx"
:
key
});
}
}
//删除标注,发送信息
sendDeleteAnnotaion
(
_param
){
//delete
let
tableDeleteItemPdu
=
new
pdu
[
'RCRegistryTableDeleteItemPdu'
];
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];
// repeated uint32 item_idx = 2;
tableDeleteItemPdu
.
type
=
pdu
.
RCPDU_REG_TABLE_DELETE_PDU
;
//
tableDeleteItemPdu
.
itemIdx
=
parseInt
(
_param
.
itemIdx
);
//这里需要设置要删除的数据的itemIdx,每条数据的这个id都不一样
let
updateObjPdu
=
new
pdu
[
'RCRegistryUpdateObjPdu'
];
updateObjPdu
.
objId
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
tableDeleteItemPdu
.
type
;
updateObjPdu
.
userData
=
tableDeleteItemPdu
.
toArrayBuffer
();
//同步
let
adapterItemPdu
=
new
pdu
[
'RCAdapterItemPdu'
];
adapterItemPdu
.
type
=
pdu
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
updateObjPdu
.
toArrayBuffer
();
let
adapterPdu
=
new
pdu
[
'RCAdapterPdu'
];
adapterPdu
.
type
=
pdu
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
// this.sendUniform(chatSendPdu);
//if (!(chatSendPdu.isPublic || 0 === chatSendPdu.peer)) {
// //发送给制定的人
// this.send(chatSendPdu);
//} else {
// //发送给所有人
// this.sendUniform(chatSendPdu);
//}
console
.
log
(
"白板发送删除数据============="
+
tableDeleteItemPdu
.
itemIdx
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
//删除标注,发送信息
deleteAnnotaion
(
_param
){
//更新标注
sendUpdaterAnnotaion
(
_param
){
let
whiteBoardModelPdu
=
new
pdu
[
'RCWhiteBoardData'
];
whiteBoardModelPdu
.
id
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
whiteBoardModelPdu
.
initiator
=
GlobalConfig
.
nodeId
;
whiteBoardModelPdu
.
data
=
"白板数据 "
+
insertIdx
;
whiteBoardModelPdu
.
type
=
3
;
let
tableItemPdu
=
new
pdu
[
'RCRegistryTableItemPdu'
];
/* tableItemPdu.itemIdx =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
tableItemPdu.owner = GlobalConfig.nodeId;
tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();*/
//com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int
//public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void
//registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO
//tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID
tableItemPdu
.
itemIdx
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
tableItemPdu
.
owner
=
0
;
//收到flash的是这个值,不清楚先写固定
tableItemPdu
.
registerObjId
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
tableItemPdu
.
itemData
=
whiteBoardModelPdu
.
toArrayBuffer
();
//updater
let
whiteBoardUpdateItem
=
new
pdu
[
'RCRegistryTableUpdateItemPdu'
];
//optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
//repeated RCRegistryTableItemPdu items = 2;
whiteBoardUpdateItem
.
type
=
pdu
.
RCPDU_REG_TABLE_UPDATE_PDU
;
//
whiteBoardUpdateItem
.
items
.
push
(
tableItemPdu
);
let
updateObjPdu
=
new
pdu
[
'RCRegistryUpdateObjPdu'
];
updateObjPdu
.
objId
=
ApeConsts
.
WHITEBOARD_OBJ_TABLE_ID
;
updateObjPdu
.
subType
=
whiteBoardUpdateItem
.
type
;
updateObjPdu
.
userData
=
whiteBoardUpdateItem
.
toArrayBuffer
();
//同步
let
adapterItemPdu
=
new
pdu
[
'RCAdapterItemPdu'
];
adapterItemPdu
.
type
=
pdu
.
RCPDU_REG_UPDATE_OBJ
;
adapterItemPdu
.
itemData
=
updateObjPdu
.
toArrayBuffer
();
let
adapterPdu
=
new
pdu
[
'RCAdapterPdu'
];
adapterPdu
.
type
=
pdu
.
RCPDU_REG_ADAPTER
;
adapterPdu
.
item
.
push
(
adapterItemPdu
);
console
.
log
(
"白板发送更新数据===============22"
);
this
.
sendUniform
(
adapterPdu
,
true
);
}
/////收到消息处理/////////////////////////////////////////////////////////////////////////////////
whiteboardMsgComingHandler
(
pdu
)
{
//loger.warn('whiteboardMsgComingHandler needs to be handled.');
console
.
log
(
"白板收到数据=============================
QQ
"
);
console
.
log
(
"白板收到数据=============================
RCPDU_CONFERENCE_SEND_DATA_REQUEST
"
);
}
wbReceriveHandler
(
chatBuffer
)
{
console
.
log
(
"白板收到数据=============================QQ"
);
//var chatReceivePdu = pdu['RCChatSendDataRequestPdu'].decode(chatBuffer);
//
//var chatMsg = {};
//chatMsg.fromNodeID = chatReceivePdu.initiator;
//chatMsg.toNodeID = chatReceivePdu.peer;
//chatMsg.message = this._rCArrayBufferUtil.uint8ArrayToStr(chatReceivePdu.userData, 2);
//chatMsg.fromName = this._rCArrayBufferUtil.uint8ArrayToStr(chatReceivePdu.fromName, 2);
//chatMsg.fromRole = chatReceivePdu.fromRole;
//
//loger.log('接收聊天消息.', chatMsg);
//
//this._emit(MessageTypes.CHAT_RECEIVE, chatMsg);
}
tableInsertHandler
(
tableId
,
record
)
{
this
.
emitDocChange
(
ApeConsts
.
DOCUMENT_DEL
);
tableInsertHandler
(
owner
,
itemIdx
,
itemData
)
{
this
.
annoInfos
[
itemIdx
]
=
itemData
;
console
.
log
(
"白板收到数据==========tableInsertHandler"
);
let
nodeData
=
pdu
[
'RCWhiteBoardData'
].
decode
(
itemData
);
console
.
log
(
"白板收到数据==========tableInsertHandler"
+
nodeData
);
console
.
log
(
nodeData
);
//this.emitDocChange(ApeConsts.DOCUMENT_DEL);
}
tableUpdateHandler
(
owner
,
recordId
,
recordData
)
{
const
recordInfo
=
pdu
[
'RCWhiteboardDataRequestPdu'
].
decode
(
recordData
);
tableUpdateHandler
(
owner
,
itemIdx
,
itemData
)
{
this
.
annoInfos
[
itemIdx
]
=
itemData
;
console
.
log
(
"白板收到数据===tableUpdateHandler itemData="
+
itemData
);
try
{
console
.
log
(
"白板收到数据===tableUpdateHandler "
);
let
whiteBoardModelPdu
=
pdu
[
'RCWhiteBoardData'
].
decode
(
itemData
);
console
.
log
(
whiteBoardModelPdu
);
}
catch
(
err
){
console
.
log
(
"tableUpdateHandler Pdu解析错误,itemIdx="
+
itemIdx
+
" err:"
+
err
.
message
);
}
/*const recordInfo = pdu['RCWhiteboardDataRequestPdu'].decode(recordData);
console.log("recordInfo");
console
.
log
(
recordInfo
);
loger.log(recordInfo);
// 目前只处理 文档标注
if (recordInfo.type == ApeConsts.WBA_DOC_ANNOTATION) {
const uncompressedBytes = new Zlib.Inflate(recordInfo.action.compact().view).decompress();
...
...
@@ -158,11 +237,15 @@ class WhiteBoardApe extends Ape {
id: recordId,
svg: UTF8.getStringFromBytes(uncompressedBytes)
};
loger.log(annoInfo);
this.annoInfos[recordId] = annoInfo;
this._emit(MessageTypes.ANNOTATION_UPDATE, annoInfo);
} else {
loger.log('白板动作忽略,类型:', ApeConsts(recordInfo.type));
}
}*/
}
tableDeleteHandler
(
object_id
,
tableDeleteData
){
console
.
log
(
"白板收到数据=============================tableDeleteHandler"
);
}
}
...
...
src/pdus/PduType.js
查看文件 @
35460c0
...
...
@@ -98,4 +98,3 @@ RCPduPackage.RCPDU_INDEX_SERVER_USERS = 301;
RCPduPackage
.
RCPDU_INDEX_CONFERENCE_USER_JOINED
=
302
;
RCPduPackage
.
RCPDU_INDEX_CONFERENCE_USER_EXITED
=
303
;
RCPduPackage
.
RCPDU_INDEX_CONFERENCE_USERS
=
304
;
...
...
src/pdus/pro.js
查看文件 @
35460c0
...
...
@@ -248,6 +248,7 @@ message RCRegistryTableItemPdu {
required
uint32
item_idx
=
1
;
required
uint32
owner
=
2
;
required
bytes
item_data
=
3
;
optional
uint32
register_obj_id
=
4
;
}
message
RCRegistryTableInsertItemPdu
{
...
...
@@ -270,7 +271,10 @@ message RCRegistryRosterItemPdu {
required
uint32
node_id
=
1
;
required
bytes
node_data
=
2
;
}
message
RCRegistryWBItemPdu
{
required
uint32
node_id
=
1
;
required
bytes
node_data
=
2
;
}
message
RCRegistryRosterInsertItemPdu
{
optional
RCPduType_E
type
=
1
[
default
=
RCPDU_REG_ROSTER_INSERT_PDU
];
repeated
RCRegistryRosterItemPdu
items
=
2
;
...
...
@@ -286,6 +290,10 @@ message RCRegistryRosterUpdateItemPdu {
repeated
RCRegistryRosterItemPdu
items
=
2
;
}
message
RCRegistryWBUpdateItemPdu
{
optional
RCPduType_E
type
=
1
[
default
=
RCPDU_REG_TABLE_UPDATE_PDU
];
repeated
RCWhiteboardDataRequestPdu
items
=
2
;
}
//message RCCleanupNodePdu
//{
// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];
...
...
@@ -828,6 +836,11 @@ message RCNodeInfoUserDataPdu {
optional
string
skype
=
2
;
optional
string
mobile
=
3
;
}
message
RCTabUpdateDataRequestPdu
{
optional
uint32
id
=
1
;
optional
bytes
action
=
2
;
optional
uint32
uncomprLen
=
3
;
}
message
RCWhiteboardDataRequestPdu
{
required
uint32
id
=
1
;
...
...
@@ -837,14 +850,13 @@ message RCWhiteboardDataRequestPdu {
optional
uint32
uncomprLen
=
5
;
}
message
RCTabUpdateDataRequestPdu
{
optional
uint32
id
=
1
;
optional
bytes
action
=
2
;
optional
uint32
uncomprLen
=
3
;
message
RCWhiteBoardData
{
required
uint32
id
=
1
;
required
uint32
initiator
=
2
;
optional
string
data
=
3
;
optional
uint32
type
=
4
;
}
//end
`
;
...
...
请
注册
或
登录
后发表评论