예제 #1
0
        private string ProcessRow(IERowSet row, FolderDescriptor folder,
                                  IEFolder mapiFolder, ref int indexed)
        {
            string entryID = row.GetBinProp(1);

            if (entryID == null)
            {
                entryID = row.GetBinProp(0);
            }
            string messageClass = row.GetStringProp(3);

            if (messageClass == null)
            {
                messageClass = string.Empty;
            }

            IResource email =
                Core.ResourceStore.FindUniqueResource(STR.Email, PROP.EntryID, entryID);

            if (email != null)
            {
                _mailsInOldIndex.TestID(email.Id);
                UpdateMail(row, email, messageClass, entryID, folder, mapiFolder);
                indexed++;
            }
            else
            {
                AddMail(messageClass, entryID, folder, mapiFolder, row.GetStringProp(7));
                indexed++;
            }
            OutlookSession.ProcessJobs();
            return(entryID);
        }
예제 #2
0
            private void ProcessRow(IERowSet row, IEFolder mapiFolder)
            {
                mapiFolder = mapiFolder;
                string entryID = row.GetBinProp(1);

                if (entryID == null)
                {
                    entryID = row.GetBinProp(0);
                }
                string messageClass = row.GetStringProp(3);

                messageClass = messageClass;
            }
예제 #3
0
        private void ProcessGlobalAddressBook(IEABContainer abContainer)
        {
            IERowSet rowSet = abContainer.GetRowSet();

            if (rowSet == null)
            {
                return;
            }
            using ( rowSet )
            {
                string    entryID   = abContainer.GetBinProp(MAPIConst.PR_ENTRYID);
                IResource outlookAB = Core.ResourceStore.FindUniqueResource(STR.OutlookABDescriptor, PROP.EntryID, entryID);
                if (outlookAB == null)
                {
                    return;
                }
                if (!Folder.IsIgnoreImport(outlookAB))
                {
                    string             curName = abContainer.GetStringProp(MAPIConst.PR_DISPLAY_NAME);
                    string             abName  = OutlookAddressBook.GetProposedName(curName, entryID);
                    OutlookAddressBook AB      = new OutlookAddressBook(abName, entryID, false);
                    AB.RunAB();
                    int count = rowSet.GetRowCount();
                    for (int i = 0; i < count; i++)
                    {
                        if (ShuttingDown)
                        {
                            return;
                        }
                        OutlookSession.ProcessJobs();

                        string ABentryID = rowSet.GetBinProp(0, i /*MAPIConst.PR_ENTRYID*/);
                        if (ABentryID == null)
                        {
                            continue;
                        }
                        Core.ResourceAP.QueueJob(new ContactDescriptor(rowSet, i, ABentryID, AB));
                    }
                }
                else
                {
                    IResource AB = Core.ResourceStore.FindUniqueResource(STR.AddressBook, PROP.EntryID, entryID);
                    if (AB != null)
                    {
                        new ResourceProxy(AB).DeleteAsync();
                    }
                }
            }
        }
예제 #4
0
        public static bool ProcessIMAPMessage(IEFolder folder, string entryID)
        {
            Tracer._Trace("ProcessIMAPMessage");
            IETable table = folder.GetEnumTable(DateTime.MinValue);

            if (table == null)
            {
                return(false);
            }
            using ( table )
            {
                int count = table.GetRowCount();
                if (count > 0)
                {
                    table.Sort(MAPIConst.PR_MESSAGE_DELIVERY_TIME, false);
                }
                for (uint i = 0; i < count; i++)
                {
                    IERowSet row = table.GetNextRow();
                    if (row == null)
                    {
                        continue;
                    }
                    using ( row )
                    {
                        if (row.GetBinProp(0) == entryID)
                        {
                            if (row.GetLongProp(6) == 1)
                            {
                                Tracer._Trace("ProcessIMAPMessage FALSE");
                                //folder.SetMessageStatus( entryID, 0x1000, 0x1000 );
                                return(false);
                            }
                            else
                            {
                                Tracer._Trace("ProcessIMAPMessage TRUE");
                                return(true);
                            }
                        }
                    }
                }
            }
            return(false);
        }