//Synchronous RPlugin::DoControl TInt CUnremovablePlugin::FsPluginDoControlL(CFsPluginConnRequest& aRequest) { TInt err = KErrNone; //We can use this to set the drive //We can store this as a member of this class. TInt function = aRequest.Function(); TPckg<TInt> removableDes(iRemovable); switch(function) { //case KPluginGetError: // { // TPckg<TInt> errCodeDes(iLastError); // TPckg<TInt> errMsgDes(iMessage); // TRAP(err,aRequest.WriteParam1L(errCodeDes)); // TRAP(err,aRequest.WriteParam2L(errMsgDes)); // break; // } case KPluginSetRemovable: { TRAP(err,aRequest.ReadParam1L(removableDes)); break; } default: break; } return err; }
//Synchronous RPlugin::DoControl TInt CPreModifierPlugin::FsPluginDoControlL(CFsPluginConnRequest& aRequest) { TInt err = KErrNone; //We can use this to set the drive //We can store this as a member of this class. TPckg<TInt> errCodeDes(iLastError); TPckg<TInt> errMsgDes(iLineNumber); TInt function = aRequest.Function(); switch(function) { case KPluginSetDrive: { TPckg<TChar> drive(iDriveToTest); TRAP(err,aRequest.ReadParam1L(drive)); break; } case KPluginGetError: { TRAP(err,aRequest.WriteParam1L(errCodeDes)); TRAP(err,aRequest.WriteParam2L(errMsgDes)); break; } default: break; } return err; }
//Synchronous RPlugin::DoControl TInt CStacked3Plugin::FsPluginDoControlL(CFsPluginConnRequest& aRequest) { TInt err = KErrNone; TPckg<TInt> errCodeDes(iLastError); TPckg<TInt> lineNumberDes(iLineNumber); TInt function = aRequest.Function(); switch(function) { case KPluginSetDrive: { TPckg<TChar> drive(iDriveToTest); TRAP(err,aRequest.ReadParam1L(drive)); break; } case KPluginGetError: { TRAP(err,aRequest.WriteParam1L(errCodeDes)); TRAP(err,aRequest.WriteParam2L(lineNumberDes)); break; } default: break; } return err; }
/** Cancels all the requests of plugin connection @param aCompletionCode: the code the request are completed */ EXPORT_C void TPluginConnRequestQue::DoCancelAll(TInt aCompletionCode) { TDblQueIter<CFsPluginConnRequest> q(iHeader); CFsPluginConnRequest* info; while((info=q++)!=NULL) { info->Complete(aCompletionCode); } __ASSERT_DEBUG(iHeader.IsEmpty(),Fault(EBaseQueCancel)); }
//Synchronous RPlugin::DoControl TInt CExclusiveAccessPlugin::FsPluginDoControlL(CFsPluginConnRequest& aRequest) { TInt err = KErrNone; //We can use this to set the drive //We can store this as a member of this class. TInt function = aRequest.Function(); TPckg<TInt> errCodeDes(iLastError); TPckg<TInt> lineNumberDes(iLineNumber); switch(function) { case KPluginGetError: { TRAP(err,aRequest.WriteParam1L(errCodeDes)); TRAP(err,aRequest.WriteParam2L(lineNumberDes)); break; } default: break; } return err; }