commit | 3850cbac5c2b813cdcf27be18cea9492b0bc0531 | [log] [tgz] |
---|---|---|
author | Razvan Musaloiu-E <razvanm@google.com> | Mon Jun 20 14:54:56 2016 -0700 |
committer | Razvan Musaloiu-E. <razvanm@google.com> | Tue Jun 21 01:25:26 2016 +0000 |
tree | 627881f813ef7cfaae11a4d7a618d040d3e08359 | |
parent | 0013d4b9fd85e67155b3c53b9a1c73e81ff73313 [diff] |
java: Switch to the new init/login scheme The new scheme works like this: - init() function is synchronous, it takes the configuration parameters and, if isLoggedIn() is true then it starts Syncbase. It expects that the database, userdata syncgroup, etc. to already exist. - isLoggedIn() function is synchronous and it requires init() to have been called. - login() function is asynchronous, does the oauth token to blessing exchange, it requires init() to have been called, starts the Syncbase and creates the expected default state (create the default database, userdata syncgroup, etc). - database() function is synchronous, requires that isLoggedIn() is true and returns a Database object right away. This change only partially implements the above plan (the login is not wired yet). The C API gets two new functions: - v23_syncbase_Serve(cErr *C.v23_syncbase_VError) - v23_syncbase_IsLoggedIn(cIsLoggedIn *C.v23_syncbase_Bool) The Java high-level API doesn't have the inner DatabaseCallback and have instead an inner LoginCallback. This change also switches the tests for core/ and internal/ to init/shutdown a single time. These makes the tests much faster. MultiPart: 1/2 Change-Id: Ib6411ec9c2e7b9fe1f7dd8f22880012425396515
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.