harvesterplugins/contacts/inc/ccontactsplugin.h
changeset 7 51d10d255e92
parent 5 3bc31ad99ee7
child 9 4a2987baf8f7
--- a/harvesterplugins/contacts/inc/ccontactsplugin.h	Thu May 27 12:52:35 2010 +0300
+++ b/harvesterplugins/contacts/inc/ccontactsplugin.h	Fri Jun 11 13:39:26 2010 +0300
@@ -25,6 +25,7 @@
 #include <cindexingplugin.h>
 #include <common.h>
 #include "delayedcallback.h"
+#include "cdocumentfield.h"
 
 class CSearchDocument;
 class CContactItemFieldSet;
@@ -53,14 +54,23 @@
 _LIT(KContactsSIPIDField, "SIPID");
 _LIT(KContactsSpouseField, "Spouse");
 _LIT(KContactsChildrenField, "Children");
-_LIT(KContactsClassField, "Class");
+//_LIT(KContactsClassField, "Class");
 _LIT(KContactsPrefixField, "Prefix");
 _LIT(KContactsAdditionalNameField, "AdditionalName");
 _LIT(KContactsFaxField, "Fax");
-_LIT(KContactsGivenNamePronunciationField, "GivenNamePronunciation");
-_LIT(KContactsFamilyNamePronunciationField, "FamilyNamePronunciation");
-_LIT(KContactsCompanyNamePronunciationField, "CompanyNamePronunciation");
-
+_LIT(KContactsDepartmentName, "Departmant");
+_LIT(KContactIMAddress, "IMAddress");
+_LIT(KContactServiceProvider, "ServiceProvider");
+_LIT(KContactAssistant, "Assistant");
+_LIT(KContactAnniversary, "Anniversary");
+_LIT(KContactBirthday, "Birthday");
+_LIT(KDateSeparator, "-");
+const TInt KDateFieldLength = 10;
+const TInt KDayPosition = 8;
+const TInt KMonthPosition = 5;
+const TInt KYearPosition = 0;
+const TInt KDayLength = 2;
+const TInt KYearLength = 4;
 
 class CContactsPlugin : public CIndexingPlugin, public MContactDbObserver, public MDelayedCallbackObserver
 {
@@ -93,8 +103,12 @@
 	/**
 	 *  Adds information field (if available)
 	 */
-	void AddFieldL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName );
-
+	void AddFieldL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName, const TInt aConfig = CDocumentField::EStoreYes | CDocumentField::EIndexTokenized);
+	
+	/**
+     *  Gets the date from anniversary text field
+     */	
+	void GetDateL(const TDesC& aTime, TDes& aDateString);
 	/**
 	 *  Adds to excerpt
 	 */
@@ -103,7 +117,7 @@
 	/**
 	 *  Helper function: adds information field to the document and to the excerpt field(if available)
 	 */
-	void AddFieldToDocumentAndExcerptL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName );
+	void AddFieldToDocumentAndExcerptL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName, const TInt aConfig = CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
 	
 	/**
 	 * Creates the actual contact book index item