|
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 the License "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 // Forward declarations |
|
21 class MMuxLinkIf; |
|
22 |
|
23 #ifndef __LINK_MUX_IF__ |
|
24 #define __LINK_MUX_IF__ |
|
25 |
|
26 /* |
|
27 * Part of ISCEs internal MUX API. |
|
28 * Abstract interface for protocol link to use multiplexer services. |
|
29 */ |
|
30 class MLinkMuxIf |
|
31 { |
|
32 |
|
33 public: |
|
34 |
|
35 enum TMessageSendPriority |
|
36 { |
|
37 EPriorityNormal = 5, |
|
38 EPriorityHigh = 10, |
|
39 }; |
|
40 |
|
41 /* |
|
42 * Informs multiplexer that link is present and returns an interface tomultiplexer for link. |
|
43 * Shall not be called with FM held. |
|
44 * Creates a new DMux for aTrxId (if not created yet). |
|
45 * @param aTrx, pointer to links interface |
|
46 * @param aTrxId, unique identifier of the transceiver where link shall register |
|
47 * @param aLinkId, unique identifier of the registering link |
|
48 * @return pointer to multiplexer interface |
|
49 */ |
|
50 IMPORT_C static MLinkMuxIf* Register( MMuxLinkIf* aTrx, const TUint8 aTrxId, const TUint8 aLinkId ); |
|
51 |
|
52 /* |
|
53 * Sends a message to multiplexer. |
|
54 * Multiplexer shall multiplex the message and create the needed multiplexing protocol header on |
|
55 * based on aMsg and aMuxingHeaderProtocolId. |
|
56 * @param aMsg, message formatted according to links protocol |
|
57 * @param aMuxingHeaderProtocolId, unique multiplexing protocol header id of links protocol |
|
58 * @param aPriority, send priority, initialized as normal. |
|
59 */ |
|
60 virtual void Send( TDes8& aMsg, const TUint8 aMuxingHeaderProtocolId, const TMessageSendPriority aPriority = EPriorityNormal ) = 0; |
|
61 |
|
62 }; |
|
63 |
|
64 #endif __LINK_MUX_IF__ |