Revision: 201011 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 17:08:52 +0300
branchRCL_3
changeset 13 16aa830c86c8
parent 12 9b6d3ca0c601
child 14 f8503e232b0c
Revision: 201011 Kit: 201015
bluetooth/btdocs/Designs/backuprestore.mdzip
bluetooth/btdocs/Designs/bnep.dot
bluetooth/btdocs/Designs/generate-bnep-document.ebs
bluetooth/btdocs/Test_Specs/Bluetooth_Test_README.xls
bluetooth/btdocs/Test_Specs/Bluetooth_Test_Spec_AFH.xls
bluetooth/btdocs/bluetooth_documentation.history.xml
bluetooth/btdocs/bluetooth_documentation.mrp
bluetooth/btexample/test/group/bld.inf
bluetooth/btlogger/group/BLD.INF
bluetooth/btstack/avdtp/avdtpSignallingChannel.h
bluetooth/btstack/rfcomm/rfcommflow.cpp
bluetooth/btstack/rfcomm/rfcommsap.cpp
bluetooth/btstack/rfcomm/rfcommsap.h
bluetooth/btstack/rfcomm/rfcommstates.cpp
bluetooth/btstack/rfcomm/rfcommutil.h
bluetoothmgmt/btcommon/bld.inf
bthci/bthci2/CommandsEvents/generator/Commands.txt
bthci/bthci2/CommandsEvents/generator/CompleteEvents.txt
bthci/bthci2/CommandsEvents/generator/Events.txt
bthci/bthci2/CommandsEvents/generator/commandheader.tmpl
bthci/bthci2/CommandsEvents/generator/commandsource.tmpl
bthci/bthci2/CommandsEvents/generator/commandteststepheader.tmpl
bthci/bthci2/CommandsEvents/generator/commandteststepsource.tmpl
bthci/bthci2/CommandsEvents/generator/completeeventheader.tmpl
bthci/bthci2/CommandsEvents/generator/completeeventsource.tmpl
bthci/bthci2/CommandsEvents/generator/dllmmp.ini
bthci/bthci2/CommandsEvents/generator/dllmmp.tmpl
bthci/bthci2/CommandsEvents/generator/eventheader.tmpl
bthci/bthci2/CommandsEvents/generator/eventsource.tmpl
bthci/bthci2/CommandsEvents/generator/eventteststepheader.tmpl
bthci/bthci2/CommandsEvents/generator/eventteststepsource.tmpl
bthci/bthci2/CommandsEvents/generator/generator.bat
bthci/bthci2/CommandsEvents/generator/hcidata.ini
bthci/bthci2/CommandsEvents/generator/hcitestscript.tmpl
bthci/bthci2/CommandsEvents/generator/hcitestserverheader.tmpl
bthci/bthci2/CommandsEvents/generator/hcitestserversource.tmpl
bthci/bthci2/CommandsEvents/generator/testmmp.tmpl
bthci/hci2implementations/CommandsEvents/symbian/group/commandsevents_symbian.mmp
bthci/hci2implementations/CommandsEvents/symbian/src/switchrolecommand.cpp
Binary file bluetooth/btdocs/Designs/backuprestore.mdzip has changed
Binary file bluetooth/btdocs/Designs/bnep.dot has changed
--- a/bluetooth/btdocs/Designs/generate-bnep-document.ebs	Wed Mar 31 23:19:43 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1315 +0,0 @@
-' Generate-report.ebs
-'
-' This is a RoseScript utility with which a user can traverse a 
-' Rational Rose model and generate a Microsoft Word Document
-' from the template "Formal.dot"
-'
-' A lot of the early versions of this script were derived from
-' work previously published on the Rational Developer's Network
-' and made freely available.
-'
-' TBD:
-'       3. Provide cleaning subroutine or external utility to curb growth of %TEMP%
-'               with rosedXXX.wmf files of rendered diagrams.
-'       4. Provide a package selection drop-down on the Dialog so that many projects can 
-'               coexist in the same model (bonus - reduces the probability of a 
-'               mook accidentally choosing to document the EPOC32 "include" package).
-'
-Const DefaultTool$ = "ReportGen"
-Const PRODUCTDEFAULTWORDDOCFILENAME     = 103
-'
-' Different report type specs
-'
-Const RepAnalysisType = 0
-Const RepDesignType = 1
-Const RepAnalysisNDesignType = 2
-Const RepTestType = 3
-'
-' Model verification options
-'
-Const RepVerifyNot = 0
-Const RepVerifySection = 1
-Const RepVerifyEmbed = 2
-'
-' There is a state machine in here and these are the states
-'
-Const RPh_StartUp = 0
-Const RPh_Dynamic = 1
-Const RPh_Static = 2
-Const RPh_TailBoiler = 3
-Const RPh_Crosscheck = 4
-'
-' For proofreading purposes
-'
-Const MissingTextStr$ = "ATTENTION: Do You Need Documentation For This Item?"
-'
-' Useful type declaraions
-'
-'
-' Told you there was a state machine in here
-'
-Type GeneratorStateType
-    Phase As Integer
-End Type
-'
-' Configurability - if this was Python, I'd serialise it
-' and make it a config file
-'
-Type ReportOptionsType
-    Title As String
-    FileName As String
-    Template As String
-    Generate As Boolean
-    WhiteBlock As Boolean
-    ClassDiagrams As Boolean
-    ScenarioDiagrams As Boolean
-    StateDiagrams As Boolean
-    UseCaseDiagrams As Boolean
-    CppSyntax As Boolean
-    PublicOnly As Boolean
-	FEBoiler As Boolean
-	BEBoiler As Boolean
-	SupportSubheadingTags As Boolean
-    HighlightDocGaps As Boolean
-    DocType As Integer
-    VerifyType As Integer
-End Type
-'
-' When verifying the model, we need to establish relationships
-' between scenario/sequence diagrams and their title. Also, on each iteration, we need to 
-' check that we don't create duplicate entries where a method is used
-' more than once in the same context.
-'
-Type DiagEntry
-    FigureTitle As String
-    Diagram As ScenarioDiagram
-    SeenBefore As Boolean
-End Type
-'
-' Globals - don't we just lurve Basic?
-'
-Private ReportOptions As ReportOptionsType
-Private GeneratorState As GeneratorStateType
-'
-' An array of DiagEntry
-'
-Public GlobalDiagList() As DiagEntry
-'
-' So, the documentation doesn't explain how one would elicit the
-' size of a dynamic array, so the counts have to be externalised.
-' Just exactly how crap is that?
-'
-Public DiagListCount As Integer
-Public GlobalDiagListSize As Integer
-
-Public LicensedRoseApplication As Application
-Private resIFace As Object
-
-Public RWU_DiagramCount As Integer
-'
-' Sort of like an Application Constructor - yech!
-'
-Sub WordUtilInit()
-    Let RWU_DiagramCount = 1
-    Let DiagListCount = 0
-    Let GlobalDiagListSize = 0
-    ReDim GlobalDiagList(0)
-End Sub
-
-'
-' Helper function
-'
-Sub Para(WordApp As Object)
-    WordApp.InsertPara
-End Sub
-'
-' For banging in a huge bunch of whitespace
-'
-Sub WhiteBlock(WordApp As Object)
-    Para WordApp
-    Para WordApp
-    Para WordApp
-    Para WordApp
-    Para WordApp
-End Sub
-'
-' Helper for page breaks
-'
-Sub Break(WordApp As Object)
-    WordApp.InsertPageBreak
-End Sub
-'
-' This is to overcome the limitations of Word as a programmable application
-' and all I can say is that the details are nasty.
-'
-Sub ReplaceFinalParagraphKludge (WordApp As Object)
-    WordApp.linedown
-    WordApp.charright 1, 1  ' go right one character and select
-    WordApp.insertpara      ' overwrite the selected para marker with a new one
-    WordApp.lineup
-End Sub
-'
-' Will need to reset the state on these objects regularly
-'
-Sub ResetGlobalDiagList
-    For i% = 0 To GlobalDiagListSize-1
-        GlobalDiagList(i).SeenBefore = False
-    Next i
-End Sub
-'
-' We need this for extracting diagrams and rendering them
-' on the file system before inserting them into a Word
-' document. Note that this does not clean up after itself
-' which means that you are likely to accumulate rosedXXX.wmf
-' files in your %TEMP% directory. The good news is that it
-' transparently reuses files on each run, so this is not inevitable
-' and unrestrained growth.
-'
-Function GetTmpFileName
-    Dim tmpFileName As String
-    Dim tmpPathName As String
-    
-    tmpPathName = Environ("TEMP")
-    If tmpPathName = ""     Then
-        tmpPathName = CurDir
-    End If
-    Do
-        tmpFileName = tmpPathName + "\rosed" & RWU_DiagramCount & ".wmf"
-        If Not Dir(tmpFileName)="" Then
-            Kill(tmpFileName)
-        End If
-    Loop Until (Dir(tmpFileName)="")
-    RWU_DiagramCount = RWU_DiagramCount + 1
-    GetTmpFileName = tmpFileName
-End Function
-
-'----------------------------------------------------------------------------
-'
-' Specialist Word-related subroutines
-'
-'
-' Generic Diagram insertion
-'
-Sub WordInsertDiagram(fileName As String, WordApp As Object)
-    'ReplaceFinalParagraphKludge WordApp
-    WordApp.CenterPara
-    WordApp.InsertPicture fileName, false, false
-    Para WordApp
-	ReplaceFinalParagraphKludge WordApp
-End Sub
-'
-' Each diagram type is literally a different type in the object model, so
-' since Basic has no polymorphic facilities, we have to resort to
-' coding up a subroutine for each type. Yawn!
-'
-Sub WordInsertScenarioDiagram(aDiagram As ScenarioDiagram, WordApp As Object)
-    Dim tmpFileName As String
-    Let tmpFileName = GetTmpFileName
-    aDiagram.RenderEnhanced tmpFileName
-    WordInsertDiagram tmpFileName, WordApp
-End Sub
-
-Sub WordInsertStateDiagram(aDiagram As StateDiagram, WordApp As Object)
-    Dim tmpFileName As String
-    Let tmpFileName = GetTmpFileName
-    aDiagram.RenderEnhanced tmpFileName
-    WordInsertDiagram tmpFileName, WordApp
-End Sub
-
-Sub WordInsertClassDiagram(aDiagram As ClassDiagram, WordApp As Object)
-    Dim tmpFileName As String
-    Let tmpFileName = GetTmpFileName
-    aDiagram.RenderEnhanced tmpFileName
-    WordInsertDiagram tmpFileName, WordApp
-End Sub
-
-'
-' So we want to be able to translate our "depth" in the model into the
-' appropriate heading style in Word.
-'
-Function GetWordHeadingStyleName(HeadingNumber As Integer) As String
-    GetWordHeadingStyleName = "Heading " & CStr(HeadingNumber)
-End Function
-'
-' Generalised heading insertion by number
-'
-Sub WordInsertHeading(aLevel As Integer, aString As String, WordApp As Object)
-        ' If you do not do it, it will not run.
-    ReplaceFinalParagraphKludge WordApp
-        ' Here's the real code that actually does something
-    WordApp.FormatStyle GetWordHeadingStyleName(aLevel)      
-    WordApp.Insert aString
-    Para WordApp
-    WordApp.FormatStyle "Normal"
-End Sub
-
-Sub WordInsertDocumentation(HeadingLevel As Integer, Documentation As String, WordApp As Object)
-	'
-	' It was requested that the script support the insertion of
-	' an HTML-like tag in the object documentation that would force the 
-	' insertion of a subheading in the output text.
-	' This will interefere with the real HTML generation capabilities
-	' of Rose, so it was originally only supported as a variant on the 
-	' script. This presents boring maintenance duplication issues, however, so it
-	' was reincorporated as a configurable option. Unfortunately, it does change 
-	' the signature of this method such that it requires a HeadingLevel even when it 
-	' doesn't use one. 
-	'
-	Dim Astr As String
-	Dim Bstr As String
-	Dim Cstr As String
-
-    If Documentation <> "" Then
-		If ReportOptions.SupportSubheadingTags Then
-			Astr = Trim(Documentation)
-			Print "Astr: ", Astr
-			x% = InStr(1,Astr,"<h>",1)
-			y% = InStr(1,Astr,"</h>",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,"<h>",1)
-				y% = InStr(1,Astr,"</h>",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 <h>Subhead</h>",.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
Binary file bluetooth/btdocs/Test_Specs/Bluetooth_Test_README.xls has changed
Binary file bluetooth/btdocs/Test_Specs/Bluetooth_Test_Spec_AFH.xls has changed
--- a/bluetooth/btdocs/bluetooth_documentation.history.xml	Wed Mar 31 23:19:43 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<relnotes name="Bluetooth Manager">
-  <purpose>
-    Documentation for the Bluetooth subsystem
-  </purpose>
-
-  <defect number="DEF141225" title="ou1cimx1#155408: Store SSP debug links in the registry during debug session" revision="012">
-    Updated Bluetooth_Functional_Specification.doc to document that functionality described by REQ7677 has now changed in light of this defect.
-  </defect>
-
-  <defect number="PDEF139836" title=".esk and .cmi files do not have header" revision="011">
-    Added copyright headers
-  </defect>
-  
-  <defect number="DEF135417" title="The How To document about AVRCP 1.4 is unavailable in MCL and SDL" revision="010">
-    Add How-To documents for the new APIs.
-  </defect> 
-
-  <defect number="DEF120937" title="Errors in AVRCP 1.3 How-to document" revision="009">
-    Correct three errors of document according to the code implementation
-  </defect> 
-   
-  <defect number="PDEF115325" title="Erroneous versions in Bluetooth functional spec" revision ="008">
-    Incorrect version number for ACVTP specification removed from Bluetooth Functional Specification document.
-  </defect>
-
-  <defect number="DEF109694" title="APIREG:EAllLowPowerModes is undefined in epoc source" revision="007">
-    SGL.GT0172.104 HOWTO Migrate to Symbian v2 Bluetooth Arch v1.1.doc has been removed.
-  </defect>
-
-  <defect number="DEF108037" title="Functional Spec requires updating for Bluetooth Spec v2.0 + EDR" revision="006">
-    Functional Spec Requires updating for Bluetooth Spec V2.0 + EDR
-  </defect>
-
-  <defect number="DEF107562" title="PAN NAP Documentation incomplete" revision="005">
-    PAN NAP Documentation incomplete
-  </defect>
-
-  <defect number="DEF104434" title="Add HCIv2 Migration HowTo document to release branch" revision="004">
-    Add HCIv2 migration HowTo
-  </defect>
-
-  <defect number="PDEF103699" title="Lack of high level design document for PBAP" revision="003">
-    PBAP Design document added
-  </defect>
-
-  <defect number="DEF101322" title="Remove 9.1/9.2 PICs from MCL bluetooth\latest\documentation" revision="002">
-    Removed 9.2 PICS
-  </defect>
-
-  <defect number="DEF100121" title="Bluetooth HCIv2 Design Document needs submitting to release" revision="001">
-    Add HCIv2 Design Doc
-  </defect>
-</relnotes>
--- a/bluetooth/btdocs/bluetooth_documentation.mrp	Wed Mar 31 23:19:43 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
--- a/bluetooth/btexample/test/group/bld.inf	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btexample/test/group/bld.inf	Wed Apr 14 17:08:52 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"
@@ -19,7 +19,7 @@
  @file
 */
 
-#include "../TestConsole/Bld.inf"
+#include "../TestConsole/bld.inf"
 #include "../cit/ROMConfig/group/bld.inf"
 
 
--- a/bluetooth/btlogger/group/BLD.INF	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btlogger/group/BLD.INF	Wed Apr 14 17:08:52 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-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"
@@ -17,5 +17,5 @@
  @file
 */
 
-#include "../generic/group/BLD.INF"
+#include "../generic/group/bld.inf"
 #include "../btsnoophcilogger/group/bld.inf"
--- a/bluetooth/btstack/avdtp/avdtpSignallingChannel.h	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btstack/avdtp/avdtpSignallingChannel.h	Wed Apr 14 17:08:52 2010 +0300
@@ -53,7 +53,7 @@
 #ifdef _OOM_TEST
 static const TInt KAvdtpSignallingChannelIdleTimeout = 800;
 #else
-static const TInt KAvdtpSignallingChannelIdleTimeout = 3000000; // 3s
+static const TInt KAvdtpSignallingChannelIdleTimeout = 1000000; // 1s
 #endif
 
 NONSHARABLE_CLASS(CSignallingChannel) : public CBase, public MSocketNotify, public XLogicalChannelFactoryClient
--- a/bluetooth/btstack/rfcomm/rfcommflow.cpp	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btstack/rfcomm/rfcommflow.cpp	Wed Apr 14 17:08:52 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)
--- a/bluetooth/btstack/rfcomm/rfcommsap.cpp	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btstack/rfcomm/rfcommsap.cpp	Wed Apr 14 17:08:52 2010 +0300
@@ -345,7 +345,7 @@
 			if (iMux)
 				{
 				// Allow for possible credit in header, 1 byte
-				TPckgBuf<TUint> intpckg(iMTU - 1);
+				TPckgBuf<TUint> 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);
--- a/bluetooth/btstack/rfcomm/rfcommsap.h	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btstack/rfcomm/rfcommsap.h	Wed Apr 14 17:08:52 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;
--- a/bluetooth/btstack/rfcomm/rfcommstates.cpp	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btstack/rfcomm/rfcommstates.cpp	Wed Apr 14 17:08:52 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
--- a/bluetooth/btstack/rfcomm/rfcommutil.h	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetooth/btstack/rfcomm/rfcommutil.h	Wed Apr 14 17:08:52 2010 +0300
@@ -87,7 +87,8 @@
 	ERfcommDequeuingBadBoundSAP = 62,
 	ERfCommFlowStrategyOutOfBounds = 63,
 	ERfCommMuxerStateOutOfBounds = 64, 
