Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000168 [Squeak Packages] Jabber minor always 09-22-04 14:19 09-22-04 14:19
Reporter MarcusDenker View Status public  
Assigned To
Priority normal Resolution open  
Status new  
Summary 0000168: [FIX] Jabber - UnknownEntity, startStepping
Description Author: Avi Bryant
Date Posted: 26 June 2003
Archive ID: 10797
Comments:
Fixes/enhancements for Michael Rueger's Jabber package.

- Adds a JabberUnknownEntity class that is used as the fallback whenever a
particular namespace or tag isn't found. This simply stores the raw
XMLElement.
- Doesn't halt when coming across an unknown query type (eg "get")
- Ensures that the JabberBuddyList starts stepping when first opened
Additional Information 'From Squeak3.6alpha of ''17 March 2003'' [latest update: #5269] on 26 June 2003 at 10:53:56 am'!
Smalltalk renameClassNamed: #JabberUnkownEntity as: #JabberUnknownEntity!
JabberProtocolEntity subclass: #JabberUnknownEntity
    instanceVariableNames: 'element '
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Network-IM Jabber'!

!JabberBuddyList class methodsFor: 'instance creation' stamp: 'ab 6/26/2003 10:43'!
openOn: client
    ^(self new)
        client: client;
        createWindow;
        openInWorld;
        startStepping! !


!JabberClientIQ methodsFor: 'dispatching' stamp: 'ab 6/26/2003 10:41'!
dispatchTo: aClient
    self type = 'result'
        ifTrue: [^aClient dispatchQueryResult: self].
    self type = 'set'
        ifTrue: [^self query dispatchTo: aClient].
    self type = 'error'
        ifTrue: [^aClient dispatchError: self]! !


!JabberProtocolEntity class methodsFor: 'xml' stamp: 'ab 6/26/2003 10:51'!
entityClassNameForNamespace: xmlns tag: tag
    ^ (self tagMapping at: xmlns ifAbsent: [^ #JabberUnknownEntity])
         at: tag ifAbsent: [#JabberUnknownEntity].
! !

!JabberProtocolEntity class methodsFor: 'xml' stamp: 'ab 6/26/2003 10:50'!
protocolEntityFor: xmlElement
    | xmlns tag |
    xmlns := xmlElement namespace ifNil: [xmlElement attributeAt: 'xmlns' ifAbsent: ['jabber:client']].
    tag := xmlElement localName.
    ^(Smalltalk at: (self entityClassNameForNamespace: xmlns tag: tag))
        unmarshalFromDOM: xmlElement! !


!JabberUnknownEntity methodsFor: 'as yet unclassified' stamp: 'ab 6/26/2003 10:48'!
element: xmlElement
    element _ xmlElement! !

!JabberUnknownEntity methodsFor: 'as yet unclassified' stamp: 'ab 6/26/2003 10:49'!
tagName
    ^ element localName! !

!JabberUnknownEntity methodsFor: 'as yet unclassified' stamp: 'ab 6/26/2003 10:49'!
xmlns
    ^ element namespace! !


!JabberUnknownEntity class methodsFor: 'as yet unclassified' stamp: 'ab 6/26/2003 10:48'!
unmarshalFromDOM: xmlElement
    ^ self new element: xmlElement! !

JabberUnknownEntity class removeSelector: #marshalXMLOn:!


Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
09-22-04 14:19 MarcusDenker New Issue


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker