syntax = "proto3"; package moe.nekojimi.friendcloud.protos; import "google/protobuf/any.proto"; message MessageHeader { uint64 sender_id = 1; uint64 message_id = 2; uint64 reply_to_message_id = 3; } message FriendCloudMessage { MessageHeader header = 1; google.protobuf.Any body = 2; } message HelloMessage { uint32 protocol_version = 1; // this is the version of the FriendCloud protocol I speak } message CheckInMessage { repeated uint64 current_change_heads = 1; uint64 current_change = 2; } enum Error { ERROR_UNSPECIFIED = 0; ERROR_WHO_THE_FUCK_ARE_YOU = 1; // sender unidentified or unauthenticated ERROR_PERMISSION_DENIED = 2; // you can't do that ERROR_OBJECT_NOT_FOUND = 3; // one or more object(s) referenced don't exist ERROR_INTERNAL = 4; // internal error ERROR_OUT_OF_DATE = 5; // your action is impossible because you have an out-of-date state (in a way that matters) ERROR_CHECKSUM_FAILURE = 6; // a supplied checksum didn't match the relevant data ERROR_PIECE_NOT_POSSESSED = 7; // you asked for a file piece I don't have ERROR_INVALID_ARGUMENT = 8; // an argument specified is outside the expected range ERROR_NOT_EXPECTING_REPLY = 9; // you sent a reply to a message that I wasn't expecting a reply to ERROR_INVALID_PROTOBUF = 10; // your message couldn't be decoded at all ERROR_END_OF_HISTORY = 11; // you're referencing a change ID that I've forgotten (or never had) ERROR_MESSAGE_BODY_UNKNOWN = 12; // I don't know how to handle the type of message in your message body; please stop sending that one } message ErrorMessage { Error error = 1; string text = 2; } message MultiObjectConfirmationMessage { repeated uint64 expected_return_id = 1; }