org.rococoa.cocoa.syncservices
Class ISyncManager
java.lang.Object
org.rococoa.cocoa.foundation.NSObject
org.rococoa.cocoa.syncservices.ISyncManager
- All Implemented Interfaces:
- ABActionDelegate, AMWorkflowControllerDelegate, IMVideoDataSource, NSAccessibility, NSAccessibilityAdditions, NSAnimationDelegate, NSApplicationScriptingDelegation, NSArchiverCallback, NSBrowserDelegate, NSClassDescriptionPrimitives, NSCoderMethods, NSColorPanelResponderMethod, NSComboBoxCellDataSource, NSComboBoxDataSource, NSComboBoxNotifications, NSComparisonMethods, NSConnectionDelegateMethods, NSControlSubclassDelegate, NSControlSubclassNotifications, NSCopyLinkMoveHandler, NSDatePickerCellDelegate, NSDelayedPerforming, NSDeprecatedKeyValueCoding, NSDeprecatedKeyValueObservingCustomization, NSDeprecatedMethods, NSDictionaryControllerKeyValuePair, NSDistantObjectRequestMethods, NSDistributedObjects, NSDraggingDestination, NSDraggingSource, NSDrawerDelegate, NSDrawerNotifications, NSEditor, NSEditorRegistration, NSErrorRecoveryAttempting, NSExceptionHandlerDelegate, NSFileManagerFileOperationAdditions, NSFontManagerDelegate, NSFontManagerResponderMethod, NSFontPanelValidationAdditions, NSImageDelegate, NSKeyedArchiverDelegate, NSKeyedArchiverObjectSubstitution, NSKeyedUnarchiverDelegate, NSKeyedUnarchiverObjectSubstitution, NSKeyValueBindingCreation, NSKeyValueCoding, NSKeyValueObserverNotification, NSKeyValueObserverRegistration, NSKeyValueObserving, NSKeyValueObservingCustomization, NSLayoutManagerDelegate, NSMenuDelegate, NSMenuValidation, NSMetadataQueryDelegate, NSNetServiceBrowserDelegateMethods, NSNetServiceDelegateMethods, NSNibAwaking, NSOutlineViewDataSource, NSOutlineViewDelegate, NSOutlineViewNotifications, NSPasteboardOwner, NSPlaceholders, NSPortDelegateMethods, NSRuleEditorDelegateMethods, NSSavePanelDelegate, NSScriptClassDescription, NSScripting, NSScriptingComparisonMethods, NSScriptKeyValueCoding, NSScriptObjectSpecifiers, NSSoundDelegateMethods, NSSpeechRecognizerDelegate, NSSpeechSynthesizerDelegate, NSSpellServerDelegate, NSSplitViewDelegate, NSStreamDelegateEventExtensions, NSTabViewDelegate, NSTextDelegate, NSTextViewDelegate, NSThreadPerformAdditions, NSTokenFieldCellDelegate, NSTokenFieldDelegate, NSToolbarDelegate, NSToolbarNotifications, NSURLClient, NSURLConnectionDelegate, NSURLDownloadDelegate, NSWindowDelegate, NSWindowNotifications, NSXMLParserDelegateEventAdditions, QTCaptureDecompressedVideoOutputDelegate, QTCaptureFileOutputDelegate, QTCaptureVideoPreviewOutputDelegate, QTCaptureViewDelegate, QTMovieDelegate, QTMovieViewDelegate, SFAuthorizationViewDelegate, SFCertificatePanelDelegate, SFChooseIdentityPanelDelegate, WebDownloadDelegate, WebFrameLoadDelegate, WebJavaPlugIn, WebPlugIn, WebPlugInContainer, WebPolicyDelegate, WebResourceLoadDelegate, WebScripting, WebUIDelegate, WebViewEditingDelegate, NSObject
public abstract class ISyncManager
- extends NSObject
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.
Methods inherited from class org.rococoa.cocoa.foundation.NSObject |
copy, create, dealloc, description, doesNotRecognizeSelector, finalize, forwardInvocation, id, init, isKindOfClass, isKindOfClass, methodSignatureForSelector, mutableCopy, release, retain, retainCount |
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject |
autorelease, class_, conformsToProtocol, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.WebUIDelegate |
webView_contextMenuItemsForElement_defaultMenuItems, webView_createWebViewModalDialogWithRequest, webView_createWebViewWithRequest, webView_dragDestinationActionMaskForDraggingInfo, webView_dragDestinationActionMaskForDraggingInfo, webView_makeFirstResponder, webView_mouseDidMoveOverElement_modifierFlags, webView_printFrameView, webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame, webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame, webView_runJavaScriptAlertPanelWithMessage, webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame, webView_runJavaScriptConfirmPanelWithMessage, webView_runJavaScriptTextInputPanelWithPrompt_defaultText_initiatedByFrame, webView_runJavaScriptTextInputPanelWithPrompt_defaultText, webView_runOpenPanelForFileButtonWithResultListener, webView_runOpenPanelForFileButtonWithResultListener, webView_setResizable, webView_setStatusBarVisible, webView_setStatusText, webView_setToolbarsVisible, webView_shouldPerformAction_fromSender, webView_validateUserInterfaceItem_defaultValidation, webView_validateUserInterfaceItem_defaultValidation, webView_willPerformDragDestinationAction_forDraggingInfo, webView_willPerformDragDestinationAction_forDraggingInfo, webViewAreToolbarsVisible, webViewClose, webViewContentRect, webViewFirstResponder, webViewFocus, webViewFooterHeight, webViewFrame, webViewHeaderHeight, webViewIsResizable, webViewIsStatusBarVisible, webViewRunModal, webViewShow, webViewStatusText, webViewUnfocus |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSBrowserDelegate |
browser_acceptDrop_atRow_column_dropOperation, browser_acceptDrop_atRow_column_dropOperation, browser_canDragRowsWithIndexes_inColumn_withEvent, browser_createRowsForColumn_inMatrix, browser_isColumnValid, browser_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_inColumn, browser_nextTypeSelectMatchFromRow_toRow_inColumn_forString, browser_numberOfRowsInColumn, browser_selectCellWithString_inColumn, browser_selectRow_inColumn, browser_shouldShowCellExpansionForRow_column, browser_shouldSizeColumn_forUserResize_toWidth, browser_shouldTypeSelectForEvent_withCurrentSearchString, browser_sizeToFitWidthOfColumn, browser_titleOfColumn, browser_typeSelectStringForRow_inColumn, browser_validateDrop_proposedRow_column_dropOperation, browser_validateDrop_proposedRow_column_dropOperation, browser_willDisplayCell_atRow_column, browser_writeRowsWithIndexes_inColumn_toPasteboard, browserColumnConfigurationDidChange, browserDidScroll, browserWillScroll |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSKeyValueCoding |
dictionaryWithValuesForKeys, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, setNilValueForKey, setValue_forKey, setValue_forKeyPath, setValue_forUndefinedKey, setValuesForKeysWithDictionary, validateValue_forKey_error, validateValue_forKeyPath_error, valueForKey, valueForKeyPath, valueForUndefinedKey |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSOutlineViewDelegate |
outlineView_dataCellForTableColumn_item, outlineView_didClickTableColumn, outlineView_didDragTableColumn, outlineView_heightOfRowByItem, outlineView_isGroupItem, outlineView_mouseDownInHeaderOfTableColumn, outlineView_nextTypeSelectMatchFromItem_toItem_forString, outlineView_selectionIndexesForProposedSelection, outlineView_shouldCollapseItem, outlineView_shouldEditTableColumn_item, outlineView_shouldExpandItem, outlineView_shouldSelectItem, outlineView_shouldSelectTableColumn, outlineView_shouldShowCellExpansionForTableColumn_item, outlineView_shouldTrackCell_forTableColumn_item, outlineView_shouldTypeSelectForEvent_withCurrentSearchString, outlineView_typeSelectStringForTableColumn_item, outlineView_willDisplayCell_forTableColumn_item, outlineView_willDisplayOutlineCell_forTableColumn_item, selectionShouldChangeInOutlineView |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.WebViewEditingDelegate |
undoManagerForWebView, webView_doCommandBySelector, webView_shouldApplyStyle_toElementsInDOMRange, webView_shouldBeginEditingInDOMRange, webView_shouldChangeTypingStyle_toStyle, webView_shouldDeleteDOMRange, webView_shouldEndEditingInDOMRange, webView_shouldInsertNode_replacingDOMRange_givenAction, webView_shouldInsertText_replacingDOMRange_givenAction, webViewDidBeginEditing, webViewDidChange, webViewDidChangeSelection, webViewDidChangeTypingStyle, webViewDidEndEditing |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.WebFrameLoadDelegate |
webView_didCancelClientRedirectForFrame, webView_didChangeLocationWithinPageForFrame, webView_didClearWindowObject_forFrame, webView_didCommitLoadForFrame, webView_didFailLoadWithError_forFrame, webView_didFailProvisionalLoadWithError_forFrame, webView_didFinishLoadForFrame, webView_didReceiveIcon_forFrame, webView_didReceiveServerRedirectForProvisionalLoadForFrame, webView_didReceiveTitle_forFrame, webView_didStartProvisionalLoadForFrame, webView_willCloseFrame, webView_windowScriptObjectAvailable |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSTokenFieldDelegate |
tokenField_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenField_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenField_displayStringForRepresentedObject, tokenField_editingStringForRepresentedObject, tokenField_hasMenuForRepresentedObject, tokenField_menuForRepresentedObject, tokenField_readFromPasteboard, tokenField_representedObjectForEditingString, tokenField_shouldAddObjects_atIndex, tokenField_styleForRepresentedObject, tokenField_writeRepresentedObjects_toPasteboard |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSXMLParserDelegateEventAdditions |
parser_didEndElement_namespaceURI_qualifiedName, parser_didEndMappingPrefix, parser_didStartElement_namespaceURI_qualifiedName_attributes, parser_didStartMappingPrefix_toURI, parser_foundAttributeDeclarationWithName_forElement_type_defaultValue, parser_foundCDATA, parser_foundCharacters, parser_foundComment, parser_foundElementDeclarationWithName_model, parser_foundExternalEntityDeclarationWithName_publicID_systemID, parser_foundIgnorableWhitespace, parser_foundInternalEntityDeclarationWithName_value, parser_foundNotationDeclarationWithName_publicID_systemID, parser_foundProcessingInstructionWithTarget_data, parser_foundUnparsedEntityDeclarationWithName_publicID_systemID_notationName, parser_parseErrorOccurred, parser_resolveExternalEntityName_systemID, parser_validationErrorOccurred, parserDidEndDocument, parserDidStartDocument |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSDraggingDestination |
concludeDragOperation, concludeDragOperation, draggingEnded, draggingEnded, draggingEntered, draggingEntered, draggingExited, draggingExited, draggingUpdated, draggingUpdated, performDragOperation, performDragOperation, prepareForDragOperation, prepareForDragOperation, wantsPeriodicDraggingUpdates |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSOutlineViewDataSource |
outlineView_acceptDrop_item_childIndex, outlineView_acceptDrop_item_childIndex, outlineView_child_ofItem, outlineView_isItemExpandable, outlineView_itemForPersistentObject, outlineView_namesOfPromisedFilesDroppedAtDestination_forDraggedItems, outlineView_numberOfChildrenOfItem, outlineView_objectValueForTableColumn_byItem, outlineView_persistentObjectForItem, outlineView_setObjectValue_forTableColumn_byItem, outlineView_sortDescriptorsDidChange, outlineView_validateDrop_proposedItem_proposedChildIndex, outlineView_validateDrop_proposedItem_proposedChildIndex, outlineView_writeItems_toPasteboard |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSURLDownloadDelegate |
download_decideDestinationWithSuggestedFilename, download_didCancelAuthenticationChallenge, download_didCreateDestination, download_didFailWithError, download_didReceiveAuthenticationChallenge, download_didReceiveDataOfLength, download_didReceiveResponse, download_shouldDecodeSourceDataOfMIMEType, download_willResumeWithResponse_fromByte, download_willSendRequest_redirectResponse, downloadDidBegin, downloadDidFinish |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSAccessibility |
accessibilityActionDescription, accessibilityActionNames, accessibilityAttributeNames, accessibilityAttributeValue_forParameter, accessibilityAttributeValue, accessibilityFocusedUIElement, accessibilityIsAttributeSettable, accessibilityIsIgnored, accessibilityParameterizedAttributeNames, accessibilityPerformAction, accessibilitySetValue_forAttribute |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSTextViewDelegate |
textView_clickedOnLink_atIndex, textView_clickedOnLink, textView_doCommandBySelector, textView_menu_forEvent_atIndex, textView_shouldChangeTextInRanges_replacementStrings, textView_shouldChangeTypingAttributes_toAttributes, textView_willChangeSelectionFromCharacterRanges_toCharacterRanges, textView_willDisplayToolTip_forCharacterAtIndex, textView_writablePasteboardTypesForCell_atIndex, textView_writablePasteboardTypesForCell_atIndex, textView_writeCell_atIndex_toPasteboard_type, textView_writeCell_atIndex_toPasteboard_type, textViewDidChangeSelection, textViewDidChangeTypingAttributes, undoManagerForTextView |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSTokenFieldCellDelegate |
tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenFieldCell_displayStringForRepresentedObject, tokenFieldCell_editingStringForRepresentedObject, tokenFieldCell_hasMenuForRepresentedObject, tokenFieldCell_menuForRepresentedObject, tokenFieldCell_readFromPasteboard, tokenFieldCell_representedObjectForEditingString, tokenFieldCell_shouldAddObjects_atIndex, tokenFieldCell_styleForRepresentedObject, tokenFieldCell_writeRepresentedObjects_toPasteboard |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSWindowNotifications |
windowDidBecomeKey, windowDidBecomeMain, windowDidChangeScreen, windowDidChangeScreenProfile, windowDidDeminiaturize, windowDidEndSheet, windowDidExpose, windowDidMiniaturize, windowDidMove, windowDidResignKey, windowDidResignMain, windowDidResize, windowDidUpdate, windowWillBeginSheet, windowWillClose, windowWillMiniaturize, windowWillMove |
ISyncManager
public ISyncManager()
sharedManager
public static ISyncManager sharedManager()
isEnabled
public abstract boolean isEnabled()
- Check if the Sync Engine is enabled and available for syncing.
Original signature : -(BOOL)isEnabled
clientWithIdentifier
public abstract ISyncClient clientWithIdentifier(NSString clientId)
registerClientWithIdentifier_descriptionFilePath
public abstract ISyncClient registerClientWithIdentifier_descriptionFilePath(NSString clientId,
NSString descriptionFilePath)
- Register a new client. You specify here all the details needed to sync the client - supported
entities and relationships, formatters, etc. In return, you get back an ISyncClient to use
and abuse.
The client description file is a plist containing a single dictionary. The dictionary may contain
any of the following keys. For keys which specify a path, a full path name may be specified, but
usually you will just want to specify a path relative to the description file. Unless explicitly
stated, all keys are optional.
Type - a string identifying the type of client. This string must be one of the
following pre-defined values: "app" (an application like iCal or AB), "device" (a phone, Palm or
iPod), "server" (.Mac) or "peer" (a peer-to-peer client). Assume the client is an app if not
explicitly specified.
DisplayName - a string containing the display name for this client.
ImagePath - path to an image of the client. This must be an absolute path except
when the description is taken from a file. Then, it can be a path relative to the description
file.
Entities - a dictionary mapping entity names to an array. The array contains
an array of property names (both attributes and relationships), indentifying the
properties supported by the client on each record type. This field is required.
PullOnlyEntities - an array containing the names of the entities for which the
client will pull changes from the engine but will never push changes to the engine.
PushOnlyEntities - an array containing the names of the entities for which the
client will only push changes to the engine but for which it will never pull changes from
the engine.
NeverFormatsRelationships - a Boolean that indicates that this client will never format
a relationship that it pulls. If yes then the sync services frameworks can make certain
optimizations for this client.
SyncsWith - a dictionary specifying the kinds of clients this client wants to sync
with. See -setShouldSynchronize:withClientsOfType: for details. The dictionary contains the
following keys:
SyncAlertTypes - an array of the client types this client wants to sync with.
SyncAlertToolPath - the path of a tool the engine will invoke when a client of the
specified type starts syncing. The tool with be passed two arguments on the command
line: "--sync" and the client's client id.
It is perfectly valid to call this method for a client that has already been registered to update
the registration info. Doing so is not required, however. The engine will periodically stat the
description file to see if it has changed and update the client description automagically. This
saves you from having to manually track changes to the client description. If an upgrade lays down
a new description file, for example, the engine will detect this and automatically pick up the
changes to the client's description.
Changing the client description may result in the engine forcing the client to slow sync on the
next sync. If a client adds support for additional properties in ISyncClientEntities, for
example, the engine must slow-sync the client to guarantee the new keys are synchronized
properly.
Original signature : -(ISyncClient*)registerClientWithIdentifier:(NSString*) descriptionFilePath:(NSString*)
unregisterClient
public abstract void unregisterClient(ISyncClient client)
- Remove a previously registered client
Original signature : -(void)unregisterClient:(ISyncClient*)
registerSchemaWithBundlePath
public abstract boolean registerSchemaWithBundlePath(NSString bundlePath)
- Register a schema. You can define new entities and relationships; you can extend an entity with
additional attributes; you can specify a data validator; you can specify a conflict resolver; and
you can provide localized names for your schema types.
A schema is defined by a "Schema.plist" file contained in a .syncschema bundle which may contain additional
images and code which support the plist. The top-level object in the plist is a dictionary which may
contain the following keys. The engine will periodically check this file to see if it has changed.
If the file has changed, the engine will automatically re-parse it to pick up the new schema
definition. This saves you from having to remember to manually re-register your schema in the event
that it has changed.
Name - a string providing a unique name for this schema. This key is required and
you should never change the schema name. Doing so will orphan the old schema definition and
you will have to manually remove it. We recommend using the reverse-DNS naming scheme,
e.g., "com.apple.Contacts".
StrictParsing - a bool that allows opting in / out of the new strict validation of schemas in Leopard. This is a top level key in a schema.
If this value is true, Leopard strict validation will be used.
If this value is false, the same checking as under Tiger will be used.
If this value is not present, it will be based on the version of the SyncServices framework the registering binary linked against.
If it linked against a Leopard framework version, strict validation will be used.
DataClasses - an array containing various data class descriptions. The data class
description contains the following:
Name - the name of the data class. This key is required. We recommend using the reverse-DNS
naming scheme, e.g., "com.apple.Contacts". The name can be localized using the strings from Schema.strings
in the .syncschema bundle.
ImagePath - the path of an image representing the data class. For most data classes this
will be the same image as would be used for the associated document type. (E.g. Contacts
would use AddressBook's .vcd image.) The path can be an absolute path, but if it is not
then SyncServices will attempt to use it to load an image resource from the .syncschema bundle.
Entities - the value is an array of record type extension descriptions. Each
description is an NSDictionary describing an extension to an existing record type. A
description may contain the following keys; unless explicitly stated, all of the keys are
optional:
Name - the name of the entity. This key is required. We recommend using the reverse-DNS naming
scheme, e.g., "com.apple.Contacts". The name can be localized using the strings from Schema.strings in
the .syncschema bundle.
ExtensionName - the name of this extension, if you are adding attributes to an
existing entity. The extension name is used to scope
the property and relationship names to prevent collisions. We recommend using
the reverse-DNS naming scheme, e.g. com.apple.AddressBook.ContactsExtensions.
DataClass - the name of the data class this entity belongs to.
ExcludeFromDataChangeAlert - or . Defaults to false if omitted. If this flag is set then
a change to this entity will not count towards the number of changed entities for the purpose
of displaying the data change alert.
Attributes - an array containing the description of all attributes in the extension.
Each attribute description is a dictionary containing the following sub-keys.
Name - the name of the attribute. The name can be localized using the strings from Schema.strings in
the .syncschema bundle. The key for the localized name of an attribute is "$entity/$attribute_name",
for example the key for the attribute with the Name "title" in the entity with the name "com.apple.things.Thing"
would be "com.apple.things.Thing/title".
Type - the type of the attribute. Must be one of the valid attribute
types, such as string, number, etc.
ExcludeFromDataChangeAlert - or . Defaults to false if omitted. If this flag is set then
a change to this attribute will not count towards the number of changed attributes for the purpose
of displaying the data change alert.
Relationships - an array containing the description of all relationships in the
extension. Each relationship description is a dictionary containing the following keys.
Name - this is the name of the relationship. This key is required. The name can be localized using the
strings from Schema.strings in the .syncschema bundle. The key for the localized name of a relationship is
"$entity/$relationship_name", for example the key for the relationship with the Name "children" in the entity with
the name "com.apple.things.Thing" would be "com.apple.things.Thing/children".
Target - an array containing the names of the target entities. Generally, a
relationship has a single target. If the relative ordering between different
entities must be maintained, you may specify multiple entities in the target.
DeleteRule - cascade or nullify. Defaults to "nullify".
Ordinality - one or many. Defaults to "one".
Ordering - none, weak or strong. Defaults to "none".
Required - yes or no. Defaults to "no".
InverseRelationships - an array or pairs specifying this relationship's inverse
relationships. Each pair is a dictionary containing the following keys:
EntityName - the name of the entity.
RelationshipName - the name of the inverse relationship on that entity.
ExcludeFromDataChangeAlert - or . Defaults to false if omitted. If this flag is set then
a change to this relationship will not count towards the number of changed relationships for the purpose
of displaying the data change alert.
IdentityProperties - an array specifying the set of properties that are used to match a new
record from a Sync client with an existing record. If the target of a one to one relationship
is to be used, the name of the relationship is specified.
PropertyDependencies - an array specifying the set of dependencies between the
properties. A dependent property is one which must be pushed to a client if any of its
dependencies are changed. Each entry in the array is itself an array of strings, specifying
the names of the co-dependent properties. Entries may be an attribute name or a relationship
name.
Parent - the name of a relationship back to the parent for this entity. A parent is an enclosing
entity type which is used to bill changes for data change alerts and to house child records in the
conflict manager display. As an example, a contact is the parent of a phone number. If there is a
change to a phone number (or if a phone number is added or deleted), that will count as a change
to the parent contact, rather than a change to the phone number. If there is a conflict on a
phone number, it will appear as if the parent contact is in conflict, not the phone number. Not
all contained objects have a parent - for example although a bookmark is contained in a folder,
the folder is not considered the parent of the bookmark. The parent is used when a record is really
a "part" of an enclosing record, such as the phone number which is a "part" of a contact.
Comment - used to insert optional comments to document the schema.
ManagedObjectModels - an array containing paths to one or more CoreData managed object models (.mom files).
Relative paths are resolved against the .syncschema bundle's Resources directory. As a special case,
you can specify a path like "../../../foo.mom" to load a model that lives outside the schema bundle
(eg. in the application's Resources directory).
This registers every entity, attribute and relationship in the managed object model with Sync Services.
(Entity extensions cannot be specified in a model file.) Information specific to Sync Services is specified
in the entity or property's 'User Info' dictionary:
Entity User Info:
"com.apple.syncservices.SyncName" - the value is a string specifying the name the entity will be
registered as with Sync Services. Clients must use this name when refering to this entity.
The "sync" name may be different from the entity's name: Sync Services uses a global name space
for entities and to avoid collisions, we recommend a reverse-DNS naming scheme,
eg. "com.apple.contacts.Contact". Names with '.'s in them don't work too well with CoreData,
so this key lets you specify a globally unique name for the entity.
This key is optional. If it's not specified, Sync Services tries to construct a unique name for
the entity: if the entity name has a '.' in it, we use that directly; otherwise, we catenate the
entity's data class name with the entity's name, separated by a '.' eg. a "Contact" entity in
the "com.apple.contacts" data class would be registered with Sync Services as "com.apple.contacts.Contact"
"com.apple.syncservices.DataClass" - the value is a string specifying the name of the entity's data class.
This key is required.
"com.apple.syncservices.Parent" - the value is a string specifying the name of a relationship
back to the parent for this entity. A parent is an enclosing entity type which is used to bill changes for
data change alerts and to house child records in the conflict manager display. As an example, a contact is
the parent of a phone number. If there is a change to a phone number (or if a phone number is added or deleted),
that will count as a change to the parent contact, rather than a change to the phone number. If there is a
conflict on a phone number, it will appear as if the parent contact is in conflict, not the phone number.
Not all contained objects have a parent - for example although a bookmark is contained in a folder,
the folder is not considered the parent of the bookmark. The parent is used when a record is really
a "part" of an enclosing record, such as the phone number which is a "part" of a contact.
"com.apple.syncservices.Syncable" - "YES" or "NO". Defaults to "YES" if omitted. If this flag is set to "NO"
then the entity will not be parsed and thus not synchronized.
"com.apple.syncservices.ExcludeFromDataChangeAlert" - "YES" or "NO". Defaults to "NO" if omitted.
If this flag is set to "YES" then a change to this entity will not count towards the number of changed
entities for the purpose of displaying the data change alert.
"com.apple.syncservices.IdentityProperties" - an array of array of strings (no, that's not a typo) specifying
the properties that are used to match a new record from a sync client with an existing record. Properties
are identified by name, eg "((property1, property2, property3))". At this time, only the first array of strings
is used and any subsequent arrays are quietly ignored.
Attribute and Relationship User Info:
"com.apple.syncservices.Syncable" - "YES" or "NO". Defaults to "YES" if omitted. If this flag is set to "NO"
then the attribute / relationship will not be parsed and thus not synchronized.
"com.apple.syncservices.ExcludeFromDataChangeAlert" - "YES" or "NO". Defaults to "NO" if omitted. If this flag
is set to "YES" then a change to this attribute / relationship will not count towards the number of changed
entities for the purpose of displaying the data change alert.
It is perfectly valid to call this method for a schema that has already been registered. It is the
recommended way to update a schema. Certains kinds of changes may result in a slow sync of all
clients synchronizing the constituent entities and relationships, however. It depends on whether
there is any overlap between the property and relationship descriptions which have changed with the
properties and relationships supported by the client. Changing a schema has serious implications for
the clients synchronizing it - changes should not be undertaken lightly.
Original signature : -(BOOL)registerSchemaWithBundlePath:(NSString*)
unregisterSchemaWithName
public abstract void unregisterSchemaWithName(NSString schemaName)
snapshotOfRecordsInTruthWithEntityNames_usingIdentifiersForClient
public abstract ISyncRecordSnapshot snapshotOfRecordsInTruthWithEntityNames_usingIdentifiersForClient(NSArray entityNames,
ISyncClient client)
- Return a snapshot of the records in the Truth. The Truth stores a copy of all synchronized records
and contains the amalgamation of all properties from all clients.
The snapshot is an immutable copy of the records, taken at the time you request it. If the Truth is
subsequently modified, the changes will not be reflected in the snapshot. You can always ask for a
new shapshot if you want an up-to-date copy.
Do not use this method if you are syncing and want a snapshot of the Truth that is consistent with the
sync session. Another client may have mutated the Truth after the engine prepared your changes but
before you ask for the snapshot. If that happens, the records in this snapshot will not match the
state in the session. Use the method on ISyncSession instead.
Original signature : -(ISyncRecordSnapshot*)snapshotOfRecordsInTruthWithEntityNames:(NSArray*) usingIdentifiersForClient:(ISyncClient*)
NSString
addRequestMode
public abstract void addRequestMode(NSString mode)
- Clients that register sync alert handlers may use the following three methods to manage the request modes
of the connections that are sent alerts by the sync server. (These request modes are simply the runloop modes
of the runloop that is servicing the connection's sync alerts.) The API mirrors that of NSConnection. For
example, a client that registers a sync alert handler in a process that might present a modal dialog to the
user should add the appropriate request mode of the loop, so alerts can be handled in a timely manner even
when the application is blocked for user input.
Original signature : -(void)addRequestMode:(NSString*)
removeRequestMode
public abstract void removeRequestMode(NSString mode)
requestModes
public abstract NSArray requestModes()
alloc
public static ISyncManager alloc()