recents_plat/logs_engine_api/inc/logsevent.h
changeset 16 c5af8598d22c
parent 6 41c0a814d878
child 17 90fe74753f71
equal deleted inserted replaced
14:f27aebe284bb 16:c5af8598d22c
    20 
    20 
    21 //  INCLUDES
    21 //  INCLUDES
    22 #include <logsexport.h>
    22 #include <logsexport.h>
    23 #include <QDateTime>
    23 #include <QDateTime>
    24 #include <qmobilityglobal.h>
    24 #include <qmobilityglobal.h>
       
    25 #include <QList>
    25 
    26 
    26 // FORWARD DECLARATION
    27 // FORWARD DECLARATION
    27 class LogsEventData;
    28 class LogsEventData;
    28 class LogsEventStrings;
    29 class LogsEventStrings;
    29 class CLogEvent;
    30 class CLogEvent;
   175         /**
   176         /**
   176          * Serialize event to data stream
   177          * Serialize event to data stream
   177          */
   178          */
   178         LOGSENGINE_EXPORT bool serialize( QDataStream& serializeDestination );
   179         LOGSENGINE_EXPORT bool serialize( QDataStream& serializeDestination );
   179         
   180         
       
   181         /**
       
   182         * Check whether event has private remoteparty
       
   183         * @return true if event has private remoteparty
       
   184         */
       
   185         LOGSENGINE_EXPORT bool isRemotePartyPrivate() const;
       
   186         
   180     public:
   187     public:
   181         
   188         
   182         /**
   189         /**
   183          * Initialized the event with contents of given source event.
   190          * Initialized the event with contents of given source event.
   184          * Event state and view status are updated automatically at
   191          * Event state and view status are updated automatically at
   234          * Set remote party name for the event.
   241          * Set remote party name for the event.
   235          */
   242          */
   236         void setRemoteParty( const QString& remoteParty );
   243         void setRemoteParty( const QString& remoteParty );
   237         
   244         
   238         /**
   245         /**
       
   246         * Set indication of result of searching matching 
       
   247         * contact from contacts
       
   248         */
       
   249         void setContactMatched( bool value );
       
   250         
       
   251         /**
       
   252         * Get indication of result of searching matching 
       
   253         * contact from contacts
       
   254         */
       
   255         bool contactMatched();
       
   256         
       
   257         /**
   239          * Check if event is valid.
   258          * Check if event is valid.
   240          * @return true if valid, otherwise false
   259          * @return true if valid, otherwise false
   241          */
   260          */
   242         bool validate();
   261         bool validate();
   243         
   262         
   272         /**
   291         /**
   273          * Check whether event is locally seen.
   292          * Check whether event is locally seen.
   274          */
   293          */
   275         bool isSeenLocally() const;
   294         bool isSeenLocally() const;
   276         
   295         
   277         bool isRemotePartyPrivate() const;
       
   278         bool isRemotePartyUnknown() const;
   296         bool isRemotePartyUnknown() const;
   279         
   297         
   280         /**
   298         /**
   281         * Set remote party status as private of the event.
   299         * Set remote party status as private of the event.
   282         */
   300         */
   284         
   302         
   285         /**
   303         /**
   286         * Set remote party status as unknown of the event.
   304         * Set remote party status as unknown of the event.
   287         */
   305         */
   288         void setRemotePartyUnknown(bool markedAsUnknown);
   306         void setRemotePartyUnknown(bool markedAsUnknown);
       
   307         
       
   308         /**
       
   309          * Merge relevant information
       
   310          */
       
   311         void merge( LogsEvent& event );
       
   312         
       
   313         /**
       
   314          * Duplicate events
       
   315          */
       
   316         QList<LogsEvent>& mergedDuplicates();
       
   317         
       
   318         /**
       
   319          * Comparison
       
   320          */
       
   321         bool operator==(const LogsEvent& other);
       
   322         
       
   323         /**
       
   324          * Check if communication is possible.
       
   325          */
       
   326         bool isCommunicationPossible() const;
   289         
   327         
   290     private:                               
   328     private:                               
   291 
   329 
   292         bool setTime( const QDateTime& time );
   330         bool setTime( const QDateTime& time );
   293 
   331 
   314         void setContactLocalId( unsigned int id );
   352         void setContactLocalId( unsigned int id );
   315 
   353 
   316         QString stripPhoneNumber(const QString& num);
   354         QString stripPhoneNumber(const QString& num);
   317         
   355         
   318         QString parseContactName(const QContactName& name);
   356         QString parseContactName(const QContactName& name);
       
   357         
       
   358         bool isUnseenEvent( const LogsEvent& event ) const;
   319         
   359         
   320         
   360         
   321     private:    // data
   361     private:    // data
   322             
   362             
   323         int mLogId;        
   363         int mLogId;        
   328         QString mRemoteParty;
   368         QString mRemoteParty;
   329         QString mNumber;
   369         QString mNumber;
   330         int mDuplicates;               
   370         int mDuplicates;               
   331         QDateTime mTime;       
   371         QDateTime mTime;       
   332         int mRingDuration;
   372         int mRingDuration;
   333 	      bool mIsRead;  
   373         bool mIsRead;  
   334 	      bool mIsALS;
   374         bool mIsALS;
   335 	      int mDuration;
   375         int mDuration;
   336 	    
   376         
   337 	      int mIndex;
   377         int mIndex;
   338 	      bool mIsInView;
   378         bool mIsInView;
   339 	      LogsEventState mEventState;
   379         LogsEventState mEventState;
   340 	      bool mIsLocallySeen;
   380         bool mIsLocallySeen;
   341 	      bool mIsPrivate;
   381         bool mIsPrivate;
   342 	      bool mIsUnknown;
   382         bool mIsUnknown;
       
   383 		bool mContactMatched;
       
   384 	    QList<LogsEvent> mMergedDuplicates;
   343 	    
   385 	    
   344     private:
   386     private:
   345         
   387         
   346         friend class LogsEventParser;
   388         friend class LogsEventParser;
   347         friend class LogsReaderStateFillDetails;
   389         friend class LogsReaderStateFillDetails;
   362         friend class UT_LogsReaderStates;
   404         friend class UT_LogsReaderStates;
   363         friend class UT_LogsDetailsModel;
   405         friend class UT_LogsDetailsModel;
   364         friend class UT_LogsMessage;
   406         friend class UT_LogsMessage;
   365         friend class UT_LogsCustomFilter;
   407         friend class UT_LogsCustomFilter;
   366         friend class UT_LogsMatchesModel;
   408         friend class UT_LogsMatchesModel;
       
   409         friend class UT_LogsRemoveStates;
       
   410         friend class UT_LogsRemove;
       
   411         friend class UT_LogsDuplicateLookup;
   367     };
   412     };
   368 
   413 
   369 #endif      // LOGSEVENT_H
   414 #endif      // LOGSEVENT_H
   370 
   415 
   371 
   416