NWSMTSGetUnsupportedOptions

Returns a list of options not supported by the TSA.

Syntax

  #include <smsutapi.h> 
  #include <smstsapi.h> 
   
  CCODE NWSMTSGetUnsupportedOptions(
     UINT32   connection, 
     UINT32  *unsupportedBackupOptions, 
     UINT32  *unsupportedRestoreOptions);
  

Parameters

connection

(IN) Specifies the connection information returned by NWSMTSConnectToTargetService or NWSMTSConnectToTargetServicEx.

unsupportedBackupOptions

(OUT) Points to a bit map that represents the TSA’s unsupported backup options.

unsupportedRestoreOptions

(OUT) Points to a bit map that represents the TSA’s unsupported restore options.

Return Values

See Section 9.3, Target Service Return Values for more information.

The following table lists the return values associated with the function.

0x00000000

Successful

0xFFFDFFE7

NWSMTS_INVALID_CONNECTION_HANDL

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

Remarks

Before NWSMTSGetUnsupportedOptions is called, the engine must be connected to a TSA and Target Service.

NWSMTSGetUnsupportedOptions returns two 32-bit maps that indicate which backup or restore options are not supported. It also indicates which options can be used in the NWSM_SCAN_CONTROL structure and which generic open mode options can be used by NWSMTSOpenDataSetForRestore and NWSMTSOpenDataSetForBackup.

Use NWSMTSGetTargetResourceInfoEx to get additional information on unsupported options by a specific primary resource.

unsupportedBackupOptions refers to the fields in the NWSM_SCAN_CONTROL and NWSM_SCAN_INFORMATION structures. If an engine passes information via one of these unsupported fields, the TSA ignores it.

The following tables list the unsupported backup and restore options that can be returned by the TSA.

Option

Value

Description

0

0x01

NWSM_BACK_ACCESS_DATE_TIME: The TSA does not support the following fields:

NWSM_SCAN_CONTROL

  • firstAccessDateAndTime
  • lastAccessDateAndTime

NWSM_SCAN_INFORMATION

  • accessDateAndTime

1

0x02

NWSM_BACK_CREATE_DATE_TIME: The TSA does not support the following fields:

NWSM_SCAN_CONTROL

  • firstCreateDateAndTime
  • lastCreateDateAndTime

NWSM_SCAN_INFORMATION

  • createDateAndTime

2

0x04

NWSM_BACK_MODIFIED_DATE_TIME: The TSA does not support the following fields:

NWSM_SCAN_CONTROL

  • firstModifiedDateAndTime
  • lastModifiedDateAndTime

NWSM_SCAN_INFORMATION

  • modifiedDateAndTime

3

0x08

NWSM_BACK_ARCHIVE_DATE_TIME: The TSA does not support the following fields:

NWSM_SCAN_CONTROL

  • firstArchivedDateAndTime
  • lastArchivedDateAndTime

NWSM_SCAN_INFORMATION

  • archivedDateAndTime

NWSMTSSetArchiveStatus

  • setFlag

NWSM_SET_ARCHIVE_DATE_AND_TIME

4

0x10

NWSM_BACK_SKIPPED_DATA_SETS: The TSA does not support the following fields:

NWSM_SCAN_INFORMATION

  • createSkippedDataSetsFil

5

0x08

NWSM_BACK_MODIFY_FLAG: The TSA does not support the following fields:

NWSM_SCAN_CONTROL scantype

  • NWSM_EXCLUDE_ARCHIVED_CHILDREN
  • NWSM_EXCLUDE_ARCH_CHILD_DATA

NWSMTSSetArchiveStatus setFlag

  • NWSM_SET_MODIFY_FLAGNWSM_CLEAR_MODIFY_FLAG NWSM_SET_ARCHIVER_ID

NWSM_SCAN_INFORMATION attributes

  • NWFA_ARCHIVE NWFA_OBJ_ARCHIVE_BIT

modifiedFlag

Option

Value

Description

0

0x01

NWSM_RESTORE_NEW_DATA_SET_NAME: NWSMTSOpenDataSetForRestore does not rename data sets.

