libdnet/source/libdnet/protobuf/dnet.proto

95 lines
1.8 KiB
Protocol Buffer
Raw Normal View History

syntax="proto3";
2021-07-18 13:53:04 +00:00
//DNETMessage
//
//This is the container for all message types
message DNETMessage
{
enum MessageType
{
2021-08-27 12:59:09 +00:00
// For all AccountMessage messages
ACCOUNT = 0;
2021-08-27 12:59:09 +00:00
// For all ChannelMessage messages
CHANNEL = 1;
2021-08-27 12:59:09 +00:00
// For all ServerMessage messages
2021-08-27 13:06:09 +00:00
SERVER = 2;
2021-07-18 13:53:04 +00:00
}
2021-08-27 12:41:57 +00:00
// Type of message
2021-07-18 13:53:04 +00:00
MessageType type = 1;
2021-08-27 12:41:57 +00:00
// Message contents
bytes content = 2;
2021-07-18 13:53:04 +00:00
}
// AccountMessage
//
// These represents account control messages for things
// such as account management, authentication, profile
// manipulation etc.
2021-08-27 13:02:48 +00:00
message AccountMessage
{
enum MessageType
{
AUTH = 0;
REGISTRATION = 1;
DEREG = 2;
GET_PROFILE_PROPS = 3;
SET_PROFILE_PROP = 4;
GET_PROFILE_PROP = 5;
2021-08-27 13:03:24 +00:00
LOGOUT = 6;
}
// The type of the account command
2021-08-27 13:06:09 +00:00
MessageType type = 1;
// The user to which the command applies
2021-08-27 13:06:09 +00:00
string name = 2;
// Additional data (dependent on command)
2021-08-27 13:06:09 +00:00
bytes additionalData = 3;
}
2021-08-27 12:47:47 +00:00
// ChannelMessage
//
// These represent channel commands
2021-08-27 13:02:48 +00:00
message ChannelMessage
2021-08-27 12:47:47 +00:00
{
enum MessageType
{
CREATE = 0;
DESTROY = 1;
JOIN = 2;
LEAVE = 3;
2021-08-27 12:55:59 +00:00
SET_PROP = 4;
GET_PROPS = 5;
GET_MEMBERS = 6;
GET_PROP = 7;
2021-08-27 13:07:11 +00:00
NEW_MESSAGE_ALERT = 8;
2021-08-27 12:47:47 +00:00
}
// The type of channel command
2021-08-27 13:06:09 +00:00
MessageType type = 1;
2021-08-27 12:47:47 +00:00
// The channel to which the command applies
2021-08-27 13:06:09 +00:00
string name = 2;
2021-08-27 12:47:47 +00:00
// Additional data (dependent on command)
2021-08-27 13:06:09 +00:00
bytes additionalData = 3;
2021-08-27 12:47:47 +00:00
}
2021-08-27 12:59:09 +00:00
// Channel/User Property
2021-08-27 12:55:59 +00:00
//
2021-08-27 12:59:09 +00:00
// Represents a channel/user property which is a mapping
2021-08-27 12:55:59 +00:00
// of a key to a value (bytes) of which its interpretation
// is solely up to the user
2021-08-27 12:59:09 +00:00
message Property
2021-08-27 12:55:59 +00:00
{
// Property's name
2021-08-27 13:06:09 +00:00
string name = 1;
2021-08-27 12:59:09 +00:00
2021-08-27 12:55:59 +00:00
// The property's data
2021-08-27 13:06:09 +00:00
bytes data = 2;
2021-08-27 13:03:07 +00:00
}