OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_SESSIONS_NSCODER_COMPATIBILITY_H_ |
| 6 #define IOS_CHROME_BROWSER_SESSIONS_NSCODER_COMPATIBILITY_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 @interface NSCoder (Compatibility) |
| 11 |
| 12 // Decodes and returns a 32-bit or 64-bit integer value that was previously |
| 13 // encoded with |cr_encodeIndex:forKey:| and associated with |key|. Handles |
| 14 // with special care |NSNotFound| value to be portable between 32-bit and |
| 15 // 64-bit binaries. |
| 16 - (NSInteger)cr_decodeIndexForKey:(NSString*)key; |
| 17 |
| 18 // Encodes the 32-bit or 64-bit integer |index| and associates it with |key|. |
| 19 // Handles with special care |NSNotFound| value to be portable between 32-bit |
| 20 // and 64-bit binaries. |
| 21 - (void)cr_encodeIndex:(NSInteger)index forKey:(NSString*)key; |
| 22 |
| 23 @end |
| 24 |
| 25 #endif // IOS_CHROME_BROWSER_SESSIONS_NSCODER_COMPATIBILITY_H_ |
OLD | NEW |