logsui/logsengine/src/logseventdata.cpp
branchGCC_SURGE
changeset 12 d56c5d6796ca
parent 6 41c0a814d878
equal deleted inserted replaced
5:8d8fb0db2489 12:d56c5d6796ca
    17 
    17 
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 #include "logseventdata.h"
    19 #include "logseventdata.h"
    20 #include "logsevent.h"
    20 #include "logsevent.h"
    21 #include "logseventdataparser.h"
    21 #include "logseventdataparser.h"
       
    22 #include "logslogger.h"
    22 
    23 
    23 #include <QRegExp>
    24 #include <QRegExp>
    24 #include <QRegExpValidator>
    25 #include <QRegExpValidator>
       
    26 #include <QDataStream>
    25 
    27 
    26 // ----------------------------------------------------------------------------
    28 // ----------------------------------------------------------------------------
    27 // LogsEventData::LogsEventData
    29 // LogsEventData::LogsEventData
    28 // ----------------------------------------------------------------------------
    30 // ----------------------------------------------------------------------------
    29 //
    31 //
    62     mRemoteUrl = data.mRemoteUrl;
    64     mRemoteUrl = data.mRemoteUrl;
    63     mLocalUrl = data.mLocalUrl;
    65     mLocalUrl = data.mLocalUrl;
    64 }
    66 }
    65 
    67 
    66 // ----------------------------------------------------------------------------
    68 // ----------------------------------------------------------------------------
       
    69 //
       
    70 // ----------------------------------------------------------------------------
       
    71 //
       
    72 LogsEventData::LogsEventData( QDataStream& serializedEvent )
       
    73 {
       
    74     LOGS_QDEBUG( "logs [ENG] -> LogsEventData::LogsEventData deserialize")
       
    75         
       
    76     serializedEvent >> mIsCNAP;
       
    77     serializedEvent >> mIsVT;
       
    78     serializedEvent >> mIsPoC;
       
    79     serializedEvent >> mIsVoIP;
       
    80     serializedEvent >> mIsEmerg;
       
    81     serializedEvent >> mDataSent;
       
    82     serializedEvent >> mDataReceived;        
       
    83     serializedEvent >> mMsgPartsNumber;            
       
    84     serializedEvent >> mServiceId;
       
    85     serializedEvent >> mContactLocalId;
       
    86     serializedEvent >> mRemoteUrl;
       
    87     serializedEvent >> mLocalUrl;
       
    88     
       
    89     LOGS_QDEBUG( "logs [ENG] <- LogsEventData::LogsEventData deserialize")
       
    90     
       
    91 }
       
    92 
       
    93 // ----------------------------------------------------------------------------
       
    94 //
       
    95 // ----------------------------------------------------------------------------
       
    96 //
       
    97 bool LogsEventData::serialize( QDataStream& serializeDestination )
       
    98 {
       
    99     LOGS_QDEBUG( "logs [ENG] -> LogsEventData::serialize")
       
   100         
       
   101     serializeDestination << mIsCNAP;
       
   102     serializeDestination << mIsVT;
       
   103     serializeDestination << mIsPoC;
       
   104     serializeDestination << mIsVoIP;
       
   105     serializeDestination << mIsEmerg;
       
   106     serializeDestination << mDataSent;
       
   107     serializeDestination << mDataReceived;        
       
   108     serializeDestination << mMsgPartsNumber;            
       
   109     serializeDestination << mServiceId;
       
   110     serializeDestination << mContactLocalId;
       
   111     serializeDestination << mRemoteUrl;
       
   112     serializeDestination << mLocalUrl;
       
   113     
       
   114     LOGS_QDEBUG( "logs [ENG] <- LogsEventData::serialize")
       
   115     return true;
       
   116 }
       
   117 
       
   118 // ----------------------------------------------------------------------------
    67 // LogsEventData::~LogsEventData
   119 // LogsEventData::~LogsEventData
    68 // ----------------------------------------------------------------------------
   120 // ----------------------------------------------------------------------------
    69 //
   121 //
    70 LogsEventData::~LogsEventData() 
   122 LogsEventData::~LogsEventData() 
    71 {
   123 {