diff options
author | jan Iversen <jani@libreoffice.org> | 2017-10-29 11:05:39 +0100 |
---|---|---|
committer | jan Iversen <jani@libreoffice.org> | 2017-10-29 11:21:11 +0100 |
commit | cbe828b7f759969c0d70eb818fca62d67379e648 (patch) | |
tree | b8be728dac2d85d47ea379d013cc089d710b0e5d /ios | |
parent | 98c7ab9531af4848dc289e38c5f4291788ad3d6e (diff) |
iOS, move hipernate handling to LOkit interface
Hipernate means stopping LOkit but of course saving first if a
document is active
and returning means starting LOkit again.
for now the implementation is left as FIXME
Change-Id: Id9ea2b056e87caec13c1d3fe82d4623ca3901ef2
Diffstat (limited to 'ios')
-rw-r--r-- | ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c | 23 | ||||
-rw-r--r-- | ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h | 2 | ||||
-rwxr-xr-x | ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift | 33 |
3 files changed, 46 insertions, 12 deletions
diff --git a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c index 59a1c217b514..a56daa71a09e 100644 --- a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c +++ b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c @@ -57,5 +57,26 @@ int BridgeLOkit_open(const char *path) int BridgeLOkit_ClientCommand(const char *input) { - return 0; + return 0; +} + + + +int BridgeLOkit_Hipernate() +{ + //FIXME + // check if document needs to be saved, to avoid data loss + // terminate all threads (basically terminate LOkit) + return 0; } + + + +int BridgeLOkit_LeaveHipernate() +{ + //FIXME + // restart LOkit + // reload document (it may have been changed by other programs, especially if iCloud + return 0; +} + diff --git a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h index b86156211893..56843ddfe0a2 100644 --- a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h +++ b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h @@ -14,3 +14,5 @@ int BridgeLOkit_Init(const char *path); int BridgeLOkit_open(const char *path); int BridgeLOkit_ClientCommand(const char *input); +int BridgeLOkit_Hipernate(); +int BridgeLOkit_LeaveHipernate(); diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift index 39a49d2a01eb..c05da106344a 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift @@ -15,6 +15,28 @@ import UIKit // It is a delegate class to recieve Menu events as well as file handling events class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewControllerDelegate { + // Handling of Background (hipernate) + // iOS is not true multitasking, only 1 app can be active (foreground) at any time, + // therefore apps frequently are moved to the background. + // background really means hipernate by terminating all threads and solely keep the + // data + + // Moving to hipernate + public func Hipernate() -> Void + { + BridgeLOkit_Hipernate() + } + + + + // Moving back to foreground + public func LeaveHipernate() -> Void + { + BridgeLOkit_LeaveHipernate() + } + + + // handling of PropertiesController // The PropertiesController is a left sidebar, that will scroll in when activated // The Controller handles manipulation of properties in the document @@ -72,17 +94,6 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC } } - - - // Handling of Background (hipernate) - public func Hipernate() -> Void - { - } - - public func LeaveHipernate() -> Void - { - } - // var currentDocumentName : String? |