Ejemplo n.º 1
0
 public void AddMessage(NodeID messageNodeID, NodeID folderNodeID)
 {
     if (m_isWindowsDesktopSearchQueuing ||
         m_file.SearchDomainObject.ContainsNode(folderNodeID))
     {
         SearchUpdateDescriptorMessageAdded messageAdded = new SearchUpdateDescriptorMessageAdded(folderNodeID, messageNodeID);
         SearchUpdateDescriptor             sud          = new SearchUpdateDescriptor((SearchUpdateDescriptorFlags)0, SearchUpdateDescriptorType.SUDT_MSG_ADD, messageAdded);
         QueueSearchUpdateDescriptor(sud);
     }
 }
Ejemplo n.º 2
0
 public void DeleteFolder(NodeID folderNodeID, NodeID parentNodeID)
 {
     if (m_isWindowsDesktopSearchQueuing ||
         m_file.SearchDomainObject.ContainsNode(parentNodeID))
     {
         SearchUpdateDescriptorFolderModified folderDeleted = new SearchUpdateDescriptorFolderModified(folderNodeID);
         SearchUpdateDescriptor sud = new SearchUpdateDescriptor((SearchUpdateDescriptorFlags)0, SearchUpdateDescriptorType.SUDT_FLD_DEL, folderDeleted);
         QueueSearchUpdateDescriptor(sud);
     }
 }
Ejemplo n.º 3
0
        // http://social.msdn.microsoft.com/Forums/en-US/os_binaryfile/thread/a5f9c653-40f5-4638-85d3-00c54607d984/
        // For the following types, search the SDO for the NIDs of the old and new parent folders.
        // If either of the NIDs is contained in the SDO, enqueue the SUD
        private void QueueSearchUpdateDescriptor(SearchUpdateDescriptor sud)
        {
            if (m_node == null)
            {
                m_node = m_file.GetNode((uint)InternalNodeName.NID_SEARCH_MANAGEMENT_QUEUE);
            }

            if (m_node.DataTree == null)
            {
                m_node.DataTree = new DataTree(m_file);
            }

            m_node.DataTree.AppendData(sud.GetBytes());
        }
Ejemplo n.º 4
0
        public void ModifyMessage(NodeID messageNodeID, NodeID folderNodeID, bool isContentsTableModified)
        {
            bool sdoContainsNode = m_file.SearchDomainObject.ContainsNode(folderNodeID);

            if (m_isWindowsDesktopSearchQueuing ||
                sdoContainsNode)
            {
                SearchUpdateDescriptorMessageAdded messageModified = new SearchUpdateDescriptorMessageAdded(folderNodeID, messageNodeID);
                SearchUpdateDescriptor             sud             = new SearchUpdateDescriptor((SearchUpdateDescriptorFlags)0, SearchUpdateDescriptorType.SUDT_MSG_MOD, messageModified);
                QueueSearchUpdateDescriptor(sud);

                if (isContentsTableModified && sdoContainsNode)
                {
                    SearchUpdateDescriptorMessageAdded messageRowModified = new SearchUpdateDescriptorMessageAdded(folderNodeID, messageNodeID);
                    SearchUpdateDescriptor             sudRow             = new SearchUpdateDescriptor((SearchUpdateDescriptorFlags)0, SearchUpdateDescriptorType.SUDT_MSG_ROW_MOD, messageRowModified);
                    QueueSearchUpdateDescriptor(sudRow);
                }
            }
        }