# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273845563 -10800 # Node ID 5e5528a288fef792168b095adbfa021ee6a318a2 # Parent 4b81101308c63a6a474512952c8e6466e501cf4d Revision: 201019 Kit: 201019 diff -r 4b81101308c6 -r 5e5528a288fe atext/client/src/atextcommon.cpp --- a/atext/client/src/atextcommon.cpp Mon May 03 13:34:38 2010 +0300 +++ b/atext/client/src/atextcommon.cpp Fri May 14 16:59:23 2010 +0300 @@ -55,7 +55,7 @@ Close(); } TRACE_FUNC_EXIT - return KErrNone; + return retVal; } // --------------------------------------------------------------------------- diff -r 4b81101308c6 -r 5e5528a288fe atext/server/inc/atextmetadata.h --- a/atext/server/inc/atextmetadata.h Mon May 03 13:34:38 2010 +0300 +++ b/atext/server/inc/atextmetadata.h Fri May 14 16:59:23 2010 +0300 @@ -302,6 +302,13 @@ */ CATExtPluginBase* iOldHandler; + /** + * Pointer to editor handler; set when editor mode started, + * NULL when editor mode not active. + * Not own. + */ + TATExtPluginEntry* iEditorHandler; + }; /** @@ -521,6 +528,22 @@ TBool aMultiPart ); /** + * Writes multipart or single part reply buffer to client for handle. + * Used for creating a reply for HandleCommand(). + * + * @since S60 5.0 + * @param aMultiPart ETrue (default behavior) if multipart reply wanted, + * EFalse otherwise. + * For multipart replies the reply may be over + * KDefaultCmdBufLength. + * @param aStartOfEditor ETrue if start of editor mode, + * EFalse otherwise + * @return Symbian error code on error, KErrNone otherwise + */ + TInt WriteHandleCmdReplyBuffer( TBool aMultiPart, + TBool aStartOfEditor ); + + /** * Clears internal initialized command handler data. This is currently used * only by CompleteCommandMessage() and is called when the data is not * needed anymore. It also prepares the internal data for a new diff -r 4b81101308c6 -r 5e5528a288fe atext/server/src/atextmetadata.cpp --- a/atext/server/src/atextmetadata.cpp Mon May 03 13:34:38 2010 +0300 +++ b/atext/server/src/atextmetadata.cpp Fri May 14 16:59:23 2010 +0300 @@ -211,6 +211,22 @@ TRACE_FUNC_EXIT return retTemp; } + // First check if in editor mode + if ( iCmdData.iEditorHandler ) + { + iCmdData.iReplyExpected = EFalse; + iCmdData.iHandler = iCmdData.iEditorHandler; + iCmdData.iHandler->iInstance->HandleCommand( iCmdData.iCmdBuffer, + iCmdData.iCmdReplyBuffer, + EFalse ); + aComplInfo.iProcessed = ETrue; + aComplInfo.iReplyExpected = ETrue; + // Note: The aComplInfo.iReplyExpected is used only for normal mode and + // is set to ETrue here to skip a check in CATExtSession::IpcHandleCommand(). + TRACE_FUNC_EXIT + return KErrNone; + } + // Not in editor so handle in normal mode TRACE_INFO(( _L8("Received command '%S'"), &iCmdData.iCmdBuffer )); // Now the command exists. Load the plugins for a command and check support. TRAPD( retTrap, CreateAndFindSupportL(iCmdData.iCmdBuffer, @@ -327,20 +343,42 @@ TRACE_FUNC_EXIT return KErrInUse; } + if ( !iCmdData.iCmdMessage.Handle() ) + { + TRACE_FUNC_EXIT + return KErrBadHandle; + } + TBool startOfEditor = EFalse; + if ( aReplyType == EReplyTypeEditor) + { + // If completion is for editor command then set iCmdData.iEditorHandler + // for the first time only + if ( !iCmdData.iEditorHandler ) + { + iCmdData.iEditorHandler = FindInstanceFromPlugindata( aPlugin ); + iCmdData.iReplyExpected = ETrue; // reply expected when first reply in editor mode + startOfEditor = ETrue; + } + } + else + { + // If completion was something else than EReplyTypeEditor then just end + // editor mode (no need to check iEditorHandler) + if ( iCmdData.iEditorHandler ) + { + iCmdData.iReplyExpected = ETrue; // reply expected when last reply in editor mode + } + iCmdData.iEditorHandler = NULL; + } // Next check if aPlugin is set (the call comes from a plugin and not from // ATEXT) and a reply is not needed. In this case do nothing as it is wrong // behavior from the plugin (a plugin must not complete messages where no // reply is expected; this is done by ATEXT) - if ( aPlugin && !iCmdData.iReplyExpected ) + if ( aPlugin && !iCmdData.iReplyExpected && !iCmdData.iEditorHandler ) { TRACE_FUNC_EXIT return KErrAlreadyExists; } - if ( !iCmdData.iCmdMessage.Handle() ) - { - TRACE_FUNC_EXIT - return KErrBadHandle; - } // Finally write the data and complete the message TPckg replyType( aReplyType ); TInt writeError = iCmdData.iCmdMessage.Write( EATExtHandleCmdParamReplyType, @@ -356,20 +394,7 @@ { CreateEmptyOrErrorBuffer( iCmdData.iCmdReplyBuffer, aErrorReply ); } - if ( aMultiPart ) - { - WriteReplyBufferToClient( iCmdData.iCmdReplyBuffer, - EATExtHandleCmdParamReply, - iCmdData.iCmdMessage, - ETrue, - EATExtHandleCmdParamLength ); - } - else - { - WriteReplyBufferToClient( iCmdData.iCmdReplyBuffer, - EATExtHandleCmdParamReply, - iCmdData.iCmdMessage ); - } + WriteHandleCmdReplyBuffer( aMultiPart, startOfEditor ); } iCmdData.iCmdStarted = EFalse; iCmdData.iReplyExpected = EFalse; @@ -380,6 +405,38 @@ } // --------------------------------------------------------------------------- +// Writes multipart or single part reply buffer to client for handle. +// Used for creating a reply for HandleCommand(). +// --------------------------------------------------------------------------- +// +TInt CATExtMetadata::WriteHandleCmdReplyBuffer( TBool aMultiPart, + TBool aStartOfEditor ) + { + TRACE_FUNC_ENTRY + if ( iCmdData.iEditorHandler && !aStartOfEditor ) + { + TRACE_FUNC_EXIT + return KErrNotReady; + } + if ( aMultiPart ) + { + WriteReplyBufferToClient( iCmdData.iCmdReplyBuffer, + EATExtHandleCmdParamReply, + iCmdData.iCmdMessage, + ETrue, + EATExtHandleCmdParamLength ); + } + else + { + WriteReplyBufferToClient( iCmdData.iCmdReplyBuffer, + EATExtHandleCmdParamReply, + iCmdData.iCmdMessage ); + } + TRACE_FUNC_EXIT + return KErrNone; + } + +// --------------------------------------------------------------------------- // Clears internal initialized command handler data. This is currently used // only by CompleteCommandMessage() and is called when the data is not needed // anymore. It also prepares the internal data for a new HandleCommand() call. @@ -964,6 +1021,7 @@ iCmdData.iReplyExpected = EFalse; iCmdData.iHandler = NULL; iCmdData.iOldHandler = NULL; + iCmdData.iEditorHandler = NULL; iCarriageReturn = KDefaultCarriageReturn; iLineFeed = KDefaultLineFeed; iQuietMode = EFalse; @@ -1185,7 +1243,7 @@ TRACE_FUNC_ENTRY if ( iCmdData.iCmdStarted || (iCmdData.iCmdMessage.Handle() && iCmdData.iCmdBuffer.Length()>0) || - iCmdData.iCmdReplyBuffer.Length()>0 ) + iCmdData.iCmdReplyBuffer.Length()>0 ) { TRACE_FUNC_EXIT return ETrue; @@ -1227,6 +1285,7 @@ iPluginData = NULL; iCmdData.iHandler = NULL; iCmdData.iOldHandler = NULL; + iCmdData.iEditorHandler = NULL; TRACE_FUNC_EXIT return KErrNone; } @@ -1248,6 +1307,7 @@ if ( iCmdData.iHandler && iCmdData.iHandler->iInstance ) { iCmdData.iHandler->iInstance->HandleCommandCancel(); + iCmdData.iEditorHandler = NULL; } CompleteCommandMessage( NULL, aError, @@ -2336,6 +2396,7 @@ iCmdData.iCmdStarted = ETrue; iCmdData.iCmdMessage = aEntrySupport.iMessage; iCmdData.iHandler = aEntrySupport.iEntry; + iCmdData.iEditorHandler = NULL; } // No "else" here as HandleCommandL() is used also with observer plugins if ( !aAtCmdFull ) @@ -2372,6 +2433,12 @@ TRACE_FUNC_EXIT User::Leave( KErrGeneral ); } + if ( !aEntrySupport.iSupportFound ) + { + // No initial support found -> do nothing + TRACE_FUNC_EXIT + return; + } TInt i; TInt count = aEntrySupport.iSupport->Count(); for ( i=aEntrySupport.iStartIndex; i "" Then - If ReportOptions.SupportSubheadingTags Then - Astr = Trim(Documentation) - Print "Astr: ", Astr - x% = InStr(1,Astr,"",1) - y% = InStr(1,Astr,"",1) - While x% <> 0 And y% <> 0 - Cstr = Left(Astr,x%-1) - Print "Cstr : ", Cstr - WordApp.FormatStyle "Normal" - WordApp.Insert Trim(Cstr) - Para WordApp - - Bstr = Mid(Astr,x%+3,y%-(x%+3)) - Print "Bstr : ", Bstr - WordInsertHeading HeadingLevel,Trim(Bstr),WordApp - - Astr = Right(Astr,Len(Astr)-(y%+3)) - Print "Astr : ",Astr - x% = InStr(1,Astr,"",1) - y% = InStr(1,Astr,"",1) - Wend - WordApp.FormatStyle "Normal" - WordApp.Insert Trim(Astr) - Para WordApp - Else - WordApp.FormatStyle "Normal" - WordApp.Insert Trim(Documentation) - Para WordApp - End If - Else - ' Oh no - we seem to have missed out a piece of documentation. - ' Another proofreading setting will highlight this lacuna for - ' you in lucky red text. - If ReportOptions.HighlightDocGaps Then - WordApp.FormatStyle "Body Text" - WordApp.Insert MissingTextStr - Para WordApp - End If - End If - ' - ' To assist in the proofreading phases, it seemed useful - ' to have a mode in which large chunks of whitespace were - ' inserted into the document at every point where the hard working - ' editor might wish to scribble notes and comments during the development - ' of the text. Run the script with this set and print out the resultant document - ' and you have a doc that facilitates the inveterate scribbler. - ' I'm a great believer in appropriate technology. - ' - If ReportOptions.WhiteBlock Then - WhiteBlock WordApp - End If - -End Sub -' -' Of course we want each of our diagrams to be numbered and titled. -' It's the done thing, and it's the thing that gets done here. -' -Sub WordInsertFigureName(aFigureName As String, WordApp As Object) - WordApp.FormatStyle "Centered" - WordApp.Insert "Figure " + CStr(RWU_DiagramCount-1) & ": " & aFigureName - Para WordApp - WordApp.FormatStyle "Normal" -End Sub -' -' Unfortunately, we have to operate slightly differently for scenarios, because of -' the verifications we may wish to run. -' -Sub WordInsertScenarioFigureName(aFigureName As String, WordApp As Object, XCEntry As DiagEntry) - Dim tstr$ - tstr = "Figure " + CStr(RWU_DiagramCount-1) & ": " & aFigureName - WordApp.FormatStyle "Centered" - 'WordApp.Insert "Figure " + CStr(RWU_DiagramCount-1) & ": " & aFigureName - WordApp.Insert tstr - Para WordApp - WordApp.FormatStyle "Normal" - ' Need to keep track of titles applied to scenario diagrams. - XCEntry.FigureTitle = tstr - Let GlobalDiagList(DiagListCount) = XCEntry - DiagListCount = DiagListCount + 1 -End Sub - - -'--------------------------------------------------------------------------- -' -' Some handy utility muffins. -' - -Public Function GetResourceString(resourceID As Long) As String - - If (resIFace Is Nothing) then - Set resIFace = CreateObject("rvsreportgenres.rvsrepgeninterface") - End If - - GetResourceString = resIFace.GetString(resourceID) -End Function - - -Function GetLicensedRoseApplication() As Application - Set GetLicensedRoseApplication = RoseApp.GetLicensedApplication("{A567222E-CBBE-11D0-BC0B-00A024C67143}") -End Function - -Function ReportDialogLoop(controlname$, action%, suppvalue%) As Integer - If controlname$ = "Browse" Then - FileName$ = SaveFilename$ ("Create a Word document", "Word Documents:*.DOC") - If FileName$ <> "" Then - DlgText "FileName", FileName$ - End If - ReportDialogLoop = 1 - End If -End Function - -Function EnclosingDirPath(FileName As String) - ' Extracts the enclosing directory path from a file name - Dim Pos1, Pos2, Pos3 - On Error GoTo EnclosingDirPath_exception - - Pos3 = 255 - Pos2 = 1 - Pos1 = 1 - Do - Pos3 = InStr(Pos2 + 1, FileName, "\") - If Pos3 <> 0 Then - Pos1 = Pos2 - Pos2 = Pos3 - Else - Exit Do - End If - Loop - - EnclosingDirPath = Left(FileName, Pos2 - 1) - Exit Function - -EnclosingDirPath_exception: - Resume EnclosingDirPath_end -EnclosingDirPath_end: - 'Exit with the full path - EnclosingDirPath = FileName -End Function - -Function GetAllOfClasses(aCategory As Category) As ClassCollection - - Dim theCatClassCollection As New ClassCollection - Dim theCatClass As Class, theCatInnerClass As Class - Dim I As Integer, J As Integer - - For I = 1 To aCategory.Classes.Count - Set theCatClass = aCategory.Classes.GetAt(I) - theCatClassCollection.Add theCatClass - For J = 1 To theCatClass.GetAllNestedClasses.Count - Set theCatInnerClass = theCatClass.GetAllNestedClasses.GetAt(J) - theCatClassCollection.Add theCatInnerClass - Next J - Next I - - Set GetAllOfClasses = theCatClassCollection -End Function - -Function MakeFileName (Path As String, FileName As String) As String - ' Check to see if the last character is a separator - If Instr ("\/", Right$(Path, 1)) Then - MakeFileName$ = Path & FileName - Else - MakeFileName$ = Path & "\" & FileName - End If -End Function - -Function ChangeFileExtension (FullFileName As String, NewExtension As String) As String - FilePath$ = FileParse$ (FullFileName, 2) - FileRoot$ = FileParse$ (FullFileName, 4) - ChangeFileExtension$ = MakeFileName$ (FilePath$, FileRoot$ & "." & NewExtension$) -End Function - -'------------------------------------------------------------------------------ -' -' Rose collections are unsorted. This is not considered sightly. -' - -Sub sortalpha( aCategory As Category, myAlpha() As String) - Dim theCatClassCollection As ClassCollection - Set theCatClassCollection = GetAllOfClasses(aCategory) - - For ike = 1 To theCatClassCollection.count - myAlpha(ike) = theCatClassCollection.GetAt(ike).Name - Next ike - arraysort myAlpha - - Set theCatClassCollection = Nothing -End Sub - -Sub sortalphaclassdiagrams( aCategory As Category, myAlpha() As String) - Dim classDiagrams As ClassDiagramCollection - Set classDiagrams = aCategory.ClassDiagrams - - For ike = 1 To classDiagrams.count - myAlpha(ike) = classDiagrams.GetAt(ike).Name - Next ike - arraysort myAlpha - - Set classDiagrams = Nothing -End Sub - -Sub sortalphascenariodiagrams( aCategory As Category, myAlpha() As String) - Dim scenarioDiagrams As ScenarioDiagramCollection - Set scenarioDiagrams = aCategory.ScenarioDiagrams - - For ike = 1 To ScenarioDiagrams.count - myAlpha(ike) = ScenarioDiagrams.GetAt(ike).Name - Next ike - arraysort myAlpha - - Set ScenarioDiagrams = Nothing -End Sub - - -'------------------------------------------------------------------------------ -' -' These higher level procedures pretty much do what their names say they do. -' -Sub SearchForClassDiagramsInPackage(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - - Dim classDiagrams As ClassDiagramCollection - Dim aClassDiagram As ClassDiagram - Dim Alpha() As String - - Set classDiagrams = aCategory.ClassDiagrams - ReDim Alpha(classDiagrams.Count) - SortAlphaClassDiagrams aCategory, alpha - - If classDiagrams.Count Then - 'Dim theClass As Class - 'Dim NestedClasses As ClassCollection - - For CLSID = 1 To classDiagrams.Count - Ike = classDiagrams.FindFirst(Alpha(CLSID)) - Set aClassDiagram = classDiagrams.GetAt(Ike) - If Not (aClassDiagram.IsUseCaseDiagram) Then - WordInsertHeading HeadingNumber, aClassDiagram.Name, WordApp - WordInsertClassDiagram aClassDiagram, WordApp - WordInsertFigureName aClassDiagram.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aClassDiagram.Documentation, WordApp - End If - Next CLSID - End If - - - 'For clsID = 1 To classDiagrams.Count - ' Set aClassDiagram=classDiagrams.GetAt(clsID) - ' If Not (aClassDiagram.IsUseCaseDiagram) Then - ' WordInsertHeading HeadingNumber, aClassDiagram.Name, WordApp - ' WordInsertClassDiagram aClassDiagram, WordApp - ' WordInsertFigureName aClassDiagram.Name, WordApp - ' WordInsertDocumentation HeadingNumber+1, aClassDiagram.Documentation, WordApp - ' End If - 'Next clsID -End Sub - -Sub SearchForSeqAndCollabDiagramsInPackage(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - - Dim ScenarioDiagrams As ScenarioDiagramCollection - Dim aScenarioDiagram As ScenarioDiagram - Dim Alpha() As String - - Set ScenarioDiagrams = aCategory.ScenarioDiagrams - ReDim Alpha(ScenarioDiagrams.Count) - SortAlphaScenarioDiagrams aCategory, alpha - - Dim XCEntry As DiagEntry - GlobalDiagListSize = GlobalDiagListSize + ScenarioDiagrams.Count - ReDim Preserve GlobalDiagList(GlobalDiagListSize) - For ScenID = 1 To ScenarioDiagrams.Count - Ike = ScenarioDiagrams.FindFirst(Alpha(ScenID)) - Set aScenarioDiagram=ScenarioDiagrams.GetAt(Ike) - WordInsertHeading HeadingNumber, aScenarioDiagram.Name, WordApp - WordInsertScenarioDiagram aScenarioDiagram, WordApp - Set XCEntry.Diagram = aScenarioDiagram - WordInsertScenarioFigureName aScenarioDiagram.Name, WordApp, XCEntry - WordInsertDocumentation HeadingNumber+1, aScenarioDiagram.Documentation, WordApp - Next ScenID -End Sub - -Sub SearchForClassDiagramsInUseCase(WordApp As Object, aUseCase As UseCase, HeadingNumber As Integer) - - Dim classDiagrams As ClassDiagramCollection - Dim aClassDiagram As ClassDiagram - - Set classDiagrams = aUseCase.ClassDiagrams - - For clsID = 1 To classDiagrams.Count - Set aClassDiagram=classDiagrams.GetAt(clsID) - If Not (aClassDiagram.IsUseCaseDiagram) Then - WordInsertHeading HeadingNumber, aClassDiagram.Name, WordApp - WordInsertClassDiagram aClassDiagram, WordApp - WordInsertFigureName aClassDiagram.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aClassDiagram.Documentation, WordApp - Else - If (aClassDiagram.IsUseCaseDiagram) And (ReportOptions.UseCaseDiagrams) Then - WordInsertHeading HeadingNumber, aClassDiagram.Name, WordApp - WordInsertClassDiagram aClassDiagram, WordApp - WordInsertFigureName aClassDiagram.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aClassDiagram.Documentation, WordApp - End If - End If - Next clsID -End Sub - - -Sub SearchForSeqAndCollabDiagramsInUseCase(WordApp As Object, aUseCase As UseCase, HeadingNumber As Integer) - - Dim ScenarioDiagrams As ScenarioDiagramCollection - Dim aScenarioDiagram As ScenarioDiagram - - Set ScenarioDiagrams = aUseCase.ScenarioDiagrams - Dim XCEntry As DiagEntry - GlobalDiagListSize = GlobalDiagListSize + ScenarioDiagrams.Count - ReDim Preserve GlobalDiagList(GlobalDiagListSize) - For ScenID = 1 To ScenarioDiagrams.Count - Set aScenarioDiagram=ScenarioDiagrams.GetAt(ScenID) - WordInsertHeading HeadingNumber, aScenarioDiagram.Name, WordApp - WordInsertScenarioDiagram aScenarioDiagram, WordApp - Set XCEntry.Diagram = aScenarioDiagram - WordInsertScenarioFigureName aScenarioDiagram.Name, WordApp, XCEntry - WordInsertDocumentation HeadingNumber+1, aScenarioDiagram.Documentation, WordApp - Next ScenID -End Sub - - - -Sub SearchForStateDiagramsInPackage(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - Dim aStateMachineOwner As StateMachineOwner - Dim aStateMachineCollection As StateMachineCollection - Dim aStateMachine As StateMachine - Dim aStateDiagram As StateDiagram - Dim aStateDiagramCollection As StateDiagramCollection - Dim aStateCollection As StateCollection - Dim aState As State - - Set aStateMachineOwner = aCategory.StateMachineOwner - Set aStateMachineCollection = aStateMachineOwner.StateMachines - If aStateMachineCollection.Count Then - For SMID = 1 To aStateMachineCollection.Count - Set aStateMachine = aStateMachineCollection.GetAt(SMID) - Set aStateDiagramCollection = aStateMachine.Diagrams - WordInsertHeading HeadingNumber, aStateMachine.Name, WordApp - If aStateDiagramCollection.Count Then - For SDID = 1 To aStateDiagramCollection.Count - Set aStateDiagram = aStateDiagramCollection.GetAt(SDID) - WordInsertHeading HeadingNumber, aStateDiagram.Name, WordApp - WordInsertStateDiagram aStateDiagram, WordApp - WordInsertFigureName aStateDiagram.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aStateDiagram.Documentation, WordApp - Next SDID - End If - Set aStateCollection = aStateMachine.States - If aStateCollection.Count Then - For STID = 1 To aStateCollection.Count - Set aState = AstateCollection.GetAt(STID) - WordInsertHeading HeadingNumber+1, aState.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aState.Documentation, WordApp - Next STID - End If - Next SMID - End If -End Sub -' -' Cunningly, we find that Use Case diagrams are not a distinct type, -' but are a specialised state of ClassDiagram -' Ho ho, go figure. -' -Sub SearchForUseCaseDiagramsInPackage(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - Dim ClassDiagrams As ClassDiagramCollection - Dim aClassDiagram As ClassDiagram - - Set ClassDiagrams = aCategory.ClassDiagrams - For ClsID = 1 To ClassDiagrams.Count - Set aClassDiagram = ClassDiagrams.GetAt(ClsID) - If aClassDiagram.IsUseCaseDiagram Then - WordInsertHeading HeadingNumber, aClassDiagram.Name, WordApp - WordInsertClassDiagram aClassDiagram, WordApp - WordInsertFigureName aClassDiagram.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aClassDiagram.Documentation, WordApp - End If - Next ClsID -End Sub - - -'------------------------------------------------------------------------------ -' -' We live in a C++ world, so we need to be able to show our attributes -' in a way familiar to code monkeys. -' -Sub GenerateAttribute(WordApp As Object, anAttribute As Attribute, HeadingNumber As Integer) - Dim theAttribute As String - - If ReportOptions.CppSyntax Then - Select Case anAttribute.ExportControl - Case rsPublicAccess - theAttribute = "Public: " - Case rsProtectedAccess - theAttribute = "Protected: " - Case rsPrivateAccess - theAttribute = "Private: " - End Select - theAttribute = theAttribute & anAttribute.Type & " " - End If - - theAttribute = theAttribute & anAttribute.Name - If ReportOptions.CppSyntax Then - If Len(anAttribute.InitValue) > 0 Then - theAttribute = theAttribute & " = " & anAttribute.InitValue - End If - End If - - WordInsertHeading HeadingNumber, theAttribute, WordApp - WordInsertDocumentation HeadingNumber+1, anAttribute.Documentation, WordApp -End Sub -' -' We like our attributes grouped according to their access specification, of course -' -Sub GenerateClassAttributeAccessGroup(WordApp As Object, attColl As AttributeCollection, HeadingNumber As Integer) - If attColl.Count Then - For AttrID = 1 To attColl.Count - GenerateAttribute WordApp, attColl.GetAt(AttrID), HeadingNumber - Next AttrID - End If -End Sub -' -' So this procedure iterates across the lot and groups them accordingly. -' However, I'm pretty sure we would frown on any public class attributes, wouldn't we? -' And I always think that protected class attributes have to be well justified. -' Generally they are used to get round analysis errors, otherwise. -' -Sub GenerateClassAttributes(WordApp As Object, aClass As Class, HeadingNumber As Integer) - Dim PublicAttributes As New AttributeCollection - Dim ProtectedAttributes As New AttributeCollection - Dim PrivateAttributes As New AttributeCollection - Dim anAttribute As Attribute - - If aClass.Attributes.Count Then - For AttrID = 1 To aClass.Attributes.Count - Set anAttribute = aClass.Attributes.GetAt(AttrID) - Select Case anAttribute.ExportControl - Case rsPublicAccess - PublicAttributes.Add anAttribute - Case rsProtectedAccess - ProtectedAttributes.Add anAttribute - Case rsPrivateAccess - PrivateAttributes.Add anAttribute - End Select - Next AttrID - WordInsertHeading HeadingNumber, aClass.Name & " Attributes", WordApp - GenerateClassAttributeAccessGroup WordApp, PublicAttributes, HeadingNumber+1 - If Not ReportOptions.PublicOnly Then - GenerateClassAttributeAccessGroup WordApp, ProtectedAttributes, HeadingNumber+1 - GenerateClassAttributeAccessGroup WordApp, PrivateAttributes, HeadingNumber+1 - End If - End If -End Sub - -'------------------------------------------------------------------------------ -' -' So here we go, doing the same with operations as we did with attributes. -' -Function GenerateParameter (aParameter As Parameter) As String - Code$ = aParameter.Name + ":" + aParameter.Type - GenerateParameter = Code$ -End Function - -Sub GenerateOperation(WordApp As Object, anOperation As Operation, HeadingNumber As Integer) - Dim theOperation As String - - If ReportOptions.CppSyntax Then - Select Case anOperation.ExportControl - Case rsPublicAccess - theOperation = "Public: " - Case rsProtectedAccess - theOperation = "Protected: " - Case rsPrivateAccess - theOperation = "Private: " - End Select - End If - - theOperation = theOperation + anOperation.Name - - If ReportOptions.CppSyntax Then - Params$ = "" - If anOperation.Parameters.Count Then - For OperID = 1 To anOperation.Parameters.Count - 1 - Params$ = Params$ + GenerateParameter(anOperation.Parameters.GetAt(OperID)) - Params$ = Params$ + ", " - Next OperID - Params$ = Params$ + GenerateParameter(anOperation.Parameters.GetAt(anOperation.Parameters.Count)) - End If - theOperation = theOperation & "( " & Params$ & ")" - End If - WordInsertHeading HeadingNumber, theOperation, WordApp - WordInsertDocumentation HeadingNumber+1, anOperation.Documentation, WordApp - If ReportOptions.VerifyType = RepVerifyEmbed Then - GenerateMethodUsageEntry anOperation, WordApp - End If - -End Sub - -Sub GenerateClassOperationAccessGroup(WordApp As Object, attColl As OperationCollection, HeadingNumber As Integer) - If attColl.Count Then - For AttrID = 1 To attColl.Count - GenerateOperation WordApp, attColl.GetAt(AttrID), HeadingNumber - Next AttrID - End If -End Sub - - -Sub GenerateClassOperations(WordApp As Object, aClass As Class, HeadingNumber As Integer) - Dim PublicOperations As New OperationCollection - Dim ProtectedOperations As New OperationCollection - Dim PrivateOperations As New OperationCollection - Dim anOperation As Operation - - WordApp.FormatStyle "Normal" - If ReportOptions.VerifyType = RepVerifyEmbed Then - Para WordApp - WordApp.FormatFont Bold:=True - WordApp.Insert aClass.Name - WordApp.FormatFont Bold:=False - - If aClass.Operations.Count = 0 Then - WordApp.Insert " has no operations defined in this model." - 'Para WordApp - Else - WordApp.Insert " has " - WordApp.Insert CStr(aClass.Operations.Count) - WordApp.Insert " operations defined in this model:" - 'Para WordApp - End If - End If - If aClass.Operations.Count <> 0 Then - For OperID = 1 To aClass.Operations.Count - Set anOperation = aClass.Operations.GetAt(OperID) - Select Case anOperation.ExportControl - Case rsPublicAccess - PublicOperations.Add anOperation - Case rsProtectedAccess - ProtectedOperations.Add anOperation - Case rsPrivateAccess - PrivateOperations.Add anOperation - End Select - Next OperID - 'WordInsertHeading HeadingNumber, aClass.Name & " Operations", WordApp - GenerateClassOperationAccessGroup WordApp, PublicOperations, HeadingNumber - If Not ReportOptions.PublicOnly Then - GenerateClassOperationAccessGroup WordApp, ProtectedOperations, HeadingNumber - GenerateClassOperationAccessGroup WordApp, PrivateOperations, HeadingNumber - End If - End If -End Sub - -'------------------------------------------------------------------------------ - - -Sub GenerateTheClassBody(WordApp As Object, aClass As Class, HeadingNumber As Integer) - WordInsertDocumentation HeadingNumber+1, aClass.Documentation, WordApp - If aClass.Persistence Then - WordApp.Insert "Persistent Class" - Para WordApp - End If - - Dim SuperClasses As ClassCollection - Dim theSuperClass As Class - Set SuperClasses = aClass.GetSuperClasses - If SuperClasses.Count Then - ClassList$ = "" - For CLSID = 1 To SuperClasses.Count - Set theSuperClass = SuperClasses.GetAt(CLSID) - If ClassList$ <> "" Then - ClassList$ = ClassList$ & ", " - End If - ClassList$ = ClassList$ & theSuperClass.Name - Next CLSID - WordApp.Insert "Derived from " & ClassList$ - Para WordApp - End If - - GenerateClassAttributes WordApp, aClass, HeadingNumber+1 - GenerateClassOperations WordApp, aClass, HeadingNumber+1 -End Sub -' -' For each class in the category -' -Sub GenerateLogicalClass(WordApp As Object, aClass As Class, HeadingNumber As Integer) - On Error Resume Next - - WordInsertHeading HeadingNumber, aClass.Name, WordApp - GenerateTheClassBody WordApp, aClass, HeadingNumber -End Sub - -Sub PrintClassesForCategory (WordApp As Object, aCategory As Category, HeadingNumber As Integer, myAlpha() As String) - Dim lastNoNameClassIndex As Integer - Dim theCatClassCollection As ClassCollection - Set theCatClassCollection = GetAllOfClasses(aCategory) - - If theCatClassCollection.Count Then - Dim theClass As Class - Dim NestedClasses As ClassCollection - - For CLSID = 1 To theCatClassCollection.Count - If(myAlpha(CLSID) = "") Then - If (lastNoNameClassIndex = 0) Then - Ike = theCatClassCollection.FindFirst("") - lastNoNameClassIndex = Ike - Else - Ike = theCatClassCollection.FindNext(lastNoNameClassIndex,"") - lastNoNameClassIndex = Ike - End If - Else - Ike = theCatClassCollection.FindFirst(myAlpha(CLSID)) - End If - Set theClass = theCatClassCollection.GetAt(Ike) - GenerateLogicalClass WordApp, theClass, HeadingNumber+1 - Next CLSID - End If - Set theClassCollection = Nothing -End Sub - - -Sub PrintCategoryClasses(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - Dim Alpha() As String - Dim theCatClassCollection As ClassCollection - - If HeadingNumber > 1 Then - WordInsertHeading HeadingNumber, aCategory.Name, WordApp - End If - WordInsertDocumentation HeadingNumber+1, aCategory.Documentation, WordApp - - Set theCatClassCollection = GetAllOfClasses(aCategory) - ReDim Alpha(theCatClassCollection.Count) - SortAlpha aCategory, alpha - - If ReportOptions.ClassDiagrams Then - SearchForClassDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - End If - - If ReportOptions.StateDiagrams Then - SearchForStateDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - End If - - If ReportOptions.UseCaseDiagrams Then - SearchForUseCaseDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - End If - - If ReportOptions.ScenarioDiagrams Then - SearchForSeqAndCollabDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - End If - - 'PrintClassesForCategory WordApp, aCategory, HeadingNumber, Alpha - -End Sub - -Sub GenerateUseCase (WordApp As Object, aUseCase As UseCase, HeadingNumber As Integer) - WordInsertHeading HeadingNumber, aUseCase.Name, WordApp - WordInsertDocumentation HeadingNumber+1, aUseCase.Documentation, WordApp - If ReportOptions.ClassDiagrams Then - SearchForClassDiagramsInUseCase WordApp, aUseCase, (HeadingNumber+1) - End If - If ReportOptions.ScenarioDiagrams Then - SearchForSeqAndCollabDiagramsInUseCase WordApp, aUseCase, (HeadingNumber+1) - End If -End Sub - -Sub PrintCategoryUseCases(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - Dim Alpha() As String - Dim theCatClassCollection As ClassCollection - - If HeadingNumber > 1 Then - WordInsertHeading HeadingNumber, aCategory.Name, WordApp - End If - WordInsertDocumentation HeadingNumber+1, aCategory.Documentation, WordApp - - SearchForClassDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - SearchForStateDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - SearchForUseCaseDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - SearchForSeqAndCollabDiagramsInPackage WordApp, aCategory, (HeadingNumber+1) - - If aCategory.UseCases.Count Then - Dim theUseCase As UseCase - Dim numberOfApplicableUseCases As Integer - Dim UseCaseNames$() - numberOfApplicableUseCases = 0 - For ucID = 1 To aCategory.UseCases.Count - Set theUseCase = aCategory.UseCases.GetAt(ucID) - ReDim Preserve UseCaseNames$(numberOfApplicableUseCases +1) - UseCaseNames$(numberOfApplicableUseCases) = theUseCase.Name - numberOfApplicableUseCases = numberOfApplicableUseCases +1 - Next ucID - - ArraySort UseCaseNames$() - - For i% = 1 To numberOfApplicableUseCases - ucID = aCategory.UseCases.FindFirst(UseCaseNames$(i%)) - Set theUseCase = aCategory.UseCases.GetAt(ucID) - If theUseCase Is Nothing Then - Else - GenerateUseCase WordApp, theUseCase, (HeadingNumber +1) - End If - Next i% - End If - -End Sub - - -Sub PrintCategory(WordApp As Object, aCategory As Category, HeadingNumber As Integer) - Dim Beta() As String - If aCategory.Name <> "Undocument" Then - Select Case GeneratorState.Phase - Case RPh_Dynamic - If HeadingNumber = 1 Then - WordInsertHeading HeadingNumber, "Analysis", WordApp - End If - Call PrintCategoryUseCases(WordApp, aCategory, HeadingNumber) - Call PrintCategoryClasses(WordApp, aCategory, HeadingNumber) - Case RPh_Static - If HeadingNumber = 1 Then - WordInsertHeading HeadingNumber, "Design", WordApp - End If - Call PrintCategoryClasses(WordApp, aCategory, HeadingNumber) - Case RPh_StartUp - Case RPh_TailBoiler - Case RPh_Crosscheck - End Select - ReDim Beta(aCategory.Categories.Count) - For Ike = 1 To aCategory.Categories.Count - Beta(Ike) = aCategory.Categories.GetAt(Ike).Name - Next Ike - ArraySort Beta - For CatID = 1 To aCategory.Categories.Count - Ike = aCategory.Categories.FindFirst(Beta(CatID)) - Call PrintCategory(WordApp, aCategory.Categories.GetAt(Ike), HeadingNumber+1) - Next CatID - End If -End Sub - -Sub GenerateBehaviouralAnalysisSection(WordApp As Object) - Break WordApp - 'WordInsertHeading 1, "Behavioural Analysis", WordApp - GeneratorState.Phase = RPh_Dynamic - PrintCategory WordApp, LicensedRoseApplication.CurrentModel.RootUseCaseCategory, 1 -End Sub - -Sub GenerateStaticRelationshipSection(WordApp As Object) - Break WordApp - 'WordInsertHeading 1, "Static Relationships", WordApp - GeneratorState.Phase = RPh_Static - PrintCategory WordApp, LicensedRoseApplication.CurrentModel.RootCategory, 1 -End Sub - - -Sub GenerateMethodUsageEntry(Op As Operation, WordApp As Object) - ResetGlobalDiagList - Dim Mc As MessageCollection - Dim Used As Boolean - Used = False - WordApp.FormatStyle "Normal" - For i% = 0 To GlobalDiagListSize-1 - Set Mc = GlobalDiagList(i).Diagram.GetMessages - For j% = 1 To Mc.Count - If Mc.GetAt(j).GetOperation Is Not Nothing Then - If Mc.GetAt(j).GetOperation.GetUniqueId = Op.GetUniqueId Then - Used = True - If GlobalDiagList(i).SeenBefore = False Then - WordApp.Insert "Used in " - WordApp.Insert GlobalDiagList(i).FigureTitle - Para WordApp - GlobalDiagList(i).SeenBefore = True - End If - End If - End If - Next j - Next i - If Used = False Then - WordApp.Insert "Not used in any Sequence or Collaboration in this view of the model." - Para WordApp - End If -End Sub - -Sub GenerateScenarioCrosscheckSection(WordApp As Object) - Break WordApp - GeneratorState.Phase = RPh_Crosscheck - - WordInsertHeading 1, "Model Verification and Checking", WordApp - - Dim AllClasses As ClassCollection - Dim Op2 As Operation - Dim Ops As OperationCollection - Dim Used As Boolean - Set AllClasses = LicensedRoseApplication.CurrentModel.GetAllClasses - - For i% = 1 To AllClasses.Count - Dim UsedClassOps As New OperationCollection - Dim UnusedClassOps As New OperationCollection - WordInsertHeading 2,AllClasses.GetAt(i).Name,WordApp - - Set Ops = AllClasses.GetAt(i).Operations - For j% = 1 To Ops.Count - Set Op2 = Ops.GetAt(j) - WordApp.FormatFont Bold:=True - WordApp.Insert Op2.Name - WordApp.FormatFont Bold:=False - Para WordApp - GenerateMethodUsageEntry Op2, WordApp - Next j - Next i -End Sub - -Sub GenerateTailEndBoilerPlate(WordApp As Object) - GeneratorState.Phase = RPh_TailBoiler - Break WordApp - WordInsertHeading 1, "Further Information", WordApp - WordInsertHeading 2, "People", WordApp - WordInsertHeading 2, "References", WordApp - WordInsertHeading 2, "Open Issues", WordApp - WordInsertHeading 2, "Glossary", WordApp - WordInsertHeading 2, "Document History", WordApp - WordInsertHeading 2, "Document Review Date", WordApp -End Sub - -Sub GenerateReport(WordApp As Object) -Dim UsedOperations As New OperationCollection - WordApp.EndOfDocument - If ReportOptions.FEBoiler = True Then - WordInsertHeading 1, "Introduction", WordApp - WordInsertHeading 2, "Overview", WordApp - WordInsertHeading 2, "Purpose and Scope", WordApp - End If - - Select Case ReportOptions.DocType - Case RepAnalysisType - GenerateBehaviouralAnalysisSection WordApp - Case RepDesignType - GenerateStaticRelationshipSection WordApp - Case RepAnalysisNDesignType - GenerateBehaviouralAnalysisSection WordApp - GenerateStaticRelationshipSection WordApp - Case RepTestType - End Select - - If ReportOptions.VerifyType = RepVerifySection Then - GenerateScenarioCrosscheckSection WordApp - End If - - If ReportOptions.BEBoiler = True Then - GenerateTailEndBoilerPlate WordApp - End If -End Sub - -Begin Dialog ReportDialog ,,224,320,"Generate Symbian Documentation",.ReportDialogLoop - - Text 8,4,148,8,"Report &Title",.TitleText - TextBox 12,16,202,12,.Title - - Text 8,32,112,8,"&Template File Name:",.TemplateFileNameText - TextBox 12,44,202,12,.TemplateFileName - - Text 8,60,112,8,"&Report File Name:",.FileNameText - TextBox 12,72,202,12,.FileName - - PushButton 174,87,44,14,"Browse",.Browse - - GroupBox 8,102,92,60,"Report Document Type",.ReportTypeGroup - OptionGroup .ReportType - OptionButton 12,114,80,8,"Analysis",.AnalysisReport - OptionButton 12,126,80,8,"Design",.DesignReport - OptionButton 12,138,80,8,"Analysis and Design",.AnalysisNDesignReport - OptionButton 12,150,80,8,"Test",.TestReport - - GroupBox 102,102,116,60,"Usage Verification",.VerifyTypeGroup - OptionGroup .VerifyType - OptionButton 106,114,80,8,"None",.NoVerify - OptionButton 106,126,80,8,"Added Section",.SectionVerify - OptionButton 106,138,80,8,"Embedded in Text",.EmbedVerify - - GroupBox 8,170,212,30,"Proofreading Options",.Proofing - CheckBox 12,182,92,8,"Expanded Whitespace",.WhiteBlock - CheckBox 106,182,92,8,"Highlight Gaps",.HighlightDocGaps - - GroupBox 8,205,212,80,"Content Options",.Content - CheckBox 12,220,92,8,"Class Diagrams",.ClassDiagrams - CheckBox 12,232,92,8,"Scenario Diagrams",.ScenarioDiagrams - CheckBox 12,244,92,8,"State Diagrams",.StateDiagrams - CheckBox 12,256,92,8,"Use Case Diagrams",.UseCaseDiagrams - CheckBox 12,268,92,8,"C++ Syntax",.CppSyntax - - CheckBox 106,220,92,8,"Public Items Only",.PublicOnly - CheckBox 106,232,92,8,"Front-end Boilerplate",.FEBoiler - CheckBox 106,244,92,8,"Back-end Boilerplate",.BEBoiler - CheckBox 106,256,92,8,"Use Subhead",.SubTag - - PushButton 8,292,76,14,"&Generate",.Generate - CancelButton 144,292,76,14 -End Dialog - - -Sub Main - Dim MyDialog As ReportDialog - - Set LicensedRoseApplication = GetLicensedRoseApplication() - LicensedRoseApplication.CurrentModel.DefaultTool = DefaultTool$ - 'NewDirectory$ = EnclosingDirPath(LicensedRoseApplication.ApplicationPath) - NewDirectory$ = CurDir$ - - If NewDirectory$ <> "" Then - If Mid$(NewDirectory$, 2, 1) = ":" Then - ChDrive NewDirectory$ - End If - ChDir NewDirectory$ - Else - MsgBox "Error: Directory not found." - Exit Sub - End If - - ' - ' Right, let's set some sensible default values - ' - DefaultFileName$ = GetResourceString(PRODUCTDEFAULTWORDDOCFILENAME) - ModelName$ = LicensedRoseApplication.CurrentModel.GetFileName() - If ModelName$ = "" Then - MyDialog.FileName$ = MakeFileName$(NewDirectory$, DefaultFileName$) - MyDialog.Title$ = FileParse$(DefaultFileName, 4) - Else - MyDialog.FileName$ = ChangeFileExtension$(ModelName$, "doc") - MyDialog.Title$ = FileParse$(ModelName$, 4) - End If - MyDialog.TemplateFileName$ = ChangeFileExtension$(ModelName$, "dot") - ' - ' Let's assume we're not proofreading at the moment - ' - MyDialog.WhiteBlock = False - MyDialog.HighlightDocGaps = False - ' - ' I think we want all the diagrams we can get - ' - MyDialog.ClassDiagrams = True - MyDialog.ScenarioDiagrams = True - MyDialog.StateDiagrams = True - MyDialog.UseCaseDiagrams = True - ' - ' We are a C++ shop, after all - ' - MyDialog.CppSyntax = True - ' - ' We can see everything for now - ' - MyDialog.PublicOnly = False - ' - ' The options to generate boilerplate and tagged headings are turned off - ' - MyDialog.FEBoiler = False - MyDialog.BEBoiler = False - MyDialog.SubTag = False - ' - ' Let's assume that we want to run across the entire model for the time being - ' - MyDialog.ReportType = RepAnalysisNDesignType - ' - ' The default is to verify in the body of the document - ' - MyDialog.VerifyType = RepVerifyEmbed - - ' - ' Right let's give the user a chance to set some preferences, in case - ' they differ from these eminently sensible ones. - ' - Result = Dialog (MyDialog) - If Result = 0 Then - Exit Sub - End If - ' - ' I suppose that if we give them the UI to change them, we ought to actually - ' take notice of them - ' - If Result = 2 Then - ReportOptions.Generate = TRUE - ReportOptions.Title = MyDialog.Title - ReportOptions.FileName = MyDialog.FileName - ReportOptions.Template = MyDialog.TemplateFileName - ReportOptions.WhiteBlock = MyDialog.WhiteBlock - ReportOptions.HighlightDocGaps = MyDialog.HighlightDocGaps - ReportOptions.ClassDiagrams = MyDialog.ClassDiagrams - ReportOptions.ScenarioDiagrams = MyDialog.ScenarioDiagrams - ReportOptions.StateDiagrams = MyDialog.StateDiagrams - ReportOptions.UseCaseDiagrams = MyDialog.UseCaseDiagrams - ReportOptions.CppSyntax = MyDialog.CppSyntax - ReportOptions.PublicOnly = MyDialog.PublicOnly - ReportOptions.FEBoiler = MyDialog.FEBoiler - ReportOptions.BEBoiler = MyDialog.BEBoiler - ReportOptions.SupportSubheadingTags = MyDialog.SubTag - - ReportOptions.DocType = MyDialog.ReportType - ReportOptions.VerifyType = MyDialog.VerifyType - - GeneratorState.Phase = RPh_StartUp - RoseAppDirectory$ = EnclosingDirPath(LicensedRoseApplication.ApplicationPath) - If Not FileExists (ReportOptions.Template) Then - ReportOptions.Template = RoseAppDirectory$ &"\Formal.dot" - If Not FileExists (ReportOptions.Template) Then - MsgBox "Error: Missing file [" & ReportOptions.Template & "]" - Exit Sub - End If - End If - End If - - ' - ' Crack open MS Word then - ' - Dim WordApplication As Object - Dim WordApp As Object - WordUtilInit - - Set WordApplication = CreateObject("Word.Application") - - ' - ' This is a very lazy thing to do, and difficult to obtain - ' documentation on now that Micro$oft have deprecated the interface - ' - Set WordApp = WordApplication.WordBasic - ' - ' But it makes some parts of life so easy - ' - WordApp.AppMaximize - ' - ' Create a new document based on our template - ' - WordApp.FileNew ReportOptions.Template - ' - ' Rush to the end of the new document - ' - WordApp.EndOfDocument - ' - ' Generate the filling - ' - GenerateReport(WordApp) - ' - ' Finalise the Table of Contents - ' - WordApp.EditSelectAll - WordApp.UpdateFields - ' - ' Save it all away - ' - WordApp.FileSaveAs ReportOptions.FileName - ' - ' Night night - ' - WordApp.FileExit - -End Sub diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btdocs/Test_Specs/Bluetooth_Test_README.xls Binary file bluetooth/btdocs/Test_Specs/Bluetooth_Test_README.xls has changed diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btdocs/Test_Specs/Bluetooth_Test_Spec_AFH.xls Binary file bluetooth/btdocs/Test_Specs/Bluetooth_Test_Spec_AFH.xls has changed diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btdocs/bluetooth_documentation.history.xml --- a/bluetooth/btdocs/bluetooth_documentation.history.xml Mon May 03 13:34:38 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ - - - - Documentation for the Bluetooth subsystem - - - - Updated Bluetooth_Functional_Specification.doc to document that functionality described by REQ7677 has now changed in light of this defect. - - - - Added copyright headers - - - - Add How-To documents for the new APIs. - - - - Correct three errors of document according to the code implementation - - - - Incorrect version number for ACVTP specification removed from Bluetooth Functional Specification document. - - - - SGL.GT0172.104 HOWTO Migrate to Symbian v2 Bluetooth Arch v1.1.doc has been removed. - - - - Functional Spec Requires updating for Bluetooth Spec V2.0 + EDR - - - - PAN NAP Documentation incomplete - - - - Add HCIv2 migration HowTo - - - - PBAP Design document added - - - - Removed 9.2 PICS - - - - Add HCIv2 Design Doc - - diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btdocs/bluetooth_documentation.mrp --- a/bluetooth/btdocs/bluetooth_documentation.mrp Mon May 03 13:34:38 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -component bluetooth_documentation - -source \sf\os\bt\bluetooth\btdocs\ - -notes_source \component_defs\release.src - - -ipr T diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_CIT_P581_BtExcluded.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_CIT_P581_BtExcluded.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_CIT_P581_BtExcluded.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -14,7 +14,7 @@ // // Run all the BT_ROMCONFIG_* tests -// Expects a ROM to be built without BT i.e. SYMBIAN_EXCLUDE_BLUETOOTH has been specified +// Expects a ROM to be built without BT i.e. __BT has NOT been specified RUN_SCRIPT c:\scripts\btromconfig\BT_ROMCONFIG_MANAGER_001.script diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_CIT_P581_BtIncluded.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_CIT_P581_BtIncluded.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_CIT_P581_BtIncluded.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -14,7 +14,7 @@ // // Run all the BT_INC_ROMCONFIG_* tests -// Expects a ROM to be built with BT i.e. SYMBIAN_EXCLUDE_BLUETOOTH has NOT been specified +// Expects a ROM to be built with BT i.e. __BT has been specified RUN_SCRIPT c:\scripts\btromconfig\BT_INC_ROMCONFIG_MANAGER_001.script diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_INC_ROMCONFIG_RSOCKETSERV_002.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_INC_ROMCONFIG_RSOCKETSERV_002.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_INC_ROMCONFIG_RSOCKETSERV_002.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-INC-ROMCONFIG-RSocketServ-002 //! @SYMTestCaseID BT-INC-ROMCONFIG-RSocketServ-002 //! @SYMTestCaseDesc RSocketServ::StartProtocol should succeed for Bluetooth protocols -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a __BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 3 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_MANAGER_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_MANAGER_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_MANAGER_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-MANAGER-001 //! @SYMTestCaseID BT-ROMCONFIG-MANAGER-001 //! @SYMTestCaseDesc Cannot conenct to RBTMan -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_MANAGER_002.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_MANAGER_002.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_MANAGER_002.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-MANAGER-002 //! @SYMTestCaseID BT-ROMCONFIG-MANAGER-002 //! @SYMTestCaseDesc Cannot connect to RBTRegServ -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_PAN_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_PAN_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_PAN_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -24,7 +24,7 @@ START_TESTCASE BT-ROMCONFIG-PAN-001 //! @SYMTestCaseID BT-ROMCONFIG-PAN-001 //! @SYMTestCaseDesc Cannot start a BT PAN RConnection -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RBTPHYLNKADAPT_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RBTPHYLNKADAPT_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RBTPHYLNKADAPT_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RBTPHYLNKADAPT-001 //! @SYMTestCaseID BT-ROMCONFIG-RBTPHYLNKADAPT-001 //! @SYMTestCaseDesc Cannot open RBTPhysicalLinkAdapter -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RCOMMSERV_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RCOMMSERV_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RCOMMSERV_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RCommServ-001 //! @SYMTestCaseID BT-ROMCONFIG-RCommServ-001 //! @SYMTestCaseDesc RCommServ::LoadCommModule should fail for Bluetooth -//! on a SYMBIAN_EXCLUDE_INFRARED ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_REMCON_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_REMCON_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_REMCON_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-REMCON-001 //! @SYMTestCaseID BT-ROMCONFIG-REMCON-001 //! @SYMTestCaseDesc Cannot open CRemConInterfaceSelector as Controller -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_REMCON_002.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_REMCON_002.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_REMCON_002.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-REMCON-002 //! @SYMTestCaseID BT-ROMCONFIG-REMCON-002 //! @SYMTestCaseDesc Cannot open CRemConInterfaceSelector as Target -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RHOSTRESOLVER_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RHOSTRESOLVER_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RHOSTRESOLVER_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RHostResolver-001 //! @SYMTestCaseID BT-ROMCONFIG-RHostResolver-001 //! @SYMTestCaseDesc RHostResolver::Open should fail for Bluetooth protocols -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RSocketServ-001 //! @SYMTestCaseID BT-ROMCONFIG-RSocketServ-001 //! @SYMTestCaseDesc RSocketServ::FindProtocol should fail for Bluetooth protocols -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_002.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_002.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_002.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RSocketServ-002 //! @SYMTestCaseID BT-ROMCONFIG-RSocketServ-002 //! @SYMTestCaseDesc RSocketServ::StartProtocol should fail for Bluetooth protocols -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_003.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_003.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKETSERV_003.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RSocketServ-003 //! @SYMTestCaseID BT-ROMCONFIG-RSocketServ-003 //! @SYMTestCaseDesc RSocketServ::GetProtocolInfo should not find Bluetooth protocols -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKET_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKET_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_RSOCKET_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-RSocket-001 //! @SYMTestCaseID BT-ROMCONFIG-RSocket-0001 //! @SYMTestCaseDesc RSocket::Open should fail for Infra-Red protocols -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_SDPAGENT_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_SDPAGENT_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_SDPAGENT_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-SDPAGENT-001 //! @SYMTestCaseID BT-ROMCONFIG-SDPAGENT-001 //! @SYMTestCaseDesc Cannot use SdpAgent -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_SDP_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_SDP_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_SDP_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-SDP-001 //! @SYMTestCaseID BT-ROMCONFIG-SDP-001 //! @SYMTestCaseDesc Cannot connect to RSdp -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_001.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_001.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_001.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-USER-001 //! @SYMTestCaseID BT-ROMCONFIG-USER-001 //! @SYMTestCaseDesc CBluetoothPhysicalLinks cannot be constructed -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_002.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_002.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_002.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-USER-002 //! @SYMTestCaseID BT-ROMCONFIG-USER-002 //! @SYMTestCaseDesc CBluetoothSocket cannot be constructed -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_003.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_003.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_003.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-USER-003 //! @SYMTestCaseID BT-ROMCONFIG-USER-003 //! @SYMTestCaseDesc CBluetoothSynchronousLink cannot be used -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_004.script --- a/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_004.script Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btexample/test/cit/ROMConfig/scripts/BT_ROMCONFIG_USER_004.script Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ START_TESTCASE BT-ROMCONFIG-USER-004 //! @SYMTestCaseID BT-ROMCONFIG-USER-004 //! @SYMTestCaseDesc RHCIDirectAccess cannot be opened -//! on a SYMBIAN_EXCLUDE_BLUETOOTH ROM +//! on a !__BT ROM //! @SYMREQ 5413 //! @SYMTestType CIT //! @SYMTestPriority 1 diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/ProxySAP.cpp --- a/bluetooth/btstack/linkmgr/ProxySAP.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/ProxySAP.cpp Fri May 14 16:59:23 2010 +0300 @@ -766,12 +766,12 @@ return; } - if (aDisconnectOption == KDisconnectAllPhysicalLinks) + if (aDisconnectOption == KDisconnectAllPhysicalLinks || aDisconnectOption == KDisconnectAllPhysicalLinksForPowerOff) { // Disconnecting All BT Physical Links // Only support link *termination*, this is done as normal cos esock weirdness __ASSERT_ALWAYS(aCloseType == CServProviderBase::ENormal, Panic(EBTProxySAPInvalidTerminate)); - rerr = iLinksMan.TerminateAllPhysicalLinks(this); + rerr = iLinksMan.TerminateAllPhysicalLinks(this, aDisconnectOption == KDisconnectAllPhysicalLinksForPowerOff ? ERemoteAboutToPowerOff : ERemoteUserEndedConnection); LOG2(_L("Proxy SAP 0x%08x -- Terminating all PHY Links, error: %d"), this, rerr); // If there was an error terminating any of the physical links then we can diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/hcifacade_commands.cpp --- a/bluetooth/btstack/linkmgr/hcifacade_commands.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/hcifacade_commands.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -189,12 +189,16 @@ void CHCIFacade::HostNumberOfCompletedPacketsL(THCIConnHandle aConnH, TUint16 aFrags) { RArray connHandles; - connHandles.Append(aConnH); + connHandles.AppendL(aConnH); + CleanupClosePushL(connHandles); RArray numPackets; - numPackets.Append(aFrags); - + numPackets.AppendL(aFrags); + CleanupClosePushL(numPackets); + CHostNumberOfCompletedPacketsCommand* cmd = CHostNumberOfCompletedPacketsCommand::NewL(1, connHandles, numPackets); + // ownership of arrays has been taken by cmd + CleanupStack::Pop(2, &connHandles); // &numPackets, &connHandles // Ownership of cmd transfered even if MhcqAddCommandL leaves iCmdController->MhcqAddCommandL(cmd, *this); diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/linkutil.h --- a/bluetooth/btstack/linkmgr/linkutil.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/linkutil.h Fri May 14 16:59:23 2010 +0300 @@ -185,6 +185,7 @@ EBTSSPModeChangedDuringConnection =209, EHCICtrlrInitAddingInitialisationCommandInBadState =210, EHCICtrlrInitOnlyOneResetCmdAllowed =211, + EInvalidDisconnectReason =212, //Please add new panic codes common to all versions of linkmgr here. EVendorSAPBadVendorEvent =250, diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/physicallinks.cpp --- a/bluetooth/btstack/linkmgr/physicallinks.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/physicallinks.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -2302,6 +2302,14 @@ LOG_FUNC TInt err = KErrNone; + __ASSERT_DEBUG(aReason == EAuthenticationFailure + || aReason == ERemoteUserEndedConnection + || aReason == ERemoteLowResources + || aReason == ERemoteAboutToPowerOff + || aReason == EUnsupportedRemoteLMPFeature + || aReason == EPairingWithUnitKeyNotSupported, + Panic (EInvalidDisconnectReason)); // Check the error code is valid with the spec + if (iLinkState.LinkState() == TBTBasebandLinkState::ELinkPending) { // If the Link is not yet up then we cannot know the correct connection handle @@ -2821,11 +2829,12 @@ } TBTPinCode pinCode; - if(iLinksMan.PrefetchMan().IsPrefetchAvailable(aAddr, pinCode)) - { - aRequester.PINCodeRequestReply(aAddr, pinCode); - return; - } + if(iLinksMan.PrefetchMan().GetPrefetch(aAddr, pinCode)) + { + iLinksMan.PrefetchMan().RemovePrefetch(aAddr); + aRequester.PINCodeRequestReply(aAddr, pinCode); + return; + } iPinHandler = &aRequester; @@ -2897,6 +2906,13 @@ return iAuthStateMask & ELinkKeyRequestPending; } +TBool CPhysicalLink::IsAuthenticationRequestPending() const + { + LOG_FUNC + return iAuthStateMask & EAuthenticationRequestPending; + } + + void CPhysicalLink::SetAuthenticationPending(TUint8 aState) { LOG_FUNC diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/physicallinks.h --- a/bluetooth/btstack/linkmgr/physicallinks.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/physicallinks.h Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -379,6 +379,9 @@ void SetAuthenticationPending(TUint8 aFlag); virtual void AuthenticationComplete(TUint8 aFlag); + TBool IsAuthenticationRequestPending() const; + + static TInt OverrideLPMTimeoutCallback(TAny* aCPhysicalLink);// async callback static TInt TerminateCallback(TAny* aCPhysicalLink);// async callback TInt Terminate(THCIErrorCode aReason); diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/physicallinksmanager.cpp --- a/bluetooth/btstack/linkmgr/physicallinksmanager.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/physicallinksmanager.cpp Fri May 14 16:59:23 2010 +0300 @@ -316,7 +316,7 @@ iTerminatingProxy=aProxySAP; } -TInt CPhysicalLinksManager::TerminateAllPhysicalLinks(CBTProxySAP* aProxySAP) +TInt CPhysicalLinksManager::TerminateAllPhysicalLinks(CBTProxySAP* aProxySAP, THCIErrorCode aErrorCode) { TInt count=iPhysicalLinks.Count(); TInt retVal = (count==0) ? KErrNotFound : KErrNone; @@ -325,7 +325,7 @@ { // If any one of the physical links return an error then this // function needs to return an error. - TInt err = iPhysicalLinks[i]->Terminate(ERemoteUserEndedConnection); + TInt err = iPhysicalLinks[i]->Terminate(aErrorCode); if (err != KErrNone) { retVal=err; @@ -1309,16 +1309,30 @@ return KErrNone; } -TBool CBluetoothPrefetchManager::IsPrefetchAvailable(const TBTDevAddr& aAddr, TBTPinCode& aPinCode) + +TInt CBluetoothPrefetchManager::IsPrefetchAvailable(const TBTDevAddr& aAddr) const + { + return iPrefetchedPins.Find(aAddr, CompareAddressInStore); + } + +TBool CBluetoothPrefetchManager::GetPrefetch(const TBTDevAddr& aAddr, TBTPinCode& aPinCode) const + { + TInt ix = IsPrefetchAvailable(aAddr); + if (ix >= 0) + { + aPinCode.Copy(iPrefetchedPins[ix].iPin); + return ETrue; + } + return EFalse; + } + +void CBluetoothPrefetchManager::RemovePrefetch(const TBTDevAddr& aAddr) { - TInt ix = iPrefetchedPins.Find(aAddr, CompareAddressInStore); - if (ix < 0) + TInt ix = IsPrefetchAvailable(aAddr); + if (ix >= 0) { - return EFalse; + iPrefetchedPins.Remove(ix); } - aPinCode.Copy(iPrefetchedPins[ix].iPin); - iPrefetchedPins.Remove(ix); - return ETrue; } TInt CBluetoothPrefetchManager::PINCodeRequestReply(const TBTDevAddr& aDevAddr, const TDesC8& aPin) const diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/linkmgr/physicallinksmanager.h --- a/bluetooth/btstack/linkmgr/physicallinksmanager.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/linkmgr/physicallinksmanager.h Fri May 14 16:59:23 2010 +0300 @@ -75,7 +75,8 @@ TInt HandleOverPinRequester(const TBTDevAddr& aAddr, CBTPinRequester* aPinRequester); TInt RegisterForPrefetching(const TBTDevAddr& aAddr, MBluetoothPrefetchNotifier& aNotifier); - TBool IsPrefetchAvailable(const TBTDevAddr& aAddr, TBTPinCode& aPinCode); + TBool GetPrefetch(const TBTDevAddr& aAddr, TBTPinCode& aPinCode) const; + void RemovePrefetch(const TBTDevAddr& aAddr); private: NONSHARABLE_CLASS(RPinRequest) @@ -105,6 +106,8 @@ static TBool CompareAddressInRequest(const TBTDevAddr* aDevAddr, const RPinRequest& aRequest); static TBool CompareAddressInStore(const TBTDevAddr* aDevAddr, const TPrefetchedPin& aRequest); + + TInt IsPrefetchAvailable(const TBTDevAddr& aAddr) const; private: // from MPINCodeResponseHandler TInt PINCodeRequestReply(const TBTDevAddr& aDevAddr, const TDesC8& aPin) const; @@ -144,7 +147,7 @@ TInt AddListener(MLogicalLink& aLogicalLink, TPhysicalLinkPort aPort); void RemoveListener(MLogicalLink& aLogicalLink); void ClearTerminatingProxy(CBTProxySAP* aProxySAP); - TInt TerminateAllPhysicalLinks(CBTProxySAP* aProxySAP); + TInt TerminateAllPhysicalLinks(CBTProxySAP* aProxySAP, THCIErrorCode aErrorCode); TInt TerminatePhysicalLink(CPhysicalLink* aConnection, CBTProxySAP* aProxySAP); void FatalError(TInt aErr); diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/rfcomm/rfcommflow.cpp --- a/bluetooth/btstack/rfcomm/rfcommflow.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/rfcomm/rfcommflow.cpp Fri May 14 16:59:23 2010 +0300 @@ -107,9 +107,9 @@ **/ { LOG_FUNC - __ASSERT_DEBUG(aSAP.NegotiatedMTU(), Panic(ERfcommBadCalculatedMTU)); + __ASSERT_DEBUG(aSAP.OptimalMTUForSending(), Panic(ERfcommBadCalculatedMTU)); - return aSAP.NegotiatedMTU(); + return aSAP.OptimalMTUForSending(); } TBool TRfcommFlowStrategyInitial::AllowWrite(CRfcommSAP& /*aSAP*/) @@ -372,10 +372,10 @@ **/ { LOG_FUNC - __ASSERT_DEBUG(aSAP.NegotiatedMTU(), Panic(ERfcommBadCalculatedMTU)); + __ASSERT_DEBUG(aSAP.OptimalMTUForSending(), Panic(ERfcommBadCalculatedMTU)); //Allow for possible credit in header. - return (STATIC_CAST(TUint16, (aSAP.NegotiatedMTU() - (aCredit?1:0)))); + return (STATIC_CAST(TUint16, (aSAP.OptimalMTUForSending() - (aCredit?1:0)))); } TBool TRfcommFlowStrategyCreditBased::AllowWrite(CRfcommSAP& aSAP) diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/rfcomm/rfcommsap.cpp --- a/bluetooth/btstack/rfcomm/rfcommsap.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/rfcomm/rfcommsap.cpp Fri May 14 16:59:23 2010 +0300 @@ -345,7 +345,7 @@ if (iMux) { // Allow for possible credit in header, 1 byte - TPckgBuf intpckg(iMTU - 1); + TPckgBuf intpckg(iOptimalMTUForSending - 1); aOption=intpckg; return KErrNone; } @@ -478,9 +478,15 @@ TUint16 CRfcommSAP::NegotiatedMTU() const { - return iMTU; + return iNegotiatedMTU; } +TUint16 CRfcommSAP::OptimalMTUForSending() const + { + return iOptimalMTUForSending; + } + + TUint16 CRfcommSAP::UsableMTU(TUint8 aCredit) const { return iMux->FlowStrategy()->UsableMTU(*this, aCredit); diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/rfcomm/rfcommsap.h --- a/bluetooth/btstack/rfcomm/rfcommsap.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/rfcomm/rfcommsap.h Fri May 14 16:59:23 2010 +0300 @@ -174,6 +174,7 @@ TInt UnusedBufferSpace() const; TUint16 NegotiatedMTU() const; //< Returns the negotiated MTU + TUint16 OptimalMTUForSending() const; //< Returns the optimal MTU for sending TUint16 UsableMTU(TUint8 aCredit) const; //< Returns the actual maximum information field size available (which with CBFC will be one less than the negotiated MTU) TBool ListeningTo(const TBTSockAddr& aBTSockAddr) const; @@ -257,7 +258,8 @@ TDblQueLink iLink; // Used by Muxer to keep track of the SAPs it is linked to TDblQueLink iListeningLink; // Used by the protocol to keep track of listening SAPs TDblQueLink iBoundLink; // Used by the protocol to keep track of bound SAPs - TUint16 iMTU; // Maximum data size for this SAP + TUint16 iNegotiatedMTU; // Maximum data size for this SAP + TUint16 iOptimalMTUForSending; // Optimal MTU for sending provided by L2CAP TUint16 iUserDefinedMTU; // User defined MTU (0=No restriction) // Members used by listening SAP TInt iMaxClonesWaitingForStart; diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/rfcomm/rfcommstates.cpp --- a/bluetooth/btstack/rfcomm/rfcommstates.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/rfcomm/rfcommstates.cpp Fri May 14 16:59:23 2010 +0300 @@ -1059,8 +1059,10 @@ #ifdef _DEBUG aSAP.iProxyForRemoteCreditsSupplied = params.iInitialCredit; #endif - aSAP.iMTU=params.iMaxFrameSize; // Remember the newly calculated MTU - LOG2(_L("RFCOMM: Sending PN (Calculated MTU %d from frame size %d)"), aSAP.iMTU, aSAP.iMux->GetMaxDataSize()); + aSAP.iNegotiatedMTU=params.iMaxFrameSize; // Remember the newly calculated MTU + aSAP.iOptimalMTUForSending=params.iMaxFrameSize; // Remember the newly calculated MTU + + LOG2(_L("RFCOMM: Sending PN (Calculated MTU %d from frame size %d)"), aSAP.iNegotiatedMTU, aSAP.iMux->GetMaxDataSize()); TInt error=aSAP.iMux->SendPN(aSAP, params); @@ -1106,7 +1108,8 @@ // If we get an error continue but with a possible non-optimal MTU value. iMTU is the max // data size so remove the max Rfcomm header size as these will get added later. - aSAP.iMTU = (error == KErrNone) ? restrictedMtu() - KMaxFrameOverhead : aParams.iMaxFrameSize; + aSAP.iOptimalMTUForSending = (error == KErrNone) ? restrictedMtu() - KMaxFrameOverhead : aParams.iMaxFrameSize; + aSAP.iNegotiatedMTU = aParams.iMaxFrameSize; error = KErrNone; } @@ -1156,7 +1159,7 @@ { TRAPD(err, aSAP.iDataBuffer.SetLengthL(aSAP.iMux->FlowStrategy()->DataBufferMultiple()* - aSAP.iMTU)); + aSAP.iNegotiatedMTU)); if(err != KErrNone) { // Failed to alloc, so fail this connect and error @@ -1165,8 +1168,8 @@ return; } - aSAP.iHighTideMark=KRfcommSAPBufferHighMultiple*(aSAP.iMTU); - aSAP.iLowTideMark=KRfcommSAPBufferLowMultiple*(aSAP.iMTU); + aSAP.iHighTideMark=KRfcommSAPBufferHighMultiple*(aSAP.iNegotiatedMTU); + aSAP.iLowTideMark=KRfcommSAPBufferLowMultiple*(aSAP.iNegotiatedMTU); ChangeState(aSAP, CRfcommStateFactory::EOpen); @@ -1410,14 +1413,17 @@ We received a SABM - Tell our parent SAP that we're connected **/ { - if(aSAP.iMTU==0) // i.e. We've not entered into any negotiations... - aSAP.iMTU=KRfcommDefaultMTU; // ...so set to default. + if(aSAP.iNegotiatedMTU==0) // i.e. We've not entered into any negotiations... + { + aSAP.iNegotiatedMTU=KRfcommDefaultMTU; // ...so set to default. + aSAP.iOptimalMTUForSending=KRfcommDefaultMTU; + } // We can set up the Data Buffer since MTU negotiations are now over. //TRAPD(err, aSAP.iDataBuffer.SetLengthL(KRfcommSAPBufferMultiple*aSAP.iMTU)); TRAPD(err, aSAP.iDataBuffer.SetLengthL(aMux.FlowStrategy()->DataBufferMultiple()* - aSAP.iMTU)); + aSAP.iNegotiatedMTU)); if(err != KErrNone) { // Failed to alloc, so fail this connect and error @@ -1426,8 +1432,8 @@ return; } - aSAP.iHighTideMark=KRfcommSAPBufferHighMultiple*(aSAP.iMTU); - aSAP.iLowTideMark=KRfcommSAPBufferLowMultiple*(aSAP.iMTU); + aSAP.iHighTideMark=KRfcommSAPBufferHighMultiple*(aSAP.iNegotiatedMTU); + aSAP.iLowTideMark=KRfcommSAPBufferLowMultiple*(aSAP.iNegotiatedMTU); ChangeState(aSAP,CRfcommStateFactory::EWaitForIncomingSecurityCheck); } @@ -1441,19 +1447,20 @@ #endif { __ASSERT_DEBUG(aSAP.iMux==&aMux,PanicInState(ERfcommInvalidMuxInSAP)); - if(aSAP.iMTU==0) + if(aSAP.iNegotiatedMTU==0) { // We have no MTU set for the SAP at the moment. Try to determine // the upper limit of what we can handle - aSAP.iMTU=aSAP.MaximumMTU(); + aSAP.iNegotiatedMTU=aSAP.MaximumMTU(); + aSAP.iOptimalMTUForSending= aSAP.NegotiatedMTU(); } - if(aParams.iMaxFrameSize>aSAP.iMTU || aParams.iMaxFrameSize<=0) + if(aParams.iMaxFrameSize>aSAP.iNegotiatedMTU || aParams.iMaxFrameSize<=0) { // Either the remote device wants a larger MTU or has provided us // with a nonsensical <=0 one. // Either way, try to negotiate the MTU to our maximum - aParams.iMaxFrameSize=aSAP.iMTU; + aParams.iMaxFrameSize=aSAP.iNegotiatedMTU; } else { @@ -1468,7 +1475,8 @@ // If we get an error continue but with a possible non-optimal MTU value. iMTU is the max // data size so remove the max Rfcomm header size as these will get added later. - aSAP.iMTU = (err == KErrNone) ? restrictedMtu() - KMaxFrameOverhead : aParams.iMaxFrameSize; + aSAP.iOptimalMTUForSending = (err == KErrNone) ? restrictedMtu() - KMaxFrameOverhead : aParams.iMaxFrameSize; + aSAP.iNegotiatedMTU = aParams.iMaxFrameSize; } if(aParams.iCreditIndicator == (KCBFCCommandFlag >> 4)) @@ -1909,8 +1917,12 @@ TInt storelen=aSAP.DataBuffer().Add(aData.Ptr(), aData.Length()); if(storelen != aData.Length()) { + __ASSERT_DEBUG(EFalse, PanicInState(ERfCommStateBufferFull)); // We've not got room for some of the data - LOG(_L("RFCOMM: Warning received data loss")); + LOG(_L("RFCOMM: Received data loss - disconnecting")); + aSAP.iSocket->Disconnect(); + ChangeState(aSAP, CRfcommStateFactory::EClosed); + return; } // Check to see if we need to quench the source diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/rfcomm/rfcommutil.h --- a/bluetooth/btstack/rfcomm/rfcommutil.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/rfcomm/rfcommutil.h Fri May 14 16:59:23 2010 +0300 @@ -87,7 +87,8 @@ ERfcommDequeuingBadBoundSAP = 62, ERfCommFlowStrategyOutOfBounds = 63, ERfCommMuxerStateOutOfBounds = 64, - ERfCommStateOutOfBounds = 65 + ERfCommStateOutOfBounds = 65, + ERfCommStateBufferFull = 66, }; /** diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/secman/btaccessrequester.cpp --- a/bluetooth/btstack/secman/btaccessrequester.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/secman/btaccessrequester.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -831,6 +831,7 @@ else if((aEvent.EventType() == ENotifyPhysicalLinkError)) { LOG(_L8("\tPhysical link error...Complete(ACCESS DENIED)")); + iSecMan.ConnectionsManager().PrefetchMan().RemovePrefetch(DeviceAddress()); LinkError(aEvent.ErrorCode()); } } diff -r 4b81101308c6 -r 5e5528a288fe bluetooth/btstack/secman/secman.cpp --- a/bluetooth/btstack/secman/secman.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetooth/btstack/secman/secman.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -585,7 +585,7 @@ else if (!link->IsPairingExpected() || ((link->AuthenticationRequirement() == EMitmNotReqDedicatedBonding || link->AuthenticationRequirement() == EMitmReqDedicatedBonding) - && !IsDedicatedBondingAttempted(aAddr))) + && !link->IsAuthenticationRequestPending())) { TRAPD(err,link->NewUserConfirmerL(aAddr, *this, ETrue)); if(err) @@ -610,7 +610,7 @@ TBTSecEventUserConfirmationComplete event(ETrue); requester->SendEvent(event); } - + link->PinRequestSent(); // note: -- check errors here TRAP_IGNORE(iCommandController->UserConfirmationRequestReplyL(aAddr)); } diff -r 4b81101308c6 -r 5e5528a288fe bluetoothcommsprofiles/btpan/group/btpan.iby --- a/bluetoothcommsprofiles/btpan/group/btpan.iby Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothcommsprofiles/btpan/group/btpan.iby Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -34,11 +34,11 @@ REM *** Now for things which should only be included if the device REM *** supports bluetooth, to save ROM space... -#ifdef SYMBIAN_EXCLUDE_BLUETOOTH +#ifndef __BT REM Feature BLUETOOTH is not in this ROM (btpan.iby) #else -// !SYMBIAN_EXCLUDE_BLUETOOTH +// __BT file=ABI_DIR\BT_DIR\panagt.agt System\Libs\panagt.agt file=ABI_DIR\BT_DIR\panhelper.dll System\Libs\panhelper.dll @@ -50,7 +50,7 @@ #endif #endif -// SYMBIAN_EXCLUDE_BLUETOOTH +// __BT #endif // __BTPAN_IBY__ diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/btlib/btbaseband.cpp --- a/bluetoothmgmt/bluetoothclientlib/btlib/btbaseband.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/btlib/btbaseband.cpp Fri May 14 16:59:23 2010 +0300 @@ -529,14 +529,7 @@ } } -void RBTBaseband::TerminateAllPhysicalLinks(TInt aReason) - { - TRequestStatus stat; - TerminateAllPhysicalLinks(aReason, stat); - User::WaitForRequest(stat); - } - -void RBTBaseband::TerminateAllPhysicalLinks(TInt /*aReason*/, TRequestStatus& aStatus) +void RBTBaseband::TerminateAllPhysicalLinks(TRequestStatus& aStatus) { if (!SubSessionHandle()) { @@ -549,6 +542,20 @@ } } +void RBTBaseband::TerminateAllPhysicalLinksForPowerOff(TRequestStatus& aStatus) + { + if (!SubSessionHandle()) + { + LocalComplete(aStatus, KErrNotReady); + } + else + { + TBuf8<1> dummy; + iSocket.Shutdown(RSocket::ENormal, KDisconnectAllPhysicalLinksForPowerOff, dummy, aStatus); // this *means* detach now + } + } + + TInt RBTBaseband::Enumerate(RBTDevAddrArray& aBTDevAddrArray, TUint aMaxNumber) { if (!SubSessionHandle()) diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinks.cpp --- a/bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinks.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinks.cpp Fri May 14 16:59:23 2010 +0300 @@ -164,7 +164,7 @@ } EXPORT_C TInt CBluetoothPhysicalLinks::DisconnectAll() -/** Disconnect all members of piconet +/** Disconnect all members of piconet with the reason code "Remote User Terminated Connection" @return Error code @capability NetworkControl */ @@ -176,10 +176,10 @@ //Allow ESock to do multiple disconnects BTBaseband().Close(); - TInt ESockErr = BTBaseband().Open(SockServer()); - if(ESockErr != KErrNone) + TInt openErr = BTBaseband().Open(SockServer()); + if(openErr != KErrNone) { - return ESockErr; + return openErr; } TRAPD(err, iBTDisconnector = CBTDisconnector::NewL(*this)); @@ -190,6 +190,33 @@ return err; } +EXPORT_C TInt CBluetoothPhysicalLinks::DisconnectAllForPowerOff() +/** Disconnect all members of piconet with the reason code "Remote Device Terminated Connection due to Power Off" +@return Error code +@capability NetworkControl +*/ + { + if(iBTDisconnector) + { + return KErrInUse; + } + + //Allow ESock to do multiple disconnects + BTBaseband().Close(); + TInt openErr = BTBaseband().Open(SockServer()); + if(openErr != KErrNone) + { + return openErr; + } + + TRAPD(err, iBTDisconnector = CBTDisconnector::NewL(*this)); + if(err == KErrNone) + { + iBTDisconnector->DisconnectAllForPowerOff(); + } + return err; + } + EXPORT_C TInt CBluetoothPhysicalLinks::Broadcast(const TDesC8& aData) /** Write (raw) broadcast data @@ -417,11 +444,22 @@ { __ASSERT_ALWAYS(!IsActive(), Panic(EUnfinishedBusiness)); - iParent.BTBaseband().TerminateAllPhysicalLinks(0, iStatus); + iParent.BTBaseband().TerminateAllPhysicalLinks(iStatus); iCurrentRequest = EDisconnectAll; SetActive(); } +void CBTDisconnector::DisconnectAllForPowerOff() + + { + __ASSERT_ALWAYS(!IsActive(), Panic(EUnfinishedBusiness)); + + iParent.BTBaseband().TerminateAllPhysicalLinksForPowerOff(iStatus); + iCurrentRequest = EDisconnectAll; + SetActive(); + } + + void CBTDisconnector::RunL() // //When logical socket has connected (only async bit), diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinkshelpers.h --- a/bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinkshelpers.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinkshelpers.h Fri May 14 16:59:23 2010 +0300 @@ -49,6 +49,7 @@ static CBTDisconnector* NewL(CBluetoothPhysicalLinks& aParent); void Disconnect(const TBTDevAddr& aBDAddr); void DisconnectAll(); + void DisconnectAllForPowerOff(); ~CBTDisconnector(); diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/bwins/BLUETOOTHU.DEF --- a/bluetoothmgmt/bluetoothclientlib/bwins/BLUETOOTHU.DEF Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/bwins/BLUETOOTHU.DEF Fri May 14 16:59:23 2010 +0300 @@ -354,4 +354,5 @@ ?SetMinMRU@TL2CapConfig@@QAEHG@Z @ 353 NONAME ; int TL2CapConfig::SetMinMRU(unsigned short) ?RetransmissionTimer@TL2CapConfig@@QBEGAAH@Z @ 354 NONAME ; unsigned short TL2CapConfig::RetransmissionTimer(int &) const ?MinMRU@TL2CapConfig@@QBEGAAH@Z @ 355 NONAME ; unsigned short TL2CapConfig::MinMRU(int &) const + ?DisconnectAllForPowerOff@CBluetoothPhysicalLinks@@QAEHXZ @ 356 NONAME ; int CBluetoothPhysicalLinks::DisconnectAllForPowerOff(void) diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/eabi/bluetoothU.def --- a/bluetoothmgmt/bluetoothclientlib/eabi/bluetoothU.def Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/eabi/bluetoothU.def Fri May 14 16:59:23 2010 +0300 @@ -408,4 +408,5 @@ _ZNK12TL2CapConfig21LegacyModesDisallowedEv @ 407 NONAME _ZNK12TL2CapConfig6MinMRUERi @ 408 NONAME _ZNK12TL2CapConfig6MinMTUERi @ 409 NONAME + _ZN23CBluetoothPhysicalLinks24DisconnectAllForPowerOffEv @ 410 NONAME diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/inc/bt_sock.h --- a/bluetoothmgmt/bluetoothclientlib/inc/bt_sock.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/inc/bt_sock.h Fri May 14 16:59:23 2010 +0300 @@ -191,6 +191,7 @@ // private tokens for use by RBTBaseband facade and stack _LIT8(KDisconnectOnePhysicalLink, "1"); /*!< Specifes one physical link should be disconnected */ _LIT8(KDisconnectAllPhysicalLinks, "A"); /*!< Specifes all physical links should be disconnected */ +_LIT8(KDisconnectAllPhysicalLinksForPowerOff, "P"); /*!< Specifes all physical links should be disconnected for power off*/ // HCI Ioctls /** Add SCO connnection Ioctl @@ -1533,6 +1534,7 @@ IMPORT_C void CancelCreateConnection(); IMPORT_C TInt Disconnect(const TBTDevAddr& aDevAddr); IMPORT_C TInt DisconnectAll(); + IMPORT_C TInt DisconnectAllForPowerOff(); IMPORT_C TInt Broadcast(const TDesC8& aData); IMPORT_C TInt ReadRaw(TDes8& aData); diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/bluetoothclientlib/inc/btbaseband.h --- a/bluetoothmgmt/bluetoothclientlib/inc/btbaseband.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/bluetoothclientlib/inc/btbaseband.h Fri May 14 16:59:23 2010 +0300 @@ -87,10 +87,10 @@ void TerminatePhysicalLink(TInt aReason, TRequestStatus& aStatus); void TerminatePhysicalLink(TInt aReason, const TBTDevAddr& aDevAddr, TRequestStatus& aStatus); void ShutdownPhysicalLink(TRequestStatus& aStatus); - void TerminateAllPhysicalLinks(TInt aReason); - void TerminateAllPhysicalLinks(TInt aReason, TRequestStatus& aStatus); + void TerminateAllPhysicalLinks(TRequestStatus& aStatus); + void TerminateAllPhysicalLinksForPowerOff(TRequestStatus& aStatus); TInt SubSessionHandle() const; - + private: TInt RequestRole(TBTLMOptions aRole); void LocalComplete(TRequestStatus& aStatus, TInt aErr); diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/btmgr/BTManServer/btmanserverburmgr.cpp --- a/bluetoothmgmt/btmgr/BTManServer/btmanserverburmgr.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/btmgr/BTManServer/btmanserverburmgr.cpp Fri May 14 16:59:23 2010 +0300 @@ -306,9 +306,9 @@ /** Receives notification that a restore file has been provided by the Secure Backup Engine. -Upon receiving this notification, the restore file is renamed to have the appropriate extension and -the local device name is updated in the registry. The restore of the remote devices table is postponed -until the next time BTManServer starts, so any ongoing BT connections are not affected. +Upon receiving this notification, the restore file is renamed to have the appropriate extension +The actual restore to the registry is postponed until the next time BTManServer starts, +so any ongoing BT connections are not affected. **/ void CBTManServerBURMgr::RestoreFileReady() { @@ -317,8 +317,6 @@ // Rename restore file RenameBackupFileForRestore(); - // Attempt to update local device name in the registry (best efforts only) - TRAP_IGNORE(UpdateLocalDeviceNameL()); } void CBTManServerBURMgr::HandleStateNormal() @@ -524,7 +522,7 @@ // Start restore file processing iRestoreHandler = CBTRestoreHandler::NewL(*this, iBTManServer); - iRestoreHandler->RestoreRemoteDeviceTableL(iLocalAddr); + iRestoreHandler->RestoreRegistryL(iLocalAddr); iStateMachine->TransitionState(EBTBUREventProcessRestoreFileComplete); } @@ -710,24 +708,6 @@ } } -/** -Parses the restore file and updates the loal device name in the registry. -This update takes place as soon as the restore file is available, regardless of whether or not the local device -address matches that held in the registry. If the local device name has already been set to a non-default value, -then it is not modified. -**/ -void CBTManServerBURMgr::UpdateLocalDeviceNameL() - { - LOG_FUNC - - CBTRestoreHandler* restoreHandler = CBTRestoreHandler::NewL(*this, iBTManServer); - CleanupStack::PushL(restoreHandler); - - restoreHandler->RestoreLocalDeviceNameL(); - - CleanupStack::PopAndDestroy(restoreHandler); - } - void CBTManServerBURMgr::RunL() { LOG_FUNC @@ -865,22 +845,7 @@ delete iRegistryData; } -void CBTRestoreHandler::RestoreLocalDeviceNameL() - { - LOG_FUNC - - LoadRestoreDataL(); - - // If the local device name is still default, restore without validating the local address - // (otherwise we will not be able to restore this field before the next stack start, which may cause problems with some UIs) - CBTRegistry& registry = iManServer.Registry(); - if (iRegistryData->WriteLocalDeviceNameToRegistryL(registry)) - { - NotifyLocalTableChange(); - } - } - -void CBTRestoreHandler::RestoreRemoteDeviceTableL(TBTDevAddr& aLocalAddr) +void CBTRestoreHandler::RestoreRegistryL(TBTDevAddr& aLocalAddr) { LOG_FUNC __ASSERT_DEBUG(aLocalAddr != TBTDevAddr(), PANIC(KBTBackupPanicCat, EBTBURMgrMissingLocalAddress)); @@ -890,9 +855,15 @@ // Compare local address held in restore file with our local address if (iRegistryData->IsLocalAddressEqualL(aLocalAddr)) { - // Proceed with restore of remote devices table + // Proceed with restore CBTRegistry& registry = iManServer.Registry(); + if (iRegistryData->WriteLocalDeviceNameToRegistryL(registry)) + { + NotifyLocalTableChange(); + NotifyLocalDeviceNameChange(iRegistryData->GetLocalDeviceNameL()); + } + TInt noRemoteDevices = iRegistryData->CountRemoteDevicesL(); for (TInt i = 0; i < noRemoteDevices; i++) { @@ -939,6 +910,39 @@ } /** +Sends a notification that the local device name has been changed. +This notification is observable through the P&S key KPRopertyKeyBluetoothSetDeviceName. +@param aLocalName The modified local device name as an 8-bit descriptor. +**/ +void CBTRestoreHandler::NotifyLocalDeviceNameChange(const TDesC8& aLocalName) + { + LOG_FUNC + + // The P&S key requires the local device name in unicode format. + TBuf16 localNameUniCode; + localNameUniCode.Copy(aLocalName); + + NotifyLocalDeviceNameChange(localNameUniCode); + } + +/** +Sends a notification that the local device name has been changed. +This notification is observable through the P&S key KPRopertyKeyBluetoothSetDeviceName. +@param aLocalName The modified local device name in unicode format. +**/ +void CBTRestoreHandler::NotifyLocalDeviceNameChange(const TDesC16& aLocalName) + { + LOG_FUNC + + // The KPropertyKeyBluetoothSetDeviceName P&S key may or may not exist at this point. + TInt err = RProperty::Set( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothSetDeviceName, aLocalName); + if (err != KErrNone && err != KErrNotFound) + { + LOG1(_L("CBTRegistryBURData::NotifyLocalDeviceNameChange() - RProperty::Set() failed with %d"), err); + } + } + +/** Sends a notification that a device in the remote devices table has been changed. The notification is observable through the P&S key KPropertyKeyBluetoothGetRegistryTableChange. Interested parties can also use RBTRegistry::NotifyViewChange() to detect if the change affects their view. @@ -1544,8 +1548,8 @@ } /** -Updates the persistence table of the registry with local device name held in this instance -if the registry currently holds a default name. +Updates the persistence table of the registry with local device name held in this instance. +The update is only performed if the local name held in this instance differs from that currently held in the registry. @param aRegistry The CBTRegistry instance to use for registry access. @return ETrue if an update was made to the registry. **/ @@ -1554,24 +1558,15 @@ LOG_FUNC TBool updateDone = EFalse; - - // Update device name only if the registry has a default name - TBTLocalDevice defaultDevice; - TRAP_IGNORE(aRegistry.GetDefaultDeviceFromIniL(defaultDevice)); - - if (!defaultDevice.IsValidDeviceName()) - { - // Could not obtain a default name - use KDefaultLocalName instead - defaultDevice.SetDeviceName(KDefaultLocalName); - } - + TBTLocalDevice* localDevice = aRegistry.GetLocalDeviceL(); CleanupStack::PushL(localDevice); - if (localDevice->DeviceName() == defaultDevice.DeviceName()) + const TDesC8& localName = GetLocalDeviceNameL(); + + if (localDevice->DeviceName() != localName) { - // Local device name is default, update with restored value. - localDevice->SetDeviceName(GetLocalDeviceNameL()); + localDevice->SetDeviceName(localName); aRegistry.UpdateLocalDeviceL(*localDevice); updateDone = ETrue; } @@ -1600,7 +1595,7 @@ const CBTDevice& nextRemDevice = GetRemoteDeviceL(aDeviceIndex); TSecureId nextRemDeviceSid = GetRemoteDeviceEntrySidL(aDeviceIndex); - // Try to add device to registry. If this fails with KErrAlreadExists, then update existing device. + // Try to add device to registry. If this fails with KErrAlreadyExists, then update existing device. TRAPD(err, aRegistry.CreateDeviceL(nextRemDevice, nextRemDevice.IsValidUiCookie(), nextRemDeviceSid)); if (err == KErrNone) diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/btmgr/BTManServer/btmanserverburmgr.h --- a/bluetoothmgmt/btmgr/BTManServer/btmanserverburmgr.h Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/btmgr/BTManServer/btmanserverburmgr.h Fri May 14 16:59:23 2010 +0300 @@ -157,7 +157,6 @@ void DeleteRestoreFile(); void RenameBackupFileForRestore(); - void UpdateLocalDeviceNameL(); // From CActive: void RunL(); @@ -213,8 +212,7 @@ static CBTRestoreHandler* NewL(CBTManServerBURMgr& aBURMgr, CBTManServer& aManServer); ~CBTRestoreHandler(); - void RestoreLocalDeviceNameL(); - void RestoreRemoteDeviceTableL(TBTDevAddr& aLocalAddr); + void RestoreRegistryL(TBTDevAddr& aLocalAddr); private: CBTRestoreHandler(CBTManServerBURMgr& aBURMgr, CBTManServer& aManServer); @@ -223,6 +221,8 @@ void LoadRestoreDataL(); void NotifyLocalTableChange(); + void NotifyLocalDeviceNameChange(const TDesC8& aLocalName); + void NotifyLocalDeviceNameChange(const TDesC16& aLocalName); void NotifyRemoteTableChangeL(const TBTDevAddr& aAddress); private: @@ -250,6 +250,7 @@ inline TBool HasRegistryData() const; void GetRegistryVersionL(TUint32& aRegistryVersionMajor, TUint32& aRegistryVersionMinor) const; + const TDesC8& GetLocalDeviceNameL() const; TBool IsLocalAddressNonZeroL() const; TBool IsLocalAddressEqualL(TBTDevAddr& aAddr) const; TInt CountRemoteDevicesL() const; @@ -262,8 +263,6 @@ CBTRegistryBURData(); void ConstructL(); - const TDesC8& GetLocalDeviceNameL() const; - private: TBool iHasRegistryData; diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/btrom/bluetooth.iby --- a/bluetoothmgmt/btrom/bluetooth.iby Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/btrom/bluetooth.iby Fri May 14 16:59:23 2010 +0300 @@ -80,7 +80,7 @@ REM *** Now for things which should only be included if the device REM *** supports bluetooth, to save ROM space... -#ifdef SYMBIAN_EXCLUDE_BLUETOOTH +#ifndef __BT REM Feature BLUETOOTH is not in this ROM (bluetooth.iby) #else @@ -133,7 +133,7 @@ #endif // BLUETOOTH_NO_AV -#endif // SYMBIAN_EXCLUDE_BLUETOOTH +#endif // __BT #endif diff -r 4b81101308c6 -r 5e5528a288fe bluetoothmgmt/btrom/hci.iby --- a/bluetoothmgmt/btrom/hci.iby Mon May 03 13:34:38 2010 +0300 +++ b/bluetoothmgmt/btrom/hci.iby Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -32,8 +32,12 @@ REM Symbian HCIv2 Framework DLLs - must be included #include -REM Reference HCIv2 DLLs - this will be branched/overwritten by the licensee to include the relevant files +REM hci_implementation.iby is provided elsewhere (platform-specific). +REM Use reference HCI implementation for H4, H6 and Naviengine. +#if ( defined __MOMAP24XX_H4HRP__ || defined __MOMAP34XX_SDP__ || defined __NE1_TB__ ) +#include +#else #include +#endif #endif // __HCI_IBY__ - diff -r 4b81101308c6 -r 5e5528a288fe bt_plat/at_command_handler_plugin_api/inc/atext.h --- a/bt_plat/at_command_handler_plugin_api/inc/atext.h Mon May 03 13:34:38 2010 +0300 +++ b/bt_plat/at_command_handler_plugin_api/inc/atext.h Fri May 14 16:59:23 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -69,15 +69,39 @@ IMPORT_C TInt SynchronousClose(); /** - * Handles a command. + * Handles a command. This API supports two modes: + * Normal mode (!EReplyTypeEditor) for normal use cases + * Editor mode (EReplyTypeEditor) for special AT commands with text mode + * + * Notes for parameters below: + * (1) Command to be handled is used in normal mode only. + * Editor mode is entered when the first EReplyTypeEditor reply is received (5). + * Editor mode is ended when the first !EReplyTypeEditor reply is received (5). + * (2) Data received is character set independent; this API is called byte-by-byte + * in editor mode. + * (3) The reply string is not used in editor mode's text input. + * Only editor mode's start condition (prompt) and end condition + * (!EReplyTypeEditor) handle the possibly existing reply string. + * (4) The remaining reply length setting is not used in editor mode's text input. + * It is only used in editor mode's start condition (prompt) and end condition + * (!EReplyTypeEditor) + * (5) Normal mode: Other than EReplyTypeEditor reply. + * Editor mode: Started with EReplyTypeEditor, continued with EReplyTypeEditor, + * Ended with !EReplyTypeEditor + * Note: the first reply with EReplyTypeEditor is the "prompt". + * Subsequent replies with EReplyTypeEditor are ignored. + * + * Note: The editor mode supported by this API should only be used for + * commands not requiring support for signals. These commands include cases + * such as DCD signal required by command AT+CMGS. * * @since S60 v5.0 * @param aStatus The request status - * @param aCmd The command to be handled. - * @param aReply The descriptor to hold reply to this command; + * @param aCmd The command to be handled (1) or data for editor mode (2). + * @param aReply The descriptor to hold reply to this command (3). * @param aRemainingReplyLength Tells the length of remaining reply if it is not 0; - * the remainings can be fetched by GetNextPartOfReply(). - * @param aReplyType Reply type for the handled AT command + * the remainings can be fetched by GetNextPartOfReply() (4). + * @param aReplyType Reply type for the handled AT command (1) or editor mode (2) (5). * @return Symbian error code on error, KErrNone otherwise */ IMPORT_C TInt HandleCommand( TRequestStatus& aStatus, @@ -88,6 +112,9 @@ /** * Cancels a command handling request. + * Calling this API in editor mode also causes ATEXT to reset the information + * about the plugin currently handling byte-by-byte data. + * This causes the next command to be handled in normal mode. * * @since S60 v5.0 * @return Symbian error code on error, KErrNone otherwise diff -r 4b81101308c6 -r 5e5528a288fe bt_plat/at_command_handler_plugin_api/inc/atextpluginbase.h --- a/bt_plat/at_command_handler_plugin_api/inc/atextpluginbase.h Mon May 03 13:34:38 2010 +0300 +++ b/bt_plat/at_command_handler_plugin_api/inc/atextpluginbase.h Fri May 14 16:59:23 2010 +0300 @@ -33,9 +33,10 @@ enum TATExtensionReplyType { EReplyTypeUndefined, // For error conditions (handling failed) - EReplyTypeOther, // For other than OK or ERROR - EReplyTypeOk, // For "OK" - EReplyTypeError, // For "ERROR" + EReplyTypeOther, // !(EReplyTypeOk||EReplyTypeError||EReplyTypeEditor) + EReplyTypeOk, // For "OK" (or "" in quiet mode) + EReplyTypeError, // For "ERROR" (or "" in quiet mode) + EReplyTypeEditor, // For editor mode }; /** Default buffer length for command reply buffer */ @@ -143,6 +144,11 @@ * After an extension plugin has handled or decided to reject the given AT * command, it must inform ATEXT by HandleCommandCompleted() with a proper * error code. + * + * Note that in editor mode the setting of aReplyNeeded is always "ETrue" + * when a plugin processing the editor mode meets the end condition for the + * editor mode (!EReplyTypeEditor reply in editor mode). In this case the + * plugin must create the last reply even when aReplyNeeded is EFalse. * * @since S60 5.0 * @param aCmd The AT command to be handled. Its format may vary depending diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/Commands.txt --- a/bthci/bthci2/CommandsEvents/generator/Commands.txt Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/Commands.txt Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -12,7 +12,6 @@ # # Description: # - # Bluetooth HCI Commands to be generated # Syntax is documented below. ("[]" brackets are used for grouping with regexp wildcards, and wildcard operators will only directly follow a ']') # @@ -42,7 +41,7 @@ PeriodicInquiryMode(1,False,True): MaxPeriodLength (2), MinPeriodLength (2), LAP (3), InquiryLength (1), NumResponses (1) ExitPeriodicInquiryMode(1,False,True): CreateACLConnection(1,True,False,Match,ConnectionCompleteEvent,True,False,BDADDR): BDADDR (6), PacketType (2), PageScanRepetitionMode (1), Reserved (1), ClockOffset (2), AllowRoleSwitch (1) -Disconnect(1,True,False,Match,DisconnectionCompleteEvent,True,False): ConnectionHandle (2), Reason (1) +Disconnect(1,True,False,Match,DisconnectionCompleteEvent,True,False,ConnectionHandle): ConnectionHandle (2), Reason (1) CreateConnectionCancel(1,False,True): BDADDR (6) AcceptConnectionRequest(1,True,False,Match,ConnectionCompleteEvent,True,False,BDADDR): BDADDR (6), Role (1) RejectConnectionRequest(1,True,False,Match,ConnectionCompleteEvent,True,False,BDADDR): BDADDR (6), Reason (1) @@ -83,7 +82,7 @@ ExitParkMode(1,True,False,Match,ModeChangeEvent,True,False,ConnectionHandle): ConnectionHandle (2) QOSSetup(1,True,False,Match,QOSSetupCompleteEvent,True,False): ConnectionHandle (2), Flags (1), ServiceType (1), TokenRate (4), PeakBandwidth (4), Latency (4), DelayVariation (4) RoleDiscovery(1,False,True): ConnectionHandle (2) -SwitchRole(1,True,False,Match,RoleChangeEvent,True,False): BDADDR (6), Role (1) +SwitchRole(1,True,False,Match,RoleChangeEvent,True,False,BDADDR): BDADDR (6), Role (1) ReadLinkPolicySettings(1,False,True): ConnectionHandle (2) WriteLinkPolicySettings(1,False,True): ConnectionHandle (2), LinkPolicySettings (2) ReadDefaultLinkPolicySettings(1,False,True): diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/CompleteEvents.txt --- a/bthci/bthci2/CommandsEvents/generator/CompleteEvents.txt Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/CompleteEvents.txt Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -12,7 +12,6 @@ # # Description: # - # # Complete Events for Commands listed in the spec. # diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/Events.txt --- a/bthci/bthci2/CommandsEvents/generator/Events.txt Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/Events.txt Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -12,7 +12,6 @@ # # Description: # - # ##### 7.7 Events # diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/command.py --- a/bthci/bthci2/CommandsEvents/generator/command.py Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/command.py Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of "Eclipse Public License v1.0" @@ -40,7 +40,7 @@ import re import string -from parameter import makeParameters, makeMembers +from parameter import makeParameters, makeMembers, makeNonOwnedParameters, makeOwnedParameters from time import strftime from utils import doTimeStampCompareAndWrite @@ -49,16 +49,32 @@ ctor_str = "" for p in aParams: - ctor_str += 'a' + p.getName() + ', ' + if not p.Owned(): + ctor_str += 'a' + p.getName() + ', ' return ctor_str[:-2] + +def makeConstructLParameters(aParams): + conl_str = "" + + for p in aParams: + if p.Owned(): + conl_str += 'a' + p.getName() + ', ' + + return conl_str[:-2] + +# determines if a custom ConstructL needs to be created for this class +# currently this is only needed for handling owned parameters. +def customConstructL(aParams): + return makeConstructLParameters(aParams) != '' # makes member initialization part of constructor def makeMemberInitialization(aParams): init_str = ", " for p in aParams: - init_str += 'i' + p.getName() + '(a' + p.getName() + ')\n\t, ' + if not p.Owned(): + init_str += 'i' + p.getName() + '(a' + p.getName() + ')\n\t, ' return init_str[:-4] @@ -71,12 +87,12 @@ return def_str + 'IMPORT_C static C' + aClass +'* NewL();' -def makeNewLImp(aClass, aParamString, aConsParamString): +def makeNewLImp(aClass, aParamString, aConsParamString, aConstructLString): imp_str = '' imp_str += 'EXPORT_C C' + aClass + '* C' + aClass + '::NewL(' + aParamString + ')\n\t{\n\t' imp_str += 'C' + aClass + '* self = new (ELeave) C' + aClass + '(' + aConsParamString + ');\n\t' imp_str += 'CleanupStack::PushL(self);\n\t' - imp_str += 'self->CHCICommandBase::BaseConstructL();\n\t' + imp_str += 'self->' + aConstructLString + ';\n\t' imp_str += 'CleanupStack::Pop(self);\n\t' imp_str += 'return self;\n\t}' return imp_str @@ -86,20 +102,33 @@ imp_str = '' if len(aParams) > 0: - imp_str += makeNewLImp(aClass, makeParameters(aParams), makeConstructorParameters(aParams)) + imp_str += makeNewLImp(aClass, makeParameters(aParams), makeConstructorParameters(aParams), makeConstructLCall(aParams)) imp_str += '\n\n' - imp_str += makeNewLImp(aClass, '', '') - return imp_str + imp_str += makeNewLImp(aClass, '', '', 'CHCICommandBase::BaseConstructL()') + return imp_str + +def makeConstructLCall(aParams): + imp_str = '' + if customConstructL(aParams): + imp_str += 'ConstructL(' + makeConstructLParameters(aParams) + ')' + else: + imp_str += 'CHCICommandBase::BaseConstructL()' + return imp_str -# makes class constructor definition +# makes class constructor definition (also ConstructL if appropriate). def makeConstructorDefinitions(aParams, aClass): def_str = '' if len(aParams) > 0: - def_str += 'C' + aClass + '(' + makeParameters(aParams) + ');\n\t' + def_str += 'C' + aClass + '(' + makeNonOwnedParameters(aParams) + ');\n\t' + + def_str += 'C' + aClass + '();' + + if customConstructL(aParams): + def_str += '\n\tvoid ConstructL(' + makeOwnedParameters(aParams) + ');' - return def_str + 'C' + aClass + '();' + return def_str # makes class constructor implementation def makeConstructorImplementations(aParams, aClass, aMatchParams): @@ -110,7 +139,7 @@ ExpCmdComplete = aMatchParams[2] if len(aParams) > 0: - imp_str += 'C' + aClass + 'Command::C' + aClass + 'Command(' + makeParameters(aParams) + ')\n\t: CHCICommandBase(K' + aClass + 'Opcode)\n\t' + makeMemberInitialization(aParams) + '\n\t{\n\t' + imp_str += 'C' + aClass + 'Command::C' + aClass + 'Command(' + makeNonOwnedParameters(aParams) + ')\n\t: CHCICommandBase(K' + aClass + 'Opcode)\n\t' + makeMemberInitialization(aParams) + '\n\t{\n\t' if int(CreditsConsumed) != 1: imp_str += 'SetCreditsConsumed(' + str(CreditsConsumed) + ');\n\t' if ExpCmdStatus == 'False': @@ -128,6 +157,11 @@ imp_str += 'SetExpectsCommandCompleteEvent(EFalse);\n\t' imp_str += '}' + + if customConstructL(aParams): + imp_str += '\n\nvoid C' + aClass + 'Command::ConstructL(' + makeOwnedParameters(aParams) + ')\n\t{\n\tCHCICommandBase::BaseConstructL();\n\t' + imp_str += makeOwnedMemberAssignment(aParams) + imp_str += '\n\t}' return imp_str @@ -200,6 +234,15 @@ ass_str += p.memberAssignment() + '\n\t' return ass_str[:-2] + +def makeOwnedMemberAssignment(aParams): + ass_str = '' + + for p in aParams: + if p.Owned(): + ass_str += p.memberAssignment() + '\n\t' + + return ass_str[:-2] # make getter definition of form Param() def makeAccessorDefinitions(aParams): diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/commandheader.tmpl --- a/bthci/bthci2/CommandsEvents/generator/commandheader.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/commandheader.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/commandsource.tmpl --- a/bthci/bthci2/CommandsEvents/generator/commandsource.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/commandsource.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/commandteststepheader.tmpl --- a/bthci/bthci2/CommandsEvents/generator/commandteststepheader.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/commandteststepheader.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/commandteststepsource.tmpl --- a/bthci/bthci2/CommandsEvents/generator/commandteststepsource.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/commandteststepsource.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/completeeventheader.tmpl --- a/bthci/bthci2/CommandsEvents/generator/completeeventheader.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/completeeventheader.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/completeeventsource.tmpl --- a/bthci/bthci2/CommandsEvents/generator/completeeventsource.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/completeeventsource.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/dllmmp.ini --- a/bthci/bthci2/CommandsEvents/generator/dllmmp.ini Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/dllmmp.ini Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). ; All rights reserved. ; This component and the accompanying materials are made available ; under the terms of the License "Eclipse Public License v1.0" @@ -16,17 +16,17 @@ [Commands] Datafile=Commands.txt HeaderPath=../interface -SourcePath=../../../CommandsEvents/symbian/src +SourcePath=../../../../hci2implementations/CommandsEvents/symbian/src Postfix=command [Events] Datafile=Events.txt HeaderPath=../interface -SourcePath=../../../CommandsEvents/symbian/src +SourcePath=../../../../hci2implementations/CommandsEvents/symbian/src Postfix=event [CompleteEvents] Datafile=CompleteEvents.txt HeaderPath=../interface -SourcePath=../../../CommandsEvents/symbian/src +SourcePath=../../../../hci2implementations/CommandsEvents/symbian/src Postfix=completeevent diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/dllmmp.tmpl --- a/bthci/bthci2/CommandsEvents/generator/dllmmp.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/dllmmp.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // @@ -59,3 +59,6 @@ OPTION cw -strict on -w pedantic,unused,hidevirtual,padding,ptrintconv UNPAGED + +SMPSAFE + diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/eventheader.tmpl --- a/bthci/bthci2/CommandsEvents/generator/eventheader.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/eventheader.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/eventsource.tmpl --- a/bthci/bthci2/CommandsEvents/generator/eventsource.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/eventsource.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/eventteststepheader.tmpl --- a/bthci/bthci2/CommandsEvents/generator/eventteststepheader.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/eventteststepheader.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/eventteststepsource.tmpl --- a/bthci/bthci2/CommandsEvents/generator/eventteststepsource.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/eventteststepsource.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/generator.bat --- a/bthci/bthci2/CommandsEvents/generator/generator.bat Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/generator.bat Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -REM Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +REM Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). REM All rights reserved. REM This component and the accompanying materials are made available REM under the terms of "Eclipse Public License v1.0" @@ -13,9 +13,9 @@ REM Description: REM -python generator.py -i dllmmp.ini -t mmp dllmmp.tmpl ..\..\..\implementations\CommandsEvents\symbian\group\commandsevents_symbian.mmp +python generator.py -i dllmmp.ini -t mmp dllmmp.tmpl ..\..\..\hci2implementations\CommandsEvents\symbian\group\commandsevents_symbian.mmp python generator.py -i hcidata.ini -t impl IF "%1" == "" GOTO :END -python generator.py -i testmmp.ini -t mmp testmmp.tmpl ..\..\..\implementations\CommandsEvents\symbian\group\hcitestserver.mmp +python generator.py -i testmmp.ini -t mmp testmmp.tmpl ..\..\..\hci2implementations\CommandsEvents\symbian\group\hcitestserver.mmp python generator.py -i testserver.ini -t test :END diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/hcidata.ini --- a/bthci/bthci2/CommandsEvents/generator/hcidata.ini Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/hcidata.ini Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). ; All rights reserved. ; This component and the accompanying materials are made available ; under the terms of the License "Eclipse Public License v1.0" @@ -22,7 +22,7 @@ TestStepHeaderTemplate=commandteststepheader.tmpl TestStepSourceTemplate=commandteststepsource.tmpl HeaderPath=../interface -SourcePath=../../../implementations/CommandsEvents/symbian/src +SourcePath=../../../hci2implementations/CommandsEvents/symbian/src [Events] Datafile=Events.txt @@ -33,7 +33,7 @@ TestStepHeaderTemplate=eventteststepheader.tmpl TestStepSourceTemplate=eventteststepsource.tmpl HeaderPath=../interface -SourcePath=../../../implementations/CommandsEvents/symbian/src +SourcePath=../../../hci2implementations/CommandsEvents/symbian/src [CompleteEvents] Datafile=CompleteEvents.txt @@ -44,5 +44,5 @@ TestStepHeaderTemplate=eventteststepheader.tmpl TestStepSourceTemplate=eventteststepsource.tmpl HeaderPath=../interface -SourcePath=../../../implementations/CommandsEvents/symbian/src +SourcePath=../../../hci2implementations/CommandsEvents/symbian/src diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/hcitestscript.tmpl --- a/bthci/bthci2/CommandsEvents/generator/hcitestscript.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/hcitestscript.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/hcitestserverheader.tmpl --- a/bthci/bthci2/CommandsEvents/generator/hcitestserverheader.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/hcitestserverheader.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/hcitestserversource.tmpl --- a/bthci/bthci2/CommandsEvents/generator/hcitestserversource.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/hcitestserversource.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/parameter.py --- a/bthci/bthci2/CommandsEvents/generator/parameter.py Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/parameter.py Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of "Eclipse Public License v1.0" @@ -21,6 +21,24 @@ param_str += p.toParameter() + ', ' return param_str[:-2] + +def makeOwnedParameters(aParams): + param_str = "" + + for p in aParams: + if p.Owned(): + param_str += p.toParameter() + ', ' + + return param_str[:-2] + +def makeNonOwnedParameters(aParams): + param_str = "" + + for p in aParams: + if not p.Owned(): + param_str += p.toParameter() + ', ' + + return param_str[:-2] # Creates a ;\n\t separated string of parameters suitable for class member declarations. def makeMembers(aParams): @@ -145,3 +163,8 @@ # Returns a string of the format 'iName = aName;' def memberAssignment(self): return 'i' + self.getName() + ' = a' + self.getName() + ';' + + def Owned(self): + return self.iArray != '' + + diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/generator/testmmp.tmpl --- a/bthci/bthci2/CommandsEvents/generator/testmmp.tmpl Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/generator/testmmp.tmpl Fri May 14 16:59:23 2010 +0300 @@ -1,7 +1,7 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Eclipse Public License v1.0" +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/interface/hostnumberofcompletedpacketscommand.h --- a/bthci/bthci2/CommandsEvents/interface/hostnumberofcompletedpacketscommand.h Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/interface/hostnumberofcompletedpacketscommand.h Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandheader.tmpl -// on Wed, 25 Jul 2007 17:00:38 (time stamp) +// on Wed, 07 Apr 2010 11:43:50 (time stamp) // // @@ -55,8 +55,9 @@ virtual TInt Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData); private: - CHostNumberOfCompletedPacketsCommand(TUint8 aNumberOfHandles, const RArray< THCIConnectionHandle >& aConnectionHandle, const RArray< THCINumOfCompletedPackets >& aHostNumOfCompletedPackets); + CHostNumberOfCompletedPacketsCommand(TUint8 aNumberOfHandles); CHostNumberOfCompletedPacketsCommand(); + void ConstructL(const RArray< THCIConnectionHandle >& aConnectionHandle, const RArray< THCINumOfCompletedPackets >& aHostNumOfCompletedPackets); // From CHCICommandBase - knows how to format the parameters of this specific command // into the HCTL frame diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/interface/writecurrentiaclapcommand.h --- a/bthci/bthci2/CommandsEvents/interface/writecurrentiaclapcommand.h Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/interface/writecurrentiaclapcommand.h Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandheader.tmpl -// on Wed, 25 Jul 2007 17:00:39 (time stamp) +// on Wed, 07 Apr 2010 11:43:52 (time stamp) // // @@ -54,8 +54,9 @@ virtual TInt Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData); private: - CWriteCurrentIACLAPCommand(TUint8 aNumCurrentIAC, const RArray< TUint32 >& aIACLAP); + CWriteCurrentIACLAPCommand(TUint8 aNumCurrentIAC); CWriteCurrentIACLAPCommand(); + void ConstructL(const RArray< TUint32 >& aIACLAP); // From CHCICommandBase - knows how to format the parameters of this specific command // into the HCTL frame diff -r 4b81101308c6 -r 5e5528a288fe bthci/bthci2/CommandsEvents/interface/writestoredlinkkeycommand.h --- a/bthci/bthci2/CommandsEvents/interface/writestoredlinkkeycommand.h Mon May 03 13:34:38 2010 +0300 +++ b/bthci/bthci2/CommandsEvents/interface/writestoredlinkkeycommand.h Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandheader.tmpl -// on Wed, 25 Jul 2007 17:00:40 (time stamp) +// on Wed, 07 Apr 2010 11:43:53 (time stamp) // // @@ -55,8 +55,9 @@ virtual TInt Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData); private: - CWriteStoredLinkKeyCommand(TUint8 aNumKeysToWrite, const RArray< TBTDevAddr >& aBDADDR, const RArray< TBTLinkKey >& aLinkKey); + CWriteStoredLinkKeyCommand(TUint8 aNumKeysToWrite); CWriteStoredLinkKeyCommand(); + void ConstructL(const RArray< TBTDevAddr >& aBDADDR, const RArray< TBTLinkKey >& aLinkKey); // From CHCICommandBase - knows how to format the parameters of this specific command // into the HCTL frame diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/CommandsEvents/symbian/group/commandsevents_symbian.mmp --- a/bthci/hci2implementations/CommandsEvents/symbian/group/commandsevents_symbian.mmp Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/CommandsEvents/symbian/group/commandsevents_symbian.mmp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template dllmmp.tmpl -// on Wed, 08 Oct 2008 11:20:24 (time stamp) +// on Wed, 07 Apr 2010 12:58:00 (time stamp) // // @@ -27,7 +27,7 @@ VENDORID 0x70000001 CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData -SOURCEPATH ../../../CommandsEvents/symbian/src +SOURCEPATH ../../../../hci2implementations/CommandsEvents/symbian/src SOURCE nopcompleteevent.cpp SOURCE inquirycancelcompleteevent.cpp SOURCE periodicinquirymodecompleteevent.cpp @@ -138,7 +138,7 @@ SOURCE readencryptionmodecompleteevent.cpp SOURCE writeencryptionmodecompleteevent.cpp -SOURCEPATH ../../../CommandsEvents/symbian/src +SOURCEPATH ../../../../hci2implementations/CommandsEvents/symbian/src SOURCE inquirycommand.cpp SOURCE inquirycancelcommand.cpp SOURCE periodicinquirymodecommand.cpp @@ -277,7 +277,7 @@ SOURCE readencryptionmodecommand.cpp SOURCE writeencryptionmodecommand.cpp -SOURCEPATH ../../../CommandsEvents/symbian/src +SOURCEPATH ../../../../hci2implementations/CommandsEvents/symbian/src SOURCE inquirycompleteevent.cpp SOURCE inquiryresultevent.cpp SOURCE connectioncompleteevent.cpp @@ -363,3 +363,4 @@ UNPAGED SMPSAFE + diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/CommandsEvents/symbian/src/disconnectcommand.cpp --- a/bthci/hci2implementations/CommandsEvents/symbian/src/disconnectcommand.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/CommandsEvents/symbian/src/disconnectcommand.cpp Fri May 14 16:59:23 2010 +0300 @@ -81,9 +81,13 @@ { if (aEvent.EventCode() == EDisconnectionCompleteEvent) { - aMatchesCmd = ETrue; - aConcludesCmd = ETrue; - aContinueMatching = EFalse; + TDisconnectionCompleteEvent& event = TDisconnectionCompleteEvent::Cast(aEvent); + if (event.ConnectionHandle() == ConnectionHandle()) + { + aMatchesCmd = ETrue; + aConcludesCmd = ETrue; + aContinueMatching = EFalse; + } } // Command Status Event and default Command Complete Event matching // is implemented in the base class. If we haven't matched already diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/CommandsEvents/symbian/src/hostnumberofcompletedpacketscommand.cpp --- a/bthci/hci2implementations/CommandsEvents/symbian/src/hostnumberofcompletedpacketscommand.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/CommandsEvents/symbian/src/hostnumberofcompletedpacketscommand.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandsource.tmpl -// on Thu, 29 May 2008 15:17:49 (time stamp) +// on Wed, 07 Apr 2010 11:59:26 (time stamp) // // @@ -38,9 +38,9 @@ EXPORT_C CHostNumberOfCompletedPacketsCommand* CHostNumberOfCompletedPacketsCommand::NewL(TUint8 aNumberOfHandles, const RArray< THCIConnectionHandle >& aConnectionHandle, const RArray< THCINumOfCompletedPackets >& aHostNumOfCompletedPackets) { - CHostNumberOfCompletedPacketsCommand* self = new (ELeave) CHostNumberOfCompletedPacketsCommand(aNumberOfHandles, aConnectionHandle, aHostNumOfCompletedPackets); + CHostNumberOfCompletedPacketsCommand* self = new (ELeave) CHostNumberOfCompletedPacketsCommand(aNumberOfHandles); CleanupStack::PushL(self); - self->CHCICommandBase::BaseConstructL(); + self->ConstructL(aConnectionHandle, aHostNumOfCompletedPackets); CleanupStack::Pop(self); return self; } @@ -56,11 +56,9 @@ // Constructors -CHostNumberOfCompletedPacketsCommand::CHostNumberOfCompletedPacketsCommand(TUint8 aNumberOfHandles, const RArray< THCIConnectionHandle >& aConnectionHandle, const RArray< THCINumOfCompletedPackets >& aHostNumOfCompletedPackets) +CHostNumberOfCompletedPacketsCommand::CHostNumberOfCompletedPacketsCommand(TUint8 aNumberOfHandles) : CHCICommandBase(KHostNumberOfCompletedPacketsOpcode) , iNumberOfHandles(aNumberOfHandles) - , iConnectionHandle(aConnectionHandle) - , iHostNumOfCompletedPackets(aHostNumOfCompletedPackets) { SetCreditsConsumed(0); SetExpectsCommandStatusEvent(EFalse); @@ -75,6 +73,13 @@ SetExpectsCommandCompleteEvent(EFalse); } +void CHostNumberOfCompletedPacketsCommand::ConstructL(const RArray< THCIConnectionHandle >& aConnectionHandle, const RArray< THCINumOfCompletedPackets >& aHostNumOfCompletedPackets) + { + CHCICommandBase::BaseConstructL(); + iConnectionHandle = aConnectionHandle; + iHostNumOfCompletedPackets = aHostNumOfCompletedPackets; + } + // Destructor CHostNumberOfCompletedPacketsCommand::~CHostNumberOfCompletedPacketsCommand() { diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/CommandsEvents/symbian/src/switchrolecommand.cpp --- a/bthci/hci2implementations/CommandsEvents/symbian/src/switchrolecommand.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/CommandsEvents/symbian/src/switchrolecommand.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandsource.tmpl -// on Thu, 29 May 2008 15:17:48 (time stamp) +// on Fri, 26 Mar 2010 16:16:13 (time stamp) // // @@ -81,9 +81,13 @@ { if (aEvent.EventCode() == ERoleChangeEvent) { - aMatchesCmd = ETrue; - aConcludesCmd = ETrue; - aContinueMatching = EFalse; + TRoleChangeEvent& event = TRoleChangeEvent::Cast(aEvent); + if (event.BDADDR() == BDADDR()) + { + aMatchesCmd = ETrue; + aConcludesCmd = ETrue; + aContinueMatching = EFalse; + } } // Command Status Event and default Command Complete Event matching // is implemented in the base class. If we haven't matched already diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/CommandsEvents/symbian/src/writecurrentiaclapcommand.cpp --- a/bthci/hci2implementations/CommandsEvents/symbian/src/writecurrentiaclapcommand.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/CommandsEvents/symbian/src/writecurrentiaclapcommand.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandsource.tmpl -// on Thu, 29 May 2008 15:17:52 (time stamp) +// on Wed, 07 Apr 2010 11:59:28 (time stamp) // // @@ -38,9 +38,9 @@ EXPORT_C CWriteCurrentIACLAPCommand* CWriteCurrentIACLAPCommand::NewL(TUint8 aNumCurrentIAC, const RArray< TUint32 >& aIACLAP) { - CWriteCurrentIACLAPCommand* self = new (ELeave) CWriteCurrentIACLAPCommand(aNumCurrentIAC, aIACLAP); + CWriteCurrentIACLAPCommand* self = new (ELeave) CWriteCurrentIACLAPCommand(aNumCurrentIAC); CleanupStack::PushL(self); - self->CHCICommandBase::BaseConstructL(); + self->ConstructL(aIACLAP); CleanupStack::Pop(self); return self; } @@ -56,10 +56,9 @@ // Constructors -CWriteCurrentIACLAPCommand::CWriteCurrentIACLAPCommand(TUint8 aNumCurrentIAC, const RArray< TUint32 >& aIACLAP) +CWriteCurrentIACLAPCommand::CWriteCurrentIACLAPCommand(TUint8 aNumCurrentIAC) : CHCICommandBase(KWriteCurrentIACLAPOpcode) , iNumCurrentIAC(aNumCurrentIAC) - , iIACLAP(aIACLAP) { SetExpectsCommandStatusEvent(EFalse); } @@ -70,6 +69,12 @@ SetExpectsCommandStatusEvent(EFalse); } +void CWriteCurrentIACLAPCommand::ConstructL(const RArray< TUint32 >& aIACLAP) + { + CHCICommandBase::BaseConstructL(); + iIACLAP = aIACLAP; + } + // Destructor CWriteCurrentIACLAPCommand::~CWriteCurrentIACLAPCommand() { diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/CommandsEvents/symbian/src/writestoredlinkkeycommand.cpp --- a/bthci/hci2implementations/CommandsEvents/symbian/src/writestoredlinkkeycommand.cpp Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/CommandsEvents/symbian/src/writestoredlinkkeycommand.cpp Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // This file was generated automatically from the template commandsource.tmpl -// on Thu, 29 May 2008 15:17:53 (time stamp) +// on Wed, 07 Apr 2010 11:59:29 (time stamp) // // @@ -38,9 +38,9 @@ EXPORT_C CWriteStoredLinkKeyCommand* CWriteStoredLinkKeyCommand::NewL(TUint8 aNumKeysToWrite, const RArray< TBTDevAddr >& aBDADDR, const RArray< TBTLinkKey >& aLinkKey) { - CWriteStoredLinkKeyCommand* self = new (ELeave) CWriteStoredLinkKeyCommand(aNumKeysToWrite, aBDADDR, aLinkKey); + CWriteStoredLinkKeyCommand* self = new (ELeave) CWriteStoredLinkKeyCommand(aNumKeysToWrite); CleanupStack::PushL(self); - self->CHCICommandBase::BaseConstructL(); + self->ConstructL(aBDADDR, aLinkKey); CleanupStack::Pop(self); return self; } @@ -56,11 +56,9 @@ // Constructors -CWriteStoredLinkKeyCommand::CWriteStoredLinkKeyCommand(TUint8 aNumKeysToWrite, const RArray< TBTDevAddr >& aBDADDR, const RArray< TBTLinkKey >& aLinkKey) +CWriteStoredLinkKeyCommand::CWriteStoredLinkKeyCommand(TUint8 aNumKeysToWrite) : CHCICommandBase(KWriteStoredLinkKeyOpcode) , iNumKeysToWrite(aNumKeysToWrite) - , iBDADDR(aBDADDR) - , iLinkKey(aLinkKey) { SetExpectsCommandStatusEvent(EFalse); } @@ -71,6 +69,13 @@ SetExpectsCommandStatusEvent(EFalse); } +void CWriteStoredLinkKeyCommand::ConstructL(const RArray< TBTDevAddr >& aBDADDR, const RArray< TBTLinkKey >& aLinkKey) + { + CHCICommandBase::BaseConstructL(); + iBDADDR = aBDADDR; + iLinkKey = aLinkKey; + } + // Destructor CWriteStoredLinkKeyCommand::~CWriteStoredLinkKeyCommand() { diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/group/bld.inf --- a/bthci/hci2implementations/group/bld.inf Mon May 03 13:34:38 2010 +0300 +++ b/bthci/hci2implementations/group/bld.inf Fri May 14 16:59:23 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -27,4 +27,4 @@ #include "../CommandsEvents/symbian/group/bld.inf" PRJ_EXPORTS -hci_implementation.iby /epoc32/rom/include/hci_implementation.iby +hci_implementation_reference.iby /epoc32/rom/include/hci_implementation_reference.iby diff -r 4b81101308c6 -r 5e5528a288fe bthci/hci2implementations/group/hci_implementation.iby --- a/bthci/hci2implementations/group/hci_implementation.iby Mon May 03 13:34:38 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef HCI_IMPLMENTATION_IBY -#define HCI_IMPLMENTATION_IBY - -// If __HCI_DEBUG__ is defined pull in debug versions of the -// HCI DLLs and Plugins regardless of the ROM type -#ifdef __HCI_DEBUG__ -define HCI_DIR UDEB -#define HCI_PLUGIN ECOM_PLUGIN_UDEB -#else -define HCI_DIR BUILD_DIR -#define HCI_PLUGIN ECOM_PLUGIN -#endif - -#include -#include -#include - -#ifdef HCI_TI - -#include -#include - -#else // CSR + Default - -#include -#include - -#endif - -#endif // HCI_IMPLMENTATION_IBY