3.2.4.2.18.9 EnumAutoApplyQuotas (Opnum 15)

The EnumAutoApplyQuotas method returns all the auto apply quotas from the List of Persisted Auto Apply Quotas (section 3.2.1.2) that fall under the specified path.

 [id(FSRM_DISPID_QUOTA_MANAGER | 0x07)] HRESULT EnumAutoApplyQuotas(
   [in, defaultvalue(L"")] BSTR path,
   [in, defaultvalue(FsrmEnumOptions_None)] 
     FsrmEnumOptions options,
   [out, retval] IFsrmCommittableCollection** quotas
 );

path: Contains the path indicating the search location for quota enumeration.

options: Contains the FsrmEnumOptions (section 2.2.1.2.5) to use when enumerating the quotas.

quotas: Pointer to an IFsrmCommittableCollection interface pointer (section 3.2.4.2.3) that upon completion contains pointers to auto apply quotas belonging to the specified path based on the wildcard specified in path. The caller MUST release the collection when it is done with it.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

The quotas parameter is NULL.

0x80045311

FSRM_E_NOT_SUPPORTED

The options parameter contains invalid FsrmEnumOptions (section 2.2.1.2.5) values.

Upon receiving this message, the server MUST validate parameters:

  • If quotas is NULL, the server MUST return E_INVALIDARG.

  • If options contains FsrmEnumOptions_Asynchronous or any value other than what is specified in section 2.2.1.2.5, the server MUST return FSRM_E_NOT_SUPPORTED.

Upon successful validation of parameters, the server MUST perform all of the following actions:

  • Create a List of Non-Persisted Auto Apply Quota Instances (section 3.2.1.2) and populate it with Non-Persisted Auto Apply Quota Instances (section 3.2.1.2.2.2) copied from the Persisted Auto Apply Quotas (section 3.2.1.2.2.1) in the List of Persisted Auto Apply Quotas, according to the following rules:

    • If path ends with "\*", the server MUST populate the List of Non-Persisted Auto Apply Quota Instances with a copy of every Persisted Auto Apply Quota from the List of Persisted Auto Apply Quotas that belongs to a subdirectory of path.

    • If path ends with "\...", the server MUST populate the List of Non-Persisted Auto Apply Quota Instances  with a copy of every Persisted Auto Apply Quota from the List of Persisted Auto Apply Quotas that recursively belongs to a subdirectory of path.

    • If path does not end with "\*" or "\...", the server MUST populate the List of Non-Persisted Auto Apply Quota Instances with a copy of only the Persisted Auto Apply Quota from the List of Persisted Auto Apply Quotas for path.

    • If a Persisted Auto Apply Quota does not exist for path, the server MUST return S_OK and set quotas to an empty IFsrmCommittableCollection.

  • After populating the List of Non-Persisted Auto Apply Quota Instances, the server MUST populate quotas with the IFsrmAutoApplyQuota interface pointer (section 3.2.4.2.17) of every Non-Persisted Auto Apply Quota Instance in this List of Non-Persisted Auto Apply Quota Instances.