Oracle Database Mobile Server .Net Sync API  12.1.0.0.0
Mobile Sync Client .NET API specification
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Classes | Enumerations | Functions
Package Oracle.OpenSync.SyncAgent

Classes

struct  bgMsg
 
class  BGException
 
class  BGMessage
 
class  BGMsgEventArgs
 
class  BGSession
 
struct  bgAgentStatus
 
struct  bgSyncStatus
 
class  BGAgentStatus
 
class  BGSyncStatus
 

Enumerations

enum  BGMessageType { BGMessageType.Info, BGMessageType.Warning, BGMessageType.Error }
 
enum  BGMessageId {
  BGMessageId.AgentStarted = 12000, BGMessageId.AgentStopped = 12001, BGMessageId.AgentPaused = 12002, BGMessageId.AgentResumed = 12003,
  BGMessageId.ComposeStarted = 12004, BGMessageId.ComposeFinished = 12005, BGMessageId.SyncStarted = 12006, BGMessageId.SyncFinished = 12007,
  BGMessageId.ApplyStarted = 12008, BGMessageId.ApplyFinished = 12009, BGMessageId.ServerNotification = 12010, BGMessageId.NetworkChanged = 12011,
  BGMessageId.NetworkEval = 12013, BGMessageId.TraceMessage = 12014, BGMessageId.BatteryLow = 12200, BGMessageId.MemoryLow = 12201,
  BGMessageId.ComposeFailed = -12500, BGMessageId.SyncFailed = -12501, BGMessageId.ApplyFailed = -12502, BGMessageId.RuleLoadFailed = -12503,
  BGMessageId.RuleEvalFailed = -12504, BGMessageId.NetworkManagerError = -12505, BGMessageId.PowerManagerError = -12506, BGMessageId.InternalError = -12507,
  BGMessageId.PlatRuleInNonPlatDB = -12508, BGMessageId.NetAutoDialFailed = -12509, BGMessageId.ServerNotificationFailed = -12510, BGMessageId.ControlConnectionClosed = -12511,
  BGMessageId.InvalidCommand = -12512, BGMessageId.InvalidServerNotification = -12513, BGMessageId.ActiveConnectionsPresent = -12514, BGMessageId.OperationNotAllowed = -12516,
  BGMessageId.InvalidRuleType = -12518, BGMessageId.InvalidRuleSubtype = -12519, BGMessageId.InvalidRuleClass = -12520, BGMessageId.InvalidRuleSubtypeType = -12521,
  BGMessageId.InvalidRuleDateFormat = -12522, BGMessageId.InvalidEventSubtype = -12523, BGMessageId.InvalidConditionSubtype = -12524, BGMessageId.InvalidEventType = -12525,
  BGMessageId.InvalidConditionType = -12526, BGMessageId.SqlRuleMissingQuery = -12527, BGMessageId.DuplicatePlatformDB = -12528, BGMessageId.AnotherInstance = -12529,
  BGMessageId.OperationNotSupported = -12530, BGMessageId.InvalidNumericParameter = -12531, BGMessageId.InvalidStringParameter = -12532, BGMessageId.InvalidWaitStatus = -12533,
  BGMessageId.InvalidSession = -12534, BGMessageId.WaitTimeout = -12535, BGMessageId.AgentNotRunning = -12536, BGMessageId.TooManyReaders = -12537,
  BGMessageId.ReaderCanceled = -12538, BGMessageId.AgentDisabled = -12539, BGMessageId.NoBGPubs = -12540, BGMessageId.RuleEvalFailedDBLocked = -12541,
  BGMessageId.InvalidParameter = -12542
}
 
enum  BGStatusCode {
  BGStatusCode.Stopped = 0, BGStatusCode.StartPending, BGStatusCode.Running, BGStatusCode.PausePending,
  BGStatusCode.Paused, BGStatusCode.ResumePending, BGStatusCode.StopPending
}
 

Functions

delegate void BGMessageHandler (object sender, BGMsgEventArgs args)
 

Enumeration Type Documentation

Message ids for background sync events and control API exceptions. Information and warning messages have positive ids and error messages and exception codes have negative ids.

Enumerator
AgentStarted 

Info: sync agent has been started

