iwbembackuprestore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IWbemBackupRestore interface identifier c49e32c7-bc8b-11d2-85d4-00105a1f8304
	BackupRestoreIID = &dcom.IID{Data1: 0xc49e32c7, Data2: 0xbc8b, Data3: 0x11d2, Data4: []byte{0x85, 0xd4, 0x00, 0x10, 0x5a, 0x1f, 0x83, 0x04}}
	// Syntax UUID
	BackupRestoreSyntaxUUID = &uuid.UUID{TimeLow: 0xc49e32c7, TimeMid: 0xbc8b, TimeHiAndVersion: 0x11d2, ClockSeqHiAndReserved: 0x85, ClockSeqLow: 0xd4, Node: [6]uint8{0x0, 0x10, 0x5a, 0x1f, 0x83, 0x4}}
	// Syntax ID
	BackupRestoreSyntaxV0_0 = &dcerpc.SyntaxID{IfUUID: BackupRestoreSyntaxUUID, IfVersionMajor: 0, IfVersionMinor: 0}
)
View Source
var (
	// import guard
	GoPackage = "dcom/wmi"
)

Functions

func BackupRestoreServerHandle

func BackupRestoreServerHandle(ctx context.Context, o BackupRestoreServer, opNum int, r ndr.Reader) (dcerpc.Operation, error)

func NewBackupRestoreServerHandle

func NewBackupRestoreServerHandle(o BackupRestoreServer) dcerpc.ServerHandle

func RegisterBackupRestoreServer

func RegisterBackupRestoreServer(conn dcerpc.Conn, o BackupRestoreServer, opts ...dcerpc.Option)

Types

type BackupRequest

type BackupRequest struct {
	// This: ORPCTHIS structure that is used to send ORPC extension data to the server.
	This *dcom.ORPCThis `idl:"name:This" json:"this"`
	// strBackupToFile: MUST be a UTF-16 string, which MUST contain the name of the file
	// to which the CIM database is backed up. This parameter MUST NOT<58> be NULL.
	BackupToFile string `idl:"name:strBackupToFile;string" json:"backup_to_file"`
	// lFlags:  This parameter is not used, and its value MUST be 0x0.
	Flags int32 `idl:"name:lFlags" json:"flags"`
}

BackupRequest structure represents the Backup operation request

func (*BackupRequest) MarshalNDR

func (o *BackupRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*BackupRequest) UnmarshalNDR

