|
1 /* |
|
2 * Copyright (c) 2005 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 |
|
19 |
|
20 |
|
21 #ifndef TMCEMEDIASTATE_H |
|
22 #define TMCEMEDIASTATE_H |
|
23 |
|
24 #include <e32std.h> |
|
25 #include "mcemediadefs.h" |
|
26 #include "mcesip.h" |
|
27 |
|
28 class TMceMccComEvent; |
|
29 class CMceComSession; |
|
30 class CSdpDocument; |
|
31 |
|
32 /** |
|
33 * Represents MM state |
|
34 * |
|
35 */ |
|
36 |
|
37 class TMceMediaState |
|
38 { |
|
39 |
|
40 public: // Constructors |
|
41 |
|
42 /** |
|
43 * Consructor |
|
44 */ |
|
45 TMceMediaState( CMceComSession& aSession ); |
|
46 virtual ~TMceMediaState(); |
|
47 |
|
48 |
|
49 public: // new functions |
|
50 |
|
51 virtual TMceMMState Id() = 0; |
|
52 |
|
53 virtual TMceMediaState* CloneL( CMceComSession& aSession ) const; |
|
54 |
|
55 virtual void EntryL(); |
|
56 |
|
57 virtual void Callback(); |
|
58 |
|
59 void Pushed(); |
|
60 |
|
61 TInt StackIndex(); |
|
62 |
|
63 TBool CallbackAllowed(); |
|
64 |
|
65 |
|
66 public: // from mcc |
|
67 |
|
68 virtual void MccLinkCreatedL( TMceMccComEvent& aEvent ); |
|
69 |
|
70 virtual void MccMediaPreparedL( TMceMccComEvent& aEvent ); |
|
71 |
|
72 virtual void MccMediaStartedL( TMceMccComEvent& aEvent ); |
|
73 |
|
74 virtual void MccMediaPausedL( TMceMccComEvent& aEvent ); |
|
75 |
|
76 virtual void MccMediaResumedL( TMceMccComEvent& aEvent ); |
|
77 |
|
78 virtual void MccError( TInt aError, TMceMccComEvent& aEvent ); |
|
79 |
|
80 public: //from application/server |
|
81 |
|
82 |
|
83 virtual TMceSipWarningCode DecodeL( CSdpDocument& aSdpDocument ); |
|
84 |
|
85 virtual CSdpDocument* EncodeL(); |
|
86 |
|
87 virtual void UpdateL(); |
|
88 |
|
89 |
|
90 public: |
|
91 |
|
92 virtual TBool NeedToNegotiate( CSdpDocument* aSdpDocument = NULL ); |
|
93 |
|
94 virtual TBool ConfirmationNeeded(); |
|
95 |
|
96 virtual TBool ReservationNeeded(); |
|
97 |
|
98 virtual TMceReturnStatus ReserveL(); |
|
99 |
|
100 |
|
101 void SetRole( TMceNegotiationRole aRole ); |
|
102 |
|
103 TMceNegotiationRole Role() const; |
|
104 |
|
105 protected://state common functions |
|
106 |
|
107 |
|
108 protected://data |
|
109 |
|
110 CMceComSession& iSession; |
|
111 TMceNegotiationRole iRole; |
|
112 TInt iStackIndex; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif //TMceMEDIASTATE_H |
|
117 |
|
118 // End of File |