Comparators
[HotSync Services]


Detailed Description

Comparators.

The SyncML version of HotSync exchanges data encoded in some registered mime type. In most cases simple binary (byte for byte) comparison of encoded data is not sufficient to determine when two different data items have the same semantic content. HotSync allows for the registration of comparators for different mime types. Each logical comparator provides an ordered (less than, equal to, or greater than) comparison for some specific mime type. The comparator can optionally be made specific to a particular target URI or user Id. During a synchronization operation the comparator may be loaded and called at various times to perform a comparison between two objects.

Three types of comparators are supported:

  1. Internal comparators. These comparators compare objects in internal opaque format. Since HotSync manipulates data in external mime format, an internal comparator must support three functions:
    1. Conversion from external to internal format.
    2. Comparison of two objects in internal format. This is referred to as comparator "application", or simply "apply".
    3. Release, or deallocation of an object in interal format.
  2. Canonical comparators. Canonical comparators convert objects in external format to a canonical format that is bitwise comparable. HotSync then performs the actual comparison using memcmp(). A canonical comparator must support two functions:
    1. Conversion from external to canonical format.
    2. Release, or deallocation of an object in canonical format.
  3. External comparators. These comparators compare objects in external mime format. An external comparator only supports one function: apply. No conversion or release is required.


Modules

 Data Types
 API's


Generated on Wed Jul 30 07:06:41 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.