4.1 Query Enumeration of File Server Resource Manager Protocol Directory Quotas
File Server Resource Manager Protocol directory quota objects are retrievable through an enumeration via the IFsrmQuotaManager interface (section 126.96.36.199.18). The following describes how a client can enumerate FSRM directory quota objects:
The client requests the creation of an instance of the Quota Manager on the local machine by calling CoCreateInstance with the class GUID of the Quota Manager, requesting an instance of the Quota Manager on the server.
The server returns a reference to the IFsrmQuotaManager interface.
The client calls the method IFsrmQuotaManager::EnumQuotas (section 188.8.131.52.18.8), passing it the path on a volume on the server for which the client wants to enumerate quotas.
The server collects all the quota objects configured for the path specified and returns a reference to the IFsrmCommittableCollection interface (section 184.108.40.206.3) back to the client.
The client calls IFsrmCommittableCollection::Count (section 220.127.116.11.3.1) to get the number of quotas in the collection.
The server replies to the client with the number of quotas in the collection.
The client calls IFsrmCollection::Item (section 18.104.22.168.1.2) with the index set to 1 to get the first quota in the collection.
The client calls VARIANT.pDispVal::QueryInterface with the GUID of the IFsrmQuota interface (section 22.214.171.124.16).
The server returns the IFsrmQuota interface of the quota.
The client can make calls to any of the methods implemented by IFsrmQuota.
The server responds appropriately to the client call.
The client calls IFsrmQuota::Release.
The server decrements the number of references to the quota.
The client can repeat steps 7 through 13, incrementing the index used in the call to IFsrmCollection::Item (section 126.96.36.199.1.2) until the index is equal to, but not greater than, the count returned in step 5.
The client calls IFsrmCommittableCollection::Release.
The server decrements the number of references to the collection.
The client calls IFsrmQuotaManager::Release.
Steps 4 through 10 are same for any IFsrmCollection interface (section 188.8.131.52.1), provided the client substitutes IFsrmQuota in steps 9 and 11 with an interface appropriate for the type of quota objects returned in the collection during step 3.
Figure 1: Flow diagram for query enumeration