1

0x02

NWSM_RESTORE_CHILD_UPDATE_MODE: The TSA does not restore a child data set if it is newer than the data set on the Target Service.

2

0x04

NWSM_RESTORE_PARENT_UPDATE_MODE: The TSA does not restore a parent data set if it is newer than the one on the Target Service.

3

0x08

NWSM_RESTORE_PARENT_HANDLE: NWSMTSOpenDataSetForRestore and NWSMTSWriteDataSet do not accept parent handles.

See Also

NWSMTSGetNameSpaceTypeInfo, NWSMTSGetOpenModeOptionString, NWSMTSGetTargetResourceInfo, NWSMTSGetTargetResourceInfoEx NWSMTSGetTargetScanTypeString, NWSMTSGetTargetSelectionTypeStr, NWSMTSListSupportedNameSpaces, NWSMTSListTSResources, NWSMTSScanDataSetBegin, NWSMTSScanSupportedNameSpaces, NWSMTSScanTargetServiceResource,

Example

  #include <smsutapi.h> 
  #include <smstsapi.h> 
  #define ADDITIONAL_BUFFER_SIZE 512 
   
  UINT32 unsupportedBackupOptions = 0, unsupportedRestoreOptions = 0; 
  NWSM_SCAN_CONTROL *scanControl; 
   
  /* Find out which options the TSA does not support */ 
  NWSMTSGetUnsupportedOptions(connection, &unsupportedBackupOptions, 
      &unsupportedRestoreOptions); 
   
  /* Setup the scan control structure. Note that some fields in scanControl are set to their default values 
  when the memory is calloc'd. */ 
  scanControl = (NWSM_SCAN_CONTROL *)calloc(1, sizeof(NWSM_SCAN_CONTROL) + 
     ADDITIONAL_BUFFER_SIZE); 
  scanControl->bufferSize = sizeof(NWSM_SCAN_CONTROL) + ADDITIONAL_BUFFER_SIZE; 
  scanControl->scanControlSize = sizeof(NWSM_SCAN_CONTROL); 
  scanControl->otherInformationSize = 0; 
   
  /* With the unsupported options, build an appropriate display. The display is used to gather information from the 
  user about which date sets are to be selected or ignored. This information is then put into an NWSM_SCAN_CONTROL 
  structure.
  This process is the same for a back-up or restore session. */ 
  if (!(unsupportedBackupOptions & NWSM_BACK_ACCESS_DATE_TIME)) 
  { 
     /* Build display field for first access time and last access time.  
      scanControl->firstAccessDateAndTime and scanControl- 
      >lastAccessDateAndTime are used to contain the input data. */ 
  } 
  if (!(unsupportedBackupOptions & NWSM_BACK_CREATE_DATE_TIME)) 
  { 
     /* Build display field for first created time and last created time. 
         scanControl->firstCreateDateAndTime and scanControl-> 
         lastCreateDateAndTime are used to contain the input data. */ 
  } 
   
  if (unsupportedBackupOptions & NWSM_RESTORE_PARENT_HANDLE) 
     scanControl->returnChildTerminalNodeNameOnly = FALSE; 
  else 
     scanControl->returnChildTerminalNodeNameOnly = TRUE; 
   
  /* Display the options and gather the user's input for these options. */ 
   
  /* Get and set the scan and selection options-see NWSMTSGetTargetScanTypeString and NWSMTGetTargetSelectionTypeStr. */ 
  /* Pass the options to the back-up or restore process. */ 
  /*Make a log of the data sets that where skipped during the backup process*/ 
  /* Read the skipped data set log from the TSA, and put the data into a user 
     readable file. See NWSMTSScanDataSetBegin. */ 
  If (!(unsupportedBackupOptions & NWSM_BACK_SKIPPED_DATA_SETS)) 
  { 
     /* Read the skipped data set log from the TSA, and put the data into a user 
        readable file. See NWSMTSScanDataSetBegin. */ 
  } 
  /* Make a log of the errors that occurred during the backup process. See 
     NWSMTSScanDataSetBegin. */