libdnet/source/libdnet/protobuf/dnet.proto

95 lines
1.8 KiB
Protocol Buffer

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