-
Notifications
You must be signed in to change notification settings - Fork 2
/
XMPPTimestamp.h
47 lines (45 loc) · 1.27 KB
/
XMPPTimestamp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// XMPPTimestamp.h
// Jabber
//
// Created by David Chisnall on 20/08/2004.
// Copyright 2004 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <EtoileXML/ETXMLNullHandler.h>
/**
* The timestamp class encapsulates an XMPP timestamp of the kind found in the
* jabber:x:delay namespace. This has a time, and a reason for the delay
* associated with it. This class is used to parse such delays from the incoming
* XML stream.
*/
@interface XMPPTimestamp : ETXMLNullHandler {
NSMutableString * reason;
NSCalendarDate * time;
}
/**
* Create a new timestamp with the specified time and excuse.
*/
+ (id) timestampWithTime:(NSCalendarDate*)_time reason:(NSString*)_reason;
/**
* Initialise a new timestamp with the specified time and excuse.
*/
- (id) initWithTime:(NSCalendarDate*)_time reason:(NSString*)_reason;
/**
* Returns the time associated with this timestamp.
*/
- (NSCalendarDate*) time;
/**
* Returns the reason given for the delay (undelayed XMPP items do not get
* timestamped; their arrival time is their timestamp).
*/
- (NSString*) reason;
/**
* Returns a textual representation of the time.
*/
- (NSString*) stamp;
/**
* Compare two timestamps by their time.
*/
- (NSComparisonResult) compare:(XMPPTimestamp*)_other;
@end