harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp
changeset 11 773be20e0a25
parent 7 51d10d255e92
child 12 993ab30e92fc
equal deleted inserted replaced
7:51d10d255e92 11:773be20e0a25
    32 _LIT(KMsgSubject, "Subject");
    32 _LIT(KMsgSubject, "Subject");
    33 _LIT(KMsgRecipients, "Recipients");
    33 _LIT(KMsgRecipients, "Recipients");
    34 _LIT(KMsgBody, "Body");
    34 _LIT(KMsgBody, "Body");
    35 _LIT(KMailBoxId, "MailBoxId");
    35 _LIT(KMailBoxId, "MailBoxId");
    36 _LIT(KFolderId, "FolderId");
    36 _LIT(KFolderId, "FolderId");
       
    37 _LIT(KHasAttachment, "HasAttachment");
    37 _LIT(KMailBoxName, "MailBoxName");
    38 _LIT(KMailBoxName, "MailBoxName");
    38 _LIT(KFolderName, "FolderName");
    39 _LIT(KFolderName, "FolderName");
    39 _LIT(KMimeTypeField, CPIX_MIMETYPE_FIELD);
    40 _LIT(KMimeTypeField, CPIX_MIMETYPE_FIELD);
    40 _LIT(KMimeTypeMsg, "Messages");
    41 _LIT(KMimeTypeMsg, "Messages");
    41 
    42 
   193     CSearchDocument* doc = 0;
   194     CSearchDocument* doc = 0;
   194     QT_TRAP_THROWING(
   195     QT_TRAP_THROWING(
   195     //Use qt_Qstring2TPtrC since we are working with <b>const</b> EmailMessageEnvelope.
   196     //Use qt_Qstring2TPtrC since we are working with <b>const</b> EmailMessageEnvelope.
   196     doc = CSearchDocument::NewL( qt_QString2TPtrC( QString().setNum( aEnvelope.id() ) ), 
   197     doc = CSearchDocument::NewL( qt_QString2TPtrC( QString().setNum( aEnvelope.id() ) ), 
   197                                  KMsgBaseAppClassGeneric );
   198                                  KMsgBaseAppClassGeneric );
   198     doc->AddFieldL( KMimeTypeField, KMimeTypeMsg, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
   199     doc->AddFieldL( KMimeTypeField, KMimeTypeMsg, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo);
   199     doc->AddFieldL( KMsgSubject, qt_QString2TPtrC( aEnvelope.subject() ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
   200     doc->AddFieldL( KMsgSubject, qt_QString2TPtrC( aEnvelope.subject() ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
   200     doc->AddFieldL( KMsgRecipients, qt_QString2TPtrC( recipients ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
   201     doc->AddFieldL( KMsgRecipients, qt_QString2TPtrC( recipients ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
   201     doc->AddFieldL( KMsgBody, qt_QString2TPtrC( msgBody ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
   202     doc->AddFieldL( KMsgBody, qt_QString2TPtrC( msgBody ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
   202     doc->AddFieldL( KMailBoxId, qt_QString2TPtrC( QString().setNum( aMailboxId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized );
   203     doc->AddFieldL( KMailBoxId, qt_QString2TPtrC( QString().setNum( aMailboxId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo );
   203     doc->AddFieldL( KFolderId, qt_QString2TPtrC( QString().setNum( aFolderId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized );
   204     doc->AddFieldL( KFolderId, qt_QString2TPtrC( QString().setNum( aFolderId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo );
   204     
   205     doc->AddFieldL( KHasAttachment, qt_QString2TPtrC( QString().setNum( aEnvelope.hasAttachments() ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo);
   205 //    NmApiMailbox aMailBox;
   206 //    NmApiMailbox aMailBox;
   206 //    iEmailService->getMailbox( aMailboxId, aMailBox );
   207 //    iEmailService->getMailbox( aMailboxId, aMailBox );
   207 //    doc->AddFieldL( KMailBoxName, qt_QString2TPtrC(aMailBox.name()) , CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized );
   208 //    doc->AddFieldL( KMailBoxName, qt_QString2TPtrC(aMailBox.name()) , CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized );
   208     //TODO : Add folder name field
   209     //TODO : Add folder name field
   209     //_LIT(KFolderName, "FolderName");
   210     //_LIT(KFolderName, "FolderName");