func (o *BackupRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type BackupResponse

type BackupResponse struct {
	// That: ORPCTHAT structure that is used to return ORPC extension data to the client.
	That *dcom.ORPCThat `idl:"name:That" json:"that"`
	// Return: The Backup return value.
	Return int32 `idl:"name:Return" json:"return"`
}

BackupResponse structure represents the Backup operation response

func (*BackupResponse) MarshalNDR

func (o *BackupResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*BackupResponse) UnmarshalNDR

func (o *BackupResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type BackupRestoreClient

type BackupRestoreClient interface {

	// IUnknown retrieval method.
	Unknown() iunknown.UnknownClient

	// On the IWbemBackupRestore::Backup method invocation, the server MUST back up the
	// contents of the CIM database.
	//
	// Return Values: This method MUST return an HRESULT value that MUST indicate the status
	// of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section
	// 2.2.11) to indicate the successful completion of the method.
	//
	// In case of failure, the server MUST return an HRESULT whose S (severity) bit is set
	// as specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation
	// dependent.
	//
	// The IWbemBackupRestore::Backup method MUST be called on the interface that is obtained
	// from the DCOM Remote Protocol activation of a CLSID_WbemBackupRestore interface,
	// as specified in this section.
	Backup(context.Context, *BackupRequest, ...dcerpc.CallOption) (*BackupResponse, error)

	// On the IWbemBackupRestore::Restore method invocation, the server MUST restore the
	// contents of the CIM database.
	//
	// Return Values: This method MUST return an HRESULT value that MUST indicate the status
	// of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section
	// 2.2.11) to indicate the successful completion of the method.
	//
	// If the WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN flag is not set, the server MUST return
	// WBEM_E_INVALID_PARAMETER.
	//
	// In case of failure, the server MUST return an HRESULT whose S (severity) bit is set
	// as specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation
	// dependent.
	Restore(context.Context, *RestoreRequest, ...dcerpc.CallOption) (*RestoreResponse, error)

	// AlterContext alters the client context.
	AlterContext(context.Context, ...dcerpc.Option) error

	// IPID sets the object interface identifier.
	IPID(context.Context, *dcom.IPID) BackupRestoreClient
}

IWbemBackupRestore interface.

func NewBackupRestoreClient

func NewBackupRestoreClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (BackupRestoreClient, error)

type BackupRestoreServer

type BackupRestoreServer interface {

	// IUnknown base class.
	iunknown.UnknownServer

	// On the IWbemBackupRestore::Backup method invocation, the server MUST back up the
	// contents of the CIM database.
	//
	// Return Values: This method MUST return an HRESULT value that MUST indicate the status
	// of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section
	// 2.2.11) to indicate the successful completion of the method.
	//
	// In case of failure, the server MUST return an HRESULT whose S (severity) bit is set
	// as specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation
	// dependent.
	//
	// The IWbemBackupRestore::Backup method MUST be called on the interface that is obtained
	// from the DCOM Remote Protocol activation of a CLSID_WbemBackupRestore interface,
	// as specified in this section.
	Backup(context.Context, *BackupRequest) (*BackupResponse, error)

	// On the IWbemBackupRestore::Restore method invocation, the server MUST restore the
	// contents of the CIM database.
	//
	// Return Values: This method MUST return an HRESULT value that MUST indicate the status
	// of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section
	// 2.2.11) to indicate the successful completion of the method.
	//
	// If the WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN flag is not set, the server MUST return
	// WBEM_E_INVALID_PARAMETER.
	//
	// In case of failure, the server MUST return an HRESULT whose S (severity) bit is set
	// as specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation
	// dependent.
	Restore(context.Context, *RestoreRequest) (*RestoreResponse, error)
}

IWbemBackupRestore server interface.

type RestoreRequest

type RestoreRequest struct {
	// This: ORPCTHIS structure that is used to send ORPC extension data to the server.
	This *dcom.ORPCThis `idl:"name:This" json:"this"`
	// strRestoreFromFile: MUST be a UTF-16 string that MUST contain the name of the file
	// from which to restore the CIM database. This parameter MUST NOT<60> be NULL.
	RestoreFromFile string `idl:"name:strRestoreFromFile;string" json:"restore_from_file"`
	// lFlags: Flags that affect the behavior of the Restore method. The flags' behavior
	// MUST be interpreted as specified in the following table.
	//
	//	+----------------------------------------------------+----------------------------------------------------------------------------------+
	//	|                                                    |                                                                                  |
	//	|                       VALUE                        |                                     MEANING                                      |
	//	|                                                    |                                                                                  |
	//	+----------------------------------------------------+----------------------------------------------------------------------------------+
	//	+----------------------------------------------------+----------------------------------------------------------------------------------+
	//	| WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN 0x00000001 | If the bit is not set and if there are any active clients, the server MUST NOT   |
	//	|                                                    | perform the restore. If the bit is set, the server MUST shut down any active     |
	//	|                                                    | clients before performing the restore operation.                                 |
	//	+----------------------------------------------------+----------------------------------------------------------------------------------+
	Flags int32 `idl:"name:lFlags" json:"flags"`
}

RestoreRequest structure represents the Restore operation request

func (*RestoreRequest) MarshalNDR

func (o *RestoreRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*RestoreRequest) UnmarshalNDR

func (o *RestoreRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type RestoreResponse

type RestoreResponse struct {
	// That: ORPCTHAT structure that is used to return ORPC extension data to the client.
	That *dcom.ORPCThat `idl:"name:That" json:"that"`
	// Return: The Restore return value.
	Return int32 `idl:"name:Return" json:"return"`
}

RestoreResponse structure represents the Restore operation response

func (*RestoreResponse) MarshalNDR

func (o *RestoreResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*RestoreResponse) UnmarshalNDR

func (o *RestoreResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL