Remove more references to 'Session'

This commit is contained in:
lawrencelomax 2016-01-28 19:38:11 +00:00
Родитель e519a689dd
Коммит db689c795e
10 изменённых файлов: 23 добавлений и 26 удалений

Просмотреть файл

@ -15,7 +15,6 @@
@class FBProcessLaunchConfiguration;
@class FBSimulatorBinary;
@class FBSimulatorSession;
/**
An Object responsible for building `FBSimulatorHistory` be converting events into state.

Просмотреть файл

@ -227,21 +227,21 @@
return self;
}
+ (FBSimulatorHistory *)updateState:(FBSimulatorHistory *)sessionState withBlock:( FBSimulatorHistory *(^)(FBSimulatorHistory *history) )block
+ (FBSimulatorHistory *)updateState:(FBSimulatorHistory *)history withBlock:( FBSimulatorHistory *(^)(FBSimulatorHistory *history) )block
{
NSParameterAssert(sessionState);
NSParameterAssert(history);
NSParameterAssert(block);
FBSimulatorHistory *nextSessionState = block([sessionState copy]);
if (!nextSessionState) {
return sessionState;
FBSimulatorHistory *nextHistory = block([history copy]);
if (!nextHistory) {
return history;
}
if ([nextSessionState isEqual:sessionState]) {
return sessionState;
if ([nextHistory isEqual:history]) {
return history;
}
nextSessionState.timestamp = [NSDate date];
nextSessionState.previousState = sessionState;
return nextSessionState;
nextHistory.timestamp = [NSDate date];
nextHistory.previousState = history;
return nextHistory;
}
@end

Просмотреть файл

@ -15,7 +15,7 @@
/**
Uses sample(1) see what is going on in the Application. This is done asynchronously.
The result is attached to the Session State. If an error occurs during the run of the sample(1), no result will be attached.
The result is attached to the Simulator History. If an error occurs during the run of the sample(1), no result will be attached.
@param application the Application to sample. Must be running, otherwise the interaction will error.
@param durationInSeconds the duration for which to sample the Application.
@ -26,7 +26,7 @@
/**
Executes a command with lldb(1). This is done asynchronously.
The result is attached to the Session State. If an error occurs during the run of the lldb command, no result will be returned.
The result is attached to the Simulator History. If an error occurs during the run of the lldb command, no result will be returned.
@param application the Application to sample. Must be running, otherwise the interaction will fail.
@param command to execute.

Просмотреть файл

@ -29,7 +29,7 @@
- (instancetype)tileSimulator;
/**
Records Video of the Simulator, until the Session is terminated.
Records Video of the Simulator, until the Simulator is terminated.
@return the reciever, for chaining.
*/

Просмотреть файл

@ -12,7 +12,6 @@
#import <FBSimulatorControl/FBSimulatorEventSink.h>
@class FBSimulator;
@class FBSimulatorSession;
@class FBWritableLog;
@class FBWritableLogBuilder;
@ -104,7 +103,7 @@ extern NSString *const FBSimulatorLogNameScreenshot;
- (NSArray *)userLaunchedProcessCrashesSinceLastLaunch;
/**
The System Log, filtered and bucketed by Processes that were launched during the Session.
The System Log, filtered and bucketed for each process that was launched by the user.
@return an NSDictionary<FBProcessInfo *, FBWritableLog> of the logs, filtered by launched process.
*/

Просмотреть файл

@ -60,14 +60,14 @@
*/
+ (void)loadPrivateFrameworksOrAbort;
#pragma mark Session
#pragma mark Simulators
/**
Obtains a Simulator for the given configuration and allocation options from the pool.
@param simulatorConfiguration the Configuration of the Simulator to Launch.
@param options the options to for the allocation/freeing of the Simulator.
@param error an outparam for describing any error that occured during the creation of the Session.
@param error an outparam for describing any error that occured during the allocation of the Simulator.
@returns A FBSimulator instance, or nil if an error occured.
*/
- (FBSimulator *)obtainSimulatorWithConfiguration:(FBSimulatorConfiguration *)simulatorConfiguration options:(FBSimulatorAllocationOptions)options error:(NSError **)error;

Просмотреть файл

@ -130,7 +130,7 @@
abort();
}
#pragma mark Sessions
#pragma mark Simulators
- (FBSimulator *)obtainSimulatorWithConfiguration:(FBSimulatorConfiguration *)simulatorConfiguration options:(FBSimulatorAllocationOptions)options error:(NSError **)error;
{

Просмотреть файл

@ -14,7 +14,7 @@
@class FBApplicationLaunchConfiguration;
/**
Queries for obtaining information from Session State
Queries for obtain specific information from the Simulator's History.
*/
@interface FBSimulatorHistory (Queries)

Просмотреть файл

@ -12,13 +12,13 @@
#import "FBProcessLaunchConfiguration.h"
#import "FBSimulatorApplication.h"
@interface FBProcessLaunchConfiguration (SessionStateQueries)
@interface FBProcessLaunchConfiguration (HistoryQueries)
- (FBSimulatorBinary *)binary;
@end
@implementation FBProcessLaunchConfiguration (SessionStateQueries)
@implementation FBProcessLaunchConfiguration (HistoryQueries)
- (FBSimulatorBinary *)binary
{
@ -149,7 +149,7 @@
- (NSDate *)startDate
{
return self.firstSessionState.timestamp;
return self.firstHistoryItem.timestamp;
}
#pragma mark - Private
@ -183,12 +183,12 @@
return recursive ? [self.previousState runningProcessForApplication:application recursive:recursive] : nil;
}
- (instancetype)firstSessionState
- (instancetype)firstHistoryItem
{
if (self.previousState == nil) {
return self;
}
return self.previousState.firstSessionState;
return self.previousState.firstHistoryItem;
}
#pragma mark Predicates

Просмотреть файл

@ -14,7 +14,6 @@
@class FBProcessLaunchConfiguration;
@class FBSimulatorApplication;
@class FBSimulatorBinary;
@class FBSimulatorSession;
/**
A Diagnostic key for the Termination Status.