collabora-online/ios/Mobile/TemplateCollectionViewContr...

18 lines
665 B
C
Raw Normal View History

// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*-
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import <UIKit/UIKit.h>
@interface TemplateCollectionViewController : UICollectionViewController<UICollectionViewDataSource,UICollectionViewDelegateFlowLayout> {
Add a way to have templates specific to a customer deployment Add two settings: One setting "Template list URL" is a string that should either be empty (the typical case for a random user of the app), or contain a https: URL. If this setting is empty, only the templates bundled in the app are provided. If the "Template list URL" is non-empty, it should be a https: URL pointing to a text file (or dynamically generated text resource). That file is downloaded and read when the app starts. Each line in the file should either be a comment (starting with a hash '#'), or a https: URL pointing to a template document, that is of type .ott, .ots, or .otp. That document is downloaded if it hasn't been downloaded already, or if its time stamp is newer than that of the already downloaded copy. Also a thumbnail image for the template, formed by appending ".png" to its URL, is downloaded, if available. Any previously downloaded templates that aren't mentioned in the list file are removed. The intent is that in some managed mass deployment environment, the mobile device management software would set up this setting, so that the end-user devices would see the same templates. Obviously, this URL does not have to point to a static file on a web server, but could point to some dynamically generated resource on a web server, that enumerates the templates available on the server and returns their URLs as a text document. Another setting is "Empty tile cache next time". This is a toggle. If toggled on, the next time a document is opened in the app, the tile cache is emptied (and the toggle is reset off). This is mostly for potential problem solving, and might be removd later. Various refactoring to support the new functionality. Change-Id: Ie2ebf032acb9e43bb1c6f7ae4d0c449ae66eaa05
2018-12-17 21:18:49 +01:00
NSMutableArray<NSURL*> *templates[3];
}
@property (copy) void (^ _Nullable importHandler)(NSURL * _Nullable, UIDocumentBrowserImportMode);
@end
// vim:set shiftwidth=4 softtabstop=4 expandtab: