Class Directory
Package: keychain.util.directory
Inheritance: Directory
Description
The Directory class (called pair_helper in the C++ library) is a built-in utility class to enable fast prototyping with a connection to a Keychain-hosted bare-bones Trusted Directory implementation.
A Trusted Directory is often deployed for the following reasons:
-
To be a source of contacts that are unable to be physically paired
-
To be a source of additional information about contacts, such as group membership
Keychain has implemented a very simplistic Trusted Directory on our server that this class can connect to in order to do basic functionality. Users can upload their persona, download all URIs for a given domain, and delete all URIs in a domain.
The class has a thread that performs get and upload actions (see below) at a user-specified frequency. The user can start and stop this thread, but at present there is no other interaction with it or hooks exposed to the user.
|
This class is for development only. It also requires coordination with Keychain to set up a domain on the Trusted Directory and does not provide any security guarantees that a full-fledged Trusted Directory would. |
Since: v2.0
Public Constructors
| Constructor |
|---|
Creates a new |
Public Member Functions
| Return type | Method and Description |
|---|---|
|
Deletes all URIs for the domain |
|
Uploads the given URI to the server under the domain |
|
Retrieves all URIs under the domain as a |
|
Tells the update thread to start |
|
Tells the update thread to stop, then waits for it to finish before exiting. |
Public Member Functions Detail
clear_all_uri
|
|
Delete all URIs for the domain and return the library error code. Note that this is a local operation and deletes the URIs from your own |
|
Returns: |
|
The Keychain error code, where 0 is success. |
|
upload_uri
|
|
Upload the given URI to the server under the domain and returns the library error code. Upload will succeed even if the server has the |
|
Returns: |
|
The Keychain error code, where 0 is success. |
|
get_all_uri
|
|
Retrieves all URIs under the domain as a collection of pairs of the |
|
Returns: |
|
The list of |
|
Raises: |
|
|
|