|
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 _SIPEXSIPSERVEROFFERINGSTATE_H_ |
|
22 #define _SIPEXSIPSERVEROFFERINGSTATE_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include "SIPExSIPStateBase.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CSIPExSIPEngine; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * Reacts to events that are possible in |
|
33 * "ClientOffering" state. |
|
34 */ |
|
35 class CSIPExSIPServerOfferingState: public CSIPExSIPStateBase |
|
36 { |
|
37 public:// Constructors and destructor |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 */ |
|
41 IMPORT_C static CSIPExSIPServerOfferingState* NewL(); |
|
42 |
|
43 /** |
|
44 * Destructor |
|
45 */ |
|
46 IMPORT_C virtual ~CSIPExSIPServerOfferingState(); |
|
47 |
|
48 public://new functions |
|
49 /** |
|
50 * Links the states |
|
51 * @param aServerEstablishingState INVITE has been received and accepted, waiting for ACK. |
|
52 * @param aTerminatedState Peer has declined the invite, SIP Session is terminated. |
|
53 */ |
|
54 void LinkStates( |
|
55 CSIPExSIPStateBase& aServerEstablishingState, |
|
56 CSIPExSIPStateBase& aTerminatedState ); |
|
57 |
|
58 public://functions from base class |
|
59 |
|
60 |
|
61 /** |
|
62 * ByeReceivedL |
|
63 * BYE has been received. |
|
64 * @param aEngine Reference to Engine object. |
|
65 * @param aTransaction Contains response elements. |
|
66 */ |
|
67 void ByeReceivedL( CSIPExSIPEngine& aEngine, |
|
68 CSIPServerTransaction& aTransaction ); |
|
69 |
|
70 /** |
|
71 * CancelReceivedL |
|
72 * CANCEL has been received. |
|
73 * @param aEngine Reference to Engine object. |
|
74 * @param aTransaction Contains response elements. |
|
75 */ |
|
76 void CancelReceivedL( CSIPExSIPEngine& aEngine, |
|
77 CSIPClientTransaction& aTransaction ); |
|
78 |
|
79 /** |
|
80 * AcceptInviteL |
|
81 * Send 200 (OK) as response to an INVITE |
|
82 * received from peer. |
|
83 * @param aEngine Reference to Engine object. |
|
84 */ |
|
85 void AcceptInviteL( CSIPExSIPEngine& aEngine ); |
|
86 |
|
87 /** |
|
88 * DeclineInviteL |
|
89 * Send 486 (Busy Here) as response |
|
90 * to an INVITE received from peer. |
|
91 * @param aEngine Reference to Engine object. |
|
92 */ |
|
93 void DeclineInviteL( CSIPExSIPEngine& aEngine ); |
|
94 |
|
95 |
|
96 private: |
|
97 /** |
|
98 * C++ default constructor. |
|
99 */ |
|
100 CSIPExSIPServerOfferingState(); |
|
101 |
|
102 private://data members |
|
103 CSIPExSIPStateBase* iServerEstablishingState; |
|
104 CSIPExSIPStateBase* iTerminatedState; |
|
105 }; |
|
106 |
|
107 #endif // _SIPEXSIPSERVEROFFERINGSTATE_H_ |
|
108 |