Oracle Database Mobile Server .Net Sync API
11.3.0.0.0
Mobile Sync Client .NET API specification
|
Public Member Functions | |
OSESession () | |
OSESession (string user) | |
OSESession (string user, char[] pwd) | |
void | Dispose () |
void | Close () |
void | SelectPub (string name) |
void | UnselectPubs () |
void | SaveUser () |
void | Sync () |
void | CancelSync () |
void | ShareConnection (string dbName, IntPtr hdl) |
void | UnshareConnection (string dbName) |
Properties | |
SyncDirection | SyncDirection [get, set] |
EncryptionType | EncryptionType [get, set] |
TransportType | TransportType [get, set] |
bool | SavePassword [get, set] |
bool | Background [get, set] |
DataPriority | SyncPriority [get, set] |
bool | SyncApps [get, set] |
bool | SyncNewPub [get, set] |
bool | ForceRefresh [get, set] |
bool | UseFiles [get, set] |
bool | UseResume [get, set] |
string | User [get] |
char[] | Password [set] |
char[] | NewPassword [set] |
string | URL [get, set] |
string | Proxy [get, set] |
string | AppRoot [get, set] |
TransportDirection | TransportDirection [get, set] |
string | FileURL [get, set] |
OSETransport | UserTransport [set] |
OSEProgressHandler | SyncProgress |
OSESession is the main class in .Net Sync API for native client. OSESession allows setting sync parameters and options, invoking sync, canceling sync and tracking sync progress. Note that in multithreaded environment a single OSESession is not supposed to be used concurrently from multiple threads. Each thread should open its own session. The only exception is calling OSESession.CancelSync from another thread.
Example:
String user = "JOHN"; String pwd = "john"; using(OSESession sess = new OSESession(user, pwd.toCharArray()) { sess.setURL("localhost:88"); sess.sync(); }
Oracle.OpenSync.OSE.OSESession.OSESession | ( | ) |
Initialize OSESession with last user info saved in OSE meta files.
OSEException | if last user was not saved or error occured loading user configuration |
Oracle.OpenSync.OSE.OSESession.OSESession | ( | string | user) |
Initialize OSESession with given user name. If the password was not saved, it can be set later by using Password property.
user | sync user name |
OSEException | if error occured loading user configuration |
Oracle.OpenSync.OSE.OSESession.OSESession | ( | string | user, |
char[] | pwd | ||
) |
Initialize OSESession with given user name and password.
user | sync user name sync password |
OSEException | if error occured loading user configuration |
void Oracle.OpenSync.OSE.OSESession.CancelSync | ( | ) |
Cancels sync operation from another thread. This call returns immediately. There is no guarantee on how long it will take for the sync to abort.
void Oracle.OpenSync.OSE.OSESession.Close | ( | ) |
Close OSESession and release its resources
void Oracle.OpenSync.OSE.OSESession.Dispose | ( | ) |
Close OSESession and release its resources
void Oracle.OpenSync.OSE.OSESession.SaveUser | ( | ) |
Save user information into OSE meta files. Usually this is done at the end of sync if changes are detected. This call allows to do it before sync. Password will be saved only if SavePassword property is set to true.
OSEException | if saving failed |
void Oracle.OpenSync.OSE.OSESession.SelectPub | ( | string | name) |
Select publication for selective sync. Select multiple publications by repeatedly calling this method.
name | publication name |
OSEException | if the publication with the given name was not found |
void Oracle.OpenSync.OSE.OSESession.ShareConnection | ( | string | dbName, |
IntPtr | hdl | ||
) |
Provides database connection handle from the application to use in OSE engine, instead of engine opening its own database connection, which is default. The connection handle is set for the duration of the session unless explicitly unset by calling UnshareConnection().
dbName | database name connection handle, has to be a valid native handle for particular type of database as used in OSE plugin. For example, for sqlite and BDB plugins hdl value should be of native type "sqlite3 *". |
OSEException | if plugin error has occured |
void Oracle.OpenSync.OSE.OSESession.Sync | ( | ) |
Performs sync.
OSException | if sync failed or was canceled from another thread. |
void Oracle.OpenSync.OSE.OSESession.UnselectPubs | ( | ) |
Unselect all publications and revert back from selective to normal sync.
void Oracle.OpenSync.OSE.OSESession.UnshareConnection | ( | string | dbName) |
Unshares connection, which forces OSE engine to use its own database connection for this database
dbName | database name |
|
getset |
Gets or sets root directory for internal sync files. The default is the sync client installation bin directory.
|
getset |
Gets or sets flag which indicates whether sync should be background. The default is false, indicating foreground sync.
|
getset |
Gets or sets encryption type. The default is EncryptionType.AES
|
getset |
Gets or sets file url for file-based sync
|
getset |
Gets or sets flag that indicates whether sync is force-refresh. The default is false.
|
set |
Sets new sync password in order to change password during next sync.
|
set |
Sets sync password for this session
|
getset |
Gets or sets http proxy in the format "host:port" or "host", in which case the port defaults to 80.
|
getset |
Gets or sets flag which indicates whether user sync password should be saved on the client so it doesn't have to be explicitely provided to future sessions. The password is saved in encrypted form. The default is false.
|
getset |
Gets or sets flag that indicates whether sync should download a list of application/client updates so they can later be installed. The default is true.
|
getset |
Gets or sets sync direction. The default is SyncDirection.SendReceive
|
getset |
Gets or sets flag that indicates whether new publication(s) can be created during sync. The default is true.
|
getset |
Gets or sets sync priority. The default is SyncPriority.Normal
|
addremove |
Adds or removes sync progress handlers
OSEException | if a handler could not be added or removed |
|
getset |
Gets or sets transport direction. The default is TransportDirection.SendReceive
|
getset |
Gets or sets transport type. The default is TransportType.Http
|
getset |
Gets or sets mobile server url
|
getset |
Gets or sets flag that indicates whether files are used to temporarily store the data before it's sent/after it's received. The default is false.
|
get |
Gets sync user name for this session
|
getset |
Gets or sets flag that indicates whether resume protocol should be used on top of sync transport. UseFiles will be implicitely set to true if this property is set to true. The default is false.
|
set |
Sets custom user-defined transport. This will automatically set TransportType to TransportType.User