Today's Menu  Portugal
journal and plan nutrition
Instance Methods | Properties | List of all members
Z5RemoteDataController Class Reference

Interface for remote access, to either open web or google drive. More...

#import <Z5RemoteDataController.h>

Inheritance diagram for Z5RemoteDataController:
Inheritance graph
[legend]
Collaboration diagram for Z5RemoteDataController:
Collaboration graph
[legend]

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

Z5GoogleLoginControllerloginController
 
Z5GmailDataControlleremailController
 
Z5GoogleDriveControllerdriveController
 
Z5GoogleCalendarDataControllercalendarController
 
Z5URLSessionControllersessionController
 
NSString * webviewHome
 
NSString * homeDirectoryFileId
 
NSString * homeCreateDateTime3339
 
NSMutableArray * menuItemsList
 
UINavigationController * kNavigator [implementation]
 

Detailed Description

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.

Method Documentation

◆ deleteSelectedFile()

- (void) deleteSelectedFile
implementation

Definition at line 999 of file Z5RemoteDataController.m.

999  {
1000  /*
1001  GTLServiceDrive *service = self.driveService;
1002 
1003  GTLDriveFile *selectedFile = [self selectedFileListEntry:1];
1004  NSString *fileID = selectedFile.identifier;
1005  if (fileID) {
1006  GTLQueryDrive *query = [GTLQueryDrive queryForFilesDeleteWithFileId:fileID];
1007  _editFileListTicket = [service executeQuery:query
1008  completionHandler:^(GTLServiceTicket *ticket,
1009  id nilObject,
1010  NSError *error) {
1011  // Callback
1012  _editFileListTicket = nil;
1013  if (error == nil) {
1014  [self displayAlert:@"Deleted"
1015  format:@"Deleted \"%@\"",
1016  selectedFile.title];
1017  [self updateUI];
1018  // [self fetchFileList];
1019  } else {
1020  [self displayAlert:@"Delete Failed"
1021  format:@"%@", error];
1022  }
1023  }];
1024  }
1025  */
1026 }

◆ fetchMenuItem:onDriveWithDelegate:()

- (void) fetchMenuItem: (NSString *)  fileId
onDriveWithDelegate: (id<Z5RemoteDataFetchProtocol>)  delegate 
implementation

This method uses name matching of title to file name. This method is called from updateOrInsertMenuItemListOnDriveWithDelegate:

dot_inline_dotgraph_20.png

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.

743  : (NSString *)fileId onDriveWithDelegate:(id<Z5RemoteDataFetchProtocol>) delegate
744 {/*
745  GTLQueryDrive *query = [GTLQueryDrive queryForFilesGetWithFileId:fileId];
746  query.maxResults = 150;
747  // GTLServiceTicket *fileListTicket =
748  [self.driveService executeQuery:query completionHandler:^(GTLServiceTicket *ticket,
749  GTLDriveFile *file,
750  NSError *error) {
751  if (error) {
752  [delegate showPublishError];
753  } else {
754  [delegate showPublishResult];
755  }
756  }];
757  */
758 }
id< U7ParamEditControlDelegate > delegate

◆ fetchSelectedFileDetails()

- (void) fetchSelectedFileDetails
implementation

Definition at line 919 of file Z5RemoteDataController.m.

