|
1 |
|
2 /* |
|
3 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef _SIPEXSIPIDLESTATE_H_ |
|
22 #define _SIPEXSIPIDLESTATE_H_ |
|
23 |
|
24 |
|
25 // INCLUDES |
|
26 #include "SIPExSIPStateBase.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CSIPExSIPEngine; |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * Reacts to events that are possible in |
|
35 * "Idle" state. |
|
36 */ |
|
37 class CSIPExSIPIdleState: public CSIPExSIPStateBase |
|
38 { |
|
39 public:// Constructors and destructor |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 IMPORT_C static CSIPExSIPIdleState* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 IMPORT_C virtual ~CSIPExSIPIdleState(); |
|
49 |
|
50 public://new functions |
|
51 /** |
|
52 * Links the states |
|
53 * @param aClientEstablishingState Invitation with media parameters is sent to peer. |
|
54 * @param aServerOfferingState Invitation with media parameters is received from peer. |
|
55 */ |
|
56 void LinkStates( |
|
57 CSIPExSIPStateBase& aClientEstablishingState, |
|
58 CSIPExSIPStateBase& aServerOfferingState ); |
|
59 |
|
60 public://functions from base class |
|
61 |
|
62 /** |
|
63 * SendInviteL |
|
64 * Sends an INVITE to peer. |
|
65 * @param aEngine Reference to SIP Engine. |
|
66 * @param aSipUri uri of recipient. |
|
67 */ |
|
68 void SendInviteL( CSIPExSIPEngine& aEngine, |
|
69 const TDesC8& aSipUri ); |
|
70 |
|
71 /** |
|
72 * InviteReceivedL |
|
73 * INVITE has been received. |
|
74 * @param aEngine Reference to SIP Engine. |
|
75 * @param aTransaction Contains response elements. |
|
76 * The ownership is transferred. |
|
77 */ |
|
78 void InviteReceivedL( |
|
79 CSIPExSIPEngine& aEngine, |
|
80 CSIPServerTransaction* aTransaction ); |
|
81 |
|
82 private: |
|
83 /** |
|
84 * C++ default constructor. |
|
85 */ |
|
86 CSIPExSIPIdleState(); |
|
87 |
|
88 private: //data members |
|
89 CSIPExSIPStateBase* iClientEstablishingState; |
|
90 CSIPExSIPStateBase* iServerOfferingState; |
|
91 }; |
|
92 |
|
93 #endif // _SIPEXSIPINITSTATE_H_ |
|
94 |