00001 /** 00002 00003 Appigo Third Party Integration - AppigoNote.h 00004 00005 Copyright (c) 2009-2010 Appigo, Inc. All rights reserved. 00006 00007 Permission is hereby granted, free of charge, to any person obtaining a copy 00008 of this software and associated documentation files (the "Software"), to 00009 deal in the Software without restriction, including without limitation the 00010 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 00011 sell copies of the Software, and to permit persons to whom the Software is 00012 furnished to do so, subject to the following conditions: 00013 00014 The above copyright notice and this permission notice shall be included in 00015 all copies or substantial portions of the Software. 00016 00017 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00018 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00019 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00020 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00021 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00022 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 00023 IN THE SOFTWARE. 00024 00025 */ 00026 00027 00028 /** 00029 @file AppigoNote.h 00030 @brief A class for representing an importable note. 00031 00032 @class AppigoNote AppigoNote.h 00033 @brief A class for representing an importable note. 00034 00035 A class to represent a note that can be placed on the Appigo Pasteboard and 00036 referenced by Appigo Applications. 00037 */ 00038 00039 00040 #import <Foundation/Foundation.h> 00041 00042 00043 @class AppigoTask; 00044 00045 00046 @interface AppigoNote : NSObject <NSCoding> 00047 { 00048 NSString *name; 00049 NSString *text; 00050 NSString *notebook; 00051 } 00052 00053 /** The name/title of the note. */ 00054 @property (nonatomic, readonly) NSString *name; 00055 00056 /** The note's text which does not include the name. */ 00057 @property (nonatomic, retain) NSString *text; 00058 00059 /** 00060 A case-insensitive notebook name that the note belongs to. If a 00061 matching notebook is found in Notebook, the note will be placed inside 00062 the corresponding notebook when imported. If multiple notebooks with 00063 the same name exist in Notebook, the notebook used for this note is 00064 undefined. If a matching notebook name is not found during import, the 00065 notebook will be created before assigning the note to the notebook. 00066 */ 00067 @property (nonatomic, retain) NSString *notebook; 00068 00069 /** 00070 Initialize a new note object. 00071 00072 @param noteName The note name. The name will be trimmed of whitespace (an 00073 empty name is invalid and will be replaced with, "Unknown"). 00074 */ 00075 - (id)initWithName:(NSString *)noteName; 00076 00077 /** 00078 Get a plain text representation of a note. 00079 00080 @param includeName Specify YES to include the name in the text representation 00081 or NO to omit it. 00082 @return Returns a plain text representation of the note. 00083 */ 00084 - (NSString *)plainTextRepresentationWithName:(BOOL)includeName; 00085 00086 /** 00087 Build an AppigoTask object from the note that can be used to import the note 00088 into Appigo Todo. 00089 00090 @return Returns an AppigoTask object. 00091 */ 00092 - (AppigoTask *)taskRepresentation; 00093 00094 @end