919  {
920  /*
921  _revisionList = nil;
922  _revisionListFetchError = nil;
923  _permissionList = nil;
924  _permissionListFetchError = nil;
925  _childList = nil;
926  _childListFetchError = nil;
927  _parentsList = nil;
928  _parentsListFetchError = nil;
929 
930  _detailsFetchError = nil;
931 
932  GTLServiceDrive *service = self.driveService;
933 
934  GTLDriveFile *selectedFile = [self selectedFileListEntry:1];
935  NSString *fileID = selectedFile.identifier;
936  if (fileID) {
937  // Rather than make separate fetches for each kind of detail for the
938  // selected file, we'll make a single batch query to etch the various
939  // details. Each query in the batch will have its own result or error,
940  // and the batch query execution itself may fail with an error.
941  GTLQueryDrive *revisionQuery = [GTLQueryDrive queryForRevisionsListWithFileId:fileID];
942  revisionQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveRevisionList *obj,
943  NSError *error) {
944  _revisionList = obj;
945  _revisionListFetchError = error;
946  };
947 
948  GTLQueryDrive *permissionQuery = [GTLQueryDrive queryForPermissionsListWithFileId:fileID];
949  permissionQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDrivePermissionList *obj,
950  NSError *error) {
951  _permissionList = obj;
952  _permissionListFetchError = error;
953  };
954 
955  GTLQueryDrive *childQuery = [GTLQueryDrive queryForChildrenListWithFolderId:fileID];
956  childQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveChildList *obj,
957  NSError *error) {
958  _childList = obj;
959  _childListFetchError = error;
960  };
961 
962  GTLQueryDrive *parentsQuery = [GTLQueryDrive queryForParentsListWithFileId:fileID];
963  parentsQuery.completionBlock = ^(GTLServiceTicket *ticket, GTLDriveParentList *obj,
964  NSError *error) {
965  // Note that we could obtain the parents list for a file item from the
966  // main file list feed, too.
967  _parentsList = obj;
968  _parentsListFetchError = error;
969  };
970  */
971 /*
972  // Combine the separate queries into one batch.
973  GTLBatchQuery *batchQuery = [GTLBatchQuery batchQuery];
974  [batchQuery addQuery:revisionQuery];
975  [batchQuery addQuery:permissionQuery];
976  [batchQuery addQuery:childQuery];
977  [batchQuery addQuery:parentsQuery];
978 
979  _detailsTicket = [service executeQuery:batchQuery
980  completionHandler:^(GTLServiceTicket *ticket,
981  GTLBatchResult *batchResult, NSError *error) {
982  // Callback
983  //
984  // The batch query execution completionHandler runs after the individual
985  // query completion handlers have been called.
986  _detailsTicket = nil;
987  _detailsFetchError = error;
988 
989  [self updateUI];
990  }];
991 
992  [self updateUI];
993  }
994  */
995 }

◆ homeResultAvailable()

