Today's Menu
Portugal
journal and plan nutrition
|
Interface for remote access, to either open web or google drive. More...
#import <Z5RemoteDataController.h>
Instance Methods | |
(void) | - loginDriveWithNavigation:andHandler: |
(void) | - loginGoogleDrive |
(void) | - logOffGoogleDrive |
(BOOL) | - isSignedIn |
(NSString *) | - signedInUsername |
(void) | - initializeAvailableWithDelegate: |
(void) | - refreshAuthentication |
(void) | - queryHomeDirectoryInfoWithDelegate: |
(BOOL) | - isHomeInfoError |
(void) | - homeResultAvailable |
(void) | - queryFileListWithDelegate: |
(void) | - updateUI |
/// - (void) fillMoleculeList; More... | |
(instancetype) | - init [implementation] |
(void) | - signInNowWithHandler: [implementation] |
(void) | - runSigninThenHandler: [implementation] |
(void) | - updateOrInsertMenuItemListOnDriveWithDelegate: [implementation] |
(void) | - insertMenuItem:withDelegate: [implementation] |
(void) | - fetchMenuItem:onDriveWithDelegate: [implementation] |
(void) | - surveyDirectory: [implementation] |
(void) | - fetchSelectedFileDetails [implementation] |
(void) | - deleteSelectedFile [implementation] |
Properties | |
Z5GoogleLoginController * | loginController |
Z5GmailDataController * | emailController |
Z5GoogleDriveController * | driveController |
Z5GoogleCalendarDataController * | calendarController |
Z5URLSessionController * | sessionController |
NSString * | webviewHome |
NSString * | homeDirectoryFileId |
NSString * | homeCreateDateTime3339 |
NSMutableArray * | menuItemsList |
UINavigationController * | kNavigator [implementation] |
Interface for remote access, to either open web or google drive.
class This is the proxy delegate, so that RemoteData can see the delegate traffic, especially after Home is found, it looks for a file-list.
I will be trying to get the same action at login as I do from viewWillAppear when logged in. I will be updating method docs:
Definition at line 26 of file Z5RemoteDataController.h.
|
implementation |
Definition at line 999 of file Z5RemoteDataController.m.
|
implementation |
This method uses name matching of title to file name. This method is called from updateOrInsertMenuItemListOnDriveWithDelegate:
This method provides for removing files from the display list, however the files continue to exist in the cloud at Google Trash.
Definition at line 743 of file Z5RemoteDataController.m.
|
implementation |
Definition at line 919 of file Z5RemoteDataController.m.
- (void) homeResultAvailable |
This method is called from within the proxy Z5RemoteDataFetchProtocol delegate at the start of this file, at showHomeResult. If there was a further delegate, they would also be notified (before this call.
Definition at line 319 of file Z5RemoteDataController.m.
|
implementation |
Definition at line 168 of file Z5RemoteDataController.m.
- (void) initializeAvailableWithDelegate: | (id<Z5RemoteDataFetchProtocol>) | delegate |
This method is called at viewDidLoad and tries to validate whats found in the keychain.
if authorization is valid it kicks off the cascade of
The results are available at delegate.tellHomeResult, and delivered to delegate.fetchDataResult
This is called from the Z7RemViewController and Zma2MenuItemTableViewController, both controllers are delegate.
Definition at line 300 of file Z5RemoteDataController.m.
|
implementation |
This module provides for adding a new file onto the Google Drive
This module will decide on the original drive-file title.
Definition at line 624 of file Z5RemoteDataController.m.
- (BOOL) isHomeInfoError |
Definition at line 486 of file Z5RemoteDataController.m.
- (BOOL) isSignedIn |
This is a convenience function that makes twisted use of signedInUsername
Definition at line 227 of file Z5RemoteDataController.m.
- (void) loginDriveWithNavigation: | (UINavigationController *) | nav | |
andHandler: | (void(^)(void)) | finishHandler | |
this is the main entry points from dislays, it grabs the navigation back for a completion handler, and calls signInNowWithHandler: The signInNowWithHandler: actually toggles the sign in status - if the method is called when logged in, it logs off. TODO revise
Definition at line 192 of file Z5RemoteDataController.m.
- (void) loginGoogleDrive |
Definition at line 250 of file Z5RemoteDataController.m.
- (IBAction) logOffGoogleDrive |
Definition at line 268 of file Z5RemoteDataController.m.
- (void) queryFileListWithDelegate: | (id<Z5RemoteDataFetchProtocol>) | delegate |
Fetch the list of home children GTLDriveFile, initialize for MD5 and date comparison at table build. Provide a none nil delegate to be notified of status. Called from initialize-available with simple class object delegate.
The Drive API's file entries are chock full of data that the app may not care about. Specifying the fields we want here reduces the network bandwidth and memory needed for the collection.
For example, leave query.fields as nil during development. When ready to test and optimize your app, specify just the fields needed. For example, this sample app might use
query.fields = "kind,etag,items(id,downloadUrl,editable,etag,exportLinks,kind,labels,originalFilename,title)";
Definition at line 497 of file Z5RemoteDataController.m.
- (void) queryHomeDirectoryInfoWithDelegate: | (id<Z5RemoteDataFetchProtocol>) | delegate |
This method looks for a file named 'NutritionSummary' in the Google-Drive root directory, if one is found class vars homeCreateDateTime3339 and homeDirectoryFileId are initialized to usable values for the session. If one is not found, it is created.
Definition at line 380 of file Z5RemoteDataController.m.
- (void) refreshAuthentication |
This method accesses the user key-chain to attempt to reestablish access. The method is called from initializeAvailableWithDelegate:
Definition at line 207 of file Z5RemoteDataController.m.
|
implementation |
Definition at line 281 of file Z5RemoteDataController.m.
- (NSString *) signedInUsername |
|
implementation |
Definition at line 233 of file Z5RemoteDataController.m.
|
implementation |
This method takes the data provided and updates the file (by file id). This method called from updateOrInsertMenuItem:onDrive:withDelegate:
Definition at line 843 of file Z5RemoteDataController.m.
|
implementation |
This is the initial work, accessed from the 'Remote options' screen. This method is called by Z7RemoteViewController.clickPublish, and that controller is the delegate.
There is material here from Coordinated-Medicine
Definition at line 561 of file Z5RemoteDataController.m.
- (void) updateUI |
/// - (void) fillMoleculeList;
/// - (void) updateOrInsertMolecule: (Molecule *) m5mo onDrive: (GTLDriveFileList *)fileList withDelegate:(id<Z5RemoteDataFetchProtocol>) delegate;
Definition at line 327 of file Z5RemoteDataController.m.
|
readnonatomicstrong |
Definition at line 31 of file Z5RemoteDataController.h.
|
readnonatomicstrong |
Definition at line 30 of file Z5RemoteDataController.h.
|
readnonatomicstrong |
Definition at line 29 of file Z5RemoteDataController.h.
|
readwritenonatomicretain |
Definition at line 38 of file Z5RemoteDataController.h.
|
readwritenonatomicretain |
Definition at line 37 of file Z5RemoteDataController.h.
|
readnonatomicassignimplementation |
Definition at line 158 of file Z5RemoteDataController.m.
|
readnonatomicstrong |
Definition at line 28 of file Z5RemoteDataController.h.
|
readwritenonatomicassign |
Definition at line 39 of file Z5RemoteDataController.h.
|
readnonatomicstrong |
Definition at line 32 of file Z5RemoteDataController.h.
|
readwritenonatomicstrong |
Definition at line 35 of file Z5RemoteDataController.h.