s3:librpc/idl/smbXsrv.idl: add smbXsrv_version_* structures
[Samba/gebeck_regimport.git] / source3 / librpc / idl / smbXsrv.idl
blob6452084d5c9a61cdb9992f7a381d675ead2ae926
1 #include "idl_types.h"
3 import "server_id.idl";
6 uuid("07408340-ae31-11e1-97dc-539f7fddc06f"),
7 version(0.0),
8 pointer_default(unique),
9 helpstring("smbXsrv structures")
11 interface smbXsrv
14 * smbXsrv_version* is designed to allow
15 * rolling code upgrades in future (within a cluster).
17 * This just adds the infrastructure,
18 * but we does not implement it yet!
20 * Currently it only prevents that
21 * nodes with a different version numbers
22 * cannot run at the same time.
24 * Each node checks at startup, if the version
25 * matches the version of all other nodes.
26 * And it exits if the version does not match
27 * to avoid corruption.
29 * While it would be possible to add versioning
30 * to each of our internal databases it is easier
31 * use a dedicated database "smbXsrv_version_global.tdb"
32 * to hold the global version information.
34 * This removes extra complexity from the individual
35 * databases and allows that we add/remove databases
36 * or use different indexing keys.
39 typedef [v1_enum] enum {
41 * NOTE: Version 0 is designed to be unstable and the format
42 * may change during development.
44 SMBXSRV_VERSION_0 = 0x00000000
45 } smbXsrv_version_values;
47 const uint32 SMBXSRV_VERSION_CURRENT = SMBXSRV_VERSION_0;
49 typedef struct {
50 server_id server_id;
51 smbXsrv_version_values min_version;
52 smbXsrv_version_values max_version;
53 smbXsrv_version_values current_version;
54 } smbXsrv_version_node0;
56 typedef struct {
57 [ignore] db_record *db_rec;
58 [range(1, 1024)] uint32 num_nodes;
59 smbXsrv_version_node0 nodes[num_nodes];
60 } smbXsrv_version_global0;
62 typedef union {
63 [case(0)] smbXsrv_version_global0 *info0;
64 [default] hyper *dummy;
65 } smbXsrv_version_globalU;
67 typedef [public] struct {
68 smbXsrv_version_values version;
69 uint32 seqnum;
70 [switch_is(version)] smbXsrv_version_globalU info;
71 } smbXsrv_version_globalB;
73 void smbXsrv_version_global_decode(
74 [in] smbXsrv_version_globalB blob