- (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.

320 {
321  // NSLog(@"RemaoteData.homeResultAvailable: calling for file list, home id: %@",
322  //[[homeRequestDelegate tellHomeResult] identifier]);
323  // [self queryFileListWithDelegate:homeRequestDelegate];
324 }

◆ init()

- (instancetype) init
implementation

Definition at line 168 of file Z5RemoteDataController.m.

169 {
170  self = [super init];
171  if (self) {
172  _loginController = [[Z5GoogleLoginController alloc] init];
173  _emailController = [[Z5GmailDataController alloc] init];
174  _driveController = [[Z5GoogleDriveController alloc] init];
175  _calendarController = [[Z5GoogleCalendarDataController alloc] init];
176  _sessionController = [[Z5URLSessionController alloc] init];
177 
178  [_loginController configureGoogleSignIn];
179  GIDSignIn* signIn = [GIDSignIn sharedInstance];
180  if (nil != [_loginController signedInUsername]) {
181  [signIn signInSilently];
182  }
183  }
184  return self;
185 }
NSString * signedInUsername()
void signInSilently()
GIDSignIn * sharedInstance()

◆ initializeAvailableWithDelegate:()

- (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

  • finding home,
  • get file list within home

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.

300  : (id<Z5RemoteDataFetchProtocol>) delegate
301 {
302  [self refreshAuthentication];
303  NSLog(@"RemoteData.initializeAvailable, %@", ([self isSignedIn]?@"signed in":@"Logged Off"));
304  if ([self isSignedIn]) {
305 
306  /*
307  homeRequestDelegate = [[Z5RemoteDataDriveDelegate alloc] initWith:delegate];
308  [homeRequestDelegate setRemoteDataController:self];
309  [self queryHomeDirectoryInfoWithDelegate:homeRequestDelegate];
310  */
311  }
312 }
id< U7ParamEditControlDelegate > delegate

◆ insertMenuItem:withDelegate:()

- (void) insertMenuItem: (MenuItem *)  m5mo
withDelegate: (id <Z5RemoteDataFetchProtocol>)  delegate 
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.

624  : (MenuItem *)m5mo withDelegate: (id <Z5RemoteDataFetchProtocol>)delegate
625 {
626  /* TODO: hook firebase
627 
628  NSString *newStr = [m5mo bodytext];
629  NSData* data = [newStr dataUsingEncoding:NSUTF8StringEncoding];
630 
631  // after check is complete, regardless, put up data file
632  GTLDriveFile *file = [GTLDriveFile object];
633 
634  NSString *newFileName; // = [[m5mo name] stringByAppendingString:@".mol"];
635  NSString *menuItemName = [m5mo name];
636  if ([menuItemName containsString:@".mol"]) {
637  newFileName = menuItemName;
638  } else if ([menuItemName containsString:@".pdb"]) {
639  newFileName = menuItemName;
640  } else if ([[m5mo bodytext] containsString:@"HEADER"]) {
641  newFileName = [[m5mo name] stringByAppendingString:@".pdb"];
642  } else {
643  newFileName = [[m5mo name] stringByAppendingString:@".mol"];
644  }
645 
646  file.title = newFileName;
647  file.descriptionProperty = @"Uploaded Menu-Item";
648  file.mimeType = @"text/plain"; // @"image/png";
649 
650  GTLDriveParentReference *newParent = [GTLDriveParentReference object];
651  newParent.identifier = [self homeDirectoryFileId];
652  file.parents = [NSArray arrayWithObject:newParent];
653 
654  // where is my new file id?
655  [self postData:data toNewGoogleDriveFile:file withDelegate:delegate];
656  */
657 }
id< U7ParamEditControlDelegate > delegate

◆ isHomeInfoError()

- (BOOL) isHomeInfoError

Definition at line 486 of file Z5RemoteDataController.m.

487 {
488  // NSLog(@"RemoteData.isHomeInfoError: reporting %@", ([homeRequestDelegate tellHomeError]? @"error" : @"all good"));
489  // return [homeRequestDelegate tellHomeError];
490  return NO;
491 }

◆ isSignedIn()

- (BOOL) isSignedIn

This is a convenience function that makes twisted use of signedInUsername

Definition at line 227 of file Z5RemoteDataController.m.

227  {
228  NSString *name = [_loginController signedInUsername];
229  return (name != nil);
230 }

◆ loginDriveWithNavigation:andHandler:()

- (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.

192  : (UINavigationController *)nav andHandler: (void (^)(void)) finishHandler
193 {
194  NSLog(@"MemoteData.logWithNavigation:withHandler");
195  assert(nil); // old version, not exercised
196  _kNavigator = nav;
197  if (nav) {
198  [self signInNowWithHandler:finishHandler];
199  } else {
200  NSLog(@"RemoteData.logWithNavigation:withHandler: ERROR");
201  }
202 }

◆ loginGoogleDrive()

- (void) loginGoogleDrive

Definition at line 250 of file Z5RemoteDataController.m.

250  {
251  if (![self isSignedIn]) {
252  // Sign in
253  [self runSigninThenHandler:^{
254  // [self updateUI];
255  }];
256  } else {
257  // Sign out
258 
259 // GTLServiceDrive *service = self.driveService;
260 //
261 // [GTMOAuth2ViewControllerTouch removeAuthFromKeychainForName:kKeychainItemName];
262 // service.authorizer = nil;
263 
264  // [self updateUI];
265  }
266 }

◆ logOffGoogleDrive()

- (IBAction) logOffGoogleDrive

Definition at line 268 of file Z5RemoteDataController.m.

269 {
270  /*
271  [GTMOAuth2ViewControllerTouch removeAuthFromKeychainForName:kKeychainItemName];
272  [GTMOAuth2ViewControllerTouch revokeTokenForGoogleAuthentication:class_auth];
273  */
274 }

◆ queryFileListWithDelegate:()

- (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.

497  :(id<Z5RemoteDataFetchProtocol>) delegate
498 {
499  /*
500  if ([homeRequestDelegate tellHomeError]) {
501  NSLog(@"RemoteData.queryFileListWithDelegate: HOME ERROR, NO-OP");
502  return;
503  }
504 
505  GTLServiceDrive *service = self.driveService;
506 
507 
508  // NSString *homeId = [[delegate tellHomeResult] identifier];
509  // NSLog(@"RemoteData.queryFileListWithDelegate: service: %@ home-id: %@", service, homeId);
510 
511  GTLQueryDrive *query = [GTLQueryDrive queryForFilesList];
512 
513  // maxResults specifies the number of results per page. Since we earlier
514  // specified shouldFetchNextPages=YES, all results should be fetched,
515  // though specifying a larger maxResults will reduce the number of fetches
516  // needed to retrieve all pages.
517  query.maxResults = 150;
518  */
519 
531  /*
532  [delegate showFetchAsk];
533 
534  // _fileListTicket =
535  [service executeQuery:query
536  completionHandler:^(GTLServiceTicket *ticket,
537  GTLDriveFileList *fileList,
538  NSError *error) {
539  // Callback
540  _fileList = fileList;
541  _fileListFetchError = error;
542  // _fileListTicket = nil;
543 
544  if (nil == error) {
545 
546  [delegate showFetchResult:[fileList items]];
547 
548  } else {
549  [delegate showFetchError];
550  }
551 
552  [delegate updateUI];
553  }];
554  */
555 }
id< U7ParamEditControlDelegate > delegate

◆ queryHomeDirectoryInfoWithDelegate:()

- (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.

380  : (id<Z5RemoteDataFetchProtocol>) delegate
381 {
382  /*
383  GTLQueryDrive *query = [GTLQueryDrive queryForFilesList];
384 
385  query.q = @"'root' in parents and title = 'NutritionSummary'";
386  query.maxResults = 150;
387  __block NSString *ret = @"none";
388 
389  // NSLog(@"RemoteData.queryHomeDirectoryInfo: execute query");
390  [delegate showHomeAsk];
391  // GTLServiceTicket *fileListTicket =
392  [self.driveService executeQuery:query
393  completionHandler:^(GTLServiceTicket *ticket,
394  GTLDriveFileList *fileList,
395  NSError *error) {
396 
397  // NSLog(@"RemoteData.queryHomeDirectoryInfo: nserror: %@", error);
398  if (nil == error) {
399  Boolean homeDirectoryFound = NO;
400 
401  for (GTLDriveFile *fil in fileList) {
402  if (![[fil.labels trashed] boolValue]) {
403  if ([[fil title] compare:@"NutritionSummary"] == NSOrderedSame) {
404  // NSLog(@"RemoteData.queryHomeDirectoryInfo: have home result: %@", delegate);
405  GTLDateTime *homeCreateDateTime = [fil createdDate];
406  ret = [[NSString alloc] initWithFormat:@"Home created: %@",[homeCreateDateTime stringValue]];
407  self.homeCreateDateTime3339 = [homeCreateDateTime stringValue];
408  self.homeDirectoryFileId = [fil identifier];
409 
410  homeDirectoryFound = YES;
411  [delegate showHomeResult:fil];
412  }
413  }
414  }
415  if (homeDirectoryFound) {
416  // NSLog(@"RemoteData.queryHomeDirectoryInfo/executeQuery: Finished home creation time check: ret: %@", ret);
417  // [self fetchMainDataInfo];
418  } else {
419  NSLog(@"RemoteData.queryHomeDirectoryInfo/executeQuery: Need to create NutritionSummary folder");
420 
421  // [self createHomeDirectoryFolder];
422  // moving code into this function
423  // allows getting delegate, however this is untested yet
424 
425  void (^w30HomeDirectory)(GTLServiceTicket *ticket,
426  GTLDriveFile *insertedFile, NSError *error) = ^(GTLServiceTicket *ticket,
427  GTLDriveFile *insertedFile, NSError *error) {
428  if (error == nil) {
429  // Uncomment the following line to print the File ID.
430  NSLog(@"RemoteData.w30HomeDirectory: Folder ID: %@", insertedFile.identifier);
431  // completionBlock(insertedFile, nil);
432  [self setHomeDirectoryFileId:insertedFile.identifier];
433 
434  [delegate showHomeResult:insertedFile];
435 
436  } else {
437  NSLog(@"RemoteData.w30HomeDirectory: error occurred: %@", error);
438  // completionBlock(nil, error);
439  }
440  };
441  NSLog(@"RemoteData.createHomeDirectoryFolder: GOOD LUCK last time -- IT WORKED FIRST TIME!!");
442  [self createFolderOnDrive:mainFolderName withBlock:w30HomeDirectory];
443 
444  }
445  } else {
446  [delegate showHomeError:error];
447  }
448  }
449  ];
450  */
451 }
id< U7ParamEditControlDelegate > delegate

◆ refreshAuthentication()

- (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.

207  {
208 
209  // TODO: Get the saved authentication, if any, from the keychain.
210  /*
211  GTMOAuth2Authentication *auth;
212  auth = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:kKeychainItemName
213  clientID:clientID
214  clientSecret:clientSecret];
215 
216  // Retain the authentication object, which holds the auth tokens
217  //
218  // We can determine later if the auth object contains an access token
219  // by calling its -canAuthorize method
220  [self setAuthentication:auth];
221  */
222 }

◆ runSigninThenHandler:()

- (void) runSigninThenHandler: (void(^)(void))  handler
implementation

Definition at line 281 of file Z5RemoteDataController.m.

281  :(void (^)(void))handler {
282  assert(nil);
283 }

◆ signedInUsername()

- (NSString *) signedInUsername

◆ signInNowWithHandler:()

- (void) signInNowWithHandler: (void(^)(void))  finishHandler
implementation

Definition at line 233 of file Z5RemoteDataController.m.

233  : (void (^)(void)) finishHandler
234 {
235  if (![self isSignedIn]) {
236  // Sign in
237  [self runSigninThenHandler:finishHandler];
238  } else {
239  // Sign out
240 
241 // GTLServiceDrive *service = self.driveService;
242 //
243 // [GTMOAuth2ViewControllerTouch removeAuthFromKeychainForName:kKeychainItemName];
244 // service.authorizer = nil;
245 
246  [self updateUI];
247  }
248 }

◆ surveyDirectory:()

- (void) surveyDirectory: (UITextField *)  result_text
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.

843  : (UITextField *)result_text
844 {
845  /*
846  NSLog(@"RemoteData: Survey directory");
847  GTLQueryDrive *query = [GTLQueryDrive queryForFilesList];
848 
849  NSLog(@"RemoteData.surveyDirectory: query: %@", [query description]);
850 
851  GTLServiceTicket *fileListTicket = [[[[Z5DataController sharedInstance] remoteDataController] driveService] executeQuery:query completionHandler:^(GTLServiceTicket *ticket,
852  GTLDriveFileList *fileList,
853  NSError *error)
854  {
855  // Callbacka
856  NSMutableString *result_out = [[NSMutableString alloc] initWithCapacity:256];
857  for (GTLDriveFile *fil in fileList) {
858  if (![[fil.labels trashed] boolValue]) {
859  NSLog(@"DebugExtraView.surveyDirectory: title: %@", [fil title]);
860  [result_out appendString:[fil title]];
861  [result_out appendString:@"\n"];
862  } else {
863  NSLog(@"DebugExtraView.surveyDirectory: TRASHED: title: %@", [fil title]);
864  }
865  }
866  result_text.text = result_out;
867  }];
868 
869  NSLog(@"RemoteData.surveyDirectory: fileListTicket.statusCode: %ld", (long)[fileListTicket statusCode]);
870  */
871 }

◆ updateOrInsertMenuItemListOnDriveWithDelegate:()

- (void) updateOrInsertMenuItemListOnDriveWithDelegate: (id<Z5RemoteDataFetchProtocol>)  delegate
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.

561  :(id<Z5RemoteDataFetchProtocol>) delegate
562 {
563  /*
564  GTLQueryDrive *query = [GTLQueryDrive queryForFilesList];
565 
566  NSString *queryString = [[NSString alloc] initWithFormat:@"'%@' in parents", [self homeDirectoryFileId]];
567  NSLog(@"RemoteData.updateOrInsertMenuItemListOnDriveWithDelegate queryString: %@", queryString);
568  query.q = queryString;
569  query.maxResults = 150;
570 
571  [delegate showPublishAsk];
572 */
576  // This first search should give me CoordinatedMedicine (by fileId),
577  // and all the 'name' ("coordmedic.json") data-file (also by fileId).
578  // Then look through name-file-list for GTLDriveFile-s with folder in parents
579 
580  // Auxiliary search would show parents for all name data-files. No, there are no more data-files,
581  // the shared files are elsewhere.
582 
583  // Auxiliary search first? After completion of file search (all files this app)
584  // update data file by [self updateDriveFile];
585  // OR create the file in the [self homeDirectoryFileId] folder
586  // GTLServiceTicket *fileListTicket =
587  /*
588  [self.driveService executeQuery:query completionHandler:^(GTLServiceTicket *ticket,
589  GTLDriveFileList *fileList,
590  NSError *error) {
591  if (error) {
592  [delegate showPublishError];
593  } else {
594  [delegate showPublishResult];
595  for (GTLDriveFile *file in fileList) {
596  NSLog(@"RemoteData.updateOrInsertMenuItemListOnDriveWithDelegate: file in home: %@", [file title]);
597  }
598 
599  NSArray *names = [[NSArray alloc] initWithObjects:@"Leucine" , @"Arginine", nil];
600  for (NSString *name in names) {
601  NSLog(@"RemoteData.updateOrInsertMenuItemListOnDriveWithDelegate: name: %@", name);
602  }
603 
604 
605 
606 
607 // [self fillMenuItemList];
608 // for (MenuItem *m5mo in [self menuItemsList]) {
609 // [self updateOrInsertMenuItem:m5mo onDrive: (GTLDriveFileList *) fileList withDelegate:delegate];
610 // } // END -- for MenuItem in list
611 
612 
613 
614  } // END -- if no error
615  }];
616  */
617 }
id< U7ParamEditControlDelegate > delegate

◆ updateUI()

- (void) updateUI

/// - (void) fillMoleculeList;

/// - (void) updateOrInsertMolecule: (Molecule *) m5mo onDrive: (GTLDriveFileList *)fileList withDelegate:(id<Z5RemoteDataFetchProtocol>) delegate;

Definition at line 327 of file Z5RemoteDataController.m.

328 {
329  /*
330  if (homeRequestDelegate) {
331  [homeRequestDelegate updateUI];
332  }
333  */
334 }

Property Documentation

◆ calendarController

- (Z5GoogleCalendarDataController*) calendarController
readnonatomicstrong

Definition at line 31 of file Z5RemoteDataController.h.

◆ driveController

- (Z5GoogleDriveController*) driveController
readnonatomicstrong

Definition at line 30 of file Z5RemoteDataController.h.

◆ emailController

- (Z5GmailDataController*) emailController
readnonatomicstrong

Definition at line 29 of file Z5RemoteDataController.h.

◆ homeCreateDateTime3339

- (NSString*) homeCreateDateTime3339
readwritenonatomicretain

Definition at line 38 of file Z5RemoteDataController.h.

◆ homeDirectoryFileId

- (NSString*) homeDirectoryFileId
readwritenonatomicretain

Definition at line 37 of file Z5RemoteDataController.h.

◆ kNavigator

- (UINavigationController*) kNavigator
readnonatomicassignimplementation

Definition at line 158 of file Z5RemoteDataController.m.

◆ loginController

- (Z5GoogleLoginController*) loginController
readnonatomicstrong

Definition at line 28 of file Z5RemoteDataController.h.

◆ menuItemsList

- (NSMutableArray*) menuItemsList
readwritenonatomicassign

Definition at line 39 of file Z5RemoteDataController.h.

◆ sessionController

- (Z5URLSessionController*) sessionController
readnonatomicstrong

Definition at line 32 of file Z5RemoteDataController.h.

◆ webviewHome

- (NSString*) webviewHome
readwritenonatomicstrong

Definition at line 35 of file Z5RemoteDataController.h.


The documentation for this class was generated from the following files: