1 // GalleryUploader.h 2 // this file is part of Context Free 3 // --------------------- 4 // Copyright (C) 2007 Mark Lentczner - markl@glyphic.com 5 // Copyright (C) 2008-2012 John Horigan - john@glyphic.com 6 // 7 // This program is free software; you can redistribute it and/or 8 // modify it under the terms of the GNU General Public License 9 // as published by the Free Software Foundation; either version 2 10 // of the License, or (at your option) any later version. 11 // 12 // This program is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 // You should have received a copy of the GNU General Public License 18 // along with this program; if not, write to the Free Software 19 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 // 21 // John Horigan can be contacted at john@glyphic.com or at 22 // John Horigan, 1209 Villa St., Mountain View, CA 94041-1123, USA 23 // 24 // Mark Lentczner can be contacted at markl@glyphic.com or at 25 // Mark Lentczner, 1209 Villa St., Mountain View, CA 94041-1123, USA 26 // 27 // 28 29 #import <Cocoa/Cocoa.h> 30 31 @class CFDGDocument; 32 @class GView; 33 34 @interface GalleryUploader : NSWindowController { 35 CFDGDocument* mDocument; 36 GView* mView; 37 NSInteger mStatus; 38 NSString* mOrigPassword; 39 NSString* mOrigName; 40 unsigned mSuccessId; 41 42 IBOutlet NSView* mContentView; 43 44 IBOutlet NSView* mFormView; 45 IBOutlet NSTextField* mUserNameField; 46 IBOutlet NSTextField* mPasswordField; 47 IBOutlet NSTextField* mTitleField; 48 IBOutlet NSTextView* mNotesView; 49 IBOutlet NSTokenField* mTagsView; 50 IBOutlet NSTextField* mFileField; 51 IBOutlet NSTextField* mVariationField; 52 IBOutlet NSMatrix* mCompressionMatrix; 53 IBOutlet NSButton* mTiled; 54 IBOutlet NSTextField* mLicenseName; 55 IBOutlet NSButton* mLicenseImage; 56 IBOutlet NSTextField* mSaveTileWidth; 57 IBOutlet NSTextField* mSaveTileHeight; 58 IBOutlet NSButton* mCropCheck; 59 IBOutlet NSTextField* mWidthLabel; 60 IBOutlet NSTextField* mHeightLabel; 61 IBOutlet NSTextField* mMultLabel; 62 63 IBOutlet NSView* mProgressView; 64 IBOutlet NSProgressIndicator* mProgressBar; 65 66 IBOutlet NSView* mDoneView; 67 IBOutlet NSTextView* mMessage; 68 IBOutlet NSButton* mRetryButton; 69 70 NSURLSessionDataTask* mUploadTask; 71 NSURLSessionDataTask* mTagsTask; 72 73 NSArray<NSString*>* mTags; 74 75 NSString* mDefccURI; 76 NSString* mDefccName; 77 NSString* mDefccImage; 78 } 79 80 - (id)initForDocument:(CFDGDocument*)document andView:(GView*)view; 81 82 - (IBAction)show:(id)sender; 83 84 - (IBAction)goToCreateAccount:(id)sender; 85 - (IBAction)changeLicense:(id)sender; 86 - (IBAction)licenseDetails:(id)sender; 87 - (IBAction)upload:(id)sender; 88 89 - (IBAction)cancel:(id)sender; 90 - (IBAction)retry:(id)sender; 91 92 - (void)updateCCInfo:(BOOL)reset; 93 94 + (NSString*) copyPassword:(NSString *)forUser; 95 + (void) savePassword:(NSString*)password forUser:(NSString*)user; 96 97 @end 98