equal
deleted
inserted
replaced
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RADIONOTIFICATIONDATA_H |
|
19 #define RADIONOTIFICATIONDATA_H |
|
20 |
|
21 class RadioNotificationData |
|
22 { |
|
23 public: |
|
24 |
|
25 RadioNotificationData() : mType( 0 ) {} |
|
26 RadioNotificationData( int type, const QVariant& data ) : |
|
27 mType( type ), |
|
28 mData( data ) |
|
29 {} |
|
30 |
|
31 virtual ~RadioNotificationData() {} |
|
32 |
|
33 template <typename Stream> void serialize( Stream& stream ) const; |
|
34 template <typename Stream> void deserialize( Stream& stream ); |
|
35 |
|
36 int mType; |
|
37 QVariant mData; |
|
38 |
|
39 }; |
|
40 |
|
41 Q_DECLARE_USER_METATYPE(RadioNotificationData) |
|
42 |
|
43 template <typename Stream> void RadioNotificationData::serialize( Stream& stream ) const |
|
44 { |
|
45 stream << mType; |
|
46 stream << mData; |
|
47 } |
|
48 |
|
49 template <typename Stream> void RadioNotificationData::deserialize( Stream& stream ) |
|
50 { |
|
51 stream >> mType; |
|
52 stream >> mData; |
|
53 } |
|
54 |
|
55 Q_IMPLEMENT_USER_METATYPE(RadioNotificationData) |
|
56 |
|
57 #endif // RADIONOTIFICATIONDATA_H |
|