• Home
Name Date Size #Lines LOC

..--

attachments/03-May-2024-3,3402,484

events/03-May-2024-386278

public/03-May-2024-11,9316,834

test/03-May-2024-881671

DEPSD03-May-2024524 2221

READMED03-May-20242 KiB3330

base_node.ccD03-May-202410.4 KiB314242

base_transaction.ccD03-May-20241 KiB3622

change_record.ccD03-May-20241.8 KiB6852

change_reorder_buffer.ccD03-May-20247.3 KiB218136

change_reorder_buffer.hD03-May-20243.2 KiB9237

debug_info_event_listener.ccD03-May-20249.4 KiB254211

debug_info_event_listener.hD03-May-20244.6 KiB12378

debug_info_event_listener_unittest.ccD03-May-20242.3 KiB6249

delete_journal.ccD03-May-20242.2 KiB5944

http_bridge.ccD03-May-202414.8 KiB405300

http_bridge_network_resources.ccD03-May-20241.1 KiB3020

http_bridge_unittest.ccD03-May-202419.2 KiB520365

internal_components_factory_impl.ccD03-May-20243 KiB8466

js_mutation_event_observer.ccD03-May-20243.4 KiB11188

js_mutation_event_observer.hD03-May-20242.1 KiB7245

js_mutation_event_observer_unittest.ccD03-May-20243.7 KiB11987

js_sync_encryption_handler_observer.ccD03-May-20244 KiB128108

js_sync_encryption_handler_observer.hD03-May-20242.1 KiB6545

js_sync_encryption_handler_observer_unittest.ccD03-May-20246.1 KiB174136

js_sync_manager_observer.ccD03-May-20243 KiB9774

js_sync_manager_observer.hD03-May-20242 KiB6141

js_sync_manager_observer_unittest.ccD03-May-20243.7 KiB12395

protocol_event_buffer.ccD03-May-20241 KiB3825

protocol_event_buffer.hD03-May-20241.1 KiB4321

protocol_event_buffer_unittest.ccD03-May-20242.4 KiB7855

read_node.ccD03-May-20243.9 KiB11593

read_transaction.ccD03-May-20241.8 KiB5841

sync_backup_manager.ccD03-May-20244.7 KiB145109

sync_backup_manager.hD03-May-20242.3 KiB6734

sync_backup_manager_unittest.ccD03-May-20246.6 KiB186148

sync_context.ccD03-May-2024380 188

sync_context_proxy.ccD03-May-2024352 167

sync_context_proxy_impl.ccD03-May-20241.9 KiB5340

sync_context_proxy_impl.hD03-May-20242.2 KiB6231

sync_context_proxy_impl_unittest.ccD03-May-20243.4 KiB10877

sync_db_util.ccD03-May-20241.2 KiB3928

sync_encryption_handler_impl.ccD03-May-202467.8 KiB1,6481,204

sync_encryption_handler_impl.hD03-May-202414 KiB316149

sync_encryption_handler_impl_unittest.ccD03-May-202496 KiB2,2831,857

sync_manager_factory.ccD03-May-20241 KiB3625

sync_manager_impl.ccD03-May-202437.6 KiB1,051817

sync_manager_impl.hD03-May-202414.4 KiB355210

sync_manager_impl_unittest.ccD03-May-2024123 KiB3,1902,514

sync_rollback_manager.ccD03-May-20244 KiB12496

sync_rollback_manager.hD03-May-20241.3 KiB4824

sync_rollback_manager_base.ccD03-May-202410.4 KiB332266

sync_rollback_manager_base.hD03-May-20245.8 KiB148109

sync_rollback_manager_base_unittest.ccD03-May-20242.8 KiB8567

sync_rollback_manager_unittest.ccD03-May-20249.3 KiB269210

syncapi_internal.ccD03-May-20244 KiB11786

syncapi_internal.hD03-May-20241.5 KiB4726

syncapi_server_connection_manager.ccD03-May-20243.5 KiB10580

syncapi_server_connection_manager.hD03-May-20242.8 KiB8046

syncapi_server_connection_manager_unittest.ccD03-May-20244.3 KiB135106

user_share.ccD03-May-2024356 166

write_node.ccD03-May-202418.6 KiB523352

write_transaction.ccD03-May-20243.8 KiB9870

README

1This file defines the "sync API", an interface to the syncer
2backend that exposes (1) the core functionality of maintaining a consistent
3local snapshot of a hierarchical object set; (2) a means to transactionally
4access and modify those objects; (3) a means to control client/server
5synchronization tasks, namely: pushing local object modifications to a
6server, pulling nonlocal object modifications from a server to this client,
7and resolving conflicts that may arise between the two; and (4) an
8abstraction of some external functionality that is to be provided by the
9host environment.
10
11This interface is used as the entry point into the syncer backend
12when the backend is compiled as a library and embedded in another
13application.  A goal for this interface layer is to depend on very few
14external types, so that an application can use the sync backend
15without introducing a dependency on specific types.  A non-goal is to
16have binary compatibility across versions or compilers; this allows the
17interface to use C++ classes.  An application wishing to use the sync API
18should ideally compile the syncer backend and this API as part of the
19application's own build, to avoid e.g. mismatches in calling convention,
20structure padding, or name mangling that could arise if there were a
21compiler mismatch.
22
23The schema of the objects in the sync domain is based on the model, which
24is essentially a hierarchy of items and folders similar to a filesystem,
25but with a few important differences.  The sync API contains fields
26such as URL to easily allow the embedding application to store web
27browser bookmarks.  Also, the sync API allows duplicate titles in a parent.
28Consequently, it does not support looking up an object by title
29and parent, since such a lookup is not uniquely determined.  Lastly,
30unlike a filesystem model, objects in the Sync API model have a strict
31ordering within a parent; the position is manipulable by callers, and
32children of a node can be enumerated in the order of their position.
33