PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Media/GDataNormalPlayTime.h

http://macfuse.googlecode.com/
C++ Header | 50 lines | 18 code | 11 blank | 21 comment | 2 complexity | b0fad3c1e8dfa38782614ec7e47b01d3 MD5 | raw file
 1/* Copyright (c) 2007 Google Inc.
 2*
 3* Licensed under the Apache License, Version 2.0 (the "License");
 4* you may not use this file except in compliance with the License.
 5* You may obtain a copy of the License at
 6*
 7*     http://www.apache.org/licenses/LICENSE-2.0
 8*
 9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15
16#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_PHOTOS_SERVICE \
17  || GDATA_INCLUDE_YOUTUBE_SERVICE
18
19#import <Foundation/Foundation.h>
20
21#import "GDataDefines.h"
22
23//  Time specification object which tries to conform to section 3.6
24//  of RFC 2326 (Normal Play Time).  http://www.ietf.org/rfc/rfc2326.txt
25//
26//  It does not support ranges.
27//
28//  It only supports a millisecond precision. Any time more precise than
29//  that will be lost when parsing.
30
31@interface GDataNormalPlayTime : NSObject {
32  long long ms_;
33  BOOL isNow_;
34}
35
36+ (GDataNormalPlayTime *)normalPlayTimeWithString:(NSString *)str;
37
38- (long long)timeOffsetInMilliseconds; // -1 if "now"
39- (void)setTimeOffsetInMilliseconds:(long long)ms;
40
41- (BOOL)isNow;
42- (void)setIsNow:(BOOL)isNow;
43
44- (NSString *)HHMMSSString;  // hh:mm:ss.fraction or "now"
45- (NSString *)secondsString; // seconds.fraction or "now"
46
47- (void)setFromString:(NSString *)str;
48@end
49
50#endif // #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_*_SERVICE