Ditto 4.8.0-rc.2
|
Classes | |
class | AwdlConfig |
Configuration for Apple Wireless Direct Link (AWDL) network transport. Not supported on all platforms. More... | |
class | BluetoothLEConfig |
Configuration for Bluetooth Low Energy network transport. Not supported on all platforms (yet). More... | |
class | Ditto |
The entrypoint to the Ditto SDK. More... | |
struct | DittoAddress |
An address uniquely representing another device on the Ditto network. More... | |
class | DittoAlreadyExistsIOException |
A file or directory already exists. More... | |
class | DittoAttachment |
A reference to a binary attachment file. More... | |
class | DittoAttachmentException |
Exception thrown for attachments related errors. More... | |
class | DittoAttachmentFetcher |
These objects are returned by calls to DittoCollection.FetchAttachment(DittoAttachmentToken, Action<DittoAttachmentFetchEvent>). More... | |
class | DittoAttachmentFetchEvent |
A representation of the events that can occur in relation to an attachment fetch. More... | |
class | DittoAttachmentFileNotFoundException |
Exception thrown while trying to create an attachment for a file that does not exist. More... | |
class | DittoAttachmentFilePermissionDeniedException |
Exception thrown when permission has been denied for a file operation while working with attachments. More... | |
class | DittoAttachmentNotFoundException |
Exception thrown when an attachment could not be found. More... | |
class | DittoAttachmentToken |
Serves as a token for a specific attachment that you can pass to a call to DittoCollection.FetchAttachment(DittoAttachmentToken, Action<DittoAttachmentFetchEvent>). More... | |
class | DittoAttachmentTokenInvalidException |
Exception thrown for an invalid attachment token. More... | |
class | DittoAuthenticationRequestEventArgs |
Data passed to the Ditto.DittoIdentityProviderAuthenticationRequest event handler when a peer wishes to use the current device as an authentication server. More... | |
struct | DittoAuthenticationStatus |
Provides info about the authentication status. More... | |
class | DittoAuthenticationSuccess |
Defines the properties and permissions of a user who has authenticated successfully and will be able to participate in the Ditto mesh. More... | |
class | DittoAuthenticator |
Provides access to authentication information and methods for logging on to Ditto Cloud. Relevant when using an OnlineWithAuthentication or an Online identity. More... | |
class | DittoBus |
Send and receive messages with remote Ditto peers in the mesh. More... | |
class | DittoCollection |
A reference to a collection in a DittoStore. More... | |
class | DittoCollectionsEvent |
Provides information about the changes that have occurred in relation to an event delivered when observing the collections in a DittoStore . It contains information about the collections that are known about as well as the collections that were previously known about in the previous event, along with information about what collections have been inserted, deleted, updated, or moved since the last event. More... | |
class | DittoConnect |
Configuration for network transports used to connect with Ditto big peers. More... | |
struct | DittoConnection |
Represents a connection between two peers in a Ditto mesh network. More... | |
class | DittoConnectionRequest |
Contains information about a remote peer that has requested a connection. More... | |
class | DittoCounter |
Represents a CRDT counter that can be upserted as part of a document or assigned to a property during an update of a document. More... | |
class | DittoCrdtException |
Exception thrown for generic CRDT errors. More... | |
class | DittoDepthLimitExceededValidationException |
Exception thrown when the depth limit for dictionary-like data has been exceeded. More... | |
class | DittoDiskUsage |
Entrypoint for accessing information about the amount of disk storage used by Ditto. This class can't be instantiated. You can access an instance through the ditto.DiskUsage API. More... | |
class | DittoDiskUsageChild |
A token returned by ObservePeers . Retain this object to continue receiving callback updates. More... | |
class | DittoDiskUsageObserver |
An observer monitoring disk usage changes. More... | |
class | DittoDocument |
A document in a DittoCollection. More... | |
class | DittoDocumentId |
An identifier for a DittoDocument More... | |
class | DittoDocumentIdPath |
Provides an interface to specify a path to a key in a document identifier that you can then call a function on to get the value at the specified key as a specific type. More... | |
class | DittoDocumentPath |
Provides an interface to specify a path to a key in a document that you can then call a function on to get the value at the specified key as a specific type. More... | |
class | DittoError |
Used to represent all Ditto-related errors that aren't thrown as exceptions. More... | |
class | DittoException |
An exception that is thrown when Ditto encounters an error. More... | |
class | DittoExperimental |
Upcoming SDK features made available for prototyping. More... | |
class | DittoFailedToCreateAttachmentException |
Exception thrown if an error ocurred while creating an attachment. More... | |
class | DittoFailedToFetchAttachmentException |
Exception thrown if an error ocurred while fetching an attachment. More... | |
class | DittoFFIException |
An exception that is thrown when Ditto FFI encounters an error. This exception contains additional details that can be useful for debugging and support. More... | |
class | DittoGlobal |
Configuration for all network transports. More... | |
class | DittoHttpListenConfig |
Configuration for less common data sync scenarios. Please read the documentation on the Ditto website for examples. Incorrect use of Listen can result in insecure configurations. More... | |
class | DittoIdentity |
Used to identify a given peer in your network. In practice a peer may be a user, a device, or it might be some other entity in your system. More... | |
class | DittoInvalidCborException |
The data does not represent valid CBOR data. More... | |
class | DittoInvalidJsonException |
The data does not represent a valid JSON string. More... | |
class | DittoIOException |
An error occurred relating to I/O. More... | |
class | DittoLanConfig |
Configuration for local LAN Wi-Fi network transport. More... | |
class | DittoListen |
Configuration for network transports used to allow incoming connections from other Ditto peers. More... | |
class | DittoLiveQuery |
A reference to a Live Query. The live query will respond to any changes relevant to the query that occur in the device's data store. Do not instantiate this by itself. The live query will keep the handler informed of all changes so long as it is not garbage collected or disposed. More... | |
class | DittoLiveQueryEvent |
Describes events delivered by a DittoLiveQuery. More... | |
class | DittoLiveQueryMove |
An object that describes how a document's position in a live query's list of matching documents has changed since the previous live query event. More... | |
class | DittoMutableCounter |
Represents a mutable CRDT counter that can be incremented by a specific amount while updating a document. More... | |
class | DittoMutableDocument |
A special reference to a DittoDocument that can be used to perform mutation on a document. Do not instantiate directly. This reference should never leave the scope of the lambda provided as part of a call to DittoPendingCursorOperation.Update(Action<List<DittoMutableDocument>>) or DittoPendingIdSpecificOperation.Update(Action<DittoMutableDocument>) and should not be used across different threads. More... | |
class | DittoMutableDocumentPath |
Provides an interface to specify a path to a key in a document that you can then call various update functions on. You obtain a DittoMutableDocumentPath by subscripting a DittoMutableDocument and you can then further subscript a DittoMutableDocumentPath to further specify the key of the document that you want to update. More... | |
class | DittoMutableRegister |
Represents a mutable CRDT register that can be updated while updating a document. More... | |
class | DittoNotADictionaryValidationException |
Exception thrown if given an invalid object when a dictionary was expected. More... | |
class | DittoNotFoundIOException |
A file or directory could not be found. More... | |
class | DittoNotJsonCompatibleException |
JSON Serialization for a provided object failed. More... | |
class | DittoOperationFailedIOException |
The operation failed for an unspecified reason. See error message for details. More... | |
struct | DittoPeer |
Represents a peer in a Ditto mesh network. More... | |
class | DittoPeersObserver |
A token returned by ObservePeers . Retain this object to continue receiving callback updates. More... | |
class | DittoPeerToPeer |
Configuration for network transport used to connect with other Ditto small peers. Some transports are not supported on all platforms. More... | |
class | DittoPendingCollectionsOperation |
These objects are returned when calling Collections() on DittoStore. More... | |
class | DittoPendingCursorOperation |
These objects are returned when using find -like functionality on DittoCollection objects. More... | |
class | DittoPendingIdSpecificOperation |
These objects are returned when using DittoCollection.FindById(string) functionality. More... | |
class | DittoPermissionDeniedIOException |
The operation failed due to insufficient permissions. More... | |
class | DittoPresence |
The entrypoint for all actions that relate presence of other peers known by the current peer, either directly or through other peers. More... | |
struct | DittoPresenceGraph |
Represent the states of all known peers. More... | |
class | DittoPresenceObserver |
A token returned by ObservePresence . Retain this object to continue receiving callback updates. More... | |
class | DittoQueryArgumentsInvalidException |
Exception thrown when the query arguments used were invalid. More... | |
class | DittoQueryException |
Exception thrown for query execution errors. More... | |
class | DittoQueryInvalidException |
Exception thrown for invalid queries. More... | |
class | DittoQueryNotSupportedException |
The query is syntactically valid but uses features that are either not supported at all yet or not supported in a particular context. More... | |
class | DittoQueryResult |
Represents the result of executing a DQL query. More... | |
class | DittoQueryResultItem |
Represents a single match of a DQL query, similar to a "row" in SQL terms. It's a reference type serving as a "cursor", allowing for efficient access of the underlying data in various formats. More... | |
class | DittoRegister |
Represents a CRDT register that can be upserted as part of a document or assigned to a property during an update of a document. More... | |
class | DittoRemotePeer |
A summary snapshot of the connections currently active with a remote peer. More... | |
class | DittoScopedWriteTransaction |
Exposes functionality that allows you to perform multiple operations on the store within a single write transaction. More... | |
class | DittoSingleDocumentLiveQueryEvent |
Provides information about a live query event relating to a single document live query. More... | |
class | DittoSizeLimitExceededValidationException |
Exception thrown when the size limit for some piece of data has been exceeded. More... | |
class | DittoSmallPeerInfo |
The entrypoint for small peer user info collection. More... | |
class | DittoStore |
A class encompassing functionality relating to the embedded storage. This is not a class you instantiate directly. Instead you access DittoStore objects using Ditto.Store. More... | |
class | DittoStoreBackendException |
Exception thrown for errors with the storage backend. More... | |
class | DittoStoreDocumentNotFoundExpcetion |
Exception thrown when a document could not be found. More... | |
class | DittoStoreException |
Exception thrown for Ditto store related issues. More... | |
class | DittoStoreObserver |
A store observer invokes an observation handler whenever results for its query change. More... | |
class | DittoSubscription |
A reference to a subscription to data with other remote peers. You do not instantiate DittoSubscription objects directly. Instead they are created by calling DittoPendingCursorOperation.Subscribe or DittoPendingIdSpecificOperation.Subscribe. More... | |
class | DittoSync |
Provides access to sync related functionality of Ditto. More... | |
class | DittoTcpListenConfig |
Configuration for less common data sync scenarios. Please read the documentation on the Ditto website for examples. Incorrect use of Listen can result in insecure configurations. More... | |
class | DittoTransportConditionChangedEventArgs |
Data passed to the Ditto.DittoTransportConditionChanged event handler when the condition of one of the underlying transports that Ditto uses changes. More... | |
class | DittoTransportConfig |
Configuration object specifying which network transports Ditto should use to sync data. More... | |
class | DittoTransportDiagnostics |
Provides a view into the state of the transports being used by Ditto at a point in time. More... | |
class | DittoTransportHandle |
Wrapper around an Action for cleaning up native transport resources. More... | |
class | DittoTransportSnapshot |
Provides information about a given transport at a point in time. More... | |
class | DittoUnsupportedException |
Operation is not supported. More... | |
class | DittoUpdateResult |
Provides information about a successful update operation on a document. More... | |
class | DittoValidationException |
Exception thrown for input validation failures. More... | |
class | DittoWriteTransaction |
Exposes functionality that allows you to perform multiple operations on the store within a single write transaction. More... | |
class | DittoWriteTransactionPendingCursorOperation |
These objects are returned when using DittoScopedWriteTransaction.Find(string), DittoScopedWriteTransaction.Find(string, Dictionary<string, object>), or DittoScopedWriteTransaction.FindAll. More... | |
class | DittoWriteTransactionPendingIdSpecificOperation |
These objects are returned when using DittoScopedWriteTransaction.FindById(string) functionality. More... | |
class | DittoWriteTransactionResult |
Provides information about the result of an operation on a document that was part of a write transaction. More... | |
interface | IDittoAuthenticationDelegate |
Provides feedback to the developer about Ditto authentication status. More... | |
interface | IDittoObserver |
An observation token returned by any observation API in the Ditto SDK. More... | |
class | WifiAwareConfig |
Configuration for Wi-Fi Aware network transport. Not supported on all platforms. More... | |
Enumerations | |
enum | FileType { Directory , File , SymLink } |
enum | DittoConnectionRequestAuthorization { Allow , Deny } |
Indicates whether a connection request should be authorized. More... | |
enum | DittoLogLevel { Error = 1 , Warning = 2 , Info = 3 , Debug = 4 , Verbose = 5 } |
The different log levels that Ditto supports. | |
enum | DittoIdentityType { OfflinePlayground , OnlineWithAuthentication , OnlinePlayground , SharedKey , Manual } |
The identity types you can use with Ditto. More... | |
enum | DittoSmallPeerInfoSyncScope { BigPeerOnly , LocalPeerOnly } |
Specifies which peers to replicate the small peer info to. More... | |
enum | DittoSortDirection { Ascending = 1 , Descending = 2 } |
Describes the lexicographic or numeric sorting direction for a query. More... | |
enum | DittoWriteStrategy { Merge = 1 , InsertIfAbsent = 2 , InsertDefaultIfAbsent = 3 , UpdateDifferentValues } |
Defines the various strategies available when inserting a document into a collection. More... | |
enum | DittoConditionSource : uint { Bluetooth = 0 , Tcp = 1 , Awdl = 2 , Mdns = 3 , WifiAware = 4 } |
The subsystem which is reporting a condition change. | |
enum | DittoConnectionPriority { DontConnect = 0 , Normal = 1 , High = 2 } |
The priority with which the local device should reach out to particular remote peers in the Ditto mesh. More... | |
enum | DittoConnectionType { Bluetooth , AccessPoint , P2PWiFi , WebSocket } |
The transport protocol used by two peers to communicate within a given connection. | |
enum | DittoTransportCondition : uint { Unknown = 0 , Ok = 1 , GenericFailure = 2 , AppInBackground = 3 , MdnsFailure = 4 , TcpListenFailure = 5 , NoBleCentralPermission = 6 , NoBlePeripheralPermission = 7 , CannotEstablishConnection = 8 , BleDisabled = 9 , NoBleHardware = 10 , WifiDisabled = 11 , TemporarilyUnavailable = 12 } |
The different conditions that a transport can be in at a point in time. | |
Functions | |
void | Cancel () |
A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription's query. | |
The priority with which the local device should reach out to particular remote peers in the Ditto mesh.
For most use-cases, this API is not required as Ditto will automatically create an optimal P2P mesh. Certain use-cases, however, might require more manual control over how the mesh is formed.
Enumerator | |
---|---|
DontConnect | Do not attempt to connect. Note that connections can be established by either peer, so the remote peer might still connect to this Ditto unless they are similarly configured. |
Normal | Connect with normal priority. This is also the default case unless specified otherwise. |
High | Connect with high priority. Remote peers which are assigned this connection priority will be preferred over normal priority peers. This priority will only have a meaningful effect once there are more nearby peers than the local Ditto instance is able to simultaneously connect to. |
The identity types you can use with Ditto.
Specifies which peers to replicate the small peer info to.
By default, the small peer info is replicated only to the big peer. This behavior can be customized to better match a specific application.
Defines the various strategies available when inserting a document into a collection.
void DittoSDK.Cancel | ( | ) |
A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription's query.
Create a sync subscription by calling DittoSync.RegisterSubscription. The subscription will remain active until either explicitly cancelled or the owning Ditto
object goes out of scope or Cancel() is called. / public class DittoSyncSubscription { private readonly WeakReference<Ditto> ditto;
internal DittoSyncSubscription(Ditto ditto, string query, Dictionary<string, object> arguments, byte[] queryArgumentsCbor) { this.ditto = new WeakReference<Ditto>(ditto); this.QueryString = query; this.QueryArguments = arguments; this.QueryArgumentsCbor = queryArgumentsCbor; }
/
/ Gets the Ditto instance this subscription belongs to. / public Ditto Ditto => this.ditto.GetValue();
/
/ Gets the query string of the sync subscription. / public string QueryString { get; private set; }
/
/ Gets the query arguments of the sync subscription. / public Dictionary<string, object> QueryArguments { get; private set; }
/
/ Gets a value indicating whether the sync subscription has been cancelled or not. / Also, a sync subscription is considered cancelled / if the owning Ditto
object goes out of scope. / public bool IsCancelled => !this.Ditto?.Sync.SubscriptionConcurrentDict.ContainsKey(this) ?? true;
NOTE: We carry the arguments CBOR data through in order to avoid having to re-encode it again when cancelling/removing/unregistering the sync subscription. internal byte[] QueryArgumentsCbor { get; private set; }
/
/ Cancels the sync subscription so that new changes matching the query are / no longer received from other peers. No-op if it's already cancelled or / the owning Ditto
object goes out of scope.