22 #include <mdeitem.h> |
22 #include <mdeitem.h> |
23 #include <mdeconstants.h> |
23 #include <mdeconstants.h> |
24 #include <mdeobjectdef.h> |
24 #include <mdeobjectdef.h> |
25 #include "harvesterserverlogger.h" |
25 #include "harvesterserverlogger.h" |
26 #include "OstTraceDefinitions.h" |
26 #include "OstTraceDefinitions.h" |
|
27 #include "csearchdocument.h" |
27 #ifdef OST_TRACE_COMPILER_IN_USE |
28 #ifdef OST_TRACE_COMPILER_IN_USE |
28 #include "cpixmediaimagedocTraces.h" |
29 #include "cpixmediaimagedocTraces.h" |
29 #endif |
30 #endif |
30 |
31 |
31 |
32 |
92 { |
93 { |
93 OstTraceFunctionEntry0( CCPIXMEDIAIMAGEDOC_GETCPIXDOCUMENTL_ENTRY ); |
94 OstTraceFunctionEntry0( CCPIXMEDIAIMAGEDOC_GETCPIXDOCUMENTL_ENTRY ); |
94 //Get basic document |
95 //Get basic document |
95 CPIXLOGSTRING("START CCPIXMediaImageDoc::GetCpixDocumentL"); |
96 CPIXLOGSTRING("START CCPIXMediaImageDoc::GetCpixDocumentL"); |
96 CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef); |
97 CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef); |
|
98 ResetExcerpt(); //Reset excerpt initially |
97 //URI and Excerpt is done add additional properties here |
99 //URI and Excerpt is done add additional properties here |
98 CMdEProperty* property(NULL); |
100 CMdEProperty* property(NULL); |
|
101 //Title property |
|
102 CMdEPropertyDef& titlePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty ); |
|
103 if(aObject.Property( titlePropDef, property ) != KErrNotFound) |
|
104 { |
|
105 //Add field to document |
|
106 CMdETextProperty* textProperty = ( CMdETextProperty* ) property; |
|
107 AddFiledtoDocumentL(*index_item, |
|
108 MdeConstants::Object::KTitleProperty, |
|
109 textProperty->Value()); |
|
110 AddToFieldExcerptL(textProperty->Value()); |
|
111 } |
|
112 |
99 //Get user comment field |
113 //Get user comment field |
100 CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty ); |
114 CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty ); |
101 if(aObject.Property( commentPropDef, property )!= KErrNotFound) |
115 if(aObject.Property( commentPropDef, property )!= KErrNotFound) |
102 { |
116 { |
103 //Add field to document |
117 //Add field to document |
104 CMdETextProperty* textProperty = ( CMdETextProperty* ) property; |
118 CMdETextProperty* textProperty = ( CMdETextProperty* ) property; |
105 AddFiledtoDocumentL(*index_item, |
119 AddFiledtoDocumentL(*index_item, |
106 MdeConstants::MediaObject::KCommentProperty, |
120 MdeConstants::MediaObject::KCommentProperty, |
107 textProperty->Value()); |
121 textProperty->Value()); |
|
122 AddToFieldExcerptL(textProperty->Value()); |
108 } |
123 } |
109 CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Image::KDateTimeOriginalProperty); |
124 CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Image::KDateTimeOriginalProperty); |
110 if(aObject.Property( dateTimePropDef, property ) != KErrNotFound) |
125 if(aObject.Property( dateTimePropDef, property ) != KErrNotFound) |
111 { |
126 { |
112 //Add field to document |
127 //Add field to document |
125 MdeConstants::Image::KDateTimeOriginalProperty, |
140 MdeConstants::Image::KDateTimeOriginalProperty, |
126 buf, |
141 buf, |
127 CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); |
142 CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); |
128 } |
143 } |
129 } |
144 } |
|
145 index_item->AddExcerptL(*iExcerpt); |
130 //Latitude error currently |
146 //Latitude error currently |
131 /* TODO- Bhuvi Location is a seperate object for each image object if any such relation |
147 /* TODO- Bhuvi Location is a seperate object for each image object if any such relation |
132 * exist it has to be searched from Relation table and from there we have to open |
148 * exist it has to be searched from Relation table and from there we have to open |
133 * location object and query Longitude and Latitudes |
149 * location object and query Longitude and Latitudes |
134 */ |
150 */ |