~nataliabidart/ubuntuone-storage-protocol/add-udf-messages

« back to all changes in this revision

Viewing changes to ubuntuone/storageprotocol/protocol.proto

  • Committer: natalia.bidart at canonical
  • Date: 2009-12-18 01:09:50 UTC
  • Revision ID: natalia.bidart@canonical.com-20091218010950-ylbzxpppdzh6mevf
Adding new messages for UDF and volumes.

Fixed code style issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
message Message {
21
21
    required int32 id = 1; // A session-unique number identifying the
22
 
                         // request that started this exchange
 
22
                           // request that started this exchange
23
23
 
24
24
    enum MessageType {
25
25
        NOOP = 0;
35
35
        ROOT = 10;
36
36
        MAKE_DIR = 11;
37
37
        MAKE_FILE = 12;
38
 
        NEW_DIR = 13;  // answer to MAKE_DIR
39
 
        NEW_FILE = 14;  // answer to MAKE_FILE
 
38
        NEW_DIR = 13;           // answer to MAKE_DIR
 
39
        NEW_FILE = 14;          // answer to MAKE_FILE
40
40
        QUERY = 15;
41
41
        NODE_STATE = 16;
42
42
        QUERY_END = 17;
47
47
        EOF = 22;
48
48
        MOVE = 23;
49
49
        UNLINK = 24;
50
 
        CREATE_SHARE = 25;
51
 
        LIST_SHARES = 26;
52
 
        SHARES_INFO = 27;  // answer to LIST_SHARES, one message per share
53
 
        SHARES_END = 28;  // no more SHARES_INFO
54
 
        NOTIFY_SHARE = 29;
55
 
        SHARE_ACCEPTED = 30;
56
 
        SHARE_DELETED = 31;
 
50
 
 
51
        CREATE_SHARE = 25;      // enable the sharing for a given node
 
52
        LIST_SHARES = 26;       // list all the shares
 
53
        SHARES_INFO = 27;       // answer to LIST_SHARES, one message per share
 
54
        SHARES_END = 28;        // no more SHARES_INFO
 
55
        NOTIFY_SHARE = 29;      // notifies the presence of a new share
 
56
        SHARE_ACCEPTED = 30;    // notifies whether a share was accepted or not
 
57
        SHARE_DELETED = 31;     // answer to DELETE_SHARE (the share was disabled)
 
58
        SHARE_CREATED = 34;     // answer to CREATE_SHARE, returns share id
 
59
        DELETE_SHARE = 36;      // disable the sharing for a given node
 
60
 
 
61
        CREATE_UDF = 44;        // register a new UDF against the server
 
62
        LIST_VOLUMES = 45;      // list all volumes (UDFs plus accepted shares)
 
63
        VOLUME_DELETED = 46;    // answer to DELETE_VOLUME (the volume was deleted)
 
64
        VOLUME_CREATED = 47;    // answer to CREATE_UDF or a share was accepted
 
65
        DELETE_VOLUME = 48;     // removes the UDF and its files from the server
 
66
 
57
67
        CANCEL_REQUEST = 32;
58
68
        NODE_ATTR = 33;
59
 
        SHARE_CREATED = 34;
60
69
        CANCELLED = 35;
61
 
        DELETE_SHARE = 36;
62
 
        QUERY_CAPS = 37;  // client2server, no commitment
63
 
        SET_CAPS = 38;    // client2server, commitment from the server
64
 
        ACCEPT_CAPS = 39; // server2client, the answer for previous two
65
 
        FREE_SPACE_INFO = 40; // answer to FREE_SPACE_INQUIRY
 
70
        QUERY_CAPS = 37;        // client2server, no commitment
 
71
        SET_CAPS = 38;          // client2server, commitment from the server
 
72
        ACCEPT_CAPS = 39;       // server2client, the answer for previous two
 
73
        FREE_SPACE_INFO = 40;   // answer to FREE_SPACE_INQUIRY
66
74
        FREE_SPACE_INQUIRY = 41;
67
 
        ACCOUNT_INFO = 42; // answer to ACCOUNT_INQUIRY
 
75
        ACCOUNT_INFO = 42;      // answer to ACCOUNT_INQUIRY
68
76
        ACCOUNT_INQUIRY = 43;
69
77
    }
70
78
 
91
99
    optional CancelRequest cancel_request = 17;
92
100
    optional NodeAttr node_attr = 18;
93
101
 
94
 
    // share management
 
102
    // share, UDf and volume management
95
103
    optional CreateShare create_share = 19;
96
104
    optional Shares shares = 20;
97
105
    optional NotifyShare notify_share = 21;
100
108
    optional ShareCreated share_created = 24;
101
109
    optional DeleteShare delete_share = 25;
102
110
 
 
111
    optional CreateUDF create_udf = 33;
 
112
    optional Volumes volumes = 34;
 
113
    optional VolumeDeleted volume_deleted = 35;
 
114
    optional VolumeCreated volume_created = 36;
 
115
    optional DeleteVolume delete_volume = 37;
 
116
 
103
117
    // caps
104
118
    repeated QueryCaps query_caps = 26;
105
119
    repeated SetCaps set_caps = 27;
149
163
}
150
164
 
151
165
message Make {
152
 
    optional bytes share = 1;
 
166
    optional bytes share = 1; // share is actually a volume id
153
167
    optional bytes parent_node = 2;
154
168
    optional string name = 3;
155
169
}
303
317
    optional string share_id = 1;
304
318
}
305
319
 
 
320
message CreateUDF {
 
321
    optional bytes path = 1;
 
322
    optional string name = 2;
 
323
}
 
324
 
 
325
message Volumes {
 
326
    optional bytes volume = 1;
 
327
    optional bytes node = 2;
 
328
}
 
329
 
 
330
message VolumeDeleted {
 
331
    optional string volume = 1;
 
332
}
 
333
 
 
334
message VolumeCreated {
 
335
    optional string volume = 1;
 
336
}
 
337
 
 
338
message DeleteVolume {
 
339
    optional string volume = 1;
 
340
}
 
341
 
306
342
message QueryCaps {
307
343
    optional string capability = 1;
308
344
}