33
|
1 |
/*
|
|
2 |
* Copyright (c) 2004 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: Header file for the CCbsMessageFactory class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CCBSMESSAGEFACTORY_H
|
|
20 |
#define CCBSMESSAGEFACTORY_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <etelmm.h>
|
|
26 |
#include "CCbsMessage.h"
|
|
27 |
|
|
28 |
// FORWARD DECLARATIONS
|
|
29 |
class CCbsRecEtel;
|
|
30 |
|
|
31 |
// CLASS DECLARATION
|
|
32 |
|
|
33 |
/**
|
|
34 |
* CCbsMessageFactory constructs CB messages based on a page
|
|
35 |
* received through ETel.
|
|
36 |
*
|
|
37 |
* The selection between GSM and WCDMA messages is made when
|
|
38 |
* constructing the message.
|
|
39 |
*/
|
|
40 |
class CCbsMessageFactory : public CBase
|
|
41 |
{
|
|
42 |
public: // New functions
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Constructs a new CCbsMessage based on TDes8&
|
|
46 |
* (which is a descriptor) received from EPOC Telephony Server.
|
|
47 |
*
|
|
48 |
* @param aRecEtel CCbsRecEtel reference
|
|
49 |
* @return A new instance of CCbsMessageFactory
|
|
50 |
*/
|
|
51 |
static CCbsMessageFactory* NewL( CCbsRecEtel& aRecEtel );
|
|
52 |
|
|
53 |
/**
|
|
54 |
* Destructor
|
|
55 |
*/
|
|
56 |
~CCbsMessageFactory();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Creates a new message.
|
|
60 |
*
|
|
61 |
* @param aMessagePage Source message descriptor
|
|
62 |
* @param aAttributes Message attributes
|
|
63 |
* @return aMsgType Message type (GSM/WCDMA/Livecast)
|
|
64 |
* @return Current instance of CCbsMessage
|
|
65 |
*/
|
|
66 |
CCbsMessage* CreateMessageL( const TDes8& aMessagePage,
|
|
67 |
const RMobileBroadcastMessaging::TMobileBroadcastAttributesV2& aAttributes,
|
|
68 |
TCbsMessageType& aMsgType );
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Creates a new message.
|
|
72 |
*
|
|
73 |
* @param aMessage Message from which to create the new msg
|
|
74 |
* @return Current instance of CCbsMessage
|
|
75 |
*/
|
|
76 |
CCbsMessage* CreateMessageL( const CCbsMessage& aMessage );
|
|
77 |
|
|
78 |
private:
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Default constructor
|
|
82 |
*/
|
|
83 |
CCbsMessageFactory( CCbsRecEtel& aRecEtel );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* 2nd-phase constructor
|
|
87 |
*/
|
|
88 |
void ConstructL();
|
|
89 |
|
|
90 |
|
|
91 |
private: // Data
|
|
92 |
|
|
93 |
// Message attributes, mainly used with WCDMA
|
|
94 |
RMobileBroadcastMessaging::TMobileBroadcastAttributesV2 iAttributes;
|
|
95 |
|
|
96 |
// CCbsRecEtel instance to which CB messages are passed.
|
|
97 |
CCbsRecEtel& iRecEtel;
|
|
98 |
|
|
99 |
};
|
|
100 |
|
|
101 |
#endif // CCBSMESSAGEFACTORY_H
|
|
102 |
|
|
103 |
// End of File
|
|
104 |
|
|
105 |
|