|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * Contains the abstract interfaces for the MT components. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MTINTERFACES_H__ |
|
22 #define __MTINTERFACES_H__ |
|
23 |
|
24 |
|
25 /******************************************************************************* |
|
26 * |
|
27 * Types |
|
28 * |
|
29 ******************************************************************************/ |
|
30 typedef enum |
|
31 { |
|
32 INTERFACE_DISABLED, |
|
33 INTERFACE_CONNECTED |
|
34 } TInterfaceStatus; |
|
35 |
|
36 typedef struct { |
|
37 int iPhoneID; |
|
38 } TPhoneData; |
|
39 |
|
40 typedef enum |
|
41 { |
|
42 DPE_NONE, |
|
43 DPE_NO_AIR_INTERFACE, |
|
44 DPE_NO_TE_CHANNEL, |
|
45 DPE_NO_TE_CHANNEL_CONNECTION, |
|
46 DPE_SEND_FAILED, |
|
47 DPE_NO_REMOTE_ADDRESS, |
|
48 } TDataPathError; |
|
49 |
|
50 /******************************************************************************* |
|
51 * |
|
52 * Interface on the Air Interface called by the DataLinkLayer (or whatever) |
|
53 * |
|
54 ******************************************************************************/ |
|
55 class IAirInterface |
|
56 { |
|
57 public: |
|
58 virtual TDataPathError SendPacket( char *data, int len, int *aErrCode ) = 0; |
|
59 }; |
|
60 |
|
61 |
|
62 /******************************************************************************* |
|
63 * |
|
64 * Interface on the TE Channel -- called by the higher layer (demux/datalink) |
|
65 * |
|
66 ******************************************************************************/ |
|
67 class ITEChannel |
|
68 { |
|
69 public: |
|
70 virtual TDataPathError SendPacket( char *data, int len, int *aErrCode ) = 0; |
|
71 }; |
|
72 |
|
73 |
|
74 /******************************************************************************* |
|
75 * |
|
76 * Interface on the datalink layer or signal stack, called by the demux and |
|
77 * the air interface |
|
78 * |
|
79 ******************************************************************************/ |
|
80 class IProcessData |
|
81 { |
|
82 public: |
|
83 virtual TDataPathError ProcessTEData( char *data, int len, int *aErrCode ) = 0; |
|
84 virtual TDataPathError ProcessUUData( char *data, int len, int *aErrCode ) = 0; |
|
85 virtual void SetAirInterface( IAirInterface *aAirInterface ) = 0; |
|
86 virtual void SetTEChannel( ITEChannel *aTEChannel ) = 0; |
|
87 }; |
|
88 |
|
89 |
|
90 /******************************************************************************* |
|
91 * |
|
92 * Interface on the filters called by the filter manager |
|
93 * |
|
94 ******************************************************************************/ |
|
95 class IFilter |
|
96 { |
|
97 public: |
|
98 virtual int ProcessIncomingData( char *data, int len ) = 0; |
|
99 virtual int ProcessOutgoingData( char *data, int len ) = 0; |
|
100 }; |
|
101 |
|
102 #endif //__MTINTERFACES_H__ |