Revision 3952,
1.3 KB
checked in by alexandrecorreia, 13 years ago
(diff) |
Ticket #1710 - Adicao do codigo fonte java do componente jmessenger(jabberit_messenger)
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | // Created on 20-okt-2004 |
---|
2 | package nu.fw.jeti.plugins.filetransfer; |
---|
3 | |
---|
4 | import nu.fw.jeti.jabber.elements.Extension; |
---|
5 | import nu.fw.jeti.jabber.elements.XData; |
---|
6 | import nu.fw.jeti.jabber.elements.XMPPErrorTag; |
---|
7 | import nu.fw.jeti.jabber.handlers.ExtensionHandler; |
---|
8 | import nu.fw.jeti.util.Log; |
---|
9 | |
---|
10 | import org.xml.sax.Attributes; |
---|
11 | |
---|
12 | /** |
---|
13 | * @author E.S. de Boer |
---|
14 | * |
---|
15 | */ |
---|
16 | public class IQSiHandler extends ExtensionHandler |
---|
17 | { |
---|
18 | private String mimeType; |
---|
19 | private String id; |
---|
20 | private String profile; |
---|
21 | private XData form; |
---|
22 | private XSiFileTransfer siprofile; |
---|
23 | |
---|
24 | public void startHandling(Attributes attr) |
---|
25 | { |
---|
26 | mimeType=attr.getValue("mime-type"); |
---|
27 | id=attr.getValue("id"); |
---|
28 | profile=attr.getValue("profile"); |
---|
29 | form=null; |
---|
30 | siprofile=null; |
---|
31 | } |
---|
32 | |
---|
33 | public void addExtension(Extension extension) |
---|
34 | { |
---|
35 | if(extension instanceof XData) |
---|
36 | { |
---|
37 | form = (XData)extension; |
---|
38 | } |
---|
39 | else if(extension instanceof XSiFileTransfer)siprofile = (XSiFileTransfer)extension; |
---|
40 | else Log.notParsedXML("Si Extension not known" + extension); |
---|
41 | } |
---|
42 | // public void endElement(String name) |
---|
43 | // { |
---|
44 | // System.out.println(name); |
---|
45 | // data = getText(); |
---|
46 | // clearCurrentChars(); |
---|
47 | // } |
---|
48 | |
---|
49 | public Extension build() |
---|
50 | { |
---|
51 | if(!getName().equals("si"))return new XMPPErrorTag(getName(),"http://jabber.org/protocol/si"); |
---|
52 | return new IQSi(id,profile,mimeType,form,siprofile); |
---|
53 | } |
---|
54 | } |
---|
55 | /* |
---|
56 | * Overrides for emacs |
---|
57 | * Local variables: |
---|
58 | * tab-width: 4 |
---|
59 | * End: |
---|
60 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.