跳至主要内容

Package: ski

The ski package is the protobuf designed for common e2ee applications.

Top

ski/AnsweredStreamEvent.proto

AnsweredStreamEvent

The message for answering event of the stream.

FieldTypeLabelDescription
user_addressskissm.E2eeAddressE2ee address with deviceId for whom send this event.

Top

ski/AudioPayload.proto

AudioPayload

Message for encrypted audio file.

FieldTypeLabelDescription
file_namestringThe file name.
file_pathstringThe url that is used to download this audio file.
file_sizeint64The file size.
modified_dateint64The time stamp of this message.
mime_typestringThe mime type.
time_lenint64The time length in milliseconds.
passkeybytesThe passkey that is used to decrypt the download audio file.

Top

ski/BlockState.proto

BlockState

State to identify if a friend is blocked or not.

NameNumberDescription
BLOCK_STATE_NORMAL0Normal status.
BLOCK_STATE_BLOCKED1Block status.

Top

ski/ContactPayload.proto

ContactPayload

Message for contact payload.

FieldTypeLabelDescription
userstringSimple e2ee address.
nicknamestringThe nickname privided by user.

Top

ski/CreateStreamEvent.proto

CreateStreamEvent

The message for creating event of the stream.

FieldTypeLabelDescription
stream_typeStreamTypeThe type of stream.
callerstringThe simple e2ee address for caller.
participantsstringrepeatedThe list of simple e2ee addresses for whom join the stream.
pin_codestringThe pin code for accessing the stream.
passkeybytesThe key for encrypting/decrypting the stream.

Top

ski/DeclineStreamEvent.proto

DeclineStreamEvent

The message for declining event of the stream.

FieldTypeLabelDescription
user_addressstringThe simple e2ee address who send this event.

Top

ski/DecryptStatusPayload.proto

DecryptStatusPayload

The decrypt status message will be sent when a peer decrypted the message and loaded in UI.

FieldTypeLabelDescription
msg_idsstringrepeatedThe array of message ids for the messages that have been decrypted.
time_decryptint64The time stamp that the messages are decrypted.

Top

ski/DeletePayload.proto

DeletePayload

The message for deleting some msgs.

FieldTypeLabelDescription
to_addressstringOptional Simple user or group address for which all its msgs will be deleted.
delete_msg_idsstringrepeatedThe array of message ids of a message to be deleted.

Top

ski/DestroyStreamEvent.proto

DestroyStreamEvent

The message for destroying event of the stream.

FieldTypeLabelDescription
user_addressstringThe simple e2ee address who send this event.
durationint64The duration for the stream.

Top

ski/FilePayload.proto

FilePayload

Message for encrypted file payload.

FieldTypeLabelDescription
file_namestringThe file name.
file_pathstringThe url that is used to download this file.
file_sizeint64The file size.
modified_dateint64The time stamp of this message.
mime_typestringThe mime type.
passkeybytesThe passkey that is used to decrypt the download file.

Top

ski/Forward.proto

Forward

Message for forwarding another message.

FieldTypeLabelDescription
fromstringThe simple e2ee address for whom is the sender of the forwarded message.
msg_idstringThe message id of the forwarded message.
time_stampint64The time stamp that this message is forwarded.

Top

ski/FriendNotifPayload.proto

FriendNotifPayload

Message for friend manager.

FieldTypeLabelDescription
opskissm.FriendOpThe friend operation.
friendskissm.FriendshipDTOThe data transmission object of a friend.

Top

ski/FriendStatus.proto

FriendStatus

The frind status message identifies the status of a friendship.

NameNumberDescription
FRIEND_STATUS_UNKNOWN0The friendship is in unknown status.
FRIEND_STATUS_STRANGER1The friendship is in stranger status.
FRIEND_STATUS_ATTENTION2The friendship is in attention status.
FRIEND_STATUS_FRIEND3The friendship is in friend status.
FRIEND_STATUS_REMOVED9The friendship is removed. (the friend account may have been removed)

Top

ski/GroupNotifPayload.proto

GroupNotifPayload

Message from group manager.

FieldTypeLabelDescription
opskissm.GroupOpThe group operation.
create_group_argskissm.CreateGroupArgThe argement for creating group message.
update_group_name_argskissm.UpdateGroupNameArgThe argement for updating group name message.
update_group_avatar_argskissm.UpdateGroupAvatarArgThe argement for updating group avatar message.
update_group_admins_argskissm.UpdateGroupAdminsArgThe argement for updatinge group admins message.
add_group_members_argskissm.AddGroupMembersArgThe argement for adding group member message.
join_group_argskissm.JoinGroupArgThe argement for joining group member message.
remove_group_members_argskissm.RemoveGroupMembersArgThe argement for removing group member message.
destroy_group_argskissm.DestroyGroupArgThe argement for destroying group member message.

Top

ski/HidePayload.proto

HidePayload

Message for hiding another messgae by manager of a group.

FieldTypeLabelDescription
hide_msg_idsstringrepeatedThe array of message ids of a message to be hided.

Top

ski/ImagePayload.proto

ImagePayload

Message for encrypted image file.

FieldTypeLabelDescription
file_namestringThe file name.
file_pathstringThe url that is used to download this image file.
file_sizeint64The file size.
modified_dateint64The time stamp of this message.
mime_typestringThe mime type.
orientationint32The orientation of this message in degrees (0, 90, 180, 270).
passkeybytesThe passkey that is used to decrypt the download image file.

Top

ski/LocationPayload.proto

LocationPayload

Message for location payload.

FieldTypeLabelDescription
latdoubleThe latitude of a location.
lngdoubleThe longitude of a location.
addressstringThe text address that identify a specific place.

Top

ski/MsgState.proto

MsgState

The state of a message is used to indicate the state of a transmitted message.

NameNumberDescription
MSG_STATE_UNKNOWN0The message is in unknown state.
MSG_STATE_SENDING1The message is in sending state.
MSG_STATE_SEND_FAILED2The message is failed to send.
MSG_STATE_SEND_PENDED3The message is pended to send and kept in local database.
MSG_STATE_SEND_SUCCEEDED5The message is succeded to send and received by server .
MSG_STATE_RECEIVED10The message is received by peer.
MSG_STATE_DECRYPT_SUCCEEDED11The message is succeded to decrypt by peer.
MSG_STATE_DECRYPT_FAILED12The message is failed to decrypt by peer.
MSG_STATE_READ13The message is read by peer
MSG_STATE_HIDED20The message is hided (by a manager of group).
MSG_STATE_DELETED21The message is deleted.

Top

ski/MsgType.proto

MsgType

The type of a message is used to identify the message type of a plainMsg. @see PlainMsg#msg

NameNumberDescription
MSG_TYPE_UNKNOWN0
MSG_TYPE_TEXT11
MSG_TYPE_CONTACT12
MSG_TYPE_LOCATION13
MSG_TYPE_STICKER14
MSG_TYPE_IMAGE21
MSG_TYPE_AUDIO22
MSG_TYPE_VIDEO23
MSG_TYPE_FILE24
MSG_TYPE_STREAM31
MSG_TYPE_FRIEND_NOTIF61
MSG_TYPE_GROUP_NOTIF62
MSG_TYPE_SYSTEM_NOTIF63
MSG_TYPE_RETRACT71
MSG_TYPE_DECRYPT_STATUS72
MSG_TYPE_HIDE73
MSG_TYPE_DELETE74

Top

ski/PlainMsg.proto

PlainMsg

PlainMsg is the main proto type to transfer plaintext among peers.

FieldTypeLabelDescription
versionstringThe version number is reserved to keep forward compatibility.
msg_idstringThe uuid for this PlainMsg.
fromstringThe sender's address in simple e2ee address format without devideId.
tostringThe receipient's address in simple e2ee address format without devideId.
time_sendint64The time stamp that is provided by server.
time_deleteint64The optional time to delete by client.
textTextPayloadText message.
contactContactPayloadContact message.
locationLocationPayloadLocation message.
stickerStickerPayloadSticker message.
imageImagePayloadImage message.
audioAudioPayloadAudio message.
videoVideoPayloadVideo message.
fileFilePayloadFile message.
streamStreamPayloadStream message.
friend_notifFriendNotifPayloadNotification message from the friend manager.
group_notifGroupNotifPayloadNotification message from the group manager.
system_notifSystemNotifPayloadNotification message from the system manager.
retractRetractPayloadSpecial message to retract some plainMsgs.
decrypt_statusDecryptStatusPayloadSpecial message to identify the decryption status of some plainMsgs.
hideHidePayloadSpecial message to hide some plainMsgs.
deleteDeletePayloadSpecial message to delete some plainMsgs.
replyReplyThe reply attribute is provided if this plainMsg is used to reply another plainMsg.
forwardsForwardrepeatedThe forwards attribute is an array to keep track the forwarded records.
reportReportThe reply attribute is provided if this plainMsg is used to report against another plainMsg.

Top

ski/Reply.proto

Reply

The message for replying another message.

FieldTypeLabelDescription
replied_msg_fromstringThe simple e2ee address for whom is the sender of replied message.
replied_msg_idstringThe messgae id of the message that is replied.
replied_msg_typeint32The messgae type of the message that is replied.
replied_msg_textstringThe replied text.

Top

ski/Report.proto

Report

The message for reporting another message that is considered to be objectionable.

