include/OFTimeStamp.h

Go to the documentation of this file.
00001 //  Copyright 2009-2010 Aurora Feint, Inc.
00002 // 
00003 //  Licensed under the Apache License, Version 2.0 (the "License");
00004 //  you may not use this file except in compliance with the License.
00005 //  You may obtain a copy of the License at
00006 //  
00007 //      http://www.apache.org/licenses/LICENSE-2.0
00008 //      
00009 //  Unless required by applicable law or agreed to in writing, software
00010 //  distributed under the License is distributed on an "AS IS" BASIS,
00011 //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012 //  See the License for the specific language governing permissions and
00013 //  limitations under the License.
00014 
00015 #pragma once
00016 
00017 #import "OFResource.h"
00018 
00019 @class OFRequestHandle;
00020 @protocol OFTimeStampDelegate;
00021 
00026 @interface OFTimeStamp : OFResource<OFCallbackable>
00027 {
00028 @private
00029     NSDate* time;
00030     int secondsSinceEpoch;
00031 }
00032 
00039 + (void)setDelegate:(id<OFTimeStampDelegate>)delegate;
00040 
00050 + (OFRequestHandle*)getServerTime;
00051 
00055 @property (nonatomic, readonly)             NSDate*     time;
00056 @property (nonatomic, readonly)             int         secondsSinceEpoch;
00057 
00058 + (NSString*)getResourceName;
00059 
00060 @end
00061 
00067 @protocol OFTimeStampDelegate
00068 @optional
00069 
00075 - (void)didGetServerTime:(OFTimeStamp*)timeStamp;
00076 
00080 - (void)didFailGetServerTime;
00081 
00082 @end
 All Classes Files Functions Variables Enumerations Enumerator Properties