inc/convergedmessageid.h
branchRCL_3
changeset 26 ebe688cedc25
equal deleted inserted replaced
25:fa1df4b99609 26:ebe688cedc25
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: This is the domain header API for Conversations 
       
    15  *                  Message Id details
       
    16  */
       
    17 
       
    18 #ifndef CONVERGED_MESSAGE_ID_H
       
    19 #define CONVERGED_MESSAGE_ID_H
       
    20 
       
    21 #include <QList>
       
    22 
       
    23 #include "msgutilsapidefines.h"
       
    24 
       
    25 /**
       
    26 * ConvergedMessageId data object
       
    27 * Encapsulates Conversations Message Id details
       
    28 */
       
    29 class MSG_UTILS_API_EXPORT ConvergedMessageId 
       
    30 {
       
    31 
       
    32 public:
       
    33 
       
    34 	/**
       
    35 	* Constructor
       
    36 	* @param id QString type id
       
    37 	*/
       
    38 	ConvergedMessageId (int id = 0);
       
    39 
       
    40 	/**
       
    41 	* Copy Constructor 
       
    42 	* @param other another ConvergedMessageId     
       
    43 	*/
       
    44 	ConvergedMessageId(const ConvergedMessageId &other);
       
    45 
       
    46 	//TODO:OPEN recheck with QT mobility if == is required
       
    47 	/**
       
    48 	* Overloaded == operator
       
    49 	* Compares two message id's
       
    50 	* @param other another ConvergedMessageId
       
    51 	* @return bool true or false if the id's are same
       
    52 	*/
       
    53 	bool operator==(const ConvergedMessageId &other) const;  
       
    54 
       
    55 	/**
       
    56 	* Overloaded = operator
       
    57 	* Assigning other id into object id
       
    58 	* @param other another ConvergedMessageId
       
    59 	* @return type is reference to ConvergedMessageId
       
    60 	*/
       
    61 	ConvergedMessageId& operator=(const ConvergedMessageId &other);
       
    62 
       
    63 	/**
       
    64 	* Get the id
       
    65 	* @return id 
       
    66 	*/
       
    67 	int getId() const;
       
    68 
       
    69 	/**
       
    70 	* Set the id
       
    71 	* @param id of QString type
       
    72 	*/
       
    73 	void setId(int id);
       
    74 
       
    75 	/**
       
    76 	* Serialize the data memebers into the stream.
       
    77 	* @param stream data stream to which data is serialized. 
       
    78 	*/
       
    79 	void serialize(QDataStream &stream) const;
       
    80 
       
    81 	/**
       
    82 	* Deserialize the stream to data members.
       
    83 	* @param stream data stream from which data is deserialized. 
       
    84 	*/
       
    85 	void deserialize(QDataStream &stream);
       
    86 
       
    87 private: //Data
       
    88 
       
    89 	/**
       
    90 	* Converge message id
       
    91 	*/
       
    92 	int mId;
       
    93 }; 
       
    94 
       
    95 typedef QList<ConvergedMessageId> ConvergedMessageIdList;
       
    96 
       
    97 #endif // CONVERGED_MESSAGE_ID_H