diff options
author | David Disseldorp <ddiss@samba.org> | 2012-02-21 14:04:42 +0100 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2012-06-08 13:34:31 +0200 |
commit | 2836787daa8e78efc7dd166c4f462ca392b3c4c2 (patch) | |
tree | 1d80fa78003250c98c86c30f3e82dc09c407b48e /librpc | |
parent | 03767f5f5ac0293ef61d960ad980636898bd64ba (diff) | |
download | samba-2836787daa8e78efc7dd166c4f462ca392b3c4c2.tar.gz |
idl: add File Server Remote VSS Protocol idl
MS-FSRVP preview documents used as reference.
H_ERROR codes should be moved to a more generic file.
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/idl/fsrvp.idl | 113 | ||||
-rw-r--r-- | librpc/idl/wscript_build | 4 | ||||
-rw-r--r-- | librpc/wscript_build | 12 |
3 files changed, 126 insertions, 3 deletions
diff --git a/librpc/idl/fsrvp.idl b/librpc/idl/fsrvp.idl new file mode 100644 index 0000000000..d61545b271 --- /dev/null +++ b/librpc/idl/fsrvp.idl @@ -0,0 +1,113 @@ +#include "idl_types.h" + +/* + * File Server Remote VSS Protocol Definitions + */ + +import "misc.idl"; + +[ uuid("a8e0653c-2744-4389-a61d-7373df8b2292"), + version(1.0), + endpoint("ncacn_np:[\\pipe\\FssagentRpc]"), + helpstring("File Server Remote VSS Protocol"), + pointer_default(unique) +] interface FileServerVssAgent +{ + const uint32 FSRVP_E_BAD_STATE = 0x80042301; + const uint32 FSRVP_E_SHADOW_COPY_SET_IN_PROGRESS = 0x80042316; + const uint32 FSRVP_E_NOT_SUPPORTED = 0x8004230C; + const uint32 FSRVP_E_WAIT_TIMEOUT = 0x00000102; + const uint32 FSRVP_E_WAIT_FAILED = 0xFFFFFFFF; + const uint32 FSRVP_E_OBJECT_ALREADY_EXISTS = 0x8004230D; + const uint32 FSRVP_E_OBJECT_NOT_FOUND = 0x80042308; + const uint32 FSRVP_E_BAD_ID = 0x80042302; /* wire, not documented */ + + /* TODO move these to generic herror defines or COM in orpc.idl */ + const uint32 E_ACCESSDENIED = 0x80070005; + const uint32 E_INVALIDARG = 0x80070057; + const uint32 E_OUTOFMEMORY = 0x80000002; + + typedef struct { + GUID ShadowCopySetId; + GUID ShadowCopyId; + [string,charset(UTF16)] uint16 *ShareNameUNC; + [string,charset(UTF16)] uint16 *ShadowCopyShareName; + NTTIME tstamp; + } fssagent_share_mapping_1; + + typedef union { + [case(1)] fssagent_share_mapping_1 *ShareMapping1; + [default]; + } fssagent_share_mapping; + + const uint32 FSRVP_RPC_VERSION_1 = 0x000000001; + DWORD fss_GetSupportedVersion( + [in] uint8 magic[52], /* wire */ + [out] uint32 *MinVersion, + [out] uint32 *MaxVersion); + + const uint32 ATTR_PERSISTENT = 0x00000001; + const uint32 ATTR_NO_AUTO_RECOVERY = 0x00000002; + const uint32 ATTR_NO_AUTO_RELEASE = 0x00000008; + const uint32 ATTR_NO_WRITERS = 0x00000010; + const uint32 ATTR_FILE_SHARE = 0x04000000; + const uint32 ATTR_AUTO_RECOVERY = 0x00400000; + + const uint32 FSRVP_CTX_BACKUP = 0x00000000; + const uint32 FSRVP_CTX_FILE_SHARE_BACKUP = 0x00000010; + const uint32 FSRVP_CTX_NAS_ROLLBACK = 0x00000019; + const uint32 FSRVP_CTX_APP_ROLLBACK = 0x00000009; + DWORD fss_SetContext( + [in] uint32 Context); + + DWORD fss_StartShadowCopySet( + [in] GUID ClientShadowCopySetId, + [out] GUID *pShadowCopySetId); + + DWORD fss_AddToShadowCopySet( + [in] GUID ClientShadowCopyId, + [in] GUID ShadowCopySetId, + [in] [string,charset(UTF16)] uint16 *ShareName, + [out] GUID *pShadowCopyId); + + DWORD fss_CommitShadowCopySet( + [in] GUID ShadowCopySetId, + [in] uint32 TimeOutInMilliseconds); + + DWORD fss_ExposeShadowCopySet( + [in] GUID ShadowCopySetId, + [in] uint32 TimeOutInMilliseconds); + + DWORD fss_RecoveryCompleteShadowCopySet( + [in] GUID ShadowCopySetId); + + DWORD fss_AbortShadowCopySet( + [in] GUID ShadowCopySetId); + + DWORD fss_IsPathSupported( + [in] [string,charset(UTF16)] uint16 *ShareName, + [in] uint8 magic[52], /* wire */ + [out] boolean32 *SupportedByThisProvider, + [out] [string,charset(UTF16)] uint16 **OwnerMachineName); + + DWORD fss_IsPathShadowCopied( + [in] [string,charset(UTF16)] uint16 *ShareName, + [out] boolean32 *ShadowCopyPresent, + [out] int32 *ShadowCopyCompatibility); + + DWORD fss_GetShareMapping( + [in] GUID ShadowCopyId, + [in] GUID ShadowCopySetId, + [in] [string,charset(UTF16)] uint16 *ShareName, + [in] uint32 Level, + [out,switch_is(Level)] fssagent_share_mapping *ShareMapping); + + DWORD fss_DeleteShareMapping( + [in] GUID ShadowCopySetId, + [in] GUID ShadowCopyId, + [in] [string,charset(UTF16)] uint16 *ShareName); + + DWORD fss_PrepareShadowCopySet( + [in] GUID ShadowCopySetId, + [in] uint32 TimeOutInMilliseconds); +} diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build index c90edf1002..58d3181cb5 100644 --- a/librpc/idl/wscript_build +++ b/librpc/idl/wscript_build @@ -12,7 +12,7 @@ bld.SAMBA_PIDL_LIST('PIDL', drsblobs.idl efs.idl frstrans.idl mgmt.idl netlogon.idl notify.idl policyagent.idl scerpc.idl svcctl.idl wkssvc.idl eventlog6.idl backupkey.idl - printcap.idl''', + fsrvp.idl''', options='--header --ndr-parser --samba3-ndr-server --server --client --python', output_dir='../gen_ndr') @@ -27,7 +27,7 @@ bld.SAMBA_PIDL_LIST('PIDL', output_dir='../gen_ndr') bld.SAMBA_PIDL_LIST('PIDL', - 'rap.idl ntprinting.idl preg.idl ioctl.idl', + 'rap.idl ntprinting.idl preg.idl ioctl.idl printcap.idl', options='--header --ndr-parser', output_dir='../gen_ndr') diff --git a/librpc/wscript_build b/librpc/wscript_build index a94ff8dac4..46570ae76b 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -285,6 +285,11 @@ bld.SAMBA_SUBSYSTEM('NDR_COMPRESSION', deps='z LZXPRESS' ) +bld.SAMBA_SUBSYSTEM('NDR_FSRVP', + source='gen_ndr/ndr_fsrvp.c', + public_deps='ndr' + ) + bld.SAMBA_SUBSYSTEM('NDR_DCERPC', source='gen_ndr/ndr_dcerpc.c', public_deps='ndr', @@ -579,12 +584,17 @@ bld.SAMBA_SUBSYSTEM('NDR_IOCTL', public_deps='ndr' ) +bld.SAMBA_SUBSYSTEM('RPC_NDR_FSRVP', + source='gen_ndr/ndr_fsrvp_c.c', + public_deps='dcerpc-binding NDR_FSRVP' + ) + # a grouping library for NDR subsystems that may be used by more than one target bld.SAMBA_LIBRARY('ndr-samba', source=[], deps='''NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_SCHANNEL NDR_MGMT NDR_DNSP NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM - NDR_NTPRINTING''', + NDR_NTPRINTING NDR_FSRVP''', private_library=True, grouping_library=True ) |