|
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 general message data model |
|
15 * plugin behavior |
|
16 */ |
|
17 //---------------------------------------------------------------- |
|
18 // UniMessageInfo::UniMessageInfo |
|
19 // @see header |
|
20 //---------------------------------------------------------------- |
|
21 UniMessageInfo::UniMessageInfo( const QString& filepath, |
|
22 const int size, |
|
23 const QString& mimetype ) : mPath (filepath), mSize(size), mMimeType(mimetype) |
|
24 { |
|
25 |
|
26 |
|
27 } |
|
28 |
|
29 //---------------------------------------------------------------- |
|
30 // UniMessageInfo::~UniMessageInfo |
|
31 // @see header |
|
32 //---------------------------------------------------------------- |
|
33 UniMessageInfo::~UniMessageInfo() |
|
34 { |
|
35 } |
|
36 |
|
37 //---------------------------------------------------------------- |
|
38 // UniMessageInfo::setPath |
|
39 // @see header |
|
40 //---------------------------------------------------------------- |
|
41 inline void UniMessageInfo::setPath( const QString& filepath ) |
|
42 { |
|
43 mPath = filepath; |
|
44 } |
|
45 |
|
46 //---------------------------------------------------------------- |
|
47 // UniMessageInfo::setSize |
|
48 // @see header |
|
49 //---------------------------------------------------------------- |
|
50 /*inline void UniMessageInfo::setSize( const int filesize ) |
|
51 { |
|
52 mSize = filesize; |
|
53 } |
|
54 */ |
|
55 //---------------------------------------------------------------- |
|
56 // UniMessageInfo::setMimeType |
|
57 // @see header |
|
58 //---------------------------------------------------------------- |
|
59 inline void UniMessageInfo::setMimeType( const QString& mimetype ) |
|
60 { |
|
61 mMimeType = mimetype; |
|
62 } |
|
63 |
|
64 //---------------------------------------------------------------- |
|
65 // UniMessageInfo::path |
|
66 // @see header |
|
67 //---------------------------------------------------------------- |
|
68 inline const QString& UniMessageInfo::path() |
|
69 { |
|
70 return mPath; |
|
71 } |
|
72 |
|
73 //---------------------------------------------------------------- |
|
74 // UniMessageInfo::size |
|
75 // @see header |
|
76 //---------------------------------------------------------------- |
|
77 inline const int UniMessageInfo::size() |
|
78 { |
|
79 return mSize; |
|
80 } |
|
81 |
|
82 //---------------------------------------------------------------- |
|
83 // UniMessageInfo::mimetype |
|
84 // @see header |
|
85 //---------------------------------------------------------------- |
|
86 inline const QString& UniMessageInfo::mimetype() |
|
87 { |
|
88 return mMimeType; |
|
89 } |
|
90 |
|
91 //---------------------------------------------------------------- |
|
92 // UniMessageInfo::serialize |
|
93 // @see header |
|
94 //---------------------------------------------------------------- |
|
95 inline void UniMessageInfo::serialize( |
|
96 QDataStream &stream) const |
|
97 { |
|
98 stream << mPath; |
|
99 //stream << mSize; |
|
100 stream << mMimeType; |
|
101 } |
|
102 |
|
103 //---------------------------------------------------------------- |
|
104 // UniMessageInfo::deserialize |
|
105 // @see header |
|
106 //---------------------------------------------------------------- |
|
107 inline void UniMessageInfo::deserialize( |
|
108 QDataStream &stream) |
|
109 { |
|
110 stream >> mPath; |
|
111 //TODO resolve the problem |
|
112 //stream >> mSize; |
|
113 stream >> mMimeType; |
|
114 } |
|
115 |
|
116 |
|
117 |
|
118 |