Revision 3952,
1.1 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
*
|
Rev | Line | |
---|
[3952] | 1 | package nu.fw.jeti.jabber.elements; |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | /** |
---|
| 5 | * <p>Title: im</p> |
---|
| 6 | * <p>Description: </p> |
---|
| 7 | * <p>Copyright: Copyright (c) 2001</p> |
---|
| 8 | * <p>Company: </p> |
---|
| 9 | * @author E.S. de Boer |
---|
| 10 | * @version 1.0 |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | public class XMessageEvent extends Extension implements XExtension |
---|
| 14 | { |
---|
| 15 | /** id is the id from the message that this event is a reply to */ |
---|
| 16 | private String id; |
---|
| 17 | |
---|
| 18 | /** type holds a string describing the type of the event (composing/offline/deliverd/displayed) */ |
---|
| 19 | private String type; |
---|
| 20 | |
---|
| 21 | public XMessageEvent(String type,String id) |
---|
| 22 | { |
---|
| 23 | this.id=id; |
---|
| 24 | this.type=type; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | public XMessageEvent(XMessageEventBuilder builder) |
---|
| 28 | { |
---|
| 29 | id=builder.getID(); |
---|
| 30 | type=builder.getType(); |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | public String getType() |
---|
| 34 | { |
---|
| 35 | return type; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | public String getID() |
---|
| 39 | { |
---|
| 40 | return id; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | public void appendToXML(StringBuffer xml) |
---|
| 44 | { |
---|
| 45 | xml.append("<x xmlns=\"jabber:x:event\">"); |
---|
| 46 | if(type!=null) xml.append("<"+type + "/>"); |
---|
| 47 | if(id!=null) xml.append("<id>"+ id + "</id>"); |
---|
| 48 | //retval.append('>'); |
---|
| 49 | xml.append("</x>"); |
---|
| 50 | } |
---|
| 51 | } |
---|
| 52 | /* |
---|
| 53 | * Overrides for emacs |
---|
| 54 | * Local variables: |
---|
| 55 | * tab-width: 4 |
---|
| 56 | * End: |
---|
| 57 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.