lib: Fix server_id_from_string
[Samba.git] / librpc / idl / frstrans.idl
blobed5b105e09ac085b75122cb5f3407635b52d392b
1 #include "idl_types.h"
3 import "misc.idl";
6 uuid("897e2e5f-93f3-4376-9c9c-fd2277495c27"),
7 version(1.0),
8 endpoint("ncacn_ip_tcp:", "ncalrpc:"),
9 helpstring("File Replication Service DFS-R"),
10 pointer_default(unique)
12 interface frstrans
14 /*****************/
15 /* Function 0x00 */
16 WERROR frstrans_CheckConnectivity(
17 [in] GUID replica_set_guid,
18 [in] GUID connection_guid
21 /*****************/
22 /* Function 0x01 */
23 typedef [v1_enum,flag(NDR_PAHEX)] enum {
24 FRSTRANS_PROTOCOL_VERSION_W2K3R2 = 0x00050000,
25 FRSTRANS_PROTOCOL_VERSION_LONGHORN_SERVER = 0x00050002
26 } frstrans_ProtocolVersion;
28 typedef [bitmap32bit] bitmap {
29 FRSTRANS_TRANSPORT_SUPPORTS_RDC_SIMILARITY = 0x00000001
30 } frstrans_TransportFlags;
32 WERROR frstrans_EstablishConnection(
33 [in] GUID replica_set_guid,
34 [in] GUID connection_guid,
35 [in] frstrans_ProtocolVersion downstream_protocol_version,
36 [in] frstrans_TransportFlags downstream_flags,
37 [out,ref] frstrans_ProtocolVersion *upstream_protocol_version,
38 [out,ref] frstrans_TransportFlags *upstream_flags
41 /*****************/
42 /* Function 0x02 */
43 WERROR frstrans_EstablishSession(
44 [in] GUID connection_guid,
45 [in] GUID content_set_guid
48 /*****************/
49 /* Function 0x03 */
50 typedef enum {
51 FRSTRANS_UPDATE_REQUEST_ALL = 0x0000,
52 FRSTRANS_UPDATE_REQUEST_TOMBSTONES = 0x0001,
53 FRSTRANS_UPDATE_REQUEST_LIVE = 0x0002
54 } frstrans_UpdateRequestType;
56 typedef enum {
57 FRSTRANS_UPDATE_STATUS_DONE = 0x0002,
58 FRSTRANS_UPDATE_STATUS_MORE = 0x0003
59 } frstrans_UpdateStatus;
61 typedef [public] struct {
62 GUID db_guid;
63 hyper low;
64 hyper high;
65 } frstrans_VersionVector;
67 typedef [flag(NDR_PAHEX)] struct {
68 boolean32 present;
69 boolean32 name_conflict;
70 uint32 attributes;
71 NTTIME fence;
72 NTTIME clock;
73 NTTIME create_time;
74 GUID content_set_guid;
75 uint8 sha1_hash[20];
76 uint8 rdc_similarity[16];
77 GUID uid_db_guid;
78 hyper uid_version;
79 GUID gsvn_db_guid;
80 hyper gsvn_version;
81 GUID parent_db_guid;
82 hyper parent_version;
83 [string,charset(UTF16)] uint16 name[261];
84 uint32 flags;
85 } frstrans_Update;
87 WERROR frstrans_RequestUpdates(
88 [in] GUID connection_guid,
89 [in] GUID content_set_guid,
90 [in,range(0,256)] uint32 credits_available,
91 [in,range(0,1)] boolean32 hash_requested,
92 [in,range(0,2)]
93 frstrans_UpdateRequestType update_request_type,
94 [in] uint32 version_vector_diff_count,
95 [in,size_is(version_vector_diff_count)]
96 frstrans_VersionVector *version_vector_diff,
97 [out,ref,size_is(credits_available),length_is(*update_count)]
98 frstrans_Update *frs_update,
99 [out,ref] uint32 *update_count,
100 [out,ref] frstrans_UpdateStatus *update_status,
101 [out,ref] GUID *gvsn_db_guid,
102 [out,ref] hyper *gvsn_version
105 /*****************/
106 /* Function 0x04 */
107 typedef enum {
108 FRSTRANS_VERSION_REQUEST_NORNAL_SYNC = 0x0000,
109 FRSTRANS_VERSION_REQUEST_SLOW_SYNC = 0x0001,
110 FRSTRANS_VERSION_REQUEST_SLAVE_SYNC = 0x0002
111 } frstrans_VersionRequestType;
113 typedef enum {
114 FRSTRANS_VERSION_CHANGE_NOTIFY = 0x0000,
115 FRSTRANS_VERSION_CHANGE_ALL = 0x0002
116 } frstrans_VersionChangeType;
118 WERROR frstrans_RequestVersionVector(
119 [in] uint32 sequence_number,
120 [in] GUID connection_guid,
121 [in] GUID content_set_guid,
122 [in,range(0,2)] frstrans_VersionRequestType request_type,
123 [in,range(0,2)] frstrans_VersionChangeType change_type,
124 [in] hyper vv_generation
127 /*****************/
128 /* Function 0x05 */
129 typedef struct {
130 GUID machine_guid;
131 uint32 year;
132 uint32 month;
133 uint32 day_of_week;
134 uint32 day;
135 uint32 hour;
136 uint32 minute;
137 uint32 second;
138 uint32 milli_seconds;
139 } frstrans_EpoqueVector;
141 typedef struct {
142 hyper vv_generation;
143 uint32 version_vector_count;
144 [size_is(version_vector_count)]
145 frstrans_VersionVector *version_vector;
146 uint32 epoque_vector_count;
147 [size_is(epoque_vector_count)]
148 frstrans_EpoqueVector *epoque_vector;
149 } frstrans_AsyncVersionVectorResponse;
151 typedef struct {
152 uint32 sequence_number;
153 WERROR status;
154 frstrans_AsyncVersionVectorResponse response;
155 } frstrans_AsyncResponseContext;
157 WERROR frstrans_AsyncPoll(
158 [in] GUID connection_guid,
159 [out,ref] frstrans_AsyncResponseContext *response
162 /*****************/
163 /* Function 0x06 */
164 [todo] void FRSTRANS_REQUEST_RECORDS();
166 /*****************/
167 /* Function 0x07 */
168 [todo] void FRSTRANS_UPDATE_CANCEL();
170 /*****************/
171 /* Function 0x08 */
172 [todo] void FRSTRANS_RAW_GET_FILE_DATA();
174 /*****************/
175 /* Function 0x09 */
176 [todo] void FRSTRANS_RDC_GET_SIGNATURES();
178 /*****************/
179 /* Function 0x0a */
180 [todo] void FRSTRANS_RDC_PUSH_SOURCE_NEEDS();
182 /*****************/
183 /* Function 0x0b */
184 [todo] void FRSTRANS_RDC_GET_FILE_DATA();
186 /*****************/
187 /* Function 0x0c */
188 WERROR frstrans_RdcClose(
189 [in,out,ref] policy_handle *server_context
192 /*****************/
193 /* Function 0x0d */
194 typedef enum {
195 FRSTRANS_STAGING_POLICY_SERVER_DEFAULTY = 0x0000,
196 FRSTRANS_STAGING_POLICY_STATGING_REQUIRED = 0x0001,
197 FRSTRANS_STAGING_POLICY_RESTATGING_REQUIRED = 0x0002
198 } frstrans_RequestedStagingPolicy;
200 typedef enum {
201 FRSTRANS_RDC_FILTER_GENERIC = 0x0000,
202 FRSTRANS_RDC_FILTER_MAX = 0x0001,
203 FRSTRANS_RDC_FILTER_POINT = 0x0002,
204 FRSTRANS_RDC_MAX_ALGORITHM = 0x0003
205 } frstrans_RdcChunckerAlgorithm;
207 typedef struct {
208 frstrans_RdcChunckerAlgorithm chunker_type;
209 uint8 chunker_parameters[64];
210 } frstrans_RdcParameterGeneric;
212 typedef struct {
213 [range(128,1024*16)] uint16 min_horizon_size;
214 [range(2,96)] uint16 max_window_size;
215 } frstrans_RdcParameterFilterMax;
217 typedef struct {
218 uint16 min_chunk_size;
219 uint16 max_chunk_size;
220 } frstrans_RdcParameterFilterPoint;
222 typedef [switch_type(frstrans_RdcChunckerAlgorithm)] union {
223 [case(FRSTRANS_RDC_FILTER_GENERIC)]
224 frstrans_RdcParameterGeneric filter_generic;
225 [case(FRSTRANS_RDC_FILTER_MAX)]
226 frstrans_RdcParameterFilterMax filter_max;
227 [case(FRSTRANS_RDC_FILTER_POINT)]
228 frstrans_RdcParameterFilterPoint filter_point;
229 } frstrans_RdcParameterUnion;
231 typedef struct {
232 frstrans_RdcChunckerAlgorithm rdc_chunker_algorithm;
233 [switch_is(rdc_chunker_algorithm)] frstrans_RdcParameterUnion u;
234 } frstrans_RdcParameters;
236 typedef enum {
237 FRSTRANS_RDC_VERSION = 0x0001
238 } frstrans_RdcVersion;
240 typedef enum {
241 FRSTRANS_RDC_VERSION_COMPATIBLE = 0x0001
242 } frstrans_RdcVersionCompatible;
244 typedef enum {
245 FRSTRANS_RDC_UNCOMPRESSED = 0x0000,
246 FRSTRANS_RDC_XPRESS = 0x0001
247 } frstrans_RdcCompressionAlgorithm;
249 typedef struct {
250 hyper on_disk_file_size;
251 hyper file_size_estimate;
252 frstrans_RdcVersion rdc_version;
253 frstrans_RdcVersionCompatible rdc_minimum_compatible_version;
254 [range(0,8)] uint8 rdc_signature_levels;
255 frstrans_RdcCompressionAlgorithm compression_algorithm;
256 [size_is(rdc_signature_levels)]
257 frstrans_RdcParameters rdc_filter_parameters[*];
258 } frstrans_RdcFileInfo;
260 WERROR frstrans_InitializeFileTransferAsync(
261 [in] GUID connection_guid,
262 [in,out,ref] frstrans_Update *frs_update,
263 [in,range(0,1)] boolean32 rdc_desired,
264 [in,out,ref] frstrans_RequestedStagingPolicy *staging_policy,
265 [out,ref] policy_handle *server_context,
266 [out,ref] frstrans_RdcFileInfo **rdc_file_info,
267 [out,ref,size_is(buffer_size),length_is(*size_read)]
268 uint8 *data_buffer,
269 [in,range(0,262144)] uint32 buffer_size,
270 [out,ref] uint32 *size_read,
271 [out,ref] boolean32 *is_end_of_file
274 /*****************/
275 /* Function 0x0e */
276 [todo] void FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE();
278 /* The following functions are new in Windows 2008 */
280 /*****************/
281 /* Function 0x0f */
282 typedef [flag(NDR_PAHEX)] pipe uint8 frstrans_BytePipe;
284 WERROR frstrans_RawGetFileDataAsync(
285 [in,ref] policy_handle *server_context,
286 [out,ref] frstrans_BytePipe *byte_pipe
289 /*****************/
290 /* Function 0x10 */
291 WERROR frstrans_RdcGetFileDataAsync(
292 [in,ref] policy_handle *server_context,
293 [out,ref] frstrans_BytePipe *byte_pipe