FieldTypeLabelDescription
msg_idstringThe message id of a message to be reported.
fromstringThe simple e2ee address for whom send the reported message.
reasonReportReasonThe reason for this report.

Top

ski/ReportReason.proto

ReportReason

The reason for a report of an objectionable message.

NameNumberDescription
REPORT_REASON_HARASSMENT0The message is related to harassment. (騷擾)
REPORT_REASON_OBJECTIONABLE_ADVERTISING100The message is related to advertising. (不當內容:廣告)
REPORT_REASON_OBJECTIONABLE_FALSE_INFO101The message is related to false information. (不當內容:不實)
REPORT_REASON_OBJECTIONABLE_BLOODINESS102The message is related to bloodiness. (不當內容:血腥)
REPORT_REASON_OBJECTIONABLE_VIOLENCE103The message is related to violence. (不當內容:暴力)
REPORT_REASON_OBJECTIONABLE_PORNOGRAPHY104The message is related to pornography. (不當內容:色情)
REPORT_REASON_OBJECTIONABLE_HATRED105The message is related to hatred. (不當內容:仇恨)
REPORT_REASON_OBJECTIONABLE_DISCRIMINATION106The message is related to discrimination.(不當內容:歧視)
REPORT_REASON_OBJECTIONABLE_SELF_HARM107The message is related to self-harm. (不當內容:自殘)
REPORT_REASON_CONTRABAND_DRUGS200The message is involved in contraband of drugs. (違禁品:毒品、藥物)
REPORT_REASON_CONTRABAND_FIREARMS201The message is involved in contraband of firearms. (違禁品:槍械)
REPORT_REASON_COUNTERFEITING_ME300The message is a counterfeit of me. (冒充:我)
REPORT_REASON_COUNTERFEITING_FRIEND301The message is a counterfeit of some friend. (冒充:朋友)
REPORT_REASON_COUNTERFEITING_OTHER302The message is a counterfeit of some person. (冒充:其他人)
REPORT_REASON_COUNTERFEITING_CELEBRITY303The message is a counterfeit of some celebrity. (冒充:名人)
REPORT_REASON_MALFUNCTION400The message is malfunctioned. (功能錯誤)
REPORT_REASON_OTHER900Something else. (其它)

Top

ski/RetractPayload.proto

RetractPayload

The message to retract some other msgs.

FieldTypeLabelDescription
retract_msg_idsstringrepeatedThe array of message ids of a message to be retracted.

Top

ski/StickerPayload.proto

StickerPayload

The message for sticker.

FieldTypeLabelDescription
namespacestringThe name space of this sticker.
categorystringThe category of this sticker.
sticker_pack_idstringThe sticker pack id to that this sticker is belonged.
sticker_idstringThe sticker id of this sticker.
descstringThe text description of this sticker.

Top

ski/StreamPayload.proto

StreamPayload

The message for streaming.

FieldTypeLabelDescription
server_urlstringServer url for serving the stream.
room_idstringThe room id of the stream.
createCreateStreamEvent
declineDeclineStreamEvent
destroyDestroyStreamEvent
answeredAnsweredStreamEvent

Top

ski/StreamType.proto

StreamType

The stream type message.

NameNumberDescription
STREAM_TYPE_AUDIO0
STREAM_TYPE_VIDEO1
STREAM_TYPE_CAMERA2
STREAM_TYPE_DESKTOP3

Top

ski/SystemNotifPayload.proto

SystemNotifPayload

The message from system manager.

FieldTypeLabelDescription
opskissm.SystemOpThe ststem operation.
payloadbytesThe utf-8 json string content.

Top

ski/TextPayload.proto

TextPayload

The message for text payload.

FieldTypeLabelDescription
contentstringThe text message that has utf-8 encoding and length limit 20480.

Top

ski/UserState.proto

UserState

The user state message.

NameNumberDescription
USER_STATE_NORMAL0
USER_STATE_BLOCKED1
USER_STATE_REVOKED2
USER_STATE_DEPRECATED3

Top

ski/UserType.proto

UserType

The user type message.

NameNumberDescription
USER_TYPE_PERSON0
USER_TYPE_GROUP1
USER_TYPE_BOT2
USER_TYPE_EDU3
USER_TYPE_GOV4
USER_TYPE_ORG5
USER_TYPE_COM6

Top

ski/VideoPayload.proto

VideoPayload

The message for encrypted video file.

FieldTypeLabelDescription
file_namestringThe file name.
file_pathstringThe url that is used to download this video file.
file_sizeint64The file size.
modified_dateint64The time stamp of this message.
mime_typestringThe mime type.
time_lenint64The time length in milliseconds.
passkeybytesThe passkey that is used to decrypt the download video file.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)