|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef EIRPUBLISHERMANUFACTURERSPECIFICDATA_H |
|
23 #define EIRPUBLISHERMANUFACTURERSPECIFICDATA_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <bluetooth/eirpublisherbase.h> |
|
27 |
|
28 _LIT(KManufacturerSpecificDataPanic, "ManufacturerSpecificDataPublisher"); |
|
29 |
|
30 enum TManufacturerSpecificDataPanics |
|
31 { |
|
32 EManufacturerSpecificDataOutOfBoundary, |
|
33 }; |
|
34 |
|
35 |
|
36 //********************************** |
|
37 // MManufacturerSpecificDataPublisherNotifier |
|
38 //********************************** |
|
39 /** |
|
40 Interface for callback notification when publishing manufacturer specific data |
|
41 **/ |
|
42 class MManufacturerSpecificDataPublisherNotifier |
|
43 { |
|
44 public: |
|
45 virtual void MmsdpnNotifyAvailableDataSize(TUint aAvailableDataSize) = 0; |
|
46 virtual void MmsdpnNotifyError(TInt aResult) = 0; |
|
47 }; |
|
48 |
|
49 //********************************** |
|
50 // CEirPublisherManufacturerSpecificData |
|
51 //********************************** |
|
52 /** |
|
53 Provides functionality to publish Manufacturer Specific Data to EIR. |
|
54 **/ |
|
55 NONSHARABLE_CLASS(CEirPublisherManufacturerSpecificData) : public CEirPublisherBase |
|
56 { |
|
57 public: |
|
58 IMPORT_C static CEirPublisherManufacturerSpecificData* NewL(MManufacturerSpecificDataPublisherNotifier& aNotifier); |
|
59 IMPORT_C void RequestPublishDataSize(TUint aSize); |
|
60 IMPORT_C void SetManufacturerSpecificData(TDesC8& aManufacturerSpecificData); |
|
61 |
|
62 private: |
|
63 CEirPublisherManufacturerSpecificData(MManufacturerSpecificDataPublisherNotifier& aNotifier); |
|
64 |
|
65 // From MEirPublisherNotifier |
|
66 virtual void MepnSpaceAvailable(TUint aBytesAvailable); |
|
67 virtual void MepnSetDataError(TInt aResult); |
|
68 private: |
|
69 TUint iRequestedDataSize; |
|
70 TUint iBytesAvailable; |
|
71 MManufacturerSpecificDataPublisherNotifier& iNotifier; |
|
72 }; |
|
73 |
|
74 #endif // EIRPUBLISHERMANUFACTURERSPECIFICDATA_H |