[Common-dev] RE: [Filesystem-dev] RE: [Clientapps-dev] [client-dev] CR-resend: MMChotswap
Edgar Luevano eluevano at dextratech.comHello Ashish, thank you for your help, that is fixed now. Regards Edgar -----Original Message----- From: Ashish.As.Gupta at nokia.com [mailto:Ashish.As.Gupta at nokia.com] Sent: Wednesday, August 24, 2005 5:22 PM To: eluevano at dextratech.com; common-dev at helixcommunity.org Cc: filesystem-dev at helixcommunity.org Subject: RE: [Filesystem-dev] RE: [Clientapps-dev] [client-dev] CR-resend: MMChotswap Edgar, Inside HXFileSource::Setup, InitPlugin((IUnknown*) (IHXStreamSource*)this)) is called, so CHXMiniFileSystem::InitPlugin's pContext is actually HXFileSource. That means HXFileSource::QI is called and failing. We might want to check there and see why it is failing. If QI reaches to HXClientEngine::QI then it should succeed. Regards Ashish -----Original Message----- From: filesystem-dev-bounces at helixcommunity.org [mailto:filesystem-dev-bounces at helixcommunity.org]On Behalf Of ext Edgar Luevano Sent: 21 August, 2005 16:34 To: Gupta Ashish.As (Nokia-TP-MSW/Irving); common Cc: filesystem-dev at helixcommunity.org Subject: [Filesystem-dev] RE: [Clientapps-dev] [client-dev] CR-resend: MMChotswap Thank you Ashish, There is no a m_pContext in minifileobj.cpp, but there is one context in minifilesys.cpp, that I could pass to minifileobj, but before pass it I try to QI for IHXErrorMessage to see if it does well the QI but also it does not get it. Some Sugesstion? What I did in minifilesys.cpp is: STDMETHODIMP CHXMiniFileSystem::InitPlugin(IUnknown* pContext) { DPRINTF(D_MINI_FS, ("InitPlugin()\n")); HX_RESULT res = HXR_OK; if (pContext->QueryInterface(IID_IHXCommonClassFactory, (void**)&m_pClassFactory) != HXR_OK) { res = HXR_NOINTERFACE; } RDebug::Print(_L("QI IHXErrorMessages")); IHXErrorMessages* pErrMsg = NULL; if (pContext->QueryInterface(IID_IHXErrorMessages, (void**)&pErrMsg) != HXR_OK) { RDebug::Print(_L("QI IHXErrorMessages Done")); if (!pErrMsg) { RDebug::Print(_L("ERROR QI")); } } return res; } -----Original Message----- From: Ashish.As.Gupta at nokia.com [mailto:Ashish.As.Gupta at nokia.com] Sent: Wednesday, August 24, 2005 1:06 PM To: eluevano at dextratech.com; ehyche at real.com; clientapps-dev at helixcommunity.org Subject: RE: [Clientapps-dev] [client-dev] CR-resend: MMC hotswap Please use m_pContext. Ashish -----Original Message----- From: clientapps-dev-bounces at helixcommunity.org [mailto:clientapps-dev-bounces at helixcommunity.org]On Behalf Of ext Edgar Luevano Sent: 21 August, 2005 12:39 To: ehyche at real.com; 'clientapps' Subject: RE: [Clientapps-dev] [client-dev] CR-resend: MMC hotswap Hello Eric, I was trying to QI the m_pClassFactory for IHXErrorMessages, but I did not get a instance of this interface. I did the following in minifileobj.cpp after the fread: if (ferror(m_pFile)) { IHXErrorMessages* pErrMsg = NULL; m_pClassFactory->QueryInterface( IID_IHXErrorMessages, (void**)&pErrMsg); m_pFileResponse->ReadDone(HXR_FAILED, NULL); RDebug::Print(_L("ERROR READ ---------------------------------------")); if (pErrMsg) { RDebug::Print(_L("---------------------------------------ERROR READ ")); } return HXR_FAIL; } Could you help me telling me how to make this QI. Thank you Edgar -----Original Message----- From: Eric Hyche [mailto:ehyche at real.com] Sent: Tuesday, August 23, 2005 11:14 AM To: 'Edgar Luevano'; 'clientapps' Subject: RE: [Clientapps-dev] [client-dev] CR-resend: MMC hotswap I don't know a lot about the Symbian-specific calls in this area, so I will leave that up to your judgement on the best call to use to determine when the MMC has been removed. But whatever you use, it should be checked AFTER you have received an error from ferror(). Then, if you detect that the MMC card has been removed, then fire the error into IHXErrorMessages::Report() and return ReadDone(HXR_FAIL, NULL). Eric > -----Original Message----- > From: clientapps-dev-bounces at helixcommunity.org > [mailto:clientapps-dev-bounces at helixcommunity.org] On Behalf > Of Edgar Luevano > Sent: Tuesday, August 23, 2005 12:09 PM > To: Edgar Luevano; clientapps > Subject: RE: [Clientapps-dev] [client-dev] CR-resend: MMC hotswap > > The methods I mentioned in the previous email, I think are > not the better to > use, > Probably I could use the RF's methods there is one function > that retrieves > the drive information. > What doo you think? > Thank you > Edgar > > -----Original Message----- > From: clientapps-dev-bounces at helixcommunity.org > [mailto:clientapps-dev-bounces at helixcommunity.org]On Behalf Of Edgar > Luevano > Sent: Tuesday, August 23, 2005 9:25 AM > To: clientapps > Subject: [Clientapps-dev] [client-dev] CR-resend: MMC hotswap > > > Hello Eric, > > I found some functions that probably could tell us indirectly > if the MMC is > present or not, > but if tehy work as I think I also would have to check when > start playing, > if it is doing from > MMC card, and then if some error occurrs and it started to > play from MMC and > is not available now > then we could conclude thta something happen with the MMC (but not > neccesarly that was extracted, it > could be it fails). > > The only funcitons related to MMC I found from Symbian are: > > IMPORT_C TUint CPinbLinkBase::MMCVolumeId ( ) const > Returns MMC volume ID. > > > IMPORT_C TBool SysUtil::MMCSpaceBelowCriticalLevelL ( RFs * aFs, > TInt aBytesToWrite = 0 > ) [static] > Checks if the free MMC (Multi Media Card) space is or > will fall below > Critical Level (CL). The CL and MMC drive letter is defined > by this module. > Returns: > Returns ETrue if storage space would go below CL after adding > aBytesToWrite > more data, EFalse otherwise. Leaves on error: > KErrNotSupported if system has > no MMC drive support, otherwise another system-wide error code, e.g. > KErrNotReady if drive contais no media. > > IMPORT_C TBool CPinbLinkBase::IsMMCDrive ( ) const > Returns whether a shortcut file exist on MMC or not. > Returns: > Return ETrue if a shortcut file exist on MMC, otherwise return EFalse. > > IMPORT_C TBool CPinbLinkBase::IsVolumeAvailable ( ) const > Checks the availability of the linked volume > Returns: > Return ETrue if volume is available > > > What do you think about use some of this function? > > Thank you > Edgar > > > > -----Original Message----- > From: Eric Hyche [mailto:ehyche at real.com] > Sent: Tuesday, August 23, 2005 7:50 AM > To: 'Edgar Luevano'; client-dev at lists.helixcommunity.org > Subject: RE: [client-dev] CR-resend: MMC hotswap > > > > I knew that ferror would not be able to tell you > that the MMC card had been removed - what I meant > is whether or not there were any Symbian-specific > APIs that you could query after you *got* the ferror > to tell you that the MMC card was removed. > > Eric > > > -----Original Message----- > > From: Edgar Luevano [mailto:eluevano at dextratech.com] > > Sent: Monday, August 22, 2005 7:56 PM > > To: ehyche at real.com; client-dev at lists.helixcommunity.org > > Subject: RE: [client-dev] CR-resend: MMC hotswap > > > > I looked to ferror, but it seems that it does not give a > > specic error code. > > > > What do you think if this error message has a more general > > description like > > "Error reading file", so this embrace different error causes.? > > > > Thank you > > Edgar > > > > -----Original Message----- > > From: Eric Hyche [mailto:ehyche at real.com] > > Sent: Wednesday, August 10, 2005 11:34 AM > > To: 'Edgar Luevano'; client-dev at lists.helixcommunity.org > > Subject: RE: [client-dev] CR-resend: MMC hotswap > > > > > > > > Edgar, > > > > Is there any way to detect *specifically* that > > the MMC card has been taken out, as opposed to > > some other type of error that might occur with > > fread()? If so, then we might do the following: > > > > Once you get an fread() failure and you determine > > that the reason is the MMC card being taken out, > > then you might try the following: > > > > 1) Go ahead and return ReadDone(HXR_FAIL, NULL) > > > > 2) Next, QI the m_pClassFactory you have for > > IHXErrorMessages. This QI should fall all the > > way up to the HXPlayer. If that's the case, > > then you should be able to call > > > > IHXErrorMessages::Report(HXLOG_EMERG, > > HXR_FAIL, > > 0, // some user code > > "MMC Card has been removed, > > stopping playback", > > "Some more info URL") > > > > and that should display an error message and stop the player. > > > > This should probably be symbian-specific for now, > > and we can generalize out the behavior later. > > _______________________________________________ Clientapps-dev mailing list Clientapps-dev at helixcommunity.org http://lists.helixcommunity.org/mailman/listinfo/clientapps-dev _______________________________________________ Filesystem-dev mailing list Filesystem-dev at helixcommunity.org http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev