|
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: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TMS_CLIENT_SOURCE_BODY_IMPL_H |
|
19 #define TMS_CLIENT_SOURCE_BODY_IMPL_H |
|
20 |
|
21 #include <tms.h> |
|
22 #include "tmsclientsourcebody.h" |
|
23 #include "tmsqueuehandler.h" |
|
24 |
|
25 namespace TMS { |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class TMSClientSourceObserver; |
|
29 class TMSBuffer; |
|
30 class TMSCallProxy; |
|
31 |
|
32 // TMSClientSourceBodyImpl class |
|
33 class TMSClientSourceBodyImpl : public TMSClientSourceBody, |
|
34 public MQueueHandlerObserver |
|
35 { |
|
36 public: |
|
37 static gint Create(TMSClientSourceBody*& bodyimpl); |
|
38 // From TMSClientSourceBody begins |
|
39 |
|
40 virtual ~TMSClientSourceBodyImpl(); |
|
41 |
|
42 virtual gint AddObserver(TMSClientSourceObserver& obsrvr, |
|
43 gpointer user_data); |
|
44 |
|
45 virtual gint RemoveObserver(TMSClientSourceObserver& obsrvr); |
|
46 |
|
47 // In pull mode, client calls this.??? How to identify last buffer. |
|
48 // Option 1 is to move setlast buffer to TMSBuffer interface. |
|
49 // Option 2 is to have overloaded function with another parameter. |
|
50 virtual gint BufferFilled(TMSBuffer& buffer); |
|
51 // Push mode |
|
52 virtual gint ProcessBuffer(TMSBuffer* buffer); |
|
53 // Indicates framework to queue ProcessBuffer. default is off |
|
54 // unsupported in pull mode??? (atleast initially) |
|
55 virtual gint SetEnqueueMode(const gboolean enable); |
|
56 virtual gint GetEnqueueMode(gboolean& enable); |
|
57 // Sends batch data to framework and clears queue mode. |
|
58 // Valid only when queue mode is set, otherwise no-op |
|
59 virtual gint Flush(); |
|
60 |
|
61 virtual gint GetType(TMSSourceType& sourcetype); |
|
62 |
|
63 // From TMSClientSourceBody ends |
|
64 |
|
65 // From MQueueHandlerObserver starts |
|
66 virtual void QueueEvent(TInt aEventType, TInt aError, void* user_data); |
|
67 // From MQueueHandlerObserver ends |
|
68 |
|
69 void SetProxy(TMSCallProxy* aProxy, gint strmid, gpointer queuehandler); |
|
70 |
|
71 private: |
|
72 TMSClientSourceBodyImpl(); |
|
73 gint PostConstruct(); |
|
74 |
|
75 private: |
|
76 TMSClientSourceObserver* iObserver; |
|
77 gpointer iUserData; |
|
78 TMSCallProxy* iProxy; |
|
79 gboolean iQueueMode; |
|
80 gint iStreamId; |
|
81 }; |
|
82 |
|
83 } //namespace TMS |
|
84 |
|
85 #endif // TMS_CLIENT_SOURCE_BODY_IMPL_H |
|
86 |
|
87 // End of file |