/Source/AppleMailItemsController.h

http://google-email-uploader-mac.googlecode.com/ · C Header · 58 lines · 25 code · 16 blank · 17 comment · 0 complexity · f214c3860f263abb7544f3d264b46a79 MD5 · raw file

  1. /* Copyright (c) 2009 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #import <Cocoa/Cocoa.h>
  16. #import "OutlineViewItem.h"
  17. #import "GDataEntryMailItem.h"
  18. @interface OutlineViewItemApple : OutlineViewItem {
  19. // paths of email messages, if any, in this mailbox
  20. NSMutableArray *emlxPaths_;
  21. }
  22. - (void)setEmlxPaths:(NSArray *)paths;
  23. - (NSArray *)emlxPaths;
  24. - (void)addEmlxPath:(NSString *)path;
  25. @end
  26. @interface AppleMailItemsController : NSObject <MailItemController> {
  27. NSString *mailFolderPath_;
  28. NSString *rootName_; // name to display in outline view
  29. OutlineViewItemApple *rootItem_;
  30. BOOL isMaildir_;
  31. OutlineViewItemApple *lastUploadedItem_; // non-nil once something's been uploaded
  32. int lastUploadedIndex_; // message within the item, -1 if none yet attemped
  33. }
  34. - (id)initWithMailFolderPath:(NSString *)path rootName:(NSString *)rootName isMaildir:(BOOL)isMaildir;
  35. - (OutlineViewItem *)rootItem;
  36. - (unsigned int)countSelectedMessages;
  37. - (void)resetUpload;
  38. // nextUploadItem is called during uploading; it returns nil once the
  39. // uploads for this controller have been exhausted
  40. - (GDataEntryMailItem *)nextUploadItem;
  41. - (NSString *)mailFolderPath;
  42. @end