0
|
1 |
/*
|
|
2 |
* Copyright (c) 2003 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 |
#ifndef __CALLBACK_INL__
|
|
20 |
#define __CALLBACK_INL__
|
|
21 |
|
|
22 |
/**
|
|
23 |
@publishedPartner
|
|
24 |
@released
|
|
25 |
|
|
26 |
Constructs an SDIO function callback object to notify clients of state changes.
|
|
27 |
*/
|
|
28 |
inline TSDIOFunctionCallback::TSDIOFunctionCallback()
|
|
29 |
: iCallbackFn(NULL),
|
|
30 |
iPtr(NULL),
|
|
31 |
iBusState(EPBusCardAbsent)
|
|
32 |
{}
|
|
33 |
|
|
34 |
/**
|
|
35 |
@publishedPartner
|
|
36 |
@released
|
|
37 |
|
|
38 |
Destructs an SDIO function callback object.
|
|
39 |
*/
|
|
40 |
inline TSDIOFunctionCallback::~TSDIOFunctionCallback()
|
|
41 |
{
|
|
42 |
iCallBack.Remove();
|
|
43 |
}
|
|
44 |
|
|
45 |
/**
|
|
46 |
@publishedPartner
|
|
47 |
@released
|
|
48 |
|
|
49 |
Constructs a SDIO function callback object to notify clients of state changes.
|
|
50 |
|
|
51 |
@param aCallbackFn The function to call when a state changes
|
|
52 |
*/
|
|
53 |
inline TSDIOFunctionCallback::TSDIOFunctionCallback(TSDIOCallbackFunction aCallbackFn)
|
|
54 |
: iCallbackFn(aCallbackFn),
|
|
55 |
iPtr(NULL),
|
|
56 |
iBusState(EPBusCardAbsent)
|
|
57 |
{}
|
|
58 |
|
|
59 |
/**
|
|
60 |
@publishedPartner
|
|
61 |
@released
|
|
62 |
|
|
63 |
Constructs a SDIO function callback object to notify clients of state changes.
|
|
64 |
|
|
65 |
@param aCallbackFn The function to call when a state changes
|
|
66 |
@param aPtr A pointer to data to pass through to the static function
|
|
67 |
*/
|
|
68 |
inline TSDIOFunctionCallback::TSDIOFunctionCallback(TSDIOCallbackFunction aCallbackFn, TAny *aPtr)
|
|
69 |
: iCallbackFn(aCallbackFn),
|
|
70 |
iPtr(aPtr),
|
|
71 |
iBusState(EPBusCardAbsent)
|
|
72 |
{}
|
|
73 |
|
|
74 |
inline TInt TSDIOFunctionCallback::CallBack(TSDIOFunctionCallbackReason aReason) const
|
|
75 |
/**
|
|
76 |
*/
|
|
77 |
{ return(iCallbackFn ? (*iCallbackFn)(iPtr, aReason) : KErrNotSupported); }
|
|
78 |
|
|
79 |
|
|
80 |
#endif // #ifndef __CALLBACK_INL__
|
|
81 |
|