1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
16 |
16 |
17 #ifndef EIRPUBLISHERTXPOWERLEVEL_H |
17 #ifndef EIRPUBLISHERTXPOWERLEVEL_H |
18 #define EIRPUBLISHERTXPOWERLEVEL_H |
18 #define EIRPUBLISHERTXPOWERLEVEL_H |
19 |
19 |
20 #include <e32base.h> |
20 #include <e32base.h> |
21 #include <bluetooth/eirpublisherbase.h> |
21 #include "eirmansession.h" |
|
22 |
|
23 class CEirManServer; |
22 |
24 |
23 #define KSizeOfTxPowerLevelData 1 |
25 #define KSizeOfTxPowerLevelData 1 |
24 |
26 |
25 //********************************** |
27 //********************************** |
26 // CEirPublisherTxPowerLevel |
28 // CEirPublisherTxPowerLevel |
27 //********************************** |
29 //********************************** |
28 /** |
30 /** |
29 Provides functionality to publish TxPowerLevel to EIR. |
31 Provides functionality to publish TxPowerLevel to EIR. |
30 **/ |
32 **/ |
31 NONSHARABLE_CLASS(CEirPublisherTxPowerLevel) : public CEirPublisherBase |
33 NONSHARABLE_CLASS(CEirPublisherTxPowerLevel) : public CBase, public MEirInternalSessionNotifier |
32 { |
34 { |
33 public: |
35 public: |
34 static CEirPublisherTxPowerLevel* NewL(); |
36 static CEirPublisherTxPowerLevel* NewL(CEirManServer& aServer); |
35 ~CEirPublisherTxPowerLevel(); |
37 ~CEirPublisherTxPowerLevel(); |
36 void UpdateTxPowerLevel(TInt8 aTxPowerLevel); |
38 void UpdateTxPowerLevel(TInt8 aTxPowerLevel); |
37 |
39 |
38 private: |
40 private: |
39 CEirPublisherTxPowerLevel(); |
41 CEirPublisherTxPowerLevel(); |
40 void ConstructL(); |
42 void ConstructL(CEirManServer& aServer); |
41 |
43 |
42 // From MEirPublisherNotifier |
44 // From MEirInternalSessionNotifier |
43 virtual void MepnSpaceAvailable(TUint aBytesAvailable); |
45 virtual void MeisnSpaceAvailable(TUint aBytesAvailable); |
44 virtual void MepnSetDataError(TInt aResult); |
46 virtual void MeisnRegisterComplete(TInt aResult); |
45 |
47 virtual void MeisnSetDataError(TInt aError); |
|
48 |
46 private: |
49 private: |
47 TInt8 iTxPowerLevel; |
50 TInt8 iTxPowerLevel; |
48 TBuf8<KSizeOfTxPowerLevelData> iPublishBuf; |
51 TBuf8<KSizeOfTxPowerLevelData> iPublishBuf; |
|
52 CEirManInternalSession* iSession; |
|
53 TBool iTxPowerLevelPublished; |
|
54 TBool iTagRegistered; |
49 }; |
55 }; |
50 |
56 |
51 #endif //EIRPUBLISHERTXPOWERLEVEL_H |
57 #endif //EIRPUBLISHERTXPOWERLEVEL_H |