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/workarea/stern/camera_raw/dng_sdk/source/dng_iptc.h#11 $ */ 00010 /* $DateTime: 2008/11/04 11:10:05 $ */ 00011 /* $Change: 518908 $ */ 00012 /* $Author: stern $ */ 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 bool fForceUTF8; 00042 00043 dng_string fTitle; 00044 00045 int32 fUrgency; 00046 00047 dng_string fCategory; 00048 00049 dng_string_list fSupplementalCategories; 00050 00051 dng_string_list fKeywords; 00052 00053 dng_string fInstructions; 00054 00055 dng_date_time_info fDateTimeCreated; 00056 00057 dng_string fAuthor; 00058 dng_string fAuthorsPosition; 00059 00060 dng_string fCity; 00061 dng_string fState; 00062 dng_string fCountry; 00063 dng_string fCountryCode; 00064 00065 dng_string fLocation; 00066 00067 dng_string fTransmissionReference; 00068 00069 dng_string fHeadline; 00070 00071 dng_string fCredit; 00072 00073 dng_string fSource; 00074 00075 dng_string fCopyrightNotice; 00076 00077 dng_string fDescription; 00078 dng_string fDescriptionWriter; 00079 00080 protected: 00081 00082 enum DataSet 00083 { 00084 kRecordVersionSet = 0, 00085 kObjectNameSet = 5, 00086 kUrgencySet = 10, 00087 kCategorySet = 15, 00088 kSupplementalCategoriesSet = 20, 00089 kKeywordsSet = 25, 00090 kSpecialInstructionsSet = 40, 00091 kDateCreatedSet = 55, 00092 kTimeCreatedSet = 60, 00093 kBylineSet = 80, 00094 kBylineTitleSet = 85, 00095 kCitySet = 90, 00096 kSublocationSet = 92, 00097 kProvinceStateSet = 95, 00098 kCountryCodeSet = 100, 00099 kCountryNameSet = 101, 00100 kOriginalTransmissionReferenceSet = 103, 00101 kHeadlineSet = 105, 00102 kCreditSet = 110, 00103 kSourceSet = 115, 00104 kCopyrightNoticeSet = 116, 00105 kCaptionSet = 120, 00106 kCaptionWriterSet = 122 00107 }; 00108 00109 enum CharSet 00110 { 00111 kCharSetUnknown = 0, 00112 kCharSetUTF8 = 1 00113 }; 00114 00115 public: 00116 00117 dng_iptc (); 00118 00119 virtual ~dng_iptc (); 00120 00123 00124 bool IsEmpty () const; 00125 00128 00129 bool NotEmpty () const 00130 { 00131 return !IsEmpty (); 00132 } 00133 00138 00139 void Parse (const void *blockData, 00140 uint32 blockSize, 00141 uint64 offsetInOriginalFile); 00142 00147 00148 dng_memory_block * Spool (dng_memory_allocator &allocator, 00149 bool padForTIFF); 00150 00151 protected: 00152 00153 void ParseString (dng_stream &stream, 00154 dng_string &s, 00155 CharSet charSet); 00156 00157 void SpoolString (dng_stream &stream, 00158 const dng_string &s, 00159 uint8 dataSet, 00160 uint32 maxChars, 00161 CharSet charSet); 00162 00163 static bool SafeForSystemEncoding (const dng_string &s); 00164 00165 static bool SafeForSystemEncoding (const dng_string_list &list); 00166 00167 bool SafeForSystemEncoding () const; 00168 00169 }; 00170 00171 /*****************************************************************************/ 00172 00173 #endif 00174 00175 /*****************************************************************************/ |