Skip to content

Commit 067ede1

Browse files
Woildanflovilmart
authored andcommitted
Rename PFFile and PFLogger (#1355)
* Renamed PFFile to PFFileObject * Renamed PFLogger to PFSystemLogger
1 parent 42cb5af commit 067ede1

File tree

29 files changed

+231
-231
lines changed

29 files changed

+231
-231
lines changed

Parse/Parse.xcodeproj/project.pbxproj

Lines changed: 112 additions & 112 deletions
Large diffs are not rendered by default.

Parse/Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ + (NSURLSessionConfiguration *)_urlSessionConfigurationForApplicationId:(NSStrin
294294

295295
- (void)urlSession:(PFURLSession *)session willPerformURLRequest:(NSURLRequest *)request {
296296
[[BFExecutor defaultPriorityBackgroundExecutor] execute:^{
297-
NSDictionary *userInfo = ([PFLogger sharedLogger].logLevel == PFLogLevelDebug ?
297+
NSDictionary *userInfo = ([PFSystemLogger sharedLogger].logLevel == PFLogLevelDebug ?
298298
@{ PFNetworkNotificationURLRequestUserInfoKey : request } : nil);
299299
[self.notificationCenter postNotificationName:PFNetworkWillSendURLRequestNotification
300300
object:self
@@ -308,7 +308,7 @@ - (void)urlSession:(PFURLSession *)session
308308
responseString:(nullable NSString *)responseString {
309309
[[BFExecutor defaultPriorityBackgroundExecutor] execute:^{
310310
NSMutableDictionary *userInfo = nil;
311-
if ([PFLogger sharedLogger].logLevel == PFLogLevelDebug) {
311+
if ([PFSystemLogger sharedLogger].logLevel == PFLogLevelDebug) {
312312
userInfo = [NSMutableDictionary dictionaryWithObject:request
313313
forKey:PFNetworkNotificationURLRequestUserInfoKey];
314314
if (response) {

Parse/Parse/Internal/File/FileDataStream/PFFileDataStream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
1414
/**
1515
PFFileDataStream is an NSStream proxy which won't read the last byte of a file until the downlaod has finished.
1616
17-
When downloading a file stream via `-[PFFile getDataDownloadStreamInBackground]`, we need to be able to read and write
17+
When downloading a file stream via `-[PFFileObject getDataDownloadStreamInBackground]`, we need to be able to read and write
1818
to the same file on disk concurrently.
1919
2020
NSInputStream closes itself as soon as it hits EOF, so this class wraps an underlying NSInputStream and stops the

Parse/Parse/Internal/File/PFFile_Private.h renamed to Parse/Parse/Internal/File/PFFileObject_Private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
#import <Foundation/Foundation.h>
1111

1212
#import <Parse/PFConstants.h>
13-
#import <Parse/PFFile.h>
13+
#import <Parse/PFFileObject.h>
1414

1515
#import "PFFileState.h"
1616

1717
NS_ASSUME_NONNULL_BEGIN
1818

19-
@interface PFFile (Private)
19+
@interface PFFileObject (Private)
2020

2121
@property (nonatomic, strong, readonly) PFFileState *state;
2222

Parse/Parse/Internal/PFInternalUtils.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#import "PFDateFormatter.h"
2020
#import "BFTask+Private.h"
2121
#import "PFFieldOperation.h"
22-
#import "PFFile_Private.h"
22+
#import "PFFileObject_Private.h"
2323
#import "PFGeoPointPrivate.h"
2424
#import "PFKeyValueCache.h"
2525
#import "PFKeychainStore.h"

Parse/Parse/Internal/PFLogging.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
# import <Parse/PFConstants.h>
1414

15-
#import "PFLogger.h"
15+
#import "PFSystemLogger.h"
1616

1717
static const PFLoggingTag PFLoggingTagCommon = 0;
1818
static const PFLoggingTag PFLoggingTagCrashReporting = 100;
1919

2020
#define PFLog(level, loggingTag, frmt, ...) \
21-
[[PFLogger sharedLogger] logMessageWithLevel:level tag:loggingTag format:(frmt), ##__VA_ARGS__]
21+
[[PFSystemLogger sharedLogger] logMessageWithLevel:level tag:loggingTag format:(frmt), ##__VA_ARGS__]
2222

2323
#define PFLogError(tag, frmt, ...) \
2424
PFLog(PFLogLevelError, (tag), (frmt), ##__VA_ARGS__)

Parse/Parse/Internal/PFLogger.h renamed to Parse/Parse/Internal/PFSystemLogger.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
typedef uint8_t PFLoggingTag;
1515

16-
@interface PFLogger : NSObject
16+
@interface PFSystemLogger : NSObject
1717

1818
@property (atomic, assign) PFLogLevel logLevel;
1919

@@ -22,9 +22,9 @@ typedef uint8_t PFLoggingTag;
2222
///--------------------------------------
2323

2424
/**
25-
A shared instance of `PFLogger` that should be used for all logging.
25+
A shared instance of `PFSystemLogger` that should be used for all logging.
2626
27-
@return An shared singleton instance of `PFLogger`.
27+
@return An shared singleton instance of `PFSystemLogger`.
2828
*/
2929
+ (instancetype)sharedLogger; //TODO: (nlutsenko) Convert to use an instance everywhere instead of a shared singleton.
3030

Parse/Parse/Internal/PFLogger.m renamed to Parse/Parse/Internal/PFSystemLogger.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
#import "PFLogger.h"
10+
#import "PFSystemLogger.h"
1111

1212
#import "PFApplication.h"
1313
#import "PFLogging.h"
1414

15-
@implementation PFLogger
15+
@implementation PFSystemLogger
1616

1717
///--------------------------------------
1818
#pragma mark - Class
@@ -58,10 +58,10 @@ + (NSString *)_descriptionForLogLevel:(PFLogLevel)logLevel {
5858
///--------------------------------------
5959

6060
+ (instancetype)sharedLogger {
61-
static PFLogger *logger;
61+
static PFSystemLogger *logger;
6262
static dispatch_once_t onceToken;
6363
dispatch_once(&onceToken, ^{
64-
logger = [[PFLogger alloc] init];
64+
logger = [[PFSystemLogger alloc] init];
6565
});
6666
return logger;
6767
}

Parse/Parse/Internal/Purchase/Controller/PFPurchaseController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#import "PFConstants.h"
2121
#import "PFDecoder.h"
2222
#import "PFFileManager.h"
23-
#import "PFFile_Private.h"
23+
#import "PFFileObject_Private.h"
2424
#import "PFHTTPRequest.h"
2525
#import "PFMacros.h"
2626
#import "PFPaymentTransactionObserver.h"
@@ -169,8 +169,8 @@ - (BFTask *)downloadAssetAsyncForTransaction:(SKPaymentTransaction *)transaction
169169
@strongify(self);
170170

171171
PFCommandResult *result = task.result;
172-
PFFile *file = [[PFDecoder objectDecoder] decodeObject:result.result];
173-
if (![file isKindOfClass:[PFFile class]]) {
172+
PFFileObject *file = [[PFDecoder objectDecoder] decodeObject:result.result];
173+
if (![file isKindOfClass:[PFFileObject class]]) {
174174
return [BFTask taskWithError:[NSError errorWithDomain:PFParseErrorDomain
175175
code:kPFErrorInvalidPurchaseReceipt
176176
userInfo:result.result]];

Parse/Parse/PFDecoder.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#import "PFDateFormatter.h"
1414
#import "PFFieldOperation.h"
1515
#import "PFFieldOperationDecoder.h"
16-
#import "PFFile_Private.h"
16+
#import "PFFileObject_Private.h"
1717
#import "PFGeoPointPrivate.h"
1818
#import "PFPolygonPrivate.h"
1919
#import "PFInternalUtils.h"
@@ -64,7 +64,7 @@ - (id)decodeDictionary:(NSDictionary *)dictionary {
6464
return [PFRelation relationFromDictionary:dictionary withDecoder:self];
6565

6666
} else if ([type isEqualToString:@"File"]) {
67-
return [PFFile fileWithName:dictionary[@"name"]
67+
return [PFFileObject fileWithName:dictionary[@"name"]
6868
url:dictionary[@"url"]];
6969

7070
} else if ([type isEqualToString:@"Pointer"]) {

0 commit comments

Comments
 (0)