AgentStopped 

Info: sync agent has been stopped

AgentPaused 

Info: sync agent has been paused

AgentResumed 

Info: sync agent has been resumed

ComposeStarted 

Info: compose has started

ComposeFinished 

Info: compose has finished successfully

SyncStarted 

Info: sync has started

SyncFinished 

Info: sync has finished successfully

ApplyStarted 

Info: apply has started

ApplyFinished 

Info: apply has finished successfully

ServerNotification 

Info: server notification has been received

NetworkChanged 

Info: network has changed

NetworkEval 

Info: evaluated network

TraceMessage 

Info: trace message with debug information

BatteryLow 

Warning: battery low

MemoryLow 

Warning: memory low

ComposeFailed 

Error: compose failed

SyncFailed 

Error: sync failed

ApplyFailed 

Error: apply failed

RuleLoadFailed 

Error: failed to load or parse a background sync rule

RuleEvalFailed 

Error: failed to evaluate a rule

NetworkManagerError 

Error: failed to evaluate network state

PowerManagerError 

Error: failed to evaluate power state

InternalError 

Error: internal error has occured

PlatRuleInNonPlatDB 

Error: found platform rule in non-platform database

NetAutoDialFailed 

Error: failed to dial up specified network

ServerNotificationFailed 

Error: failed to get server notification

ControlConnectionClosed 

Control connection to sync agent is closed due to an error

InvalidCommand 

Invalid control command received. This is internal error in the .Net wrapper.

InvalidServerNotification 

Error: failed to get server notification

ActiveConnectionsPresent 

Cannot stop the agent because active control connection(s) are present

OperationNotAllowed 

Control operation not allowed with sync agent being in a given state

InvalidRuleType 

Invalid rule type detected

InvalidRuleSubtype 

Invalid rule subtype detected

InvalidRuleClass 

Invalid rule class detected (only event and condition are allowed)

InvalidRuleSubtypeType 

Invalid rule subtype for a give rule type

InvalidRuleDateFormat 

Invalid date format in time rule

InvalidEventSubtype 

Invalid subtype for an event rule

InvalidConditionSubtype 

Invalid subtype for a condition rule

InvalidEventType 

Invalid type for an event rule

InvalidConditionType 

Invalid type for a condition rule

SqlRuleMissingQuery 

Missing query string for SQL rule

DuplicatePlatformDB 

Duplicate platoform database detected

AnotherInstance 

Cannot start sync agent because another instance is already running

OperationNotSupported 

Operation is not yet supported

InvalidNumericParameter 

Invalid numeric parameter specified This is internal error in the .Net wrapper.

InvalidStringParameter 

Invalid numeric parameter specified This is internal error in the .Net wrapper.

InvalidWaitStatus 

Invalid sync agent status to wait for.

See Also
BGSession.WaitForStatus()
InvalidSession 

Invalid or closed BGSession object

WaitTimeout 

Control operation has timed out

AgentNotRunning 

Operation cannot be performed because sync agent is not running

TooManyReaders 

Cannot process sync agent events because the allowed maximum of message readers will be exceeded. This can happen while trying to add message handler when 4 sessions are already subscribed to events.

ReaderCanceled 

Message reader was canceled from another thread. This is internal error in the .Net wrapper.

AgentDisabled 

Could not start sync agent because it is disabled

NoBGPubs 

Cannot start or resume sync agent because no background sync publications are found on the client.

RuleEvalFailedDBLocked 

Failed to evaluate DB rule because client database is locked

InvalidParameter 

Invalid parameter specified This is internal error in the .Net wrapper.

Sync agent message types

Enumerator
Info 

information message

Warning 

warning

Error 

error

Sync Agent status codes

Enumerator
Stopped 

not running

StartPending 

starting

Running 

running

PausePending 

pausing

Paused 

paused

ResumePending 

resuming

StopPending 

stopping

Function Documentation

delegate void Oracle.OpenSync.SyncAgent.BGMessageHandler ( object  sender,
BGMsgEventArgs  args 
)

Message handler delegate.

Parameters
senderevent sender, set to BGSession object to which the handler belongs
argsevent arguments, encapsulates BGMessage object
See Also
BGMessage