ZDCCloud

  • ZDCCloud is a YapDatabase extension.

    It manages the storage of the upload queue. This allows your application to work offline. Any changes that need to be pushed to the cloud will get stored in the database using a lightweight operation object that encodes the minimum information necessary to execute the operation at a later time.

    It extends YapDatabaseCloudCore, which we also developed, and contributed to the open source community.

    When using the ZeroDarkCloud framework, you’ll often be interacting with ZDCCloudTransaction.

    See more

    Declaration

    Objective-C

    @interface ZDCCloud

    Swift

    class ZDCCloud
  • ZDCCloud is a YapDatabase extension.

    It manages the storage of the upload queue. This allows your application to work offline. Any changes that need to be pushed to the cloud will get stored in the database using a lightweight operation object that encodes the minimum information necessary to execute the operation at a later time.

    It extends YapDatabaseCloudCore, which we also developed, and contributed to the open source community.

    See more

    Declaration

    Objective-C

    @interface ZDCCloudConnection

    Swift

    class ZDCCloudConnection
  • ZDCCloud is a YapDatabase extension.

    It manages the storage of the upload queue. This allows your application to work offline. Any changes that need to be pushed to the cloud will get stored in the database using a lightweight operation object that encodes the minimum information necessary to execute the operation at a later time.

    It extends YapDatabaseCloudCore, which we also developed, and contributed to the open source community.

    See more

    Declaration

    Objective-C

    @interface ZDCCloudTransaction

    Swift

    class ZDCCloudTransaction
  • ZDCCloudOperation is a lightweight representation of a push task that needs to be performed.

    That is, it represents a change that needs to be pushed to the server such as:

    • uploading a new node
    • modifying an existing node
    • moving or renaming a node
    • deleting a node

    It encodes the minimum information necessary to to execute the task at a later date, possibly after an app re-launch.

    The operation objects get stored in the database as part of ZDCCloud (a database extension), which manages the operation objects in a semi-queue-like fashion.

    Note

    ZDCCloudOperation extends YapDatabaseCloudCoreOperation. (YapDatabaseCloudCore was also developed by us, which we contributed to the open source community.) The YapDatabaseCloudCoreOperation class is where you’ll find the basic operation stuff, such as the uuid, dependencies, and priority.
    See more

    Declaration

    Objective-C

    @interface ZDCCloudOperation <NSCoding, NSCopying>

    Swift

    class ZDCCloudOperation : NSCoding, NSCopying
  • Encapsulates all the information required to locate a file in the cloud:

    • AWS region (e.g. us-west-2)
    • AWS S3 bucket name
    • AWS s3 keypath (in standardized/parsed form)

    Instances of this class are immutable.

    See more

    Declaration

    Objective-C

    @interface ZDCCloudLocator : NSObject <NSCoding, NSCopying>

    Swift

    class ZDCCloudLocator : NSObject, NSCoding, NSCopying
  • Encapsultes a standardized & parsed cloudPath, which takes the form of: {treeID}/{dirPrefix}/{filename}

    For example, the following are valid cloudPaths:

    • com.4th-a.storm4/00000000000000000000000000000000/3h6omkbtsn3o7xfsjtz6xcnyxn5e6bug.rcrd
    • tld.foo.bar/640C24E8B6874D428A19C63652DF5F8C/54yqj8u5796uaoaa41n6unywki8t3wpn.data
    • tld.foo.bar/mgsIn/7ckebgr1c4s7a9xgu6gqcb7ix55mndbg
    See more

    Declaration

    Objective-C

    @interface ZDCCloudPath : NSObject <NSCoding, NSCopying>

    Swift

    class ZDCCloudPath : NSObject, NSCoding, NSCopying
  • This class represents the decrypted information within a RCRD file.

    Every node that gets stored in the cloud gets split into 2 files:

    • the RCRD file contains the treesystem metadata (name of file, permissions, etc)
    • the DATA file contains the actual content of the node

    ZeroDark.cloud downloads RCRD files automatically (which are small), in order to keep the local treesystem up-to-date with the cloud. Note, however, that it does NOT automatically download DATA files. Your application gets to decide which DATA files to download & when.

    See more

    Declaration

    Objective-C

    @interface ZDCCloudRcrd : NSObject

    Swift

    class ZDCCloudRcrd : NSObject
  • A dropbox invite encompasses the information required for another user to write into your treesystem.

    Imagine that Alice has a node in her treesystem at: /foo/bar/filesFromFriends

    She wants to setup the node as a dropbox for Bob: That is:

    • Bob should be allowed to write files into this directory
    • But Bob doesn’t have permission to read the files in this directory
    • And Bob doesn’t have permission to delete files from this directory

    Alice can accomplish this by:

    • giving Bob write permission on the node
    • sending Bob a dropbox invite for the node

    What’s nice about this system is that Bob doesn’t see the parentNode. That is, Bob cannot discover the location of /foo/bar/filesFromFriends. So he wouldn’t be able to determine, for example, who else Alice has given Dropbox permission to.

    Further, since Bob doesn’t have read permission, he won’t be able to see the other children of the node. So he also won’t be able to determine which other friends have sent Alice files.

    See more

    Declaration

    Objective-C

    @interface ZDCDropboxInvite : NSObject <NSCopying>

    Swift

    class ZDCDropboxInvite : NSObject, NSCopying
  • A GraftInvite encompasses the information required to complete a graft.

    For example, if Alice wants to collaborate with Bob, then she wants to share a branch of her treesystem with Bob. There are 2 steps required for Alice.

    First, she needs to give Bob permission to access her branch. She can accomplish this with -[ZDCCloudTransaction recursiveAddShareItem:forUserID:nodeID:].

    Second, she needs to send a message to Bob. The message is some kind of application-specific invite. And the invite must contain, at a minimum, the information contained in this class.

    After Bob receives the invite message, he can accept the invite via -[ZDCCloudTransaction graftNodeWithLocalPath:::::].

    See more

    Declaration

    Objective-C

    @interface ZDCGraftInvite : NSObject <NSCopying>

    Swift

    class ZDCGraftInvite : NSObject, NSCopying