--- a/kernel/eka/drivers/pbus/mmc/sdcard/sdcard3c/sdcard.cpp Fri Aug 06 16:34:38 2010 +0100
+++ b/kernel/eka/drivers/pbus/mmc/sdcard/sdcard3c/sdcard.cpp Thu Aug 12 11:55:14 2010 +0100
@@ -424,6 +424,10 @@
EXPORT_C TInt DSDStack::Init()
{
OstTraceFunctionEntry1( DSDSTACK_INIT_ENTRY, this );
+
+ if((iAddressCard = new DAddressCard(*this)) == NULL)
+ return KErrNoMemory;
+
TInt ret = DMMCStack::Init();
OstTraceFunctionExitExt( DSDSTACK_INIT_EXIT, this, ret );
return ret;
@@ -1136,7 +1140,7 @@
{
AddressCard(KBroadcastToAllCards);
__KTRACE_OPT(KPBUS1, Kern::Printf("<DSDStack::InitStackAfterUnlockSM()"));
- }
+ }
SMF_END
@@ -1654,6 +1658,31 @@
}
+DAddressCard::DAddressCard(DSDStack& aStack) :iStack(aStack)
+ {
+ }
+
+void DAddressCard::AddressCard(TInt aCardNumber)
+ {
+ iStack.AddressCard(aCardNumber);
+ }
+
+/**
+Gets an interface from a derived class
+
+N.B the derived class should call this function if it does not support the specified interface
+*/
+EXPORT_C void DSDStack::GetInterface(TInterfaceId aInterfaceId, MInterface*& aInterfacePtr)
+ {
+ if (aInterfaceId == KInterfaceAddressCard)
+ {
+ aInterfacePtr = (DMMCStack::MInterface*) iAddressCard;
+ }
+ else
+ {
+ DMMCStack::GetInterface(aInterfaceId, aInterfacePtr);
+ }
+ }
+
EXPORT_C void DSDStack::Dummy1() {}
EXPORT_C void DSDStack::Dummy2() {}
-EXPORT_C void DSDStack::Dummy3() {}