1 #ifndef LPC_INDEX_H1110724080_INCLUDE_GUARD_ 2 #define LPC_INDEX_H1110724080_INCLUDE_GUARD_ 35 #include <tqcstring.h> 36 #include <tqvaluelist.h> 40 #include <indexlib/index.h> 41 #include <indexlib/lockfile.h> 52 class KMMsgIndex : public TQObject { 56 explicit KMMsgIndex( TQObject* parent ); 67 bool startQuery( KMSearch* ); 73 bool stopQuery( KMSearch* ); 78 std::vector<TQ_UINT32> simpleSearch( TQString, bool* ) const; 87 bool isIndexable( KMFolder* folder ) const; 95 bool isIndexed( KMFolder* folder ) const; 100 bool isEnabled() const { return mState != s_disabled; } 111 void setEnabled( bool ); 119 void setIndexingEnabled( KMFolder*, bool ); 133 void removeSearch( TQObject* ); 135 void continueCreation(); 137 void slotAddMessage( KMFolder*, TQ_UINT32 message ); 138 void slotRemoveMessage( KMFolder*, TQ_UINT32 message ); 140 static TQString defaultPath(); 143 int addMessage( TQ_UINT32 ); 144 void removeMessage( TQ_UINT32 ); 146 void scheduleAction(); 147 bool creating() const; 160 std::vector<TQ_UINT32> mPendingMsgs; 161 std::vector<KMFolder*> mPendingFolders; 162 std::vector<TQ_UINT32> mAddedMsgs; 163 std::vector<TQ_UINT32> mRemovedMsgs; 164 std::vector<TQ_UINT32> mExisting; 175 unsigned mMaintenanceCount; 182 indexlib::detail::lockfile mLockFile; 186 indexlib::index* mIndex; 188 std::set<KMFolder*> mOpenedFolders; 189 std::vector<Search*> mSearches; 190 TQCString mIndexPath; 196 class KMMsgIndex::Search : public TQObject { 200 explicit Search( KMSearch* s ); 202 KMSearch* search() const { return mSearch; } 204 void found( TQ_UINT32 ); 205 void finished( bool ); 216 std::vector<TQ_UINT32> mValues; 217 enum { s_none = 0, s_starting, s_emitting, s_emitstopped, s_done } mState; This class is an abstraction of a search over messages.
Incoming mail is sent through the list of mail filter rules before it is placed in the associated mai...
|