-	ERfCommStateOutOfBounds = 65
+	ERfCommStateOutOfBounds = 65,
+	ERfCommStateBufferFull = 66,
 	};
 
 /**
--- a/bluetoothmgmt/btcommon/bld.inf	Wed Mar 31 23:19:43 2010 +0300
+++ b/bluetoothmgmt/btcommon/bld.inf	Wed Apr 14 17:08:52 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"
@@ -25,7 +25,7 @@
 #include "../btconfig/bld.inf"
 
 // Logging code
-#include "../../bluetooth/btlogger/group/BLD.INF"
+#include "../../bluetooth/btlogger/group/bld.inf"
 
 // User code	
 #include "../bluetoothclientlib/bld.inf"
@@ -45,7 +45,7 @@
 
 // Profiles
 #include "../../bluetooth/gavdp/group/bld.inf"
-#include "../../bluetoothcommsprofiles/btpan/group/BLD.INF"
+#include "../../bluetoothcommsprofiles/btpan/group/bld.inf"
 
 
 // CSY
--- a/bthci/bthci2/CommandsEvents/generator/Commands.txt	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/Commands.txt	Wed Apr 14 17:08:52 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 ']')
 #
@@ -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):
--- a/bthci/bthci2/CommandsEvents/generator/CompleteEvents.txt	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/CompleteEvents.txt	Wed Apr 14 17:08:52 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.
 #
--- a/bthci/bthci2/CommandsEvents/generator/Events.txt	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/Events.txt	Wed Apr 14 17:08:52 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
 #
--- a/bthci/bthci2/CommandsEvents/generator/commandheader.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/commandheader.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/commandsource.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/commandsource.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/commandteststepheader.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/commandteststepheader.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/commandteststepsource.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/commandteststepsource.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/completeeventheader.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/completeeventheader.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/completeeventsource.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/completeeventsource.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/dllmmp.ini	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/dllmmp.ini	Wed Apr 14 17:08:52 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
--- a/bthci/bthci2/CommandsEvents/generator/dllmmp.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/dllmmp.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/eventheader.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/eventheader.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/eventsource.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/eventsource.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/eventteststepheader.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/eventteststepheader.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/eventteststepsource.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/eventteststepsource.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/generator.bat	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/generator.bat	Wed Apr 14 17:08:52 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
--- a/bthci/bthci2/CommandsEvents/generator/hcidata.ini	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/hcidata.ini	Wed Apr 14 17:08:52 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
 
--- a/bthci/bthci2/CommandsEvents/generator/hcitestscript.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/hcitestscript.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/hcitestserverheader.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/hcitestserverheader.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/hcitestserversource.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/hcitestserversource.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/bthci2/CommandsEvents/generator/testmmp.tmpl	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/bthci2/CommandsEvents/generator/testmmp.tmpl	Wed Apr 14 17:08:52 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".
 //
--- a/bthci/hci2implementations/CommandsEvents/symbian/group/commandsevents_symbian.mmp	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/hci2implementations/CommandsEvents/symbian/group/commandsevents_symbian.mmp	Wed Apr 14 17:08:52 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 Fri, 26 Mar 2010 16:28:21 (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
--- a/bthci/hci2implementations/CommandsEvents/symbian/src/switchrolecommand.cpp	Wed Mar 31 23:19:43 2010 +0300
+++ b/bthci/hci2implementations/CommandsEvents/symbian/src/switchrolecommand.cpp	Wed Apr 14 17:08:52 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