Protocol Documentation
Table of Contents
- ski/AnsweredStreamEvent.proto
- ski/AudioPayload.proto
- ski/BlockState.proto
- ski/ContactPayload.proto
- ski/CreateStreamEvent.proto
- ski/DataPayload.proto
- ski/DeclineStreamEvent.proto
- ski/DecryptStatusPayload.proto
- ski/DeletePayload.proto
- ski/DestroyStreamEvent.proto
- ski/FilePayload.proto
- ski/Forward.proto
- ski/FriendNotifPayload.proto
- ski/FriendStatus.proto
- ski/GroupNotifPayload.proto
- ski/HidePayload.proto
- ski/ImagePayload.proto
- ski/LocalLabelPayload.proto
- ski/LocationPayload.proto
- ski/MsgState.proto
- ski/MsgType.proto
- ski/PlainMsg.proto
- ski/Reply.proto
- ski/Report.proto
- ski/ReportReason.proto
- ski/RetractPayload.proto
- ski/StickerPayload.proto
- ski/StreamPayload.proto
- ski/StreamType.proto
- ski/SyncMsg.proto
- ski/SystemNotifPayload.proto
- ski/TextPayload.proto
- ski/UserState.proto
- ski/UserType.proto
- ski/VideoPayload.proto
- Scalar Value Types
ski/AnsweredStreamEvent.proto
AnsweredStreamEvent
The message for answering event of the stream.
| Field | Type | Label | Description |
|---|---|---|---|
| user_address | e2ees.E2eeAddress | E2ee address with deviceId for whom send this event. |
ski/AudioPayload.proto
AudioPayload
Message for encrypted audio file.
| Field | Type | Label | Description |
|---|---|---|---|
| file_name | string | The file name. | |
| file_path | string | The url that is used to download this audio file. | |
| file_size | int64 | The file size. | |
| modified_date | int64 | The time stamp of this message. | |
| mime_type | string | The mime type. | |
| time_len | int64 | The time length in milliseconds. | |
| passkey | bytes | The passkey that is used to decrypt the download audio file. |
ski/BlockState.proto
BlockState
State to identify if a friend is blocked or not.
| Name | Number | Description |
|---|---|---|
| BLOCK_STATE_NORMAL | 0 | Normal status. |
| BLOCK_STATE_BLOCKED | 1 | Block status. |
ski/ContactPayload.proto
ContactPayload
Message for contact payload.
| Field | Type | Label | Description |
|---|---|---|---|
| user | string | Simple e2ee address. | |
| nickname | string | The nickname provided by user. |
ski/CreateStreamEvent.proto
CreateStreamEvent
The message for creating event of the stream.
| Field | Type | Label | Description |
|---|---|---|---|
| stream_type | StreamType | The type of stream. | |
| caller | string | The simple e2ee address for caller. | |
| participants | string | repeated | The list of simple e2ee addresses for whom join the stream. |
| pin_code | string | The pin code for accessing the stream. | |
| passkey | bytes | The key for encrypting/decrypting the stream. |
ski/DataPayload.proto
DataPayload
The message for data payload.
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | The class name for decoding data. | |
| data | bytes | The raw data encoded in a sequence of bytes no longer than 2^32 (4GB). |
ski/DeclineStreamEvent.proto
DeclineStreamEvent
The message for declining event of the stream.
| Field | Type | Label | Description |
|---|---|---|---|
| user_address | string | The simple e2ee address who send this event. |
ski/DecryptStatusPayload.proto
DecryptStatusPayload
The decrypt status message will be sent when a peer decrypted the message and loaded in UI.
| Field | Type | Label | Description |
|---|---|---|---|
| msg_ids | string | repeated | The array of message ids for the messages that have been decrypted. |
| time_decrypt | int64 | The time stamp that the messages are decrypted. |
ski/DeletePayload.proto
DeletePayload
The message for deleting some msgs.
| Field | Type | Label | Description |
|---|---|---|---|
| to_address | string | Optional Simple user or group address for which all its msgs will be deleted. | |
| delete_msg_ids | string | repeated | The array of message ids of a message to be deleted. |
ski/DestroyStreamEvent.proto
DestroyStreamEvent
The message for destroying event of the stream.
| Field | Type | Label | Description |
|---|---|---|---|
| user_address | string | The simple e2ee address who send this event. | |
| duration | int64 | The duration for the stream. |
ski/FilePayload.proto
FilePayload
Message for encrypted file payload.
| Field | Type | Label | Description |
|---|---|---|---|
| file_name | string | The file name. | |
| file_path | string | The url that is used to download this file. | |
| file_size | int64 | The file size. | |
| modified_date | int64 | The time stamp of this message. | |
| mime_type | string | The mime type. | |
| passkey | bytes | The passkey that is used to decrypt the download file. |
ski/Forward.proto
Forward
Message for forwarding another message.
| Field | Type | Label | Description |
|---|---|---|---|
| from | string | The simple e2ee address for whom is the sender of the forwarded message. | |
| msg_id | string | The message id of the forwarded message. | |
| time_stamp | int64 | The time stamp that this message is forwarded. |
ski/FriendNotifPayload.proto
FriendNotifPayload
Message for friend manager.
| Field | Type | Label | Description |
|---|---|---|---|
| op | e2ees.FriendOp | The friend operation. | |
| friend | e2ees.FriendshipDTO | The data transmission object of a friend. |
ski/FriendStatus.proto
FriendStatus
The frind status message identifies the status of a friendship.
| Name | Number | Description |
|---|---|---|
| FRIEND_STATUS_UNSPECIFIED | 0 | The friendship is in unknown status. |
| FRIEND_STATUS_STRANGER | 1 | The friendship is in stranger status. |
| FRIEND_STATUS_ATTENTION | 2 | The friendship is in attention status. |
| FRIEND_STATUS_FRIEND | 3 | The friendship is in friend status. |
| FRIEND_STATUS_REMOVED | 9 | The friendship is removed. (the friend account may have been removed) |
ski/GroupNotifPayload.proto
GroupNotifPayload
Message from group manager.
| Field | Type | Label | Description |
|---|---|---|---|
| op | e2ees.GroupOp | The group operation. | |
| create_group_arg | e2ees.CreateGroupArg | The argement for creating group message. | |
| update_group_name_arg | e2ees.UpdateGroupNameArg | The argement for updating group name message. | |
| update_group_avatar_arg | e2ees.UpdateGroupAvatarArg | The argement for updating group avatar message. | |
| update_group_admins_arg | e2ees.UpdateGroupAdminsArg | The argement for updatinge group admins message. | |
| add_group_members_arg | e2ees.AddGroupMembersArg | The argement for adding group member message. | |
| join_group_arg | e2ees.JoinGroupArg | The argement for joining group member message. | |
| remove_group_members_arg | e2ees.RemoveGroupMembersArg | The argement for removing group member message. | |
| destroy_group_arg | e2ees.DestroyGroupArg | The argement for destroying group member message. |
ski/HidePayload.proto
HidePayload
Message for hiding another messgae by manager of a group.
| Field | Type | Label | Description |
|---|---|---|---|
| hide_msg_ids | string | repeated | The array of message ids of a message to be hided. |
ski/ImagePayload.proto
ImagePayload
Message for encrypted image file.
| Field | Type | Label | Description |
|---|---|---|---|
| file_name | string | The file name. | |
| file_path | string | The url that is used to download this image file. | |
| file_size | int64 | The file size. | |
| modified_date | int64 | The time stamp of this message. | |
| mime_type | string | The mime type. | |
| orientation | int32 | The orientation of this message in degrees (0, 90, 180, 270). | |
| passkey | bytes | The passkey that is used to decrypt the download image file. |
ski/LocalLabelPayload.proto
LocalLabelPayload
The message for loacl label payload.
| Field | Type | Label | Description |
|---|---|---|---|
| caption | string | The local label caption. | |
| text | string | The local label text. |
ski/LocationPayload.proto
LocationPayload
Message for location payload.
| Field | Type | Label | Description |
|---|---|---|---|
| lat | double | The latitude of a location. | |
| lng | double | The longitude of a location. | |
| address | string | The text address that identify a specific place. |
ski/MsgState.proto
MsgState
The state of a message is used to indicate the state of a transmitted message.
| Name | Number | Description |
|---|---|---|
| MSG_STATE_UNSPECIFIED | 0 | The message is in unknown state. |
| MSG_STATE_SENDING | 1 | The message is in sending state. |
| MSG_STATE_SEND_FAILED | 2 | The message is failed to send. |
| MSG_STATE_SEND_PENDED | 3 | The message is pended to send and kept in local database. |
| MSG_STATE_SEND_SUCCEEDED | 5 | The message is succeeded to send and received by server . |
| MSG_STATE_RECEIVED | 10 | The message is received by peer. |
| MSG_STATE_DECRYPT_SUCCEEDED | 11 | The message is succeeded to decrypt by peer. |
| MSG_STATE_DECRYPT_FAILED | 12 | The message is failed to decrypt by peer. |
| MSG_STATE_READ | 13 | The message is read by peer |
| MSG_STATE_HIDED | 20 | The message is hided (by a manager of group). |
| MSG_STATE_DELETED | 21 | The message is deleted. |
ski/MsgType.proto
MsgType
The type of a message is used to identify the message type of a plainMsg. @see PlainMsg#msg
| Name | Number | Description |
|---|---|---|
| MSG_TYPE_UNSPECIFIED | 0 | |
| MSG_TYPE_TEXT | 11 | |
| MSG_TYPE_CONTACT | 12 | |
| MSG_TYPE_LOCATION | 13 | |
| MSG_TYPE_STICKER | 14 | |
| MSG_TYPE_IMAGE | 21 | |
| MSG_TYPE_AUDIO | 22 | |
| MSG_TYPE_VIDEO | 23 | |
| MSG_TYPE_FILE | 24 | |
| MSG_TYPE_STREAM | 31 | |
| MSG_TYPE_DATA | 41 | |
| MSG_TYPE_FRIEND_NOTIF | 61 | |
| MSG_TYPE_GROUP_NOTIF | 62 | |
| MSG_TYPE_SYSTEM_NOTIF | 63 | |
| MSG_TYPE_RETRACT | 71 | |
| MSG_TYPE_DECRYPT_STATUS | 72 | |
| MSG_TYPE_HIDE | 73 | |
| MSG_TYPE_DELETE | 74 | |
| MSG_TYPE_LOCAL_LABEL | 91 |
ski/PlainMsg.proto
PlainMsg
PlainMsg is the main proto type to transfer plaintext among peers.
| Field | Type | Label | Description |
|---|---|---|---|
| version | string | The version number is reserved to keep forward compatibility. | |
| msg_id | string | The uuid for this plain message. | |
| from | string | The sender's address in simple e2ee address format without devideId. | |
| to | string | The recipient's address in simple e2ee address format without devideId. | |
| time_send | int64 | The time stamp that is provided by server. | |
| time_delete | int64 | The optional time to delete by client. | |
| text | TextPayload | Text message. | |
| contact | ContactPayload | Contact message. | |
| location | LocationPayload | Location message. | |
| sticker | StickerPayload | Sticker message. | |
| image | ImagePayload | Image message. | |
| audio | AudioPayload | Audio message. | |
| video | VideoPayload | Video message. | |
| file | FilePayload | File message. | |
| stream | StreamPayload | Stream message. | |
| data | DataPayload | Data message | |
| friend_notif | FriendNotifPayload | Notification message from the friend manager. | |
| group_notif | GroupNotifPayload | Notification message from the group manager. | |
| system_notif | SystemNotifPayload | Notification message from the system manager. | |
| retract | RetractPayload | Special message to retract some plainMsgs. | |
| decrypt_status | DecryptStatusPayload | Special message to identify the decryption status of some plainMsgs. | |
| hide | HidePayload | Special message to hide some plainMsgs. | |
| delete | DeletePayload | Special message to delete some plainMsgs. | |
| local_label | LocalLabelPayload | Local label message. | |
| reply | Reply | The reply attribute is provided if this plainMsg is used to reply another plainMsg. | |
| forwards | Forward | repeated | The forwards attribute is an array to keep track the forwarded records. |
| report | Report | The reply attribute is provided if this plainMsg is used to report against another plainMsg. |
ski/Reply.proto
Reply
The message for replying another message.
| Field | Type | Label | Description |
|---|---|---|---|
| replied_msg_from | string | The simple e2ee address for whom is the sender of replied message. | |
| replied_msg_id | string | The message id of the message that is replied. | |
| replied_msg_type | int32 | The message type of the message that is replied. | |
| replied_msg_text | string | The replied text. |
ski/Report.proto
Report
The message for reporting another message that is considered to be objectionable.
| Field | Type | Label | Description |
|---|---|---|---|
| msg_id | string | The message id of a message to be reported. | |
| from | string | The simple e2ee address for whom send the reported message. | |
| reason | ReportReason | The reason for this report. |
ski/ReportReason.proto
ReportReason
The reason for a report of an objectionable message.
| Name | Number | Description |
|---|---|---|
| REPORT_REASON_HARASSMENT | 0 | The message is related to harassment. (騷擾) |
| REPORT_REASON_OBJECTIONABLE_ADVERTISING | 100 | The message is related to advertising. (不當內容:廣告) |
| REPORT_REASON_OBJECTIONABLE_FALSE_INFO | 101 | The message is related to false information. (不當內容:不實) |
| REPORT_REASON_OBJECTIONABLE_BLOODINESS | 102 | The message is related to bloodiness. (不當內容:血腥) |
| REPORT_REASON_OBJECTIONABLE_VIOLENCE | 103 | The message is related to violence. (不當內容:暴力) |
| REPORT_REASON_OBJECTIONABLE_PORNOGRAPHY | 104 | The message is related to pornography. (不當內容:色情) |
| REPORT_REASON_OBJECTIONABLE_HATRED | 105 | The message is related to hatred. (不當內容:仇恨) |
| REPORT_REASON_OBJECTIONABLE_DISCRIMINATION | 106 | The message is related to discrimination.(不當內容:歧視) |
| REPORT_REASON_OBJECTIONABLE_SELF_HARM | 107 | The message is related to self-harm. (不當內容:自殘) |
| REPORT_REASON_CONTRABAND_DRUGS | 200 | The message is involved in contraband of drugs. (違禁品:毒品、藥物) |
| REPORT_REASON_CONTRABAND_FIREARMS | 201 | The message is involved in contraband of firearms. (違禁品:槍械) |
| REPORT_REASON_COUNTERFEITING_ME | 300 | The message is a counterfeit of me. (冒充:我) |
| REPORT_REASON_COUNTERFEITING_FRIEND | 301 | The message is a counterfeit of some friend. (冒充:朋友) |
| REPORT_REASON_COUNTERFEITING_OTHER | 302 | The message is a counterfeit of some person. (冒充:其他人) |
| REPORT_REASON_COUNTERFEITING_CELEBRITY | 303 | The message is a counterfeit of some celebrity. (冒充:名人) |
| REPORT_REASON_MALFUNCTION | 400 | The message is malfunctioned. (功能錯誤) |
| REPORT_REASON_OTHER | 900 | Something else. (其它) |
ski/RetractPayload.proto
RetractPayload
The message to retract some other msgs.
| Field | Type | Label | Description |
|---|---|---|---|
| retract_msg_ids | string | repeated | The array of message ids to be retracted. |
ski/StickerPayload.proto
StickerPayload
The message for sticker.
| Field | Type | Label | Description |
|---|---|---|---|
| namespace | string | The name space of this sticker. | |
| category | string | The category of this sticker. | |
| sticker_pack_id | string | The sticker pack id to that this sticker is belonged. | |
| sticker_id | string | The sticker id of this sticker. | |
| desc | string | The text description of this sticker. |
ski/StreamPayload.proto
StreamPayload
The message for streaming.
| Field | Type | Label | Description |
|---|---|---|---|
| server_url | string | Server url for serving the stream. | |
| room_id | string | The room id of the stream. | |
| create | CreateStreamEvent | ||
| decline | DeclineStreamEvent | ||
| destroy | DestroyStreamEvent | ||
| answered | AnsweredStreamEvent |
ski/StreamType.proto
StreamType
The stream type message.
| Name | Number | Description |
|---|---|---|
| STREAM_TYPE_AUDIO | 0 | |
| STREAM_TYPE_VIDEO | 1 | |
| STREAM_TYPE_CAMERA | 2 | |
| STREAM_TYPE_DESKTOP | 3 |
ski/SyncMsg.proto
SyncMsg
Msg for syncing data among devices.
| Field | Type | Label | Description |
|---|---|---|---|
| op | SyncOp | The operation of this msg. | |
| update_backup_passkey_arg | UpdateBackupPasskeyArg | The argument for updating backup passkey. |
UpdateBackupPasskeyArg
Argument for updating backup passkey.
| Field | Type | Label | Description |
|---|---|---|---|
| backup_passkey | bytes |
SyncOp
The sync operations.
| Name | Number | Description |
|---|---|---|
| SYNC_OP_UNSPECIFIED | 0 | |
| SYNC_OP_UPDATE_BACKUP_PASSKEY | 11 |
ski/SystemNotifPayload.proto
SystemNotifPayload
The message from system manager.
| Field | Type | Label | Description |
|---|---|---|---|
| op | e2ees.SystemOp | The ststem operation. | |
| payload | bytes | The utf-8 json string content. |
ski/TextPayload.proto
TextPayload
The message for text payload.
| Field | Type | Label | Description |
|---|---|---|---|
| content | string | The text message that has utf-8 encoding and length limit 20480. |
ski/UserState.proto
UserState
The user state message.
| Name | Number | Description |
|---|---|---|
| USER_STATE_NORMAL | 0 | |
| USER_STATE_BLOCKED | 1 | |
| USER_STATE_REVOKED | 2 | |
| USER_STATE_DEPRECATED | 3 |
ski/UserType.proto
UserType
The user type message.
| Name | Number | Description |
|---|---|---|
| USER_TYPE_PERSON | 0 | |
| USER_TYPE_GROUP | 1 | |
| USER_TYPE_BOT | 2 | |
| USER_TYPE_EDU | 3 | |
| USER_TYPE_GOV | 4 | |
| USER_TYPE_ORG | 5 | |
| USER_TYPE_COM | 6 |
ski/VideoPayload.proto
VideoPayload
The message for encrypted video file.
| Field | Type | Label | Description |
|---|---|---|---|
| file_name | string | The file name. | |
| file_path | string | The url that is used to download this video file. | |
| file_size | int64 | The file size. | |
| modified_date | int64 | The time stamp of this message. | |
| mime_type | string | The mime type. | |
| time_len | int64 | The time length in milliseconds. | |
| passkey | bytes | The passkey that is used to decrypt the download video file. |