3.1.5.12 SyncPrinterCatalog

Synopsis:

This call supports the synchronization of printer driver update metadata to client computers (2) and is used only by the Add Printer Wizard on the client.

Request Validation:

Parameter

Validation conditions

Error code

cookie

MUST be a valid cookie, issued by this server, that has not expired.

InvalidCookie, ServerChanged, or CookieExpired

Data Processing:

The data processing specified in this section references most of the elements of the abstract data model, as specified in section 3.1.1.

The server MUST check whether the configuration data returned from GetConfig (section 3.1.5.2) has changed since the last time the client synchronized and, if so, throw a ConfigChanged ErrorCode fault.

The server SHOULD check whether client registration is required but the client is not yet registered. If so, it SHOULD throw a RegistrationRequired ErrorCode.

The next step is for the server to compute the NeededRevisions list for the client. The server MUST do so as follows:

  1. Restrict the set of revisions to those that are deployed to the client computer's target group, combined with any dependencies (prerequisite or bundle) of such updates.

  2. Restrict the resulting set further to those revisions whose prerequisites are satisfied by the updates whose revision IDs are specified in Parameters.InstalledNonLeafUpdateIDs.

  3. Restrict the resulting set further to either:

    • Revisions for which all the following conditions hold:

      • UpdateType = Driver

      • DriverClass = Printer

      • If there is already a driver installed on the device:

        • The revision has an entry in the driver table that MUST be a "better" match than the installed driver.

        • The revision MUST have an entry in the driver table that matches the Provider and Manufacturer for the installed driver.

Next, the server MUST generate the list of CachedRevisions by accepting the revisions listed in Parameters.CachedDriverIDs.

Results:

If no faults occur during the operation, the server MUST return a SyncPrinterCatalogResponse message to the client. It MUST generate the response as follows:

  • SyncPrinterCatalogResponse.NewUpdates: Populated with entries for revision in the NeededRevisions list that are not in the CachedRevisions list:

    • ID: The revision ID.

    • Deployment: Information about the deployment to this revision. If this revision was not explicitly deployed to the client by an administrator (for example, it was included in the NeededRevisions list because it was a dependency of an explicitly deployed revision), the DeploymentAction MUST be set to "Evaluate". For driver updates (UpdateType = driver), when the client reports a protocolVersion of "1.6" or higher in the GetCookie call, the server SHOULD include all the HardwareIDs that are selected as "best" matches associated with this revision from the driver table.<51>

    • IsLeaf: Specifies whether the revision is a leaf on the prerequisite graph. That is, no entries in the abstract data model prerequisite table (as specified in section 3.1.1) have this revision's UpdateID specified as a PrerequisiteUpdateID.

    • Xml: The "core" metadata (FragmentType = "Core") associated with the revision.

    Note: The server implementation MUST send no more than one revision for a given Update. It is recommended that the implementation SHOULD, in the event of multiple matches, select only the latest revision (the one with the highest revision number).

  • SyncPrinterCatalogResponse.OutOfScopeRevisionIDs: Populated with the revision's IDs in the CachedRevisions list that are not in the NeededRevisions list.

  • SyncPrinterCatalogResponse.ChangedUpdates: Populated with entries for revisions in the NeededRevisions list that are also in the CachedRevisions list, but for which Deployment or IsLeaf data has changed since the last time the client synchronized with the server. The fields of these entries are populated according to the server's abstract data model (as specified in section 3.1.1) as follows:

  • Deployment: The entry in the deployment table that specifies how the revision is deployed to the client's target group.

  • IsLeaf: The entry in the Revision table that specifies whether the revision is a leaf in the prerequisite graph.

  • SyncPrinterCatalogResponse.Truncated: The server MAY choose to return a subset of the updates that would normally be returned in the <NewUpdates> collection to reduce the processing overhead incurred by a single call to the server. In such cases, the server MUST set Truncated = TRUE.<52>

  • SyncPrinterCatalogResponse.NewCookie: The server MUST return a new cookie for the client to use on subsequent SyncUpdates calls. The server SHOULD update the cookie with the highest (most recent) LastChangeTime stored in the deployment table. This allows the server to determine, on future calls to SyncUpdates, whether a revision that stays in scope for the client needs to have its deployment returned in the ChangedUpdates list; if the current deployment's LastChangeTime is less than the value stored in this cookie, then the deployment need not be returned in the ChangedUpdates list, because the deployment data will already be cached on the client.