Exemplo n.º 1
0
        private void SubscribeForEvents()
        {
            ptrBackupEvent  = new InternalCAPI.ServerBackupCallback(BackupFunction);
            ptrCleanupEvent = new InternalCAPI.ServerCleanupCallback(CleanupFunction);

            CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.SubscribeForBackupEvents(ptrBackupEvent));
            CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.SubscribeForCleanupEvents(ptrCleanupEvent));
        }
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Restore_Uninit());

            disposed = true;
        }
        public string[] Restore_ListAll()
        {
            uint count = 0;
            UnmarshaledString UnmanagedStringArray = IntPtr.Zero;

            CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Restore_ListAll(out UnmanagedStringArray, out count));

            string[] ManagedStringArray = null;
            MarshalUnmananagedStrArray2ManagedStrArray(UnmanagedStringArray, (int)count, out ManagedStringArray);
            return(ManagedStringArray);
        }
Exemplo n.º 4
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            UnsubscribeFromEvents();
            CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Uninit());

            disposed  = true;
            _instance = null;
        }
Exemplo n.º 5
0
 public void ReloadConfig(string IniPath)
 {
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.ReloadConfig(IniPath));
 }
Exemplo n.º 6
0
 private void UnsubscribeFromEvents()
 {
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.UnsubscribeFromBackupEvents());
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.UnsubscribeFromCleanupEvents());
 }
Exemplo n.º 7
0
 public void Stop()
 {
     UnsubscribeFromEvents();
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Stop());
 }
Exemplo n.º 8
0
 public void Start(string IniPath)
 {
     SubscribeForEvents();
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Start(IniPath));
 }
Exemplo n.º 9
0
 private CeBackupServerManager()
 {
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Init());
 }
 public void RestoreTo(string BackupPath, string DirTo)
 {
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Restore_RestoreTo(BackupPath, DirTo));
 }
 public void Restore(string BackupPath)
 {
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Restore_Restore(BackupPath));
 }
 public void Init(string IniPath)
 {
     _IniPath = IniPath;
     CeBackupServerException.RaiseIfNotSucceeded(InternalCAPI.Restore_Init(_IniPath));
 }