DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_iptc.hGo to the documentation of this file.00001 /*****************************************************************************/ 00002 // Copyright 2006-2008 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/dng_sdk_1_2/dng_sdk/source/dng_iptc.h#1 $ */ 00010 /* $DateTime: 2008/03/09 14:29:54 $ */ 00011 /* $Change: 431850 $ */ 00012 /* $Author: tknoll $ */ 00013 00018 /*****************************************************************************/ 00019 00020 #ifndef __dng_iptc__ 00021 #define __dng_iptc__ 00022 00023 /*****************************************************************************/ 00024 00025 #include "dng_date_time.h" 00026 #include "dng_string.h" 00027 #include "dng_string_list.h" 00028 00029 /*****************************************************************************/ 00030 00035 00036 class dng_iptc 00037 { 00038 00039 public: 00040 00041 dng_string fTitle; 00042 00043 int32 fUrgency; 00044 00045 dng_string fCategory; 00046 00047 dng_string_list fSupplementalCategories; 00048 00049 dng_string_list fKeywords; 00050 00051 dng_string fInstructions; 00052 00053 dng_date_time_info fDateTimeCreated; 00054 00055 dng_string fAuthor; 00056 dng_string fAuthorsPosition; 00057 00058 dng_string fCity; 00059 dng_string fState; 00060 dng_string fCountry; 00061 dng_string fCountryCode; 00062 00063 dng_string fLocation; 00064 00065 dng_string fTransmissionReference; 00066 00067 dng_string fHeadline; 00068 00069 dng_string fCredit; 00070 00071 dng_string fSource; 00072 00073 dng_string fCopyrightNotice; 00074 00075 dng_string fDescription; 00076 dng_string fDescriptionWriter; 00077 00078 protected: 00079 00080 enum DataSet 00081 { 00082 kRecordVersionSet = 0, 00083 kObjectNameSet = 5, 00084 kUrgencySet = 10, 00085 kCategorySet = 15, 00086 kSupplementalCategoriesSet = 20, 00087 kKeywordsSet = 25, 00088 kSpecialInstructionsSet = 40, 00089 kDateCreatedSet = 55, 00090 kTimeCreatedSet = 60, 00091 kBylineSet = 80, 00092 kBylineTitleSet = 85, 00093 kCitySet = 90, 00094 kSublocationSet = 92, 00095 kProvinceStateSet = 95, 00096 kCountryCodeSet = 100, 00097 kCountryNameSet = 101, 00098 kOriginalTransmissionReferenceSet = 103, 00099 kHeadlineSet = 105, 00100 kCreditSet = 110, 00101 kSourceSet = 115, 00102 kCopyrightNoticeSet = 116, 00103 kCaptionSet = 120, 00104 kCaptionWriterSet = 122 00105 }; 00106 00107 enum CharSet 00108 { 00109 kCharSetUnknown = 0, 00110 kCharSetUTF8 = 1 00111 }; 00112 00113 public: 00114 00115 dng_iptc (); 00116 00117 virtual ~dng_iptc (); 00118 00121 00122 bool IsEmpty () const; 00123 00126 00127 bool NotEmpty () const 00128 { 00129 return !IsEmpty (); 00130 } 00131 00136 00137 void Parse (const void *blockData, 00138 uint32 blockSize, 00139 uint64 offsetInOriginalFile); 00140 00144 00145 dng_memory_block * Spool (dng_memory_allocator &allocator); 00146 00147 protected: 00148 00149 void ParseString (dng_stream &stream, 00150 dng_string &s, 00151 CharSet charSet); 00152 00153 void SpoolString (dng_stream &stream, 00154 const dng_string &s, 00155 uint8 dataSet, 00156 uint32 maxChars, 00157 CharSet charSet); 00158 00159 static bool SafeForSystemEncoding (const dng_string &s); 00160 00161 static bool SafeForSystemEncoding (const dng_string_list &list); 00162 00163 bool SafeForSystemEncoding () const; 00164 00165 }; 00166 00167 /*****************************************************************************/ 00168 00169 #endif 00170 00171 /*****************************************************************************/ | |||
