1 // NetFSServerRosterDefs.h 2 3 #ifndef NET_FS_SERVER_ROSTER_DEFS_H 4 #define NET_FS_SERVER_ROSTER_DEFS_H 5 6 extern const char* kNetFSServerSignature; 7 8 // message what field values 9 enum { 10 NETFS_REQUEST_GET_MESSENGER = 'nfgm', 11 12 NETFS_REQUEST_ADD_USER = 'nfau', 13 NETFS_REQUEST_REMOVE_USER = 'nfru', 14 NETFS_REQUEST_GET_USERS = 'nfgu', 15 NETFS_REQUEST_GET_USER_STATISTICS = 'nfus', 16 17 NETFS_REQUEST_ADD_SHARE = 'nfas', 18 NETFS_REQUEST_REMOVE_SHARE = 'nfrs', 19 NETFS_REQUEST_GET_SHARES = 'nfgs', 20 NETFS_REQUEST_GET_SHARE_USERS = 'nfsu', 21 NETFS_REQUEST_GET_SHARE_STATISTICS = 'nfss', 22 23 NETFS_REQUEST_SET_USER_PERMISSIONS = 'nfsp', 24 NETFS_REQUEST_GET_USER_PERMISSIONS = 'nfgp', 25 26 NETFS_REQUEST_SAVE_SETTINGS = 'nfse', 27 }; 28 29 /* 30 Protocol 31 ======== 32 33 Common 34 ------ 35 36 reply: 37 "error": int32 38 39 40 NETFS_REQUEST_GET_MESSENGER 41 --------------------------- 42 43 reply: 44 "messenger": messenger 45 46 47 NETFS_REQUEST_ADD_USER 48 ---------------------- 49 50 request: 51 "user": string 52 [ "password": string ] 53 54 55 NETFS_REQUEST_REMOVE_USER 56 ------------------------- 57 58 request: 59 "user": string 60 61 62 NETFS_REQUEST_GET_USERS 63 ----------------------- 64 65 reply: 66 "users": message ( "users": string[] ) 67 68 69 NETFS_REQUEST_GET_USER_STATISTICS 70 --------------------------------- 71 72 request: 73 "user": string 74 75 reply: 76 "statistics": message ( not defined yet ) 77 78 79 NETFS_REQUEST_ADD_SHARE 80 ----------------------- 81 82 request: 83 "share": string 84 "path": string 85 86 87 NETFS_REQUEST_REMOVE_SHARE 88 -------------------------- 89 90 request: 91 "share": string 92 93 94 NETFS_REQUEST_GET_SHARES 95 ------------------------ 96 97 reply: 98 "shares": message ( "shares": string[] 99 "paths": string[] ) 100 101 102 NETFS_REQUEST_GET_SHARE_USERS 103 ----------------------------- 104 105 request: 106 "share": string 107 108 reply: 109 "users": message ( "users": string[] ) 110 111 112 NETFS_REQUEST_GET_SHARE_STATISTICS 113 ---------------------------------- 114 115 request: 116 "share": string 117 118 reply: 119 "statistics": message ( not defined yet ) 120 121 122 NETFS_REQUEST_SET_USER_PERMISSIONS 123 ---------------------------------- 124 125 request: 126 "share": string 127 "user": string 128 "permissions": int32 129 130 131 NETFS_REQUEST_GET_USER_PERMISSIONS 132 ---------------------------------- 133 134 request: 135 "share": string 136 "user": string 137 138 reply: 139 "permissions": int32 140 141 142 NETFS_REQUEST_SAVE_SETTINGS 143 --------------------------- 144 145 request: <empty> 146 147 */ 148 149 #endif // NET_FS_SERVER_ROSTER_DEFS_H 150