libdnet/source/libdnet/protobuf/dnet.proto

78 lines
1.3 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
2021-07-18 13:53:04 +00:00
AUTH = 0;
REGISTER = 1;
2021-08-27 12:59:09 +00:00
// For all ChannelMessage messages
CHANNEL = 2;
2021-08-27 12:47:47 +00:00
LIST_CHANS = 3;
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
}
2021-08-27 12:47:47 +00:00
// ChannelMessage
//
// These represent channel commands
message ChannelCommand
{
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 12:47:47 +00:00
}
// The channel to which the command applies
string name;
// Additional data (dependent on command)
bytes additionalData;
}
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
string name;
2021-08-27 12:59:09 +00:00
2021-08-27 12:55:59 +00:00
// The property's data
bytes data;
}
2021-08-27 12:47:47 +00:00
2021-07-18 13:53:04 +00:00
message ProfileDetails
{
string username;
string server;
repeated UserProperty = 2;
}
message UserProperty
{
string propertyName;
bytes propertyData;
2021-07-18 13:53:04 +00:00
}