|
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_H |
|
19 #define TMS_CLIENT_SOURCE_BODY_H |
|
20 |
|
21 #include <tms.h> |
|
22 |
|
23 namespace TMS { |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class TMSClientSourceObserver; |
|
27 class TMSBuffer; |
|
28 |
|
29 // TMSClientSourceBody class |
|
30 class TMSClientSourceBody |
|
31 { |
|
32 public: |
|
33 virtual ~TMSClientSourceBody() {} |
|
34 |
|
35 virtual gint AddObserver(TMSClientSourceObserver& obsrvr, |
|
36 gpointer user_data) = 0; |
|
37 |
|
38 virtual gint RemoveObserver(TMSClientSourceObserver& obsrvr) = 0; |
|
39 |
|
40 // In pull mode, client calls this.??? How to identify last buffer. |
|
41 // Option 1 is to move setlast buffer to TMSBuffer interface. |
|
42 // Option 2 is to have overloaded function with another parameter. |
|
43 virtual gint BufferFilled(TMSBuffer& buffer) = 0; |
|
44 // Push mode |
|
45 virtual gint ProcessBuffer(TMSBuffer* buffer) = 0; |
|
46 // Indicates framework to queue ProcessBuffer. default is off |
|
47 // unsupported in pull mode??? (atleast initially) |
|
48 virtual gint SetEnqueueMode(const gboolean enable) = 0; |
|
49 virtual gint GetEnqueueMode(gboolean& enable) = 0; |
|
50 // Sends batch data to framework and clears queue mode. |
|
51 // Valid only when queue mode is set, otherwise no-op |
|
52 virtual gint Flush() = 0; |
|
53 |
|
54 virtual gint GetType(TMSSourceType& sourcetype) = 0; |
|
55 }; |
|
56 |
|
57 } //namespace TMS |
|
58 |
|
59 #endif //TMS_CLIENT_SOURCE_BODY_H |