From 30697c9be2ff01e9f33e0934b58877fc3d11f516 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 17 Feb 2015 17:09:14 -0800 Subject: [PATCH 01/59] Imports code of the RX library. --- .../RxLibrary/GRXImmediateWriter.h | 40 ++++++ .../RxLibrary/GRXImmediateWriter.m | 132 ++++++++++++++++++ src/objective-c/RxLibrary/GRXWriteable.h | 27 ++++ src/objective-c/RxLibrary/GRXWriteable.m | 33 +++++ .../RxLibrary/GRXWriter+Immediate.h | 33 +++++ .../RxLibrary/GRXWriter+Immediate.m | 31 ++++ .../RxLibrary/GRXWriter+Transformations.h | 9 ++ .../RxLibrary/GRXWriter+Transformations.m | 14 ++ src/objective-c/RxLibrary/GRXWriter.h | 94 +++++++++++++ src/objective-c/RxLibrary/GRXWriter.m | 79 +++++++++++ .../RxLibrary/NSEnumerator+GRXUtil.h | 18 +++ .../RxLibrary/NSEnumerator+GRXUtil.m | 21 +++ src/objective-c/RxLibrary/README.md | 8 ++ .../RxLibrary/private/GRXNSBlockEnumerator.h | 9 ++ .../RxLibrary/private/GRXNSBlockEnumerator.m | 28 ++++ .../RxLibrary/private/GRXNSFastEnumerator.h | 10 ++ .../RxLibrary/private/GRXNSFastEnumerator.m | 55 ++++++++ .../RxLibrary/private/GRXNSScalarEnumerator.h | 8 ++ .../RxLibrary/private/GRXNSScalarEnumerator.m | 24 ++++ .../transformations/GRXMappingWriter.h | 7 + .../transformations/GRXMappingWriter.m | 30 ++++ 21 files changed, 710 insertions(+) create mode 100644 src/objective-c/RxLibrary/GRXImmediateWriter.h create mode 100644 src/objective-c/RxLibrary/GRXImmediateWriter.m create mode 100644 src/objective-c/RxLibrary/GRXWriteable.h create mode 100644 src/objective-c/RxLibrary/GRXWriteable.m create mode 100644 src/objective-c/RxLibrary/GRXWriter+Immediate.h create mode 100644 src/objective-c/RxLibrary/GRXWriter+Immediate.m create mode 100644 src/objective-c/RxLibrary/GRXWriter+Transformations.h create mode 100644 src/objective-c/RxLibrary/GRXWriter+Transformations.m create mode 100644 src/objective-c/RxLibrary/GRXWriter.h create mode 100644 src/objective-c/RxLibrary/GRXWriter.m create mode 100644 src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h create mode 100644 src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m create mode 100644 src/objective-c/RxLibrary/README.md create mode 100644 src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h create mode 100644 src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m create mode 100644 src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h create mode 100644 src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m create mode 100644 src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h create mode 100644 src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m create mode 100644 src/objective-c/RxLibrary/transformations/GRXMappingWriter.h create mode 100644 src/objective-c/RxLibrary/transformations/GRXMappingWriter.m diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.h b/src/objective-c/RxLibrary/GRXImmediateWriter.h new file mode 100644 index 00000000000..568dbe65764 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.h @@ -0,0 +1,40 @@ +#import + +#import "GRXWriter.h" + +// Utility to construct GRXWriter instances from values that are immediately available when +// required. The returned writers all support pausing and early termination. +// +// Unless the writeable callback pauses them or stops them early, these writers will do all their +// interactions with the writeable before the start method returns. +@interface GRXImmediateWriter : NSObject + +// Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to +// its writeable. The NSEnumerator is released when it finishes. ++ (id)writerWithEnumerator:(NSEnumerator *)enumerator; + +// Returns a writer that pushes to its writeable the successive values returned by the passed +// block. When the block first returns nil, it is released. ++ (id)writerWithValueSupplier:(id (^)())block; + +// Returns a writer that iterates over the values of the passed container and pushes them to +// its writeable. The container is released when the iteration is over. +// +// Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to +// call one method per element. Because GRXWriteable instances accept values one by one, that speed +// gain doesn't happen here. ++ (id)writerWithContainer:(id)container; + +// Returns a writer that sends the passed value to its writeable and then finishes (releasing the +// value). ++ (id)writerWithValue:(id)value; + +// Returns a writer that, as part of its start method, sends the passed error to the writeable +// (then releasing the error). ++ (id)writerWithError:(NSError *)error; + +// Returns a writer that, as part of its start method, finishes immediately without sending any +// values to its writeable. ++ (id)emptyWriter; + +@end diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.m b/src/objective-c/RxLibrary/GRXImmediateWriter.m new file mode 100644 index 00000000000..ebeb3f458a3 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.m @@ -0,0 +1,132 @@ +#import "GRXImmediateWriter.h" + +#import "NSEnumerator+GRXUtil.h" + +@implementation GRXImmediateWriter { + NSEnumerator *_enumerator; + NSError *_errorOrNil; + id _writeable; +} + +@synthesize state = _state; + +- (instancetype) init { + return [self initWithEnumerator:nil error:nil]; // results in an empty writer. +} + +// Designated initializer +- (instancetype)initWithEnumerator:(NSEnumerator *)enumerator error:(NSError *)errorOrNil { + if (((self = [super init]))) { + _enumerator = enumerator; + _errorOrNil = errorOrNil; + _state = GRXWriterStateNotStarted; + } + return self; +} + +#pragma mark Convenience constructors + ++ (instancetype)writerWithEnumerator:(NSEnumerator *)enumerator error:(NSError *)errorOrNil { + return [[self alloc] initWithEnumerator:enumerator error:errorOrNil]; +} + ++ (id)writerWithEnumerator:(NSEnumerator *)enumerator { + return [self writerWithEnumerator:enumerator error:nil]; +} + ++ (id)writerWithValueSupplier:(id (^)())block { + return [self writerWithEnumerator:[NSEnumerator grx_enumeratorWithValueSupplier:block]]; +} + ++ (id)writerWithContainer:(id)container { + return [self writerWithEnumerator:[NSEnumerator grx_enumeratorWithContainer:container]];; +} + ++ (id)writerWithValue:(id)value { + if (value) { + return [self writerWithEnumerator:[NSEnumerator grx_enumeratorWithSingleValue:value]]; + } else { + return [self emptyWriter]; + } +} + ++ (id)writerWithError:(NSError *)error { + if (error) { + return [self writerWithEnumerator:nil error:error]; + } else { + return [self emptyWriter]; + } +} + ++ (id)emptyWriter { + static GRXImmediateWriter *emptyWriter; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + emptyWriter = [self writerWithEnumerator:nil error:nil]; + }); + return emptyWriter; +} + +#pragma mark Conformance with GRXWriter + +// Most of the complexity in this implementation is the result of supporting pause and resumption of +// the GRXWriter. It's an important feature for instances of GRXWriter that are backed by a +// container (which may be huge), or by a NSEnumerator (which may even be infinite). + +- (void)writeUntilPausedOrStopped { + id value; + while (value = [_enumerator nextObject]) { + [_writeable didReceiveValue:value]; + // If the writeable has a reference to us, it might change our state to paused or finished. + if (_state == GRXWriterStatePaused || _state == GRXWriterStateFinished) { + return; + } + } + [self finishWithError:_errorOrNil]; +} + +- (void)startWithWriteable:(id)writeable { + _state = GRXWriterStateStarted; + _writeable = writeable; + [self writeUntilPausedOrStopped]; +} + +- (void)finishWithError:(NSError *)errorOrNil { + _state = GRXWriterStateFinished; + _enumerator = nil; + _errorOrNil = nil; + id writeable = _writeable; + _writeable = nil; + [writeable didFinishWithError:errorOrNil]; +} + +- (void)setState:(GRXWriterState)newState { + // Manual transitions are only allowed from the started or paused states. + if (_state == GRXWriterStateNotStarted || _state == GRXWriterStateFinished) { + return; + } + + switch (newState) { + case GRXWriterStateFinished: + _state = newState; + _enumerator = nil; + _errorOrNil = nil; + // Per GRXWriter's contract, setting the state to Finished manually + // means one doesn't wish the writeable to be messaged anymore. + _writeable = nil; + return; + case GRXWriterStatePaused: + _state = newState; + return; + case GRXWriterStateStarted: + if (_state == GRXWriterStatePaused) { + _state = newState; + [self writeUntilPausedOrStopped]; + } + return; + case GRXWriterStateNotStarted: + return; + } +} + +@end diff --git a/src/objective-c/RxLibrary/GRXWriteable.h b/src/objective-c/RxLibrary/GRXWriteable.h new file mode 100644 index 00000000000..bbcdb6a2ba9 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriteable.h @@ -0,0 +1,27 @@ +#import + +// A GRXWriteable is an object to which a sequence of values can be sent. The +// sequence finishes with an optional error. +@protocol GRXWriteable + +// Push the next value of the sequence to the receiving object. +// TODO(jcanizales): Name it enumerator:(id) didProduceValue:(id)? +- (void)didReceiveValue:(id)value; + +// Signal that the sequence is completed, or that an error ocurred. After this +// message is sent to the instance, neither it nor didReceiveValue: may be +// called again. +// TODO(jcanizales): enumerator:(id) didFinishWithError:(NSError*)? +- (void)didFinishWithError:(NSError *)errorOrNil; +@end + +typedef void (^GRXValueHandler)(id value); +typedef void (^GRXCompletionHandler)(NSError *errorOrNil); + +// Utility to create objects that conform to the GRXWriteable protocol, from +// blocks that handle each of the two methods of the protocol. +@interface GRXWriteable : NSObject +- (instancetype)initWithValueHandler:(GRXValueHandler)valueHandler + completionHandler:(GRXCompletionHandler)completionHandler + NS_DESIGNATED_INITIALIZER; +@end diff --git a/src/objective-c/RxLibrary/GRXWriteable.m b/src/objective-c/RxLibrary/GRXWriteable.m new file mode 100644 index 00000000000..3b4f0811aa7 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriteable.m @@ -0,0 +1,33 @@ +#import "GRXWriteable.h" + +@implementation GRXWriteable { + GRXValueHandler _valueHandler; + GRXCompletionHandler _completionHandler; +} + +- (instancetype)init { + return [self initWithValueHandler:nil completionHandler:nil]; +} + +// Designated initializer +- (instancetype)initWithValueHandler:(GRXValueHandler)valueHandler + completionHandler:(GRXCompletionHandler)completionHandler { + if ((self = [super init])) { + _valueHandler = valueHandler; + _completionHandler = completionHandler; + } + return self; +} + +- (void)didReceiveValue:(id)value { + if (_valueHandler) { + _valueHandler(value); + } +} + +- (void)didFinishWithError:(NSError *)errorOrNil { + if (_completionHandler) { + _completionHandler(errorOrNil); + } +} +@end diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.h b/src/objective-c/RxLibrary/GRXWriter+Immediate.h new file mode 100644 index 00000000000..2d397d76559 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.h @@ -0,0 +1,33 @@ +#import "GRXWriter.h" + +@interface GRXWriter (Immediate) + +// Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to +// its writeable. The NSEnumerator is released when it finishes. ++ (instancetype)writerWithEnumerator:(NSEnumerator *)enumerator; + +// Returns a writer that pushes to its writeable the successive values returned by the passed +// block. When the block first returns nil, it is released. ++ (instancetype)writerWithValueSupplier:(id (^)())block; + +// Returns a writer that iterates over the values of the passed container and pushes them to +// its writeable. The container is released when the iteration is over. +// +// Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to +// call one method per element. Because GRXWriteable instances accept values one by one, that speed +// gain doesn't happen here. ++ (instancetype)writerWithContainer:(id)container; + +// Returns a writer that sends the passed value to its writeable and then finishes (releasing the +// value). ++ (instancetype)writerWithValue:(id)value; + +// Returns a writer that, as part of its start method, sends the passed error to the writeable +// (then releasing the error). ++ (instancetype)writerWithError:(NSError *)error; + +// Returns a writer that, as part of its start method, finishes immediately without sending any +// values to its writeable. ++ (instancetype)emptyWriter; + +@end diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.m b/src/objective-c/RxLibrary/GRXWriter+Immediate.m new file mode 100644 index 00000000000..841ea8a30f9 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.m @@ -0,0 +1,31 @@ +#import "GRXWriter+Immediate.h" + +#import "GRXImmediateWriter.h" + +@implementation GRXWriter (Immediate) + ++ (instancetype)writerWithEnumerator:(NSEnumerator *)enumerator { + return [[self alloc] initWithWriter:[GRXImmediateWriter writerWithEnumerator:enumerator]]; +} + ++ (instancetype)writerWithValueSupplier:(id (^)())block { + return [[self alloc] initWithWriter:[GRXImmediateWriter writerWithValueSupplier:block]]; +} + ++ (instancetype)writerWithContainer:(id)container { + return [[self alloc] initWithWriter:[GRXImmediateWriter writerWithContainer:container]]; +} + ++ (instancetype)writerWithValue:(id)value { + return [[self alloc] initWithWriter:[GRXImmediateWriter writerWithValue:value]]; +} + ++ (instancetype)writerWithError:(NSError *)error { + return [[self alloc] initWithWriter:[GRXImmediateWriter writerWithError:error]]; +} + ++ (instancetype)emptyWriter { + return [[self alloc] initWithWriter:[GRXImmediateWriter emptyWriter]]; +} + +@end diff --git a/src/objective-c/RxLibrary/GRXWriter+Transformations.h b/src/objective-c/RxLibrary/GRXWriter+Transformations.h new file mode 100644 index 00000000000..4c9335b6758 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriter+Transformations.h @@ -0,0 +1,9 @@ +#import "GRXWriter.h" + +@interface GRXWriter (Transformations) + +// Returns a writer that wraps the receiver, and has all the values the receiver would write +// transformed by the provided mapping function. +- (GRXWriter *)map:(id (^)(id value))map; + +@end diff --git a/src/objective-c/RxLibrary/GRXWriter+Transformations.m b/src/objective-c/RxLibrary/GRXWriter+Transformations.m new file mode 100644 index 00000000000..30e5000afdf --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriter+Transformations.m @@ -0,0 +1,14 @@ +#import "GRXWriter+Transformations.h" + +#import "transformations/GRXMappingWriter.h" + +@implementation GRXWriter (Transformations) + +- (GRXWriter *)map:(id (^)(id))map { + if (!map) { + return self; + } + return [[GRXMappingWriter alloc] initWithWriter:self map:map]; +} + +@end diff --git a/src/objective-c/RxLibrary/GRXWriter.h b/src/objective-c/RxLibrary/GRXWriter.h new file mode 100644 index 00000000000..03b3ee18cd8 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriter.h @@ -0,0 +1,94 @@ +#import + +#import "GRXWriteable.h" + +typedef NS_ENUM(NSInteger, GRXWriterState) { + + // The writer has not yet been given a writeable to which it can push its + // values. To have an writer transition to the Started state, send it a + // startWithWriteable: message. + // + // An writer's state cannot be manually set to this value. + GRXWriterStateNotStarted, + + // The writer might push values to the writeable at any moment. + GRXWriterStateStarted, + + // The writer is temporarily paused, and won't send any more values to the + // writeable unless its state is set back to Started. The writer might still + // transition to the Finished state at any moment, and is allowed to send + // didFinishWithError: to its writeable. + // + // Not all implementations of writer have to support pausing, and thus + // trying to set an writer's state to this value might have no effect. + GRXWriterStatePaused, + + // The writer has released its writeable and won't interact with it anymore. + // + // One seldomly wants to set an writer's state to this value, as its + // writeable isn't notified with a didFinishWithError: message. Instead, sending + // finishWithError: to the writer will make it notify the writeable and then + // transition to this state. + GRXWriterStateFinished +}; + +// An object that conforms to this protocol can produce, on demand, a sequence +// of values. The sequence may be produced asynchronously, and it may consist of +// any number of elements, including none or an infinite number. +// +// GRXWriter is the active dual of NSEnumerator. The difference between them +// is thus whether the object plays an active or passive role during usage: A +// user of NSEnumerator pulls values off it, and passes the values to a writeable. +// A user of GRXWriter, though, just gives it a writeable, and the +// GRXWriter instance pushes values to the writeable. This makes this protocol +// suitable to represent a sequence of future values, as well as collections +// with internal iteration. +// +// An instance of GRXWriter can start producing values after a writeable is +// passed to it. It can also be commanded to finish the sequence immediately +// (with an optional error). Finally, it can be asked to pause, but the +// conforming instance is not required to oblige. +// +// Unless otherwise indicated by a conforming class, no messages should be sent +// concurrently to a GRXWriter. I.e., conforming classes aren't required to +// be thread-safe. +@protocol GRXWriter + +// This property can be used to query the current state of the writer, which +// determines how it might currently use its writeable. Some state transitions can +// be triggered by setting this property to the corresponding value, and that's +// useful for advanced use cases like pausing an writer. For more details, +// see the documentation of the enum. +@property(nonatomic) GRXWriterState state; + +// Start sending messages to the writeable. Messages may be sent before the method +// returns, or they may be sent later in the future. See GRXWriteable.h for the +// different messages a writeable can receive. +// +// If this writer draws its values from an external source (e.g. from the +// filesystem or from a server), calling this method will commonly trigger side +// effects (like network connections). +// +// This method might only be called on writers in the NotStarted state. +- (void)startWithWriteable:(id)writeable; + +// Send didFinishWithError:errorOrNil immediately to the writeable, and don't send +// any more messages to it. +// +// This method might only be called on writers in the Started or Paused +// state. +// +// TODO(jcanizales): Consider adding some guarantee about the immediacy of that +// stopping. I know I've relied on it in part of the code that uses this, but +// can't remember the details in the presence of concurrency. +- (void)finishWithError:(NSError *)errorOrNil; +@end + +// A "proxy" class that simply forwards values, completion, and errors from its +// input writer to its writeable. +// It is useful as a superclass for pipes that act as a transformation of their +// input writer, and for classes that represent objects with input and +// output sequences of values, like an RPC. +@interface GRXWriter : NSObject +- (instancetype)initWithWriter:(id)writer NS_DESIGNATED_INITIALIZER; +@end diff --git a/src/objective-c/RxLibrary/GRXWriter.m b/src/objective-c/RxLibrary/GRXWriter.m new file mode 100644 index 00000000000..67d928fed58 --- /dev/null +++ b/src/objective-c/RxLibrary/GRXWriter.m @@ -0,0 +1,79 @@ +#import "GRXWriter.h" + +@interface GRXWriter () +@end + +@implementation GRXWriter { + id _writer; + id _writeable; +} + +- (instancetype)init { + return [self initWithWriter:nil]; +} + +// Designated initializer +- (instancetype)initWithWriter:(id)writer { + if (!writer) { + [NSException raise:NSInvalidArgumentException format:@"writer can't be nil."]; + } + if ((self = [super init])) { + _writer = writer; + } + return self; +} + +// This is used to send a completion or an error to the writeable. It nillifies +// our reference to it in order to guarantee no more messages are sent to it, +// and to release it. +- (void)finishOutputWithError:(NSError *)errorOrNil { + id writeable = _writeable; + _writeable = nil; + [writeable didFinishWithError:errorOrNil]; +} + +// This is used to stop the input writer. It nillifies our reference to it +// to release it. +- (void)finishInput { + id writer = _writer; + _writer = nil; + writer.state = GRXWriterStateFinished; +} + +#pragma mark GRXWriteable implementation + +- (void)didReceiveValue:(id)value { + [_writeable didReceiveValue:value]; +} + +- (void)didFinishWithError:(NSError *)errorOrNil { + _writer = nil; + [self finishOutputWithError:errorOrNil]; +} + +#pragma mark GRXWriter implementation + +- (GRXWriterState)state { + return _writer ? _writer.state : GRXWriterStateFinished; +} + +- (void)setState:(GRXWriterState)state { + if (state == GRXWriterStateFinished) { + _writeable = nil; + [self finishInput]; + } else { + _writer.state = state; + } +} + +- (void)startWithWriteable:(id)writeable { + _writeable = writeable; + [_writer startWithWriteable:self]; +} + +- (void)finishWithError:(NSError *)errorOrNil { + [self finishOutputWithError:errorOrNil]; + [self finishInput]; +} + +@end diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h new file mode 100644 index 00000000000..ecd8f2de79d --- /dev/null +++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h @@ -0,0 +1,18 @@ +#import + +@interface NSEnumerator (GRXUtil) + +// Returns a NSEnumerator instance that iterates through the elements of the passed container that +// supports fast enumeration. Note that this negates the speed benefits of fast enumeration over +// NSEnumerator. It's only intended for the rare cases when one needs the latter and only has the +// former, e.g. for iteration that needs to be paused and resumed later. ++ (NSEnumerator *)grx_enumeratorWithContainer:(id)container; + +// Returns a NSEnumerator instance that provides a single object before finishing. The value is then +// released. ++ (NSEnumerator *)grx_enumeratorWithSingleValue:(id)value; + +// Returns a NSEnumerator instance that delegates the invocations of nextObject to the passed block. +// When the block first returns nil, it is released. ++ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)())block; +@end diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m new file mode 100644 index 00000000000..7da05d13c49 --- /dev/null +++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m @@ -0,0 +1,21 @@ +#import "NSEnumerator+GRXUtil.h" + +#import "private/GRXNSBlockEnumerator.h" +#import "private/GRXNSFastEnumerator.h" +#import "private/GRXNSScalarEnumerator.h" + +@implementation NSEnumerator (GRXUtil) + ++ (NSEnumerator *)grx_enumeratorWithContainer:(id)container { + // TODO(jcanizales): Consider checking if container responds to objectEnumerator and return that? + return [[GRXNSFastEnumerator alloc] initWithContainer:container]; +} + ++ (NSEnumerator *)grx_enumeratorWithSingleValue:(id)value { + return [[GRXNSScalarEnumerator alloc] initWithValue:value]; +} + ++ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)())block { + return [[GRXNSBlockEnumerator alloc] initWithValueSupplier:block]; +} +@end diff --git a/src/objective-c/RxLibrary/README.md b/src/objective-c/RxLibrary/README.md new file mode 100644 index 00000000000..88e90723b9b --- /dev/null +++ b/src/objective-c/RxLibrary/README.md @@ -0,0 +1,8 @@ +This is a generic Reactive Extensions library for Objective-C, created to ease +the implementation of the gRPC Objective-C runtime. + +It has no dependencies on gRPC nor other libraries, and should eventually be +moved under its own GitHub project. + +If you're trying to get started on the library, you might want to first read +GRXWriter.h and then GRXWriteable.h. diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h new file mode 100644 index 00000000000..0bb1f477648 --- /dev/null +++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h @@ -0,0 +1,9 @@ +#import + +// Concrete subclass of NSEnumerator that delegates the invocations of nextObject to a block passed +// on initialization. +@interface GRXNSBlockEnumerator : NSEnumerator +// The first time the passed block returns nil, the enumeration will end and the block will be +// released. +- (instancetype)initWithValueSupplier:(id (^)())block; +@end diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m new file mode 100644 index 00000000000..9a53531b128 --- /dev/null +++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m @@ -0,0 +1,28 @@ +#import "GRXNSBlockEnumerator.h" + +@implementation GRXNSBlockEnumerator { + id (^_block)(); +} + +- (instancetype)init { + return [self initWithValueSupplier:nil]; +} + +- (instancetype)initWithValueSupplier:(id (^)())block { + if ((self = [super init])) { + _block = block; + } + return self; +} + +- (id)nextObject { + if (!_block) { + return nil; + } + id value = _block(); + if (!value) { + _block = nil; + } + return value; +} +@end diff --git a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h new file mode 100644 index 00000000000..e5f27b1cc70 --- /dev/null +++ b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h @@ -0,0 +1,10 @@ +#import + +// This is a bridge to interact through NSEnumerator's interface with objects that only conform to +// NSFastEnumeration. (There's nothing specifically fast about it - you certainly don't win any +// speed by using this instead of a NSEnumerator provided by your container). +@interface GRXNSFastEnumerator : NSEnumerator +// After the iteration of the container (via the NSFastEnumeration protocol) is over, the container +// is released. If the container is modified during enumeration, an exception is thrown. +- (instancetype)initWithContainer:(id)container; +@end diff --git a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m new file mode 100644 index 00000000000..817ff34d95c --- /dev/null +++ b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m @@ -0,0 +1,55 @@ +#import "GRXNSFastEnumerator.h" + +@implementation GRXNSFastEnumerator { + id _container; + NSFastEnumerationState _state; + // Number of elements of the container currently in the _state.itemsPtr array. + NSUInteger _count; + // The index of the next object to return from the _state.itemsPtr array. + NSUInteger _index; + // A "buffer of one element," for the containers that enumerate their elements one by one. Those + // will set _state.itemsPtr to point to this. + // The NSFastEnumeration protocol requires it to be __unsafe_unretained, but that's alright + // because the only use we'd make of its value is to return it immediately as the result of + // nextObject. + __unsafe_unretained id _bufferValue; + // Neither NSEnumerator nor NSFastEnumeration instances are required to work correctly when the + // underlying container is mutated during iteration. The expectation is that an exception is + // thrown when that happens. So we check for mutations. + unsigned long _mutationFlag; + BOOL _mutationFlagIsSet; +} + +- (instancetype)init { + return [self initWithContainer:nil]; +} + +// Designated initializer. +- (instancetype)initWithContainer:(id)container { + NSAssert(container, @"container can't be nil"); + if ((self = [super init])) { + _container = container; + } + return self; +} + +- (id)nextObject { + if (_index == _count) { + _index = 0; + _count = [_container countByEnumeratingWithState:&_state objects:&_bufferValue count:1]; + if (_count == 0) { + // Enumeration is over. + _container = nil; + return nil; + } + if (_mutationFlagIsSet) { + NSAssert(_mutationFlag == *(_state.mutationsPtr), + @"container was mutated while being enumerated"); + } else { + _mutationFlag = *(_state.mutationsPtr); + _mutationFlagIsSet = YES; + } + } + return _state.itemsPtr[_index++]; +} +@end diff --git a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h new file mode 100644 index 00000000000..1130f52897e --- /dev/null +++ b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h @@ -0,0 +1,8 @@ +#import + +// Concrete subclass of NSEnumerator whose instances return a single object before finishing. +@interface GRXNSScalarEnumerator : NSEnumerator +// Param value: the single object this instance will produce. After the first invocation of +// nextObject, the value is released. +- (instancetype)initWithValue:(id)value; +@end diff --git a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m new file mode 100644 index 00000000000..b2a1afd00e6 --- /dev/null +++ b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m @@ -0,0 +1,24 @@ +#import "GRXNSScalarEnumerator.h" + +@implementation GRXNSScalarEnumerator { + id _value; +} + +- (instancetype)init { + return [self initWithValue:nil]; +} + +// Designated initializer. +- (instancetype)initWithValue:(id)value { + if ((self = [super init])) { + _value = value; + } + return self; +} + +- (id)nextObject { + id value = _value; + _value = nil; + return value; +} +@end diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h new file mode 100644 index 00000000000..13640c5bd6d --- /dev/null +++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h @@ -0,0 +1,7 @@ +#import "GRXWriter.h" + +// A "proxy" writer that transforms all the values of its input writer by using a mapping function. +@interface GRXMappingWriter : GRXWriter +- (instancetype)initWithWriter:(id)writer map:(id (^)(id value))map + NS_DESIGNATED_INITIALIZER; +@end diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m new file mode 100644 index 00000000000..3aa2a2503ae --- /dev/null +++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m @@ -0,0 +1,30 @@ +#import "GRXMappingWriter.h" + +static id (^kIdentity)(id value) = ^id(id value) { + return value; +}; + +@interface GRXWriter () +@end + +@implementation GRXMappingWriter { + id (^_map)(id value); +} + +- (instancetype)initWithWriter:(id)writer { + return [self initWithWriter:writer map:nil]; +} + +// Designated initializer +- (instancetype)initWithWriter:(id)writer map:(id (^)(id value))map { + if ((self = [super initWithWriter:writer])) { + _map = map ?: kIdentity; + } + return self; +} + +// Override +- (void)didReceiveValue:(id)value { + [super didReceiveValue:_map(value)]; +} +@end From 5e0efd95f785bc3a82fa2b7b67b2442625653efa Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 17 Feb 2015 18:23:58 -0800 Subject: [PATCH 02/59] Imports code of the generic gRPC client library. --- src/objective-c/GRPCClient/GRPCCall.h | 57 +++ src/objective-c/GRPCClient/GRPCCall.m | 373 ++++++++++++++++++ src/objective-c/GRPCClient/GRPCMethodName.h | 15 + src/objective-c/GRPCClient/GRPCMethodName.m | 14 + src/objective-c/GRPCClient/README.md | 4 + .../GRPCClient/private/GRPCChannel.h | 17 + .../GRPCClient/private/GRPCChannel.m | 32 ++ .../GRPCClient/private/GRPCCompletionQueue.h | 21 + .../GRPCClient/private/GRPCCompletionQueue.m | 73 ++++ .../GRPCClient/private/GRPCDelegateWrapper.h | 48 +++ .../GRPCClient/private/GRPCDelegateWrapper.m | 87 ++++ .../private/GRPCMethodName+HTTP2Encoding.h | 7 + .../private/GRPCMethodName+HTTP2Encoding.m | 11 + .../GRPCClient/private/NSData+GRPC.h | 8 + .../GRPCClient/private/NSData+GRPC.m | 53 +++ .../GRPCClient/private/NSDictionary+GRPC.h | 7 + .../GRPCClient/private/NSDictionary+GRPC.m | 23 ++ .../GRPCClient/private/NSError+GRPC.h | 41 ++ .../GRPCClient/private/NSError+GRPC.m | 18 + src/objective-c/README.md | 3 + 20 files changed, 912 insertions(+) create mode 100644 src/objective-c/GRPCClient/GRPCCall.h create mode 100644 src/objective-c/GRPCClient/GRPCCall.m create mode 100644 src/objective-c/GRPCClient/GRPCMethodName.h create mode 100644 src/objective-c/GRPCClient/GRPCMethodName.m create mode 100644 src/objective-c/GRPCClient/README.md create mode 100644 src/objective-c/GRPCClient/private/GRPCChannel.h create mode 100644 src/objective-c/GRPCClient/private/GRPCChannel.m create mode 100644 src/objective-c/GRPCClient/private/GRPCCompletionQueue.h create mode 100644 src/objective-c/GRPCClient/private/GRPCCompletionQueue.m create mode 100644 src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h create mode 100644 src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m create mode 100644 src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h create mode 100644 src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m create mode 100644 src/objective-c/GRPCClient/private/NSData+GRPC.h create mode 100644 src/objective-c/GRPCClient/private/NSData+GRPC.m create mode 100644 src/objective-c/GRPCClient/private/NSDictionary+GRPC.h create mode 100644 src/objective-c/GRPCClient/private/NSDictionary+GRPC.m create mode 100644 src/objective-c/GRPCClient/private/NSError+GRPC.h create mode 100644 src/objective-c/GRPCClient/private/NSError+GRPC.m create mode 100644 src/objective-c/README.md diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h new file mode 100644 index 00000000000..db138fd1ee3 --- /dev/null +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -0,0 +1,57 @@ +#import +#import + +@class GRPCMethodName; + +@class GRPCCall; + +// The gRPC protocol is an RPC protocol on top of HTTP2. +// +// While the most common type of RPC receives only one request message and +// returns only one response message, the protocol also supports RPCs that +// return multiple individual messages in a streaming fashion, RPCs that +// accept a stream of request messages, or RPCs with both streaming requests +// and responses. +// +// Conceptually, each gRPC call consists of a bidirectional stream of binary +// messages, with RPCs of the "non-streaming type" sending only one message in +// the corresponding direction (the protocol doesn't make any distinction). +// +// Each RPC uses a different HTTP2 stream, and thus multiple simultaneous RPCs +// can be multiplexed transparently on the same TCP connection. +@interface GRPCCall : NSObject + +// These HTTP2 headers will be passed to the server as part of this call. Each +// HTTP2 header is a name-value pair with string names and either string or binary values. +// The passed dictionary has to use NSString keys, corresponding to the header names. The +// value associated to each can be a NSString object or a NSData object. E.g.: +// +// call.requestMetadata = @{ +// @"Authorization": @"Bearer ...", +// @"SomeBinaryHeader": someData +// }; +// +// After the call is started, modifying this won't have any effect. +@property(nonatomic, readwrite) NSMutableDictionary *requestMetadata; + +// This isn't populated until the first event is delivered to the handler. +@property(atomic, readonly) NSDictionary *responseMetadata; + +// The request writer has to write NSData objects into the provided Writeable. The server will +// receive each of those separately and in order. +// A gRPC call might not complete until the request writer finishes. On the other hand, the +// request finishing doesn't necessarily make the call to finish, as the server might continue +// sending messages to the response side of the call indefinitely (depending on the semantics of +// the specific remote method called). +// To finish a call right away, invoke cancel. +- (instancetype)initWithHost:(NSString *)host + method:(GRPCMethodName *)method + requestsWriter:(id)requestsWriter NS_DESIGNATED_INITIALIZER; + +// Finishes the request side of this call, notifies the server that the RPC +// should be cancelled, and finishes the response side of the call with an error +// of code CANCELED. +- (void)cancel; + +// TODO(jcanizales): Let specify a deadline. As a category of GRXWriter? +@end diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m new file mode 100644 index 00000000000..b9248be5dbc --- /dev/null +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -0,0 +1,373 @@ +#import "GRPCCall.h" + +#include +#include + +#import "GRPCMethodName.h" +#import "private/GRPCChannel.h" +#import "private/GRPCCompletionQueue.h" +#import "private/GRPCDelegateWrapper.h" +#import "private/GRPCMethodName+HTTP2Encoding.h" +#import "private/NSData+GRPC.h" +#import "private/NSDictionary+GRPC.h" +#import "private/NSError+GRPC.h" + +// A grpc_call_error represents a precondition failure when invoking the +// grpc_call_* functions. If one ever happens, it's a bug in this library. +// +// TODO(jcanizales): Can an application shut down gracefully when a thread other +// than the main one throws an exception? +static void AssertNoErrorInCall(grpc_call_error error) { + if (error != GRPC_CALL_OK) { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:@"Precondition of grpc_call_* not met." + userInfo:nil]; + } +} + +@interface GRPCCall () +// Makes it readwrite. +@property(atomic, strong) NSDictionary *responseMetadata; +@end + +// The following methods of a C gRPC call object aren't reentrant, and thus +// calls to them must be serialized: +// - add_metadata +// - invoke +// - start_write +// - writes_done +// - start_read +// - destroy +// The first four are called as part of responding to client commands, but +// start_read we want to call as soon as we're notified that the RPC was +// successfully established (which happens concurrently in the network queue). +// Serialization is achieved by using a private serial queue to operate the +// call object. +// Because add_metadata and invoke are called and return successfully before +// any of the other methods is called, they don't need to use the queue. +// +// Furthermore, start_write and writes_done can only be called after the +// WRITE_ACCEPTED event for any previous write is received. This is achieved by +// pausing the requests writer immediately every time it writes a value, and +// resuming it again when WRITE_ACCEPTED is received. +// +// Similarly, start_read can only be called after the READ event for any +// previous read is received. This is easier to enforce, as we're writing the +// received messages into the writeable: start_read is enqueued once upon receiving +// the CLIENT_METADATA_READ event, and then once after receiving each READ +// event. +@implementation GRPCCall { + dispatch_queue_t _callQueue; + + grpc_call *_gRPCCall; + dispatch_once_t _callAlreadyInvoked; + + GRPCChannel *_channel; + GRPCCompletionQueue *_completionQueue; + + // The C gRPC library has less guarantees on the ordering of events than we + // do. Particularly, in the face of errors, there's no ordering guarantee at + // all. This wrapper over our actual writeable ensures thread-safety and + // correct ordering. + GRPCDelegateWrapper *_responseWriteable; + id _requestWriter; +} + +@synthesize state = _state; + +- (instancetype)init { + return [self initWithHost:nil method:nil requestsWriter:nil]; +} + +// Designated initializer +- (instancetype)initWithHost:(NSString *)host + method:(GRPCMethodName *)method + requestsWriter:(id)requestWriter { + if (!host || !method) { + [NSException raise:NSInvalidArgumentException format:@"Neither host nor method can be nil."]; + } + // TODO(jcanizales): Throw if the requestWriter was already started. + if ((self = [super init])) { + static dispatch_once_t initialization; + dispatch_once(&initialization, ^{ + grpc_init(); + }); + + _completionQueue = [GRPCCompletionQueue completionQueue]; + + _channel = [GRPCChannel channelToHost:host]; + _gRPCCall = grpc_channel_create_call_old(_channel.unmanagedChannel, + method.HTTP2Path.UTF8String, + host.UTF8String, + gpr_inf_future); + + // Serial queue to invoke the non-reentrant methods of the grpc_call object. + _callQueue = dispatch_queue_create("org.grpc.call", NULL); + + _requestWriter = requestWriter; + } + return self; +} + +#pragma mark Finish + +- (void)finishWithError:(NSError *)errorOrNil { + _requestWriter.state = GRXWriterStateFinished; + _requestWriter = nil; + if (errorOrNil) { + [_responseWriteable cancelWithError:errorOrNil]; + } else { + [_responseWriteable enqueueSuccessfulCompletion]; + } +} + +- (void)cancelCall { + // Can be called from any thread, any number of times. + AssertNoErrorInCall(grpc_call_cancel(_gRPCCall)); +} + +- (void)cancel { + [self finishWithError:[NSError errorWithDomain:kGRPCErrorDomain + code:GRPCErrorCodeCancelled + userInfo:nil]]; + [self cancelCall]; +} + +- (void)dealloc { + grpc_call *gRPCCall = _gRPCCall; + dispatch_async(_callQueue, ^{ + grpc_call_destroy(gRPCCall); + }); +} + +#pragma mark Read messages + +// Only called from the call queue. +// The handler will be called from the network queue. +- (void)startReadWithHandler:(GRPCEventHandler)handler { + AssertNoErrorInCall(grpc_call_start_read_old(_gRPCCall, (__bridge_retained void *)handler)); +} + +// Called initially from the network queue once response headers are received, +// then "recursively" from the responseWriteable queue after each response from the +// server has been written. +// If the call is currently paused, this is a noop. Restarting the call will invoke this +// method. +// TODO(jcanizales): Rename to readResponseIfNotPaused. +- (void)startNextRead { + if (self.state == GRXWriterStatePaused) { + return; + } + __weak GRPCCall *weakSelf = self; + __weak GRPCDelegateWrapper *weakWriteable = _responseWriteable; + + dispatch_async(_callQueue, ^{ + [weakSelf startReadWithHandler:^(grpc_event *event) { + if (!event->data.read) { + // No more responses from the server. + return; + } + NSData *data = [NSData grpc_dataWithByteBuffer:event->data.read]; + if (!data) { + // The app doesn't have enough memory to hold the server response. We + // don't want to throw, because the app shouldn't crash for a behavior + // that's on the hands of any server to have. Instead we finish and ask + // the server to cancel. + // + // TODO(jcanizales): No canonical code is appropriate for this situation + // (because it's just a client problem). Use another domain and an + // appropriately-documented code. + [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain + code:GRPCErrorCodeInternal + userInfo:nil]]; + [weakSelf cancelCall]; + return; + } + [weakWriteable enqueueMessage:data completionHandler:^{ + [weakSelf startNextRead]; + }]; + }]; + }); +} + +#pragma mark Send headers + +- (void)addHeaderWithName:(NSString *)name binaryValue:(NSData *)value { + grpc_metadata metadata; + // Safe to discard const qualifiers; we're not going to modify the contents. + metadata.key = (char *)name.UTF8String; + metadata.value = (char *)value.bytes; + metadata.value_length = value.length; + grpc_call_add_metadata_old(_gRPCCall, &metadata, 0); +} + +- (void)addHeaderWithName:(NSString *)name ASCIIValue:(NSString *)value { + grpc_metadata metadata; + // Safe to discard const qualifiers; we're not going to modify the contents. + metadata.key = (char *)name.UTF8String; + metadata.value = (char *)value.UTF8String; + // The trailing \0 isn't encoded in HTTP2. + metadata.value_length = value.length; + grpc_call_add_metadata_old(_gRPCCall, &metadata, 0); +} + +// TODO(jcanizales): Rename to commitHeaders. +- (void)sendHeaders:(NSDictionary *)metadata { + for (NSString *name in metadata) { + id value = metadata[name]; + if ([value isKindOfClass:[NSData class]]) { + [self addHeaderWithName:name binaryValue:value]; + } else if ([value isKindOfClass:[NSString class]]) { + [self addHeaderWithName:name ASCIIValue:value]; + } + } +} + +#pragma mark GRXWriteable implementation + +// Only called from the call queue. The error handler will be called from the +// network queue if the write didn't succeed. +- (void)writeMessage:(NSData *)message withErrorHandler:(void (^)())errorHandler { + + __weak GRPCCall *weakSelf = self; + GRPCEventHandler resumingHandler = ^(grpc_event *event) { + if (event->data.write_accepted != GRPC_OP_OK) { + errorHandler(); + } + // Resume the request writer (even in the case of error). + // TODO(jcanizales): No need to do it in the case of errors anymore? + GRPCCall *strongSelf = weakSelf; + if (strongSelf) { + strongSelf->_requestWriter.state = GRXWriterStateStarted; + } + }; + + grpc_byte_buffer *buffer = message.grpc_byteBuffer; + AssertNoErrorInCall(grpc_call_start_write_old(_gRPCCall, + buffer, + (__bridge_retained void *)resumingHandler, + 0)); + grpc_byte_buffer_destroy(buffer); +} + +- (void)didReceiveValue:(id)value { + // TODO(jcanizales): Throw/assert if value isn't NSData. + + // Pause the input and only resume it when the C layer notifies us that writes + // can proceed. + _requestWriter.state = GRXWriterStatePaused; + + __weak GRPCCall *weakSelf = self; + dispatch_async(_callQueue, ^{ + [weakSelf writeMessage:value withErrorHandler:^{ + [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain + code:GRPCErrorCodeInternal + userInfo:nil]]; + }]; + }); +} + +// Only called from the call queue. The error handler will be called from the +// network queue if the requests stream couldn't be closed successfully. +- (void)finishRequestWithErrorHandler:(void (^)())errorHandler { + GRPCEventHandler handler = ^(grpc_event *event) { + if (event->data.finish_accepted != GRPC_OP_OK) { + errorHandler(); + } + }; + AssertNoErrorInCall(grpc_call_writes_done_old(_gRPCCall, (__bridge_retained void *)handler)); +} + +- (void)didFinishWithError:(NSError *)errorOrNil { + if (errorOrNil) { + [self cancel]; + } else { + __weak GRPCCall *weakSelf = self; + dispatch_async(_callQueue, ^{ + [weakSelf finishRequestWithErrorHandler:^{ + [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain + code:GRPCErrorCodeInternal + userInfo:nil]]; + }]; + }); + } +} + +#pragma mark Invoke + +// Both handlers will eventually be called, from the network queue. Writes can start immediately +// after this. +// The first one (metadataHandler), when the response headers are received. +// The second one (completionHandler), whenever the RPC finishes for any reason. +- (void)invokeCallWithMetadataHandler:(GRPCEventHandler)metadataHandler + completionHandler:(GRPCEventHandler)completionHandler { + AssertNoErrorInCall(grpc_call_invoke_old(_gRPCCall, + _completionQueue.unmanagedQueue, + (__bridge_retained void *)metadataHandler, + (__bridge_retained void *)completionHandler, + 0)); +} + +- (void)invokeCall { + __weak GRPCCall *weakSelf = self; + [self invokeCallWithMetadataHandler:^(grpc_event *event) { + // Response metadata received. + // TODO(jcanizales): Name the type of event->data.client_metadata_read + // in the C library so one can actually pass the object to a method. + grpc_metadata *entries = event->data.client_metadata_read.elements; + size_t count = event->data.client_metadata_read.count; + GRPCCall *strongSelf = weakSelf; + if (strongSelf) { + strongSelf.responseMetadata = [NSDictionary grpc_dictionaryFromMetadata:entries + count:count]; + [strongSelf startNextRead]; + } + } completionHandler:^(grpc_event *event) { + // TODO(jcanizales): Merge HTTP2 trailers into response metadata. + [weakSelf finishWithError:[NSError grpc_errorFromStatus:&event->data.finished]]; + }]; + // Now that the RPC has been initiated, request writes can start. + [_requestWriter startWithWriteable:self]; +} + +#pragma mark GRXWriter implementation + +- (void)startWithWriteable:(id)writeable { + // The following produces a retain cycle self:_responseWriteable:self, which is only + // broken when didFinishWithError: is sent to the wrapped writeable. + // Care is taken not to retain self strongly in any of the blocks used in + // the implementation of GRPCCall, so that the life of the instance is + // determined by this retain cycle. + _responseWriteable = [[GRPCDelegateWrapper alloc] initWithWriteable:writeable writer:self]; + [self sendHeaders:_requestMetadata]; + [self invokeCall]; +} + +- (void)setState:(GRXWriterState)newState { + // Manual transitions are only allowed from the started or paused states. + if (_state == GRXWriterStateNotStarted || _state == GRXWriterStateFinished) { + return; + } + + switch (newState) { + case GRXWriterStateFinished: + _state = newState; + // Per GRXWriter's contract, setting the state to Finished manually + // means one doesn't wish the writeable to be messaged anymore. + [_responseWriteable cancelSilently]; + _responseWriteable = nil; + return; + case GRXWriterStatePaused: + _state = newState; + return; + case GRXWriterStateStarted: + if (_state == GRXWriterStatePaused) { + _state = newState; + [self startNextRead]; + } + return; + case GRXWriterStateNotStarted: + return; + } +} +@end diff --git a/src/objective-c/GRPCClient/GRPCMethodName.h b/src/objective-c/GRPCClient/GRPCMethodName.h new file mode 100644 index 00000000000..4fb86d20991 --- /dev/null +++ b/src/objective-c/GRPCClient/GRPCMethodName.h @@ -0,0 +1,15 @@ +#import + +// See the README file for an introduction to this library. + +// A fully-qualified gRPC method name. Full qualification is needed because a gRPC endpoint can +// implement multiple interfaces. +// TODO(jcanizales): Is this proto-specific, or actual part of gRPC? If the former, move one layer up. +@interface GRPCMethodName : NSObject +@property(nonatomic, readonly) NSString *package; +@property(nonatomic, readonly) NSString *interface; +@property(nonatomic, readonly) NSString *method; +- (instancetype)initWithPackage:(NSString *)package + interface:(NSString *)interface + method:(NSString *)method; +@end diff --git a/src/objective-c/GRPCClient/GRPCMethodName.m b/src/objective-c/GRPCClient/GRPCMethodName.m new file mode 100644 index 00000000000..be9fd4b85bc --- /dev/null +++ b/src/objective-c/GRPCClient/GRPCMethodName.m @@ -0,0 +1,14 @@ +#import "GRPCMethodName.h" + +@implementation GRPCMethodName +- (instancetype)initWithPackage:(NSString *)package + interface:(NSString *)interface + method:(NSString *)method { + if ((self = [super init])) { + _package = [package copy]; + _interface = [interface copy]; + _method = [method copy]; + } + return self; +} +@end diff --git a/src/objective-c/GRPCClient/README.md b/src/objective-c/GRPCClient/README.md new file mode 100644 index 00000000000..9b87f0316cf --- /dev/null +++ b/src/objective-c/GRPCClient/README.md @@ -0,0 +1,4 @@ +This is a generic gRPC client for Objective-C on iOS. + +If you're trying to get started with the library or with gRPC, you should first +read GRPCCall.h. diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h new file mode 100644 index 00000000000..8772acc12fb --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCChannel.h @@ -0,0 +1,17 @@ +#import + +struct grpc_channel; + +// Each separate instance of this class represents at least one TCP +// connection to the provided host. To create a grpc_call, pass the +// value of the unmanagedChannel property to grpc_channel_create_call. +// Release this object when the call is finished. +@interface GRPCChannel : NSObject +@property(nonatomic, readonly) struct grpc_channel *unmanagedChannel; + +// Convenience constructor to allow for reuse of connections. ++ (instancetype)channelToHost:(NSString *)host; + +// Designated initializer +- (instancetype)initWithHost:(NSString *)host; +@end diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m new file mode 100644 index 00000000000..af4a01ee05d --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -0,0 +1,32 @@ +#import "GRPCChannel.h" + +#import + +@implementation GRPCChannel + ++ (instancetype)channelToHost:(NSString *)host { + // TODO(jcanizales): Reuse channels. + return [[self alloc] initWithHost:host]; +} + +- (instancetype)init { + return [self initWithHost:nil]; +} + +// Designated initializer +- (instancetype)initWithHost:(NSString *)host { + if (!host) { + [NSException raise:NSInvalidArgumentException format:@"Host can't be nil."]; + } + if ((self = [super init])) { + _unmanagedChannel = grpc_channel_create(host.UTF8String, NULL); + } + return self; +} + +- (void)dealloc { + // TODO(jcanizales): Be sure to add a test with a server that closes the connection prematurely, + // as in the past that made this call to crash. + grpc_channel_destroy(_unmanagedChannel); +} +@end diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h new file mode 100644 index 00000000000..503df94dd49 --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h @@ -0,0 +1,21 @@ +#import + +struct grpc_completion_queue; +struct grpc_event; + +typedef void(^GRPCEventHandler)(struct grpc_event *event); + +// This class lets one more easily use grpc_completion_queue. To use it, pass +// the value of the unmanagedQueue property of an instance of this class to +// grpc_call_start_invoke. Then for every grpc_call_* method that accepts a tag, +// you can pass a block of type GRPCEventHandler (remembering to cast it using +// __bridge_retained). The block is guaranteed to eventually be called, by a +// concurrent queue, and then released. Each such block is passed a pointer to +// the grpc_event that carried it (in event->tag). +// Release the GRPCCompletionQueue object only after you are not going to pass +// any more blocks to the grpc_call that's using it. +@interface GRPCCompletionQueue : NSObject +@property(nonatomic, readonly) struct grpc_completion_queue *unmanagedQueue; + ++ (instancetype)completionQueue; +@end diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m new file mode 100644 index 00000000000..d2508daec42 --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m @@ -0,0 +1,73 @@ +#import "GRPCCompletionQueue.h" + +#import + +@implementation GRPCCompletionQueue + ++ (instancetype)completionQueue { + // TODO(jcanizales): Reuse completion queues to consume only one thread, + // instead of one per call. + return [[self alloc] init]; +} + +- (instancetype)init { + if ((self = [super init])) { + _unmanagedQueue = grpc_completion_queue_create(); + + // This is for the following block to capture the pointer by value (instead + // of retaining self and doing self->_unmanagedQueue). This is essential + // because the block doesn't end until after grpc_completion_queue_shutdown + // is called, and we only want that to happen after nobody's using the queue + // anymore (i.e. on self dealloc). So the block would never end if it + // retained self. + grpc_completion_queue *unmanagedQueue = _unmanagedQueue; + + // Start a loop on a concurrent queue to read events from the completion + // queue and dispatch each. + static dispatch_once_t initialization; + static dispatch_queue_t gDefaultConcurrentQueue; + dispatch_once(&initialization, ^{ + gDefaultConcurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + }); + dispatch_async(gDefaultConcurrentQueue, ^{ + while (YES) { + // The following call blocks until an event is available. + grpc_event *event = grpc_completion_queue_next(unmanagedQueue, gpr_inf_future); + switch (event->type) { + case GRPC_WRITE_ACCEPTED: + case GRPC_FINISH_ACCEPTED: + case GRPC_CLIENT_METADATA_READ: + case GRPC_READ: + case GRPC_FINISHED: + if (event->tag) { + GRPCEventHandler handler = (__bridge_transfer GRPCEventHandler) event->tag; + handler(event); + } + grpc_event_finish(event); + continue; + case GRPC_QUEUE_SHUTDOWN: + grpc_completion_queue_destroy(unmanagedQueue); + grpc_event_finish(event); + return; + case GRPC_SERVER_RPC_NEW: + NSAssert(NO, @"C gRPC library produced a server-only event."); + continue; + } + // This means the C gRPC library produced an event that wasn't known + // when this library was written. To preserve evolvability, ignore the + // unknown event on release builds. + NSAssert(NO, @"C gRPC library produced an unknown event."); + }; + }); + } + return self; +} + +- (void)dealloc { + // This makes the completion queue produce a GRPC_QUEUE_SHUTDOWN event *after* + // all other pending events are flushed. What this means is all the blocks + // passed to the gRPC C library as void* are eventually called, even if some + // are called after self is dealloc'd. + grpc_completion_queue_shutdown(_unmanagedQueue); +} +@end diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h new file mode 100644 index 00000000000..70a07f817f4 --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h @@ -0,0 +1,48 @@ +#import + +@protocol GRXWriteable; +@protocol GRXWriter; + +// This is a thread-safe wrapper over a GRXWriteable instance. It lets one +// enqueue calls to a GRXWriteable instance for the main thread, guaranteeing +// that didFinishWithError: is the last message sent to it (no matter what +// messages are sent to the wrapper, in what order, nor from which thread). It +// also guarantees that, if cancelWithError: is called from the main thread +// (e.g. by the app cancelling the writes), no further messages are sent to the +// writeable except didFinishWithError:. +// +// TODO(jcanizales): Let the user specify another queue for the writeable +// callbacks. +// TODO(jcanizales): Rename to GRXWriteableWrapper and move to the Rx library. +@interface GRPCDelegateWrapper : NSObject + +// The GRXWriteable passed is the wrapped writeable. +// Both the GRXWriter instance and the GRXWriteable instance are retained until +// didFinishWithError: is sent to the writeable, and released after that. +// This is used to create a retain cycle that keeps both objects alive until the +// writing is explicitly finished. +- (instancetype)initWithWriteable:(id)writeable writer:(id)writer + NS_DESIGNATED_INITIALIZER; + +// Enqueues didReceiveValue: to be sent to the writeable in the main thread. +// The passed handler is invoked from the main thread after didReceiveValue: +// returns. +- (void)enqueueMessage:(NSData *)message completionHandler:(void (^)())handler; + +// Enqueues didFinishWithError:nil to be sent to the writeable in the main +// thread. After that message is sent to the writeable, all other methods of +// this object are effectively noops. +- (void)enqueueSuccessfulCompletion; + +// If the writeable has not yet received a didFinishWithError: message, this +// will enqueue one to be sent to it in the main thread, and cancel all other +// pending messages to the writeable enqueued by this object (both past and +// future). +// The error argument cannot be nil. +- (void)cancelWithError:(NSError *)error; + +// Cancels all pending messages to the writeable enqueued by this object (both +// past and future). Because the writeable won't receive didFinishWithError:, +// this also releases the writeable and the writer. +- (void)cancelSilently; +@end diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m new file mode 100644 index 00000000000..7c64850d7e8 --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m @@ -0,0 +1,87 @@ +#import "GRPCDelegateWrapper.h" + +#import + +@interface GRPCDelegateWrapper () +// These are atomic so that cancellation can nillify them from any thread. +@property(atomic, strong) id writeable; +@property(atomic, strong) id writer; +@end + +@implementation GRPCDelegateWrapper { + dispatch_queue_t _writeableQueue; + // This ensures that didFinishWithError: is only sent once to the writeable. + dispatch_once_t _alreadyFinished; +} + +- (instancetype)init { + return [self initWithWriteable:nil writer:nil]; +} + +// Designated initializer +- (instancetype)initWithWriteable:(id)writeable writer:(id)writer { + if (self = [super init]) { + _writeableQueue = dispatch_get_main_queue(); + _writeable = writeable; + _writer = writer; + } + return self; +} + +- (void)enqueueMessage:(NSData *)message completionHandler:(void (^)())handler { + dispatch_async(_writeableQueue, ^{ + // We're racing a possible cancellation performed by another thread. To turn + // all already-enqueued messages into noops, cancellation nillifies the + // writeable property. If we get it before it's nil, we won + // the race. + id writeable = self.writeable; + if (writeable) { + [writeable didReceiveValue:message]; + handler(); + } + }); +} + +- (void)enqueueSuccessfulCompletion { + dispatch_async(_writeableQueue, ^{ + dispatch_once(&_alreadyFinished, ^{ + // Cancellation is now impossible. None of the other three blocks can run + // concurrently with this one. + [self.writeable didFinishWithError:nil]; + // Break the retain cycle with writer, and skip any possible message to the + // wrapped writeable enqueued after this one. + self.writeable = nil; + self.writer = nil; + }); + }); +} + +- (void)cancelWithError:(NSError *)error { + NSAssert(error, @"For a successful completion, use enqueueSuccessfulCompletion."); + dispatch_once(&_alreadyFinished, ^{ + // Skip any of the still-enqueued messages to the wrapped writeable. We use + // the atomic setter to nillify writer and writeable because we might be + // running concurrently with the blocks in _writeableQueue, and assignment + // with ARC isn't atomic. + id writeable = self.writeable; + self.writeable = nil; + + dispatch_async(_writeableQueue, ^{ + [writeable didFinishWithError:error]; + // Break the retain cycle with writer. + self.writer = nil; + }); + }); +} + +- (void)cancelSilently { + dispatch_once(&_alreadyFinished, ^{ + // Skip any of the still-enqueued messages to the wrapped writeable. We use + // the atomic setter to nillify writer and writeable because we might be + // running concurrently with the blocks in _writeableQueue, and assignment + // with ARC isn't atomic. + self.writeable = nil; + self.writer = nil; + }); +} +@end diff --git a/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h new file mode 100644 index 00000000000..504c669f920 --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h @@ -0,0 +1,7 @@ +#import + +#import "GRPCMethodName.h" + +@interface GRPCMethodName (HTTP2Encoding) +- (NSString *)HTTP2Path; +@end diff --git a/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m new file mode 100644 index 00000000000..2e9fe8d60b1 --- /dev/null +++ b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m @@ -0,0 +1,11 @@ +#import "GRPCMethodName+HTTP2Encoding.h" + +@implementation GRPCMethodName (HTTP2Encoding) +- (NSString *)HTTP2Path { + if (self.package) { + return [NSString stringWithFormat:@"/%@.%@/%@", self.package, self.interface, self.method]; + } else { + return [NSString stringWithFormat:@"/%@/%@", self.interface, self.method]; + } +} +@end diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.h b/src/objective-c/GRPCClient/private/NSData+GRPC.h new file mode 100644 index 00000000000..8cb7b76ebca --- /dev/null +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.h @@ -0,0 +1,8 @@ +#import + +struct grpc_byte_buffer; + +@interface NSData (GRPC) ++ (instancetype)grpc_dataWithByteBuffer:(struct grpc_byte_buffer *)buffer; +- (struct grpc_byte_buffer *)grpc_byteBuffer; +@end diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m new file mode 100644 index 00000000000..47f7a07d7a8 --- /dev/null +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -0,0 +1,53 @@ +#import "NSData+GRPC.h" + +#include +#include + +// TODO(jcanizales): Move these two incantations to the C library. + +static void CopyByteBufferToCharArray(grpc_byte_buffer *buffer, char *array) { + size_t offset = 0; + grpc_byte_buffer_reader *reader = grpc_byte_buffer_reader_create(buffer); + gpr_slice next; + while (grpc_byte_buffer_reader_next(reader, &next) != 0){ + memcpy(array + offset, GPR_SLICE_START_PTR(next), (size_t) GPR_SLICE_LENGTH(next)); + offset += GPR_SLICE_LENGTH(next); + gpr_slice_unref(next); + } + grpc_byte_buffer_reader_destroy(reader); +} + +static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array, size_t length) { + gpr_slice slice = gpr_slice_from_copied_buffer(array, length); + grpc_byte_buffer *buffer = grpc_byte_buffer_create(&slice, 1); + gpr_slice_unref(slice); + return buffer; +} + +@implementation NSData (GRPC) ++ (instancetype)grpc_dataWithByteBuffer:(grpc_byte_buffer *)buffer { + NSUInteger length = grpc_byte_buffer_length(buffer); + char *array = malloc(length * sizeof(*array)); + if (!array) { + // TODO(jcanizales): grpc_byte_buffer is reference-counted, so we can + // prevent this memory problem by implementing a subclass of NSData + // that wraps the grpc_byte_buffer. Then enumerateByteRangesUsingBlock: + // can be implemented using a grpc_byte_buffer_reader. + return nil; + } + CopyByteBufferToCharArray(buffer, array); + return [self dataWithBytesNoCopy:array length:length freeWhenDone:YES]; +} + +- (grpc_byte_buffer *)grpc_byteBuffer { + // Some implementations of NSData, as well as grpc_byte_buffer, support O(1) + // appending of byte arrays by not using internally a single contiguous memory + // block for representation. + // The following implementation is thus not optimal, sometimes requiring two + // copies (one by self.bytes and another by gpr_slice_from_copied_buffer). + // If it turns out to be an issue, we can use enumerateByteRangesUsingblock: + // to create an array of gpr_slice objects to pass to grpc_byte_buffer_create. + // That would make it do exactly one copy, always. + return CopyCharArrayToNewByteBuffer((const char *)self.bytes, (size_t)self.length); +} +@end diff --git a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h new file mode 100644 index 00000000000..b717b108e4b --- /dev/null +++ b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h @@ -0,0 +1,7 @@ +#import + +struct grpc_metadata; + +@interface NSDictionary (GRPC) ++ (instancetype)grpc_dictionaryFromMetadata:(struct grpc_metadata *)entries count:(size_t)count; +@end diff --git a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m new file mode 100644 index 00000000000..a24396d3a95 --- /dev/null +++ b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m @@ -0,0 +1,23 @@ +#import "NSDictionary+GRPC.h" + +#include + +@implementation NSDictionary (GRPC) ++ (instancetype)grpc_dictionaryFromMetadata:(grpc_metadata *)entries count:(size_t)count { + NSMutableDictionary *metadata = [NSMutableDictionary dictionaryWithCapacity:count]; + for (grpc_metadata *entry = entries; entry < entries + count; entry++) { + // TODO(jcanizales): Verify in a C library test that it's converting header names to lower case automatically. + NSString *name = [NSString stringWithUTF8String:entry->key]; + if (!name) { + continue; + } + if (!metadata[name]) { + metadata[name] = [NSMutableArray array]; + } + // TODO(jcanizales): Should we use a non-copy constructor? + [metadata[name] addObject:[NSData dataWithBytes:entry->value + length:entry->value_length]]; + } + return metadata; +} +@end diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.h b/src/objective-c/GRPCClient/private/NSError+GRPC.h new file mode 100644 index 00000000000..949d1dd819f --- /dev/null +++ b/src/objective-c/GRPCClient/private/NSError+GRPC.h @@ -0,0 +1,41 @@ +#import + +// TODO(jcanizales): Make the domain string public. +extern NSString *const kGRPCErrorDomain; + +// TODO(jcanizales): Make this public and document each code. +typedef NS_ENUM(NSInteger, GRPCErrorCode) { + GRPCErrorCodeCancelled = 1, + GRPCErrorCodeUnknown = 2, + GRPCErrorCodeInvalidArgument = 3, + GRPCErrorCodeDeadlineExceeded = 4, + GRPCErrorCodeNotFound = 5, + GRPCErrorCodeAlreadyExists = 6, + GRPCErrorCodePermissionDenied = 7, + GRPCErrorCodeUnauthenticated = 16, + GRPCErrorCodeResourceExhausted = 8, + GRPCErrorCodeFailedPrecondition = 9, + GRPCErrorCodeAborted = 10, + GRPCErrorCodeOutOfRange = 11, + GRPCErrorCodeUnimplemented = 12, + GRPCErrorCodeInternal = 13, + GRPCErrorCodeUnavailable = 14, + GRPCErrorCodeDataLoss = 15 +}; + +// TODO(jcanizales): This is conflating trailing metadata with Status details. Fix it once there's +// a decision on how to codify Status. +#include +struct grpc_metadata; +struct grpc_status { + grpc_status_code status; + const char *details; + size_t metadata_count; + struct grpc_metadata *metadata_elements; +}; + +@interface NSError (GRPC) +// Returns nil if the status is OK. Otherwise, a NSError whose code is one of +// GRPCErrorCode and whose domain is kGRPCErrorDomain. ++ (instancetype)grpc_errorFromStatus:(struct grpc_status *)status; +@end diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.m b/src/objective-c/GRPCClient/private/NSError+GRPC.m new file mode 100644 index 00000000000..73ce112f151 --- /dev/null +++ b/src/objective-c/GRPCClient/private/NSError+GRPC.m @@ -0,0 +1,18 @@ +#import "NSError+GRPC.h" + +#include + +NSString *const kGRPCErrorDomain = @"org.grpc"; + +@implementation NSError (GRPC) ++ (instancetype)grpc_errorFromStatus:(struct grpc_status *)status { + if (status->status == GRPC_STATUS_OK) { + return nil; + } + NSString *message = + [NSString stringWithFormat:@"Code=%i Message='%s'", status->status, status->details]; + return [NSError errorWithDomain:kGRPCErrorDomain + code:status->status + userInfo:@{NSLocalizedDescriptionKey: message}]; +} +@end diff --git a/src/objective-c/README.md b/src/objective-c/README.md new file mode 100644 index 00000000000..05e9f2b4dc9 --- /dev/null +++ b/src/objective-c/README.md @@ -0,0 +1,3 @@ +gRPC implementation for Objective-C on iOS + +This is a work in progress. From d1a8cc082acac3a01defa365b1ae98bc40c5ea3a Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 17 Feb 2015 19:24:36 -0800 Subject: [PATCH 03/59] Adds podspec for RxLibrary and sample app --- src/objective-c/.gitignore | 18 + src/objective-c/RxLibrary/RxLibrary.podspec | 12 + src/objective-c/examples/Sample/Podfile | 12 + src/objective-c/examples/Sample/Podfile.lock | 14 + .../Public/RxLibrary/GRXImmediateWriter.h | 1 + .../Headers/Public/RxLibrary/GRXWriteable.h | 1 + .../Public/RxLibrary/GRXWriter+Immediate.h | 1 + .../RxLibrary/GRXWriter+Transformations.h | 1 + .../Pods/Headers/Public/RxLibrary/GRXWriter.h | 1 + .../Public/RxLibrary/NSEnumerator+GRXUtil.h | 1 + .../Pods/Local Podspecs/RxLibrary.podspec | 12 + .../examples/Sample/Pods/Manifest.lock | 14 + .../Pods/Pods.xcodeproj/project.pbxproj | 2568 +++++++++++++++++ .../Pods-RxLibrary-Private.xcconfig | 5 + .../Pods-RxLibrary/Pods-RxLibrary-dummy.m | 5 + .../Pods-RxLibrary/Pods-RxLibrary-prefix.pch | 5 + .../Pods-RxLibrary/Pods-RxLibrary.xcconfig | 0 .../Pods-Sample-RxLibrary-Private.xcconfig | 5 + .../Pods-Sample-RxLibrary-dummy.m | 5 + .../Pods-Sample-RxLibrary-prefix.pch | 5 + .../Pods-Sample-RxLibrary.xcconfig | 0 .../Pods-Sample-acknowledgements.markdown | 3 + .../Pods-Sample-acknowledgements.plist | 29 + .../Pods-Sample/Pods-Sample-dummy.m | 5 + .../Pods-Sample/Pods-Sample-environment.h | 14 + .../Pods-Sample/Pods-Sample-resources.sh | 74 + .../Pods-Sample/Pods-Sample.debug.xcconfig | 6 + .../Pods-Sample/Pods-Sample.release.xcconfig | 6 + ...ods-SampleTests-RxLibrary-Private.xcconfig | 5 + .../Pods-SampleTests-RxLibrary-dummy.m | 5 + .../Pods-SampleTests-RxLibrary-prefix.pch | 5 + .../Pods-SampleTests-RxLibrary.xcconfig | 0 ...Pods-SampleTests-acknowledgements.markdown | 3 + .../Pods-SampleTests-acknowledgements.plist | 29 + .../Pods-SampleTests/Pods-SampleTests-dummy.m | 5 + .../Pods-SampleTests-environment.h | 14 + .../Pods-SampleTests-resources.sh | 74 + .../Pods-SampleTests.debug.xcconfig | 6 + .../Pods-SampleTests.release.xcconfig | 6 + .../Pods/Pods-acknowledgements.markdown | 3 + .../Pods/Pods-acknowledgements.plist | 29 + .../Target Support Files/Pods/Pods-dummy.m | 5 + .../Pods/Pods-environment.h | 14 + .../Pods/Pods-resources.sh | 74 + .../Pods/Pods.debug.xcconfig | 6 + .../Pods/Pods.release.xcconfig | 6 + src/objective-c/examples/Sample/README.md | 2 + .../Sample/Sample.xcodeproj/project.pbxproj | 955 ++++++ .../contents.xcworkspacedata | 7 + .../contents.xcworkspacedata | 10 + .../examples/Sample/Sample/AppDelegate.h | 17 + .../examples/Sample/Sample/AppDelegate.m | 45 + .../Sample/Sample/Base.lproj/LaunchScreen.xib | 41 + .../Sample/Sample/Base.lproj/Main.storyboard | 25 + .../AppIcon.appiconset/Contents.json | 68 + .../examples/Sample/Sample/Info.plist | 47 + .../examples/Sample/Sample/ViewController.h | 15 + .../examples/Sample/Sample/ViewController.m | 27 + src/objective-c/examples/Sample/Sample/main.m | 16 + .../examples/Sample/SampleTests/Info.plist | 24 + .../examples/Sample/SampleTests/SampleTests.m | 40 + 61 files changed, 4451 insertions(+) create mode 100644 src/objective-c/.gitignore create mode 100644 src/objective-c/RxLibrary/RxLibrary.podspec create mode 100644 src/objective-c/examples/Sample/Podfile create mode 100644 src/objective-c/examples/Sample/Podfile.lock create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXImmediateWriter.h create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriteable.h create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Immediate.h create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Transformations.h create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter.h create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/NSEnumerator+GRXUtil.h create mode 100644 src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec create mode 100644 src/objective-c/examples/Sample/Pods/Manifest.lock create mode 100644 src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-Private.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-dummy.m create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.markdown create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.plist create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-dummy.m create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-environment.h create mode 100755 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.markdown create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.plist create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-dummy.m create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-environment.h create mode 100755 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-resources.sh create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.debug.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.release.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.plist create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-dummy.m create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-environment.h create mode 100755 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-resources.sh create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.debug.xcconfig create mode 100644 src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.release.xcconfig create mode 100644 src/objective-c/examples/Sample/README.md create mode 100644 src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj create mode 100644 src/objective-c/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 src/objective-c/examples/Sample/Sample.xcworkspace/contents.xcworkspacedata create mode 100644 src/objective-c/examples/Sample/Sample/AppDelegate.h create mode 100644 src/objective-c/examples/Sample/Sample/AppDelegate.m create mode 100644 src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib create mode 100644 src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard create mode 100644 src/objective-c/examples/Sample/Sample/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 src/objective-c/examples/Sample/Sample/Info.plist create mode 100644 src/objective-c/examples/Sample/Sample/ViewController.h create mode 100644 src/objective-c/examples/Sample/Sample/ViewController.m create mode 100644 src/objective-c/examples/Sample/Sample/main.m create mode 100644 src/objective-c/examples/Sample/SampleTests/Info.plist create mode 100644 src/objective-c/examples/Sample/SampleTests/SampleTests.m diff --git a/src/objective-c/.gitignore b/src/objective-c/.gitignore new file mode 100644 index 00000000000..ec839c09ebd --- /dev/null +++ b/src/objective-c/.gitignore @@ -0,0 +1,18 @@ +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate diff --git a/src/objective-c/RxLibrary/RxLibrary.podspec b/src/objective-c/RxLibrary/RxLibrary.podspec new file mode 100644 index 00000000000..4e1f64e35f5 --- /dev/null +++ b/src/objective-c/RxLibrary/RxLibrary.podspec @@ -0,0 +1,12 @@ +Pod::Spec.new do |s| + s.name = 'RxLibrary' + s.version = '0.0.1' + s.summary = 'Reactive Extensions library for iOS' + s.author = { + 'Jorge Canizales' => 'jcanizales@google.com' + } + s.source_files = '*.{h,m}' + s.platform = :ios + s.ios.deployment_target = '6.0' + s.requires_arc = true +end diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile new file mode 100644 index 00000000000..fa989879102 --- /dev/null +++ b/src/objective-c/examples/Sample/Podfile @@ -0,0 +1,12 @@ +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' + +pod 'RxLibrary', :path => "../../RxLibrary" + +target 'Sample' do + +end + +target 'SampleTests' do + +end diff --git a/src/objective-c/examples/Sample/Podfile.lock b/src/objective-c/examples/Sample/Podfile.lock new file mode 100644 index 00000000000..9bc407dafab --- /dev/null +++ b/src/objective-c/examples/Sample/Podfile.lock @@ -0,0 +1,14 @@ +PODS: + - RxLibrary (0.0.1) + +DEPENDENCIES: + - RxLibrary (from `../../RxLibrary`) + +EXTERNAL SOURCES: + RxLibrary: + :path: ../../RxLibrary + +SPEC CHECKSUMS: + RxLibrary: fc24868ee72616e8c4e58128b439811fdade0da4 + +COCOAPODS: 0.35.0 diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXImmediateWriter.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXImmediateWriter.h new file mode 120000 index 00000000000..915b0e4f90a --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXImmediateWriter.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/GRXImmediateWriter.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriteable.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriteable.h new file mode 120000 index 00000000000..cb275199fce --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriteable.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/GRXWriteable.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Immediate.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Immediate.h new file mode 120000 index 00000000000..fe5e740afbc --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Immediate.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/GRXWriter+Immediate.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Transformations.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Transformations.h new file mode 120000 index 00000000000..c57168c9efd --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter+Transformations.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/GRXWriter+Transformations.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter.h new file mode 120000 index 00000000000..c4f657e5678 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXWriter.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/GRXWriter.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/NSEnumerator+GRXUtil.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/NSEnumerator+GRXUtil.h new file mode 120000 index 00000000000..97c6aaeeecc --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/NSEnumerator+GRXUtil.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/NSEnumerator+GRXUtil.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec b/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec new file mode 100644 index 00000000000..4e1f64e35f5 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec @@ -0,0 +1,12 @@ +Pod::Spec.new do |s| + s.name = 'RxLibrary' + s.version = '0.0.1' + s.summary = 'Reactive Extensions library for iOS' + s.author = { + 'Jorge Canizales' => 'jcanizales@google.com' + } + s.source_files = '*.{h,m}' + s.platform = :ios + s.ios.deployment_target = '6.0' + s.requires_arc = true +end diff --git a/src/objective-c/examples/Sample/Pods/Manifest.lock b/src/objective-c/examples/Sample/Pods/Manifest.lock new file mode 100644 index 00000000000..9bc407dafab --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Manifest.lock @@ -0,0 +1,14 @@ +PODS: + - RxLibrary (0.0.1) + +DEPENDENCIES: + - RxLibrary (from `../../RxLibrary`) + +EXTERNAL SOURCES: + RxLibrary: + :path: ../../RxLibrary + +SPEC CHECKSUMS: + RxLibrary: fc24868ee72616e8c4e58128b439811fdade0da4 + +COCOAPODS: 0.35.0 diff --git a/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..426cb991de2 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,2568 @@ + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 00061C3922BA01C61542886C + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXWriter+Immediate.m + sourceTree + <group> + + 0014294E408866C876275712 + + fileRef + 00061C3922BA01C61542886C + isa + PBXBuildFile + + 033F82759B99EF3786C6C3AB + + fileRef + EBD4E0AE1D9C793A8420AA8F + isa + PBXBuildFile + + 073184615871F8C7E53BF14F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-RxLibrary.xcconfig + sourceTree + <group> + + 074C7BFE33E5A8B65490CD74 + + fileRef + 6C69DB42AABCB52A9652A925 + isa + PBXBuildFile + + 0D88B5DF071D95A30D664FF6 + + fileRef + 00061C3922BA01C61542886C + isa + PBXBuildFile + + 0E76C0DE38838984ADBE9793 + + isa + PBXTargetDependency + name + Pods-Sample-RxLibrary + target + 5D62B0B091242C70E6F86CAF + targetProxy + 6CE91202B3CB22AD98A8D8DD + + 0E77891D6F14157CEFE7E0AB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-Sample-RxLibrary-Private.xcconfig + path + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig + sourceTree + <group> + + 0EF90C125A8C853D6900067E + + buildActionMask + 2147483647 + files + + A9657244C4119ECE09EE0780 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 0F54B7DB9C41BEA754222626 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Pods-SampleTests-acknowledgements.plist + sourceTree + <group> + + 10420B1B517C0F7BFC1629D6 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + Pods-SampleTests-RxLibrary-prefix.pch + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch + sourceTree + <group> + + 17882F47BB3F8879EADC6877 + + children + + ED20D5EB599CC4E0E8E6F6F4 + B960F8B548AAFF747493F848 + 6C69DB42AABCB52A9652A925 + C0AFDE847E9A73FB99BE85CA + B3E633C4D93071411657B4CC + BA6147A19780CE00E1877F27 + E025FBABACF462C5EDEB8F04 + + isa + PBXGroup + name + Pods + path + Target Support Files/Pods + sourceTree + <group> + + 17B62DC84258EA204EC14FC6 + + isa + PBXTargetDependency + name + Pods-SampleTests-RxLibrary + target + 9EED35B98793FD4884D527D7 + targetProxy + AD71151A44A1A6BB85C70D05 + + 1A919D1671FBC2A501B2B80E + + buildConfigurations + + 79FAE9523C4CB0EF1158F9A0 + 3FCF54B65C82686C35E6A695 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 1B96F18B31A3C8F512494663 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXWriteable.h + sourceTree + <group> + + 1D0CED76BEB5A08AE74DA509 + + fileRef + BD301B295FA10BA71944E6A7 + isa + PBXBuildFile + + 1DD32401F91AA06C7AC30E87 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-Sample.release.xcconfig + sourceTree + <group> + + 1E52CE0A26CA218416895820 + + fileRef + 1B96F18B31A3C8F512494663 + isa + PBXBuildFile + + 1F4EFE5811548D073C9AE7F7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXWriter+Transformations.m + sourceTree + <group> + + 20FAE2C205A83A18304F55D3 + + buildConfigurationList + 3CED27F6BA01528C8C816522 + buildPhases + + 5E942AABDFCC15C6D8A85F77 + EEDF7C277603B79A9BE8324B + + buildRules + + dependencies + + 7E0A207ED9A829B259BAF98E + + isa + PBXNativeTarget + name + Pods + productName + Pods + productReference + 6F8086848D877F06E765F3B6 + productType + com.apple.product-type.library.static + + 2439530CF70B0AEDF7D20F2F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXImmediateWriter.h + sourceTree + <group> + + 246FBFA8A2E45D74C161F0D4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXWriter.h + sourceTree + <group> + + 251E2B5CA237FEEC44071A78 + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES + COPY_PHASE_STRIP + YES + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + ONLY_ACTIVE_ARCH + YES + STRIP_INSTALLED_PRODUCT + NO + + isa + XCBuildConfiguration + name + Debug + + 2536F48732661916E7F98AF4 + + fileRef + 246FBFA8A2E45D74C161F0D4 + isa + PBXBuildFile + + 25515F1B6F5C5FC0FC5B2023 + + baseConfigurationReference + BA6147A19780CE00E1877F27 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 26766544901BC361ADA15529 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-Sample.debug.xcconfig + sourceTree + <group> + + 281E734DE47EFFBE3BF9EB6D + + fileRef + 2439530CF70B0AEDF7D20F2F + isa + PBXBuildFile + + 2BBE3F72E34FB1C4FCE57F41 + + buildConfigurations + + BD0C47F343CA107135A8B9F2 + 636DF1F4C61C5AA7645709FA + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 2D16B1B846727EA61BFB6D3F + + fileRef + C4DD5ACCFDD651DB710A7AC6 + isa + PBXBuildFile + + 2D6F8181094C5DE060DD3540 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + name + Podfile + path + ../Podfile + sourceTree + SOURCE_ROOT + xcLanguageSpecificationIdentifier + xcode.lang.ruby + + 2D9FCC93E8EC668156F428D9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXImmediateWriter.m + sourceTree + <group> + + 2E1D14017CD6D1DF2F25DA2E + + fileRef + 816CFE69CF10239B3EFBCBF1 + isa + PBXBuildFile + + 34547F4C6AC4B31274C6887D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-SampleTests-environment.h + sourceTree + <group> + + 34C114FAF0ED12406E0FFB5F + + fileRef + 1F4EFE5811548D073C9AE7F7 + isa + PBXBuildFile + + 3538730220221D8890A16973 + + fileRef + EBD4E0AE1D9C793A8420AA8F + isa + PBXBuildFile + + 359EFFFF445825D09A49A284 + + fileRef + C4DD5ACCFDD651DB710A7AC6 + isa + PBXBuildFile + + 388A0A86C10335BD8BA6069B + + baseConfigurationReference + 26766544901BC361ADA15529 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 3BE0763D6A2984A3588C51F3 + + buildActionMask + 2147483647 + files + + A6364C40CAC538ABF3DDE60C + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 3C53511285FA3AEF9ACE450F + + buildActionMask + 2147483647 + files + + FD4FDDAA137AAC4ECC193E65 + 1E52CE0A26CA218416895820 + 033F82759B99EF3786C6C3AB + CA58438D9F3E61D68DE07BB0 + A8484F554272234EC1DA0229 + A5F3698797D4DA1AFBCA61F0 + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 3CED27F6BA01528C8C816522 + + buildConfigurations + + 25515F1B6F5C5FC0FC5B2023 + 6C8561D023F024FB9671765B + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 3E250631C4B54FA19123352E + + fileRef + 2D9FCC93E8EC668156F428D9 + isa + PBXBuildFile + + 3FCF54B65C82686C35E6A695 + + baseConfigurationReference + 0E77891D6F14157CEFE7E0AB + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 402AEA377C3925F10F39E9CB + + fileRef + 816CFE69CF10239B3EFBCBF1 + isa + PBXBuildFile + + 446E4587689AB45B32C6B76A + + fileRef + 00061C3922BA01C61542886C + isa + PBXBuildFile + + 44B1E75D8EFE8AED04C78FB7 + + fileRef + D44C1815FF998CE19AF260F7 + isa + PBXBuildFile + + 44EAD826ACB27F88B80500A1 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-Sample.a + sourceTree + BUILT_PRODUCTS_DIR + + 4545C1984951202819F52915 + + fileRef + 246FBFA8A2E45D74C161F0D4 + isa + PBXBuildFile + + 46C034308E68A95A172FD281 + + fileRef + 2D9FCC93E8EC668156F428D9 + isa + PBXBuildFile + + 46E75B83BEFA486A489F2FB5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SampleTests-RxLibrary.xcconfig + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary.xcconfig + sourceTree + <group> + + 477CC2FC7C249C2918424B8D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-SampleTests.release.xcconfig + sourceTree + <group> + + 4BB07CE9F73F22C44B89EC9F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXWriter.m + sourceTree + <group> + + 502BB8D05700DD95603B152D + + fileRef + 816CFE69CF10239B3EFBCBF1 + isa + PBXBuildFile + + 53DFD2191AC1853EC39421DF + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + Pods-Sample-RxLibrary-prefix.pch + path + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch + sourceTree + <group> + + 548BF298DFD0AB1E85BFD224 + + buildActionMask + 2147483647 + files + + 359EFFFF445825D09A49A284 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 55F613C8D46B4C3EE36596A4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-Sample-environment.h + sourceTree + <group> + + 569EE7C2B5DC944C87116DDD + + buildActionMask + 2147483647 + files + + BCF96ACB49A4C581F6C4FB72 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 5C1A6CAF7D4B0AADC6E86AB5 + + baseConfigurationReference + 70699B620DD649C9FC80B596 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 5D485A8180289AB7135979D4 + + children + + 2439530CF70B0AEDF7D20F2F + 2D9FCC93E8EC668156F428D9 + 1B96F18B31A3C8F512494663 + 816CFE69CF10239B3EFBCBF1 + 246FBFA8A2E45D74C161F0D4 + 4BB07CE9F73F22C44B89EC9F + EBD4E0AE1D9C793A8420AA8F + 00061C3922BA01C61542886C + D13801CD3BED29EB3EB28C87 + 1F4EFE5811548D073C9AE7F7 + BD301B295FA10BA71944E6A7 + D44C1815FF998CE19AF260F7 + D2B713C74AFBCA4A9C709F44 + + isa + PBXGroup + name + RxLibrary + path + ../../../RxLibrary + sourceTree + <group> + + 5D62B0B091242C70E6F86CAF + + buildConfigurationList + 1A919D1671FBC2A501B2B80E + buildPhases + + 80BFFCFE10F415F6D4AA05BD + 3BE0763D6A2984A3588C51F3 + C099EA9920009567F1CC8E6F + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-Sample-RxLibrary + productName + Pods-Sample-RxLibrary + productReference + B5E5D1402D71983EBFCAC80A + productType + com.apple.product-type.library.static + + 5E942AABDFCC15C6D8A85F77 + + buildActionMask + 2147483647 + files + + 074C7BFE33E5A8B65490CD74 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6269A76A3AFAD59C7AE98E1E + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SampleTests.a + sourceTree + BUILT_PRODUCTS_DIR + + 62CA148DC83850E7AD0BBC72 + + fileRef + 6721F6605F810F0E3E99A008 + isa + PBXBuildFile + + 636DF1F4C61C5AA7645709FA + + baseConfigurationReference + D4FB4028CE077DDD8A803F26 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 6721F6605F810F0E3E99A008 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-SampleTests-dummy.m + sourceTree + <group> + + 68BB1D7B3AA00144450F5F1C + + fileRef + ACD86D4B746F1151268E7F57 + isa + PBXBuildFile + + 6A7ADEEB77C72E01BBCBF89C + + buildActionMask + 2147483647 + files + + EE32FC2DAC0BD2116BB4F552 + 9CFC94D08F567982ED81D0AC + 3538730220221D8890A16973 + C30D693B18D43C87B0A38159 + 4545C1984951202819F52915 + 1D0CED76BEB5A08AE74DA509 + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6C69DB42AABCB52A9652A925 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-dummy.m + sourceTree + <group> + + 6C8561D023F024FB9671765B + + baseConfigurationReference + E025FBABACF462C5EDEB8F04 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 6CE91202B3CB22AD98A8D8DD + + containerPortal + E72217186F5258779AB341C4 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 5D62B0B091242C70E6F86CAF + remoteInfo + Pods-Sample-RxLibrary + + 6E0139A4BF1CBFDAB998D762 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-RxLibrary.a + sourceTree + BUILT_PRODUCTS_DIR + + 6F8086848D877F06E765F3B6 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 70699B620DD649C9FC80B596 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-SampleTests.debug.xcconfig + sourceTree + <group> + + 708D5526684493C21D4B351D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-RxLibrary-dummy.m + sourceTree + <group> + + 71EAA6DC03A9DA40C184D310 + + fileRef + 4BB07CE9F73F22C44B89EC9F + isa + PBXBuildFile + + 73BE487FD7206FA1037433A9 + + buildConfigurations + + C7522ABF8E5F673B2B51B846 + 9DAF30B69F82D25455209E07 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 77B5A8963EF74F9CE1CDEBEF + + containerPortal + E72217186F5258779AB341C4 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + CA2EA15026724E5FE7863617 + remoteInfo + Pods-RxLibrary + + 78C1945CE480BC3E085811D5 + + fileRef + 9CA52DBDD25FD65977423056 + isa + PBXBuildFile + + 79FAE9523C4CB0EF1158F9A0 + + baseConfigurationReference + 0E77891D6F14157CEFE7E0AB + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 7E0A207ED9A829B259BAF98E + + isa + PBXTargetDependency + name + Pods-RxLibrary + target + CA2EA15026724E5FE7863617 + targetProxy + 77B5A8963EF74F9CE1CDEBEF + + 7F305BF2D2399198431240B2 + + fileRef + D44C1815FF998CE19AF260F7 + isa + PBXBuildFile + + 80BFFCFE10F415F6D4AA05BD + + buildActionMask + 2147483647 + files + + 8B988DE4EEF45D03E1FE4011 + 502BB8D05700DD95603B152D + 0D88B5DF071D95A30D664FF6 + CC015D517558717A179F07EB + CA7A5D5A911B21E060A7C9A8 + DF707F9ADA38C19530138855 + 68BB1D7B3AA00144450F5F1C + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 80ED48A94404B285C3BAD2A2 + + buildActionMask + 2147483647 + files + + 2D16B1B846727EA61BFB6D3F + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 816CFE69CF10239B3EFBCBF1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXWriteable.m + sourceTree + <group> + + 8258E01A573DC26563C24CD3 + + children + + 8E115C0A94168699797FD383 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 8454D1F76F981D7967AFEB64 + + buildConfigurations + + 251E2B5CA237FEEC44071A78 + E429BB9EF652206D69B38B4B + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 8998DF528EA3268FD2F3312F + + buildConfigurationList + AAD81C09A25B9BF7DA0C1C86 + buildPhases + + BA1F7D67EB7832C536803BEB + 548BF298DFD0AB1E85BFD224 + + buildRules + + dependencies + + 17B62DC84258EA204EC14FC6 + + isa + PBXNativeTarget + name + Pods-SampleTests + productName + Pods-SampleTests + productReference + 6269A76A3AFAD59C7AE98E1E + productType + com.apple.product-type.library.static + + 8AF2FEBF81B82548A9CD7D5E + + buildConfigurations + + 388A0A86C10335BD8BA6069B + 972E288F65487B1145B953C3 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 8B988DE4EEF45D03E1FE4011 + + fileRef + 2D9FCC93E8EC668156F428D9 + isa + PBXBuildFile + + 8CDD9B1A9971F8E45E6ECCFE + + children + + 6F8086848D877F06E765F3B6 + 6E0139A4BF1CBFDAB998D762 + 44EAD826ACB27F88B80500A1 + B5E5D1402D71983EBFCAC80A + 6269A76A3AFAD59C7AE98E1E + F8FA1EE55435B1DD5386F9B7 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 8D0ECACB7BF0FD50C8BA90EF + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-Sample-dummy.m + sourceTree + <group> + + 8D141FF420B8F70654BEB651 + + buildActionMask + 2147483647 + files + + 46C034308E68A95A172FD281 + 2E1D14017CD6D1DF2F25DA2E + 446E4587689AB45B32C6B76A + 34C114FAF0ED12406E0FFB5F + 71EAA6DC03A9DA40C184D310 + 44B1E75D8EFE8AED04C78FB7 + C7F1D04BA7ECEB89811F5AE8 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 8E115C0A94168699797FD383 + + children + + C4DD5ACCFDD651DB710A7AC6 + + isa + PBXGroup + name + iOS + sourceTree + <group> + + 8FDD88F3116CD60BDFADE08D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-SampleTests-acknowledgements.markdown + sourceTree + <group> + + 9147D56A68B32B154574B4B1 + + children + + 2D6F8181094C5DE060DD3540 + DA385F717CB8DC97197F9779 + 8258E01A573DC26563C24CD3 + 8CDD9B1A9971F8E45E6ECCFE + BC215B3ADAA2B59CC8E1E0D2 + + isa + PBXGroup + sourceTree + <group> + + 93706FFF29E959C0D0FB35B8 + + fileRef + BD301B295FA10BA71944E6A7 + isa + PBXBuildFile + + 972E288F65487B1145B953C3 + + baseConfigurationReference + 1DD32401F91AA06C7AC30E87 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 9CA52DBDD25FD65977423056 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + Pods-SampleTests-RxLibrary-dummy.m + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m + sourceTree + <group> + + 9CFC94D08F567982ED81D0AC + + fileRef + 1B96F18B31A3C8F512494663 + isa + PBXBuildFile + + 9DAF30B69F82D25455209E07 + + baseConfigurationReference + B16330C6E1974F73301EFA15 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 9E294E4639886DA2A66D2F45 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-Sample-acknowledgements.markdown + sourceTree + <group> + + 9EED35B98793FD4884D527D7 + + buildConfigurationList + 2BBE3F72E34FB1C4FCE57F41 + buildPhases + + A5F1BCFC715A1FB9A5E05F54 + 0EF90C125A8C853D6900067E + 3C53511285FA3AEF9ACE450F + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-SampleTests-RxLibrary + productName + Pods-SampleTests-RxLibrary + productReference + F8FA1EE55435B1DD5386F9B7 + productType + com.apple.product-type.library.static + + A3B182A29677AE41F3DDF60E + + children + + 9E294E4639886DA2A66D2F45 + BDDB48DF5321836E03134B73 + 8D0ECACB7BF0FD50C8BA90EF + 55F613C8D46B4C3EE36596A4 + F2055AA27575926EE57B8546 + 26766544901BC361ADA15529 + 1DD32401F91AA06C7AC30E87 + + isa + PBXGroup + name + Pods-Sample + path + Target Support Files/Pods-Sample + sourceTree + <group> + + A5F1BCFC715A1FB9A5E05F54 + + buildActionMask + 2147483647 + files + + 3E250631C4B54FA19123352E + 402AEA377C3925F10F39E9CB + 0014294E408866C876275712 + E21F75C9C5AE553D1525B15D + FFFC86AF33D17D398F42C549 + 7F305BF2D2399198431240B2 + 78C1945CE480BC3E085811D5 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + A5F3698797D4DA1AFBCA61F0 + + fileRef + BD301B295FA10BA71944E6A7 + isa + PBXBuildFile + + A6364C40CAC538ABF3DDE60C + + fileRef + C4DD5ACCFDD651DB710A7AC6 + isa + PBXBuildFile + + A8484F554272234EC1DA0229 + + fileRef + 246FBFA8A2E45D74C161F0D4 + isa + PBXBuildFile + + A9657244C4119ECE09EE0780 + + fileRef + C4DD5ACCFDD651DB710A7AC6 + isa + PBXBuildFile + + AAD81C09A25B9BF7DA0C1C86 + + buildConfigurations + + 5C1A6CAF7D4B0AADC6E86AB5 + C11B686FDA34820988E0EA76 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + AB030C334AF0049970BC6F69 + + fileRef + D13801CD3BED29EB3EB28C87 + isa + PBXBuildFile + + AB49EB008360ACF61F868E97 + + fileRef + 1B96F18B31A3C8F512494663 + isa + PBXBuildFile + + ACD86D4B746F1151268E7F57 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + Pods-Sample-RxLibrary-dummy.m + path + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m + sourceTree + <group> + + AD71151A44A1A6BB85C70D05 + + containerPortal + E72217186F5258779AB341C4 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 9EED35B98793FD4884D527D7 + remoteInfo + Pods-SampleTests-RxLibrary + + B032E0762906905546DBF8B3 + + fileRef + EBD4E0AE1D9C793A8420AA8F + isa + PBXBuildFile + + B16330C6E1974F73301EFA15 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-RxLibrary-Private.xcconfig + sourceTree + <group> + + B3E633C4D93071411657B4CC + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.script.sh + path + Pods-resources.sh + sourceTree + <group> + + B5E5D1402D71983EBFCAC80A + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-Sample-RxLibrary.a + sourceTree + BUILT_PRODUCTS_DIR + + B960F8B548AAFF747493F848 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Pods-acknowledgements.plist + sourceTree + <group> + + BA1F7D67EB7832C536803BEB + + buildActionMask + 2147483647 + files + + 62CA148DC83850E7AD0BBC72 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + BA6147A19780CE00E1877F27 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods.debug.xcconfig + sourceTree + <group> + + BC215B3ADAA2B59CC8E1E0D2 + + children + + 17882F47BB3F8879EADC6877 + A3B182A29677AE41F3DDF60E + EE39E3EB35643DA11DB4107A + + isa + PBXGroup + name + Targets Support Files + sourceTree + <group> + + BCF96ACB49A4C581F6C4FB72 + + fileRef + C4DD5ACCFDD651DB710A7AC6 + isa + PBXBuildFile + + BD0C47F343CA107135A8B9F2 + + baseConfigurationReference + D4FB4028CE077DDD8A803F26 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + BD301B295FA10BA71944E6A7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + NSEnumerator+GRXUtil.h + sourceTree + <group> + + BDDB48DF5321836E03134B73 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Pods-Sample-acknowledgements.plist + sourceTree + <group> + + C099EA9920009567F1CC8E6F + + buildActionMask + 2147483647 + files + + 281E734DE47EFFBE3BF9EB6D + AB49EB008360ACF61F868E97 + B032E0762906905546DBF8B3 + AB030C334AF0049970BC6F69 + 2536F48732661916E7F98AF4 + 93706FFF29E959C0D0FB35B8 + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + C0AFDE847E9A73FB99BE85CA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-environment.h + sourceTree + <group> + + C11B686FDA34820988E0EA76 + + baseConfigurationReference + 477CC2FC7C249C2918424B8D + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + C30D693B18D43C87B0A38159 + + fileRef + D13801CD3BED29EB3EB28C87 + isa + PBXBuildFile + + C4DD5ACCFDD651DB710A7AC6 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework + sourceTree + DEVELOPER_DIR + + C7522ABF8E5F673B2B51B846 + + baseConfigurationReference + B16330C6E1974F73301EFA15 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + C7F1D04BA7ECEB89811F5AE8 + + fileRef + 708D5526684493C21D4B351D + isa + PBXBuildFile + + CA2EA15026724E5FE7863617 + + buildConfigurationList + 73BE487FD7206FA1037433A9 + buildPhases + + 8D141FF420B8F70654BEB651 + 569EE7C2B5DC944C87116DDD + 6A7ADEEB77C72E01BBCBF89C + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-RxLibrary + productName + Pods-RxLibrary + productReference + 6E0139A4BF1CBFDAB998D762 + productType + com.apple.product-type.library.static + + CA58438D9F3E61D68DE07BB0 + + fileRef + D13801CD3BED29EB3EB28C87 + isa + PBXBuildFile + + CA7A5D5A911B21E060A7C9A8 + + fileRef + 4BB07CE9F73F22C44B89EC9F + isa + PBXBuildFile + + CC015D517558717A179F07EB + + fileRef + 1F4EFE5811548D073C9AE7F7 + isa + PBXBuildFile + + CD55EA3FDCE78270B7AD57C1 + + buildActionMask + 2147483647 + files + + F2258DDD414D3E7F794A8D57 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + CE7EA2A3E87B73883477BA0E + + fileRef + C4DD5ACCFDD651DB710A7AC6 + isa + PBXBuildFile + + D0574DAAAAAA7164F6C504B0 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-RxLibrary-prefix.pch + sourceTree + <group> + + D13801CD3BED29EB3EB28C87 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXWriter+Transformations.h + sourceTree + <group> + + D2B713C74AFBCA4A9C709F44 + + children + + 073184615871F8C7E53BF14F + B16330C6E1974F73301EFA15 + 708D5526684493C21D4B351D + D0574DAAAAAA7164F6C504B0 + DE7537ED152395F49840CBC4 + 0E77891D6F14157CEFE7E0AB + ACD86D4B746F1151268E7F57 + 53DFD2191AC1853EC39421DF + 46E75B83BEFA486A489F2FB5 + D4FB4028CE077DDD8A803F26 + 9CA52DBDD25FD65977423056 + 10420B1B517C0F7BFC1629D6 + + isa + PBXGroup + name + Support Files + path + ../examples/Sample/Pods/Target Support Files/Pods-RxLibrary + sourceTree + <group> + + D44C1815FF998CE19AF260F7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + NSEnumerator+GRXUtil.m + sourceTree + <group> + + D4FB4028CE077DDD8A803F26 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SampleTests-RxLibrary-Private.xcconfig + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig + sourceTree + <group> + + DA385F717CB8DC97197F9779 + + children + + 5D485A8180289AB7135979D4 + + isa + PBXGroup + name + Development Pods + sourceTree + <group> + + DE7537ED152395F49840CBC4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-Sample-RxLibrary.xcconfig + path + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary.xcconfig + sourceTree + <group> + + DF707F9ADA38C19530138855 + + fileRef + D44C1815FF998CE19AF260F7 + isa + PBXBuildFile + + E025FBABACF462C5EDEB8F04 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods.release.xcconfig + sourceTree + <group> + + E21F75C9C5AE553D1525B15D + + fileRef + 1F4EFE5811548D073C9AE7F7 + isa + PBXBuildFile + + E429BB9EF652206D69B38B4B + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES + COPY_PHASE_STRIP + NO + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PREPROCESSOR_DEFINITIONS + + RELEASE=1 + + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + STRIP_INSTALLED_PRODUCT + NO + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + E72217186F5258779AB341C4 + + attributes + + LastUpgradeCheck + 0510 + + buildConfigurationList + 8454D1F76F981D7967AFEB64 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + + mainGroup + 9147D56A68B32B154574B4B1 + productRefGroup + 8CDD9B1A9971F8E45E6ECCFE + projectDirPath + + projectReferences + + projectRoot + + targets + + 20FAE2C205A83A18304F55D3 + CA2EA15026724E5FE7863617 + F88FB4C4D5E45ABA4FE79557 + 5D62B0B091242C70E6F86CAF + 8998DF528EA3268FD2F3312F + 9EED35B98793FD4884D527D7 + + + E8EEC1310BE1A1C26A6CC94F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.script.sh + path + Pods-SampleTests-resources.sh + sourceTree + <group> + + EBD4E0AE1D9C793A8420AA8F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXWriter+Immediate.h + sourceTree + <group> + + ED20D5EB599CC4E0E8E6F6F4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-acknowledgements.markdown + sourceTree + <group> + + EE32FC2DAC0BD2116BB4F552 + + fileRef + 2439530CF70B0AEDF7D20F2F + isa + PBXBuildFile + + EE39E3EB35643DA11DB4107A + + children + + 8FDD88F3116CD60BDFADE08D + 0F54B7DB9C41BEA754222626 + 6721F6605F810F0E3E99A008 + 34547F4C6AC4B31274C6887D + E8EEC1310BE1A1C26A6CC94F + 70699B620DD649C9FC80B596 + 477CC2FC7C249C2918424B8D + + isa + PBXGroup + name + Pods-SampleTests + path + Target Support Files/Pods-SampleTests + sourceTree + <group> + + EEDF7C277603B79A9BE8324B + + buildActionMask + 2147483647 + files + + CE7EA2A3E87B73883477BA0E + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + F2055AA27575926EE57B8546 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.script.sh + path + Pods-Sample-resources.sh + sourceTree + <group> + + F2258DDD414D3E7F794A8D57 + + fileRef + 8D0ECACB7BF0FD50C8BA90EF + isa + PBXBuildFile + + F88FB4C4D5E45ABA4FE79557 + + buildConfigurationList + 8AF2FEBF81B82548A9CD7D5E + buildPhases + + CD55EA3FDCE78270B7AD57C1 + 80ED48A94404B285C3BAD2A2 + + buildRules + + dependencies + + 0E76C0DE38838984ADBE9793 + + isa + PBXNativeTarget + name + Pods-Sample + productName + Pods-Sample + productReference + 44EAD826ACB27F88B80500A1 + productType + com.apple.product-type.library.static + + F8FA1EE55435B1DD5386F9B7 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SampleTests-RxLibrary.a + sourceTree + BUILT_PRODUCTS_DIR + + FD4FDDAA137AAC4ECC193E65 + + fileRef + 2439530CF70B0AEDF7D20F2F + isa + PBXBuildFile + + FFFC86AF33D17D398F42C549 + + fileRef + 4BB07CE9F73F22C44B89EC9F + isa + PBXBuildFile + + + rootObject + E72217186F5258779AB341C4 + + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-Private.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-Private.xcconfig new file mode 100644 index 00000000000..5c1a7097bed --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-Private.xcconfig @@ -0,0 +1,5 @@ +#include "Pods-RxLibrary.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/RxLibrary" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC +PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-dummy.m b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-dummy.m new file mode 100644 index 00000000000..79e14602570 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_RxLibrary : NSObject +@end +@implementation PodsDummy_Pods_RxLibrary +@end diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch new file mode 100644 index 00000000000..95cf11d9fb0 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-environment.h" diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-RxLibrary/Pods-RxLibrary.xcconfig new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig new file mode 100644 index 00000000000..2cc81f729dc --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig @@ -0,0 +1,5 @@ +#include "Pods-Sample-RxLibrary.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/RxLibrary" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC +PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m new file mode 100644 index 00000000000..c81b57bbe88 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Sample_RxLibrary : NSObject +@end +@implementation PodsDummy_Pods_Sample_RxLibrary +@end diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch new file mode 100644 index 00000000000..0e807f67a35 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-Sample-environment.h" diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary.xcconfig new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.markdown b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.markdown new file mode 100644 index 00000000000..255149a8286 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - http://cocoapods.org diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.plist b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.plist new file mode 100644 index 00000000000..e4edebe92da --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-dummy.m b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-dummy.m new file mode 100644 index 00000000000..b5ca68a1c55 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Sample : NSObject +@end +@implementation PodsDummy_Pods_Sample +@end diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-environment.h b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-environment.h new file mode 100644 index 00000000000..b4fd16b369b --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-environment.h @@ -0,0 +1,14 @@ + +// To check if a library is compiled with CocoaPods you +// can use the `COCOAPODS` macro definition which is +// defined in the xcconfigs so it is available in +// headers also when they are imported in the client +// project. + + +// RxLibrary +#define COCOAPODS_POD_AVAILABLE_RxLibrary +#define COCOAPODS_VERSION_MAJOR_RxLibrary 0 +#define COCOAPODS_VERSION_MINOR_RxLibrary 0 +#define COCOAPODS_VERSION_PATCH_RxLibrary 1 + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh new file mode 100755 index 00000000000..e149064a090 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh @@ -0,0 +1,74 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig new file mode 100644 index 00000000000..776727154c1 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC -l"Pods-Sample-RxLibrary" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig new file mode 100644 index 00000000000..776727154c1 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC -l"Pods-Sample-RxLibrary" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig new file mode 100644 index 00000000000..a3cd7924345 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig @@ -0,0 +1,5 @@ +#include "Pods-SampleTests-RxLibrary.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/RxLibrary" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC +PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m new file mode 100644 index 00000000000..d57aef11d68 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_SampleTests_RxLibrary : NSObject +@end +@implementation PodsDummy_Pods_SampleTests_RxLibrary +@end diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch new file mode 100644 index 00000000000..abd56515872 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-SampleTests-environment.h" diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary.xcconfig new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.markdown b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.markdown new file mode 100644 index 00000000000..255149a8286 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - http://cocoapods.org diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.plist b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.plist new file mode 100644 index 00000000000..e4edebe92da --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-dummy.m b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-dummy.m new file mode 100644 index 00000000000..01b4ad73ba6 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_SampleTests : NSObject +@end +@implementation PodsDummy_Pods_SampleTests +@end diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-environment.h b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-environment.h new file mode 100644 index 00000000000..b4fd16b369b --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-environment.h @@ -0,0 +1,14 @@ + +// To check if a library is compiled with CocoaPods you +// can use the `COCOAPODS` macro definition which is +// defined in the xcconfigs so it is available in +// headers also when they are imported in the client +// project. + + +// RxLibrary +#define COCOAPODS_POD_AVAILABLE_RxLibrary +#define COCOAPODS_VERSION_MAJOR_RxLibrary 0 +#define COCOAPODS_VERSION_MINOR_RxLibrary 0 +#define COCOAPODS_VERSION_PATCH_RxLibrary 1 + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-resources.sh b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-resources.sh new file mode 100755 index 00000000000..e149064a090 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-resources.sh @@ -0,0 +1,74 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.debug.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.debug.xcconfig new file mode 100644 index 00000000000..92a3b7d2bd5 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.debug.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC -l"Pods-SampleTests-RxLibrary" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.release.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.release.xcconfig new file mode 100644 index 00000000000..92a3b7d2bd5 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests.release.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC -l"Pods-SampleTests-RxLibrary" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown new file mode 100644 index 00000000000..255149a8286 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - http://cocoapods.org diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.plist new file mode 100644 index 00000000000..e4edebe92da --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-dummy.m b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-dummy.m new file mode 100644 index 00000000000..ade64bd1a9b --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-environment.h b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-environment.h new file mode 100644 index 00000000000..b4fd16b369b --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-environment.h @@ -0,0 +1,14 @@ + +// To check if a library is compiled with CocoaPods you +// can use the `COCOAPODS` macro definition which is +// defined in the xcconfigs so it is available in +// headers also when they are imported in the client +// project. + + +// RxLibrary +#define COCOAPODS_POD_AVAILABLE_RxLibrary +#define COCOAPODS_VERSION_MAJOR_RxLibrary 0 +#define COCOAPODS_VERSION_MINOR_RxLibrary 0 +#define COCOAPODS_VERSION_PATCH_RxLibrary 1 + diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-resources.sh b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-resources.sh new file mode 100755 index 00000000000..e149064a090 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods-resources.sh @@ -0,0 +1,74 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.debug.xcconfig new file mode 100644 index 00000000000..3c7fe4aa007 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.debug.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC -l"Pods-RxLibrary" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.release.xcconfig b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.release.xcconfig new file mode 100644 index 00000000000..3c7fe4aa007 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Target Support Files/Pods/Pods.release.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/RxLibrary" +OTHER_LDFLAGS = -ObjC -l"Pods-RxLibrary" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/src/objective-c/examples/Sample/README.md b/src/objective-c/examples/Sample/README.md new file mode 100644 index 00000000000..45ba544a34a --- /dev/null +++ b/src/objective-c/examples/Sample/README.md @@ -0,0 +1,2 @@ +When contributing changes to this sample, use Cocoapods to manage the workspace +file and everything under the Pods directory. \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..142e60e2b25 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj @@ -0,0 +1,955 @@ + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 04554623324BE4A838846086 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" + + showEnvVarsInLog + 0 + + 2DC7B7C4C0410F43B9621631 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 41F7486D8F66994B0BFB84AF + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + 6369A2611A9322E20015FC5C + + children + + 6369A26C1A9322E20015FC5C + 6369A2861A9322E20015FC5C + 6369A26B1A9322E20015FC5C + AB3331C9AE6488E61B2B094E + C4C2C5219053E079C9EFB930 + + isa + PBXGroup + sourceTree + <group> + + 6369A2621A9322E20015FC5C + + attributes + + LastUpgradeCheck + 0610 + ORGANIZATIONNAME + gRPC + TargetAttributes + + 6369A2691A9322E20015FC5C + + CreatedOnToolsVersion + 6.1.1 + + 6369A2821A9322E20015FC5C + + CreatedOnToolsVersion + 6.1.1 + TestTargetID + 6369A2691A9322E20015FC5C + + + + buildConfigurationList + 6369A2651A9322E20015FC5C + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + Base + + mainGroup + 6369A2611A9322E20015FC5C + productRefGroup + 6369A26B1A9322E20015FC5C + projectDirPath + + projectReferences + + projectRoot + + targets + + 6369A2691A9322E20015FC5C + 6369A2821A9322E20015FC5C + + + 6369A2651A9322E20015FC5C + + buildConfigurations + + 6369A28B1A9322E20015FC5C + 6369A28C1A9322E20015FC5C + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6369A2661A9322E20015FC5C + + buildActionMask + 2147483647 + files + + 6369A2761A9322E20015FC5C + 6369A2731A9322E20015FC5C + 6369A2701A9322E20015FC5C + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6369A2671A9322E20015FC5C + + buildActionMask + 2147483647 + files + + FC81FE63CA655031F3524EC0 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6369A2681A9322E20015FC5C + + buildActionMask + 2147483647 + files + + 6369A2791A9322E20015FC5C + 6369A27E1A9322E20015FC5C + 6369A27B1A9322E20015FC5C + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6369A2691A9322E20015FC5C + + buildConfigurationList + 6369A28D1A9322E20015FC5C + buildPhases + + 41F7486D8F66994B0BFB84AF + 6369A2661A9322E20015FC5C + 6369A2671A9322E20015FC5C + 6369A2681A9322E20015FC5C + 04554623324BE4A838846086 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Sample + productName + Sample + productReference + 6369A26A1A9322E20015FC5C + productType + com.apple.product-type.application + + 6369A26A1A9322E20015FC5C + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + Sample.app + sourceTree + BUILT_PRODUCTS_DIR + + 6369A26B1A9322E20015FC5C + + children + + 6369A26A1A9322E20015FC5C + 6369A2831A9322E20015FC5C + + isa + PBXGroup + name + Products + sourceTree + <group> + + 6369A26C1A9322E20015FC5C + + children + + 6369A2711A9322E20015FC5C + 6369A2721A9322E20015FC5C + 6369A2741A9322E20015FC5C + 6369A2751A9322E20015FC5C + 6369A2771A9322E20015FC5C + 6369A27A1A9322E20015FC5C + 6369A27C1A9322E20015FC5C + 6369A26D1A9322E20015FC5C + + isa + PBXGroup + path + Sample + sourceTree + <group> + + 6369A26D1A9322E20015FC5C + + children + + 6369A26E1A9322E20015FC5C + 6369A26F1A9322E20015FC5C + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 6369A26E1A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Info.plist + sourceTree + <group> + + 6369A26F1A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + main.m + sourceTree + <group> + + 6369A2701A9322E20015FC5C + + fileRef + 6369A26F1A9322E20015FC5C + isa + PBXBuildFile + + 6369A2711A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + AppDelegate.h + sourceTree + <group> + + 6369A2721A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + AppDelegate.m + sourceTree + <group> + + 6369A2731A9322E20015FC5C + + fileRef + 6369A2721A9322E20015FC5C + isa + PBXBuildFile + + 6369A2741A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + ViewController.h + sourceTree + <group> + + 6369A2751A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + ViewController.m + sourceTree + <group> + + 6369A2761A9322E20015FC5C + + fileRef + 6369A2751A9322E20015FC5C + isa + PBXBuildFile + + 6369A2771A9322E20015FC5C + + children + + 6369A2781A9322E20015FC5C + + isa + PBXVariantGroup + name + Main.storyboard + sourceTree + <group> + + 6369A2781A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + file.storyboard + name + Base + path + Base.lproj/Main.storyboard + sourceTree + <group> + + 6369A2791A9322E20015FC5C + + fileRef + 6369A2771A9322E20015FC5C + isa + PBXBuildFile + + 6369A27A1A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + folder.assetcatalog + path + Images.xcassets + sourceTree + <group> + + 6369A27B1A9322E20015FC5C + + fileRef + 6369A27A1A9322E20015FC5C + isa + PBXBuildFile + + 6369A27C1A9322E20015FC5C + + children + + 6369A27D1A9322E20015FC5C + + isa + PBXVariantGroup + name + LaunchScreen.xib + sourceTree + <group> + + 6369A27D1A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + Base + path + Base.lproj/LaunchScreen.xib + sourceTree + <group> + + 6369A27E1A9322E20015FC5C + + fileRef + 6369A27C1A9322E20015FC5C + isa + PBXBuildFile + + 6369A27F1A9322E20015FC5C + + buildActionMask + 2147483647 + files + + 6369A28A1A9322E20015FC5C + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6369A2801A9322E20015FC5C + + buildActionMask + 2147483647 + files + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6369A2811A9322E20015FC5C + + buildActionMask + 2147483647 + files + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6369A2821A9322E20015FC5C + + buildConfigurationList + 6369A2901A9322E20015FC5C + buildPhases + + 6369A27F1A9322E20015FC5C + 6369A2801A9322E20015FC5C + 6369A2811A9322E20015FC5C + + buildRules + + dependencies + + 6369A2851A9322E20015FC5C + + isa + PBXNativeTarget + name + SampleTests + productName + SampleTests + productReference + 6369A2831A9322E20015FC5C + productType + com.apple.product-type.bundle.unit-test + + 6369A2831A9322E20015FC5C + + explicitFileType + wrapper.cfbundle + includeInIndex + 0 + isa + PBXFileReference + path + SampleTests.xctest + sourceTree + BUILT_PRODUCTS_DIR + + 6369A2841A9322E20015FC5C + + containerPortal + 6369A2621A9322E20015FC5C + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 6369A2691A9322E20015FC5C + remoteInfo + Sample + + 6369A2851A9322E20015FC5C + + isa + PBXTargetDependency + target + 6369A2691A9322E20015FC5C + targetProxy + 6369A2841A9322E20015FC5C + + 6369A2861A9322E20015FC5C + + children + + 6369A2891A9322E20015FC5C + 6369A2871A9322E20015FC5C + + isa + PBXGroup + path + SampleTests + sourceTree + <group> + + 6369A2871A9322E20015FC5C + + children + + 6369A2881A9322E20015FC5C + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 6369A2881A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Info.plist + sourceTree + <group> + + 6369A2891A9322E20015FC5C + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + SampleTests.m + sourceTree + <group> + + 6369A28A1A9322E20015FC5C + + fileRef + 6369A2891A9322E20015FC5C + isa + PBXBuildFile + + 6369A28B1A9322E20015FC5C + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + CLANG_WARN_UNREACHABLE_CODE + YES + CLANG_WARN__DUPLICATE_METHOD_MATCH + YES + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + COPY_PHASE_STRIP + NO + ENABLE_STRICT_OBJC_MSGSEND + YES + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES_ERROR + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES_AGGRESSIVE + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 8.1 + MTL_ENABLE_DEBUG_INFO + YES + ONLY_ACTIVE_ARCH + YES + SDKROOT + iphoneos + TARGETED_DEVICE_FAMILY + 1,2 + + isa + XCBuildConfiguration + name + Debug + + 6369A28C1A9322E20015FC5C + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + CLANG_WARN_UNREACHABLE_CODE + YES + CLANG_WARN__DUPLICATE_METHOD_MATCH + YES + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + COPY_PHASE_STRIP + YES + ENABLE_NS_ASSERTIONS + NO + ENABLE_STRICT_OBJC_MSGSEND + YES + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES_ERROR + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES_AGGRESSIVE + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 8.1 + MTL_ENABLE_DEBUG_INFO + NO + SDKROOT + iphoneos + TARGETED_DEVICE_FAMILY + 1,2 + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 6369A28D1A9322E20015FC5C + + buildConfigurations + + 6369A28E1A9322E20015FC5C + 6369A28F1A9322E20015FC5C + + defaultConfigurationIsVisible + 0 + isa + XCConfigurationList + + 6369A28E1A9322E20015FC5C + + baseConfigurationReference + AC29DD6FCDF962F519FEBB0D + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + INFOPLIST_FILE + Sample/Info.plist + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks + PRODUCT_NAME + $(TARGET_NAME) + + isa + XCBuildConfiguration + name + Debug + + 6369A28F1A9322E20015FC5C + + baseConfigurationReference + C68330F8D451CC6ACEABA09F + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + INFOPLIST_FILE + Sample/Info.plist + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks + PRODUCT_NAME + $(TARGET_NAME) + + isa + XCBuildConfiguration + name + Release + + 6369A2901A9322E20015FC5C + + buildConfigurations + + 6369A2911A9322E20015FC5C + 6369A2921A9322E20015FC5C + + defaultConfigurationIsVisible + 0 + isa + XCConfigurationList + + 6369A2911A9322E20015FC5C + + buildSettings + + BUNDLE_LOADER + $(TEST_HOST) + FRAMEWORK_SEARCH_PATHS + + $(SDKROOT)/Developer/Library/Frameworks + $(inherited) + + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + INFOPLIST_FILE + SampleTests/Info.plist + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks @loader_path/Frameworks + PRODUCT_NAME + $(TARGET_NAME) + TEST_HOST + $(BUILT_PRODUCTS_DIR)/Sample.app/Sample + + isa + XCBuildConfiguration + name + Debug + + 6369A2921A9322E20015FC5C + + buildSettings + + BUNDLE_LOADER + $(TEST_HOST) + FRAMEWORK_SEARCH_PATHS + + $(SDKROOT)/Developer/Library/Frameworks + $(inherited) + + INFOPLIST_FILE + SampleTests/Info.plist + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks @loader_path/Frameworks + PRODUCT_NAME + $(TARGET_NAME) + TEST_HOST + $(BUILT_PRODUCTS_DIR)/Sample.app/Sample + + isa + XCBuildConfiguration + name + Release + + AB3331C9AE6488E61B2B094E + + children + + AC29DD6FCDF962F519FEBB0D + C68330F8D451CC6ACEABA09F + + isa + PBXGroup + name + Pods + sourceTree + <group> + + AC29DD6FCDF962F519FEBB0D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.debug.xcconfig + path + Pods/Target Support Files/Pods/Pods.debug.xcconfig + sourceTree + <group> + + C4C2C5219053E079C9EFB930 + + children + + 2DC7B7C4C0410F43B9621631 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + C68330F8D451CC6ACEABA09F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.release.xcconfig + path + Pods/Target Support Files/Pods/Pods.release.xcconfig + sourceTree + <group> + + FC81FE63CA655031F3524EC0 + + fileRef + 2DC7B7C4C0410F43B9621631 + isa + PBXBuildFile + + + rootObject + 6369A2621A9322E20015FC5C + + diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/objective-c/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..a80c0382495 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/src/objective-c/examples/Sample/Sample.xcworkspace/contents.xcworkspacedata b/src/objective-c/examples/Sample/Sample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..7b5a2f3050a --- /dev/null +++ b/src/objective-c/examples/Sample/Sample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/src/objective-c/examples/Sample/Sample/AppDelegate.h b/src/objective-c/examples/Sample/Sample/AppDelegate.h new file mode 100644 index 00000000000..ff8369337bc --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// Sample +// +// Created by Jorge Canizalez Diaz on 2/16/15. +// Copyright (c) 2015 gRPC. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/src/objective-c/examples/Sample/Sample/AppDelegate.m b/src/objective-c/examples/Sample/Sample/AppDelegate.m new file mode 100644 index 00000000000..7db63e9d7b5 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/AppDelegate.m @@ -0,0 +1,45 @@ +// +// AppDelegate.m +// Sample +// +// Created by Jorge Canizalez Diaz on 2/16/15. +// Copyright (c) 2015 gRPC. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib b/src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib new file mode 100644 index 00000000000..c51a8e199eb --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard b/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard new file mode 100644 index 00000000000..f56d2f3bb56 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/objective-c/examples/Sample/Sample/Images.xcassets/AppIcon.appiconset/Contents.json b/src/objective-c/examples/Sample/Sample/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..36d2c80d889 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Sample/Info.plist b/src/objective-c/examples/Sample/Sample/Info.plist new file mode 100644 index 00000000000..ffdc8b30122 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.grpc.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/src/objective-c/examples/Sample/Sample/ViewController.h b/src/objective-c/examples/Sample/Sample/ViewController.h new file mode 100644 index 00000000000..5637635a77c --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// Sample +// +// Created by Jorge Canizalez Diaz on 2/16/15. +// Copyright (c) 2015 gRPC. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/src/objective-c/examples/Sample/Sample/ViewController.m b/src/objective-c/examples/Sample/Sample/ViewController.m new file mode 100644 index 00000000000..07cefe7289d --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/ViewController.m @@ -0,0 +1,27 @@ +// +// ViewController.m +// Sample +// +// Created by Jorge Canizalez Diaz on 2/16/15. +// Copyright (c) 2015 gRPC. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/src/objective-c/examples/Sample/Sample/main.m b/src/objective-c/examples/Sample/Sample/main.m new file mode 100644 index 00000000000..a5deee9cae7 --- /dev/null +++ b/src/objective-c/examples/Sample/Sample/main.m @@ -0,0 +1,16 @@ +// +// main.m +// Sample +// +// Created by Jorge Canizalez Diaz on 2/16/15. +// Copyright (c) 2015 gRPC. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/src/objective-c/examples/Sample/SampleTests/Info.plist b/src/objective-c/examples/Sample/SampleTests/Info.plist new file mode 100644 index 00000000000..f547b0b7072 --- /dev/null +++ b/src/objective-c/examples/Sample/SampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.grpc.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/src/objective-c/examples/Sample/SampleTests/SampleTests.m b/src/objective-c/examples/Sample/SampleTests/SampleTests.m new file mode 100644 index 00000000000..5c2bccb5e66 --- /dev/null +++ b/src/objective-c/examples/Sample/SampleTests/SampleTests.m @@ -0,0 +1,40 @@ +// +// SampleTests.m +// SampleTests +// +// Created by Jorge Canizalez Diaz on 2/16/15. +// Copyright (c) 2015 gRPC. All rights reserved. +// + +#import +#import + +@interface SampleTests : XCTestCase + +@end + +@implementation SampleTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end From e8304d5741d31397342c2f279ad8021dd50d2e55 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 17 Feb 2015 19:50:51 -0800 Subject: [PATCH 04/59] Fixes copyright notices --- .../RxLibrary/GRXImmediateWriter.h | 33 ++++++++++++++++ .../RxLibrary/GRXImmediateWriter.m | 33 ++++++++++++++++ src/objective-c/RxLibrary/GRXWriteable.h | 33 ++++++++++++++++ src/objective-c/RxLibrary/GRXWriteable.m | 33 ++++++++++++++++ .../RxLibrary/GRXWriter+Immediate.h | 33 ++++++++++++++++ .../RxLibrary/GRXWriter+Immediate.m | 33 ++++++++++++++++ .../RxLibrary/GRXWriter+Transformations.h | 33 ++++++++++++++++ .../RxLibrary/GRXWriter+Transformations.m | 33 ++++++++++++++++ src/objective-c/RxLibrary/GRXWriter.h | 33 ++++++++++++++++ src/objective-c/RxLibrary/GRXWriter.m | 33 ++++++++++++++++ .../RxLibrary/NSEnumerator+GRXUtil.h | 33 ++++++++++++++++ .../RxLibrary/NSEnumerator+GRXUtil.m | 33 ++++++++++++++++ .../RxLibrary/private/GRXNSBlockEnumerator.h | 33 ++++++++++++++++ .../RxLibrary/private/GRXNSBlockEnumerator.m | 33 ++++++++++++++++ .../RxLibrary/private/GRXNSFastEnumerator.h | 33 ++++++++++++++++ .../RxLibrary/private/GRXNSFastEnumerator.m | 33 ++++++++++++++++ .../RxLibrary/private/GRXNSScalarEnumerator.h | 33 ++++++++++++++++ .../RxLibrary/private/GRXNSScalarEnumerator.m | 33 ++++++++++++++++ .../transformations/GRXMappingWriter.h | 33 ++++++++++++++++ .../transformations/GRXMappingWriter.m | 33 ++++++++++++++++ .../examples/Sample/Sample/AppDelegate.h | 39 +++++++++++++++---- .../examples/Sample/Sample/AppDelegate.m | 39 +++++++++++++++---- .../examples/Sample/Sample/ViewController.h | 39 +++++++++++++++---- .../examples/Sample/Sample/ViewController.m | 39 +++++++++++++++---- src/objective-c/examples/Sample/Sample/main.m | 39 +++++++++++++++---- .../examples/Sample/SampleTests/SampleTests.m | 39 +++++++++++++++---- 26 files changed, 852 insertions(+), 42 deletions(-) diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.h b/src/objective-c/RxLibrary/GRXImmediateWriter.h index 568dbe65764..74f4dc69f4b 100644 --- a/src/objective-c/RxLibrary/GRXImmediateWriter.h +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import #import "GRXWriter.h" diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.m b/src/objective-c/RxLibrary/GRXImmediateWriter.m index ebeb3f458a3..4417ae8f161 100644 --- a/src/objective-c/RxLibrary/GRXImmediateWriter.m +++ b/src/objective-c/RxLibrary/GRXImmediateWriter.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXImmediateWriter.h" #import "NSEnumerator+GRXUtil.h" diff --git a/src/objective-c/RxLibrary/GRXWriteable.h b/src/objective-c/RxLibrary/GRXWriteable.h index bbcdb6a2ba9..5aa00ba40ec 100644 --- a/src/objective-c/RxLibrary/GRXWriteable.h +++ b/src/objective-c/RxLibrary/GRXWriteable.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import // A GRXWriteable is an object to which a sequence of values can be sent. The diff --git a/src/objective-c/RxLibrary/GRXWriteable.m b/src/objective-c/RxLibrary/GRXWriteable.m index 3b4f0811aa7..9567e42b747 100644 --- a/src/objective-c/RxLibrary/GRXWriteable.m +++ b/src/objective-c/RxLibrary/GRXWriteable.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriteable.h" @implementation GRXWriteable { diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.h b/src/objective-c/RxLibrary/GRXWriter+Immediate.h index 2d397d76559..101df81e5e6 100644 --- a/src/objective-c/RxLibrary/GRXWriter+Immediate.h +++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriter.h" @interface GRXWriter (Immediate) diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.m b/src/objective-c/RxLibrary/GRXWriter+Immediate.m index 841ea8a30f9..7dab5e2ba57 100644 --- a/src/objective-c/RxLibrary/GRXWriter+Immediate.m +++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriter+Immediate.h" #import "GRXImmediateWriter.h" diff --git a/src/objective-c/RxLibrary/GRXWriter+Transformations.h b/src/objective-c/RxLibrary/GRXWriter+Transformations.h index 4c9335b6758..cfd644b5208 100644 --- a/src/objective-c/RxLibrary/GRXWriter+Transformations.h +++ b/src/objective-c/RxLibrary/GRXWriter+Transformations.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriter.h" @interface GRXWriter (Transformations) diff --git a/src/objective-c/RxLibrary/GRXWriter+Transformations.m b/src/objective-c/RxLibrary/GRXWriter+Transformations.m index 30e5000afdf..67c54a7e809 100644 --- a/src/objective-c/RxLibrary/GRXWriter+Transformations.m +++ b/src/objective-c/RxLibrary/GRXWriter+Transformations.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriter+Transformations.h" #import "transformations/GRXMappingWriter.h" diff --git a/src/objective-c/RxLibrary/GRXWriter.h b/src/objective-c/RxLibrary/GRXWriter.h index 03b3ee18cd8..8bda52fcb98 100644 --- a/src/objective-c/RxLibrary/GRXWriter.h +++ b/src/objective-c/RxLibrary/GRXWriter.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import #import "GRXWriteable.h" diff --git a/src/objective-c/RxLibrary/GRXWriter.m b/src/objective-c/RxLibrary/GRXWriter.m index 67d928fed58..7d6c2acd369 100644 --- a/src/objective-c/RxLibrary/GRXWriter.m +++ b/src/objective-c/RxLibrary/GRXWriter.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriter.h" @interface GRXWriter () diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h index ecd8f2de79d..e3f8bbe9c2e 100644 --- a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h +++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import @interface NSEnumerator (GRXUtil) diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m index 7da05d13c49..807a1cd7009 100644 --- a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m +++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "NSEnumerator+GRXUtil.h" #import "private/GRXNSBlockEnumerator.h" diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h index 0bb1f477648..4253324e95c 100644 --- a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h +++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import // Concrete subclass of NSEnumerator that delegates the invocations of nextObject to a block passed diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m index 9a53531b128..53b8bb863d6 100644 --- a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m +++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXNSBlockEnumerator.h" @implementation GRXNSBlockEnumerator { diff --git a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h index e5f27b1cc70..1c28b158d73 100644 --- a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h +++ b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import // This is a bridge to interact through NSEnumerator's interface with objects that only conform to diff --git a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m index 817ff34d95c..2bbefacd69a 100644 --- a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m +++ b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXNSFastEnumerator.h" @implementation GRXNSFastEnumerator { diff --git a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h index 1130f52897e..5f4026e3a5f 100644 --- a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h +++ b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import // Concrete subclass of NSEnumerator whose instances return a single object before finishing. diff --git a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m index b2a1afd00e6..18f6ddfc264 100644 --- a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m +++ b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXNSScalarEnumerator.h" @implementation GRXNSScalarEnumerator { diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h index 13640c5bd6d..72249b486ba 100644 --- a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h +++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXWriter.h" // A "proxy" writer that transforms all the values of its input writer by using a mapping function. diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m index 3aa2a2503ae..8375aefdcd4 100644 --- a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m +++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRXMappingWriter.h" static id (^kIdentity)(id value) = ^id(id value) { diff --git a/src/objective-c/examples/Sample/Sample/AppDelegate.h b/src/objective-c/examples/Sample/Sample/AppDelegate.h index ff8369337bc..867e62842ae 100644 --- a/src/objective-c/examples/Sample/Sample/AppDelegate.h +++ b/src/objective-c/examples/Sample/Sample/AppDelegate.h @@ -1,10 +1,35 @@ -// -// AppDelegate.h -// Sample -// -// Created by Jorge Canizalez Diaz on 2/16/15. -// Copyright (c) 2015 gRPC. All rights reserved. -// +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #import diff --git a/src/objective-c/examples/Sample/Sample/AppDelegate.m b/src/objective-c/examples/Sample/Sample/AppDelegate.m index 7db63e9d7b5..66fceffd85c 100644 --- a/src/objective-c/examples/Sample/Sample/AppDelegate.m +++ b/src/objective-c/examples/Sample/Sample/AppDelegate.m @@ -1,10 +1,35 @@ -// -// AppDelegate.m -// Sample -// -// Created by Jorge Canizalez Diaz on 2/16/15. -// Copyright (c) 2015 gRPC. All rights reserved. -// +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #import "AppDelegate.h" diff --git a/src/objective-c/examples/Sample/Sample/ViewController.h b/src/objective-c/examples/Sample/Sample/ViewController.h index 5637635a77c..38cd7f92b66 100644 --- a/src/objective-c/examples/Sample/Sample/ViewController.h +++ b/src/objective-c/examples/Sample/Sample/ViewController.h @@ -1,10 +1,35 @@ -// -// ViewController.h -// Sample -// -// Created by Jorge Canizalez Diaz on 2/16/15. -// Copyright (c) 2015 gRPC. All rights reserved. -// +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #import diff --git a/src/objective-c/examples/Sample/Sample/ViewController.m b/src/objective-c/examples/Sample/Sample/ViewController.m index 07cefe7289d..70b5d458110 100644 --- a/src/objective-c/examples/Sample/Sample/ViewController.m +++ b/src/objective-c/examples/Sample/Sample/ViewController.m @@ -1,10 +1,35 @@ -// -// ViewController.m -// Sample -// -// Created by Jorge Canizalez Diaz on 2/16/15. -// Copyright (c) 2015 gRPC. All rights reserved. -// +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #import "ViewController.h" diff --git a/src/objective-c/examples/Sample/Sample/main.m b/src/objective-c/examples/Sample/Sample/main.m index a5deee9cae7..81e9d44e542 100644 --- a/src/objective-c/examples/Sample/Sample/main.m +++ b/src/objective-c/examples/Sample/Sample/main.m @@ -1,10 +1,35 @@ -// -// main.m -// Sample -// -// Created by Jorge Canizalez Diaz on 2/16/15. -// Copyright (c) 2015 gRPC. All rights reserved. -// +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #import #import "AppDelegate.h" diff --git a/src/objective-c/examples/Sample/SampleTests/SampleTests.m b/src/objective-c/examples/Sample/SampleTests/SampleTests.m index 5c2bccb5e66..9a1d4b14d43 100644 --- a/src/objective-c/examples/Sample/SampleTests/SampleTests.m +++ b/src/objective-c/examples/Sample/SampleTests/SampleTests.m @@ -1,10 +1,35 @@ -// -// SampleTests.m -// SampleTests -// -// Created by Jorge Canizalez Diaz on 2/16/15. -// Copyright (c) 2015 gRPC. All rights reserved. -// +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #import #import From af2d9977bfd8df7ed3baf09c2c088320cad45218 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 17 Feb 2015 19:56:59 -0800 Subject: [PATCH 05/59] Fixes podspec of the RxLibrary --- src/objective-c/RxLibrary/RxLibrary.podspec | 3 +- src/objective-c/examples/Sample/Podfile.lock | 2 +- .../Public/RxLibrary/GRXMappingWriter.h | 1 + .../Pods/Local Podspecs/RxLibrary.podspec | 3 +- .../examples/Sample/Pods/Manifest.lock | 2 +- .../Pods/Pods.xcodeproj/project.pbxproj | 3110 +++++++++-------- 6 files changed, 1722 insertions(+), 1399 deletions(-) create mode 120000 src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXMappingWriter.h diff --git a/src/objective-c/RxLibrary/RxLibrary.podspec b/src/objective-c/RxLibrary/RxLibrary.podspec index 4e1f64e35f5..605aedaf108 100644 --- a/src/objective-c/RxLibrary/RxLibrary.podspec +++ b/src/objective-c/RxLibrary/RxLibrary.podspec @@ -5,7 +5,8 @@ Pod::Spec.new do |s| s.author = { 'Jorge Canizales' => 'jcanizales@google.com' } - s.source_files = '*.{h,m}' + s.source_files = '*.{h,m}', 'transformations/*.{h,m}', 'private/*.{h,m}' + s.private_header_files = 'private/*.h' s.platform = :ios s.ios.deployment_target = '6.0' s.requires_arc = true diff --git a/src/objective-c/examples/Sample/Podfile.lock b/src/objective-c/examples/Sample/Podfile.lock index 9bc407dafab..fee4b43bec3 100644 --- a/src/objective-c/examples/Sample/Podfile.lock +++ b/src/objective-c/examples/Sample/Podfile.lock @@ -9,6 +9,6 @@ EXTERNAL SOURCES: :path: ../../RxLibrary SPEC CHECKSUMS: - RxLibrary: fc24868ee72616e8c4e58128b439811fdade0da4 + RxLibrary: 70cfcf1573ec16a375b4fe61d976a3188aab9303 COCOAPODS: 0.35.0 diff --git a/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXMappingWriter.h b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXMappingWriter.h new file mode 120000 index 00000000000..4d1073f4511 --- /dev/null +++ b/src/objective-c/examples/Sample/Pods/Headers/Public/RxLibrary/GRXMappingWriter.h @@ -0,0 +1 @@ +../../../../../../RxLibrary/transformations/GRXMappingWriter.h \ No newline at end of file diff --git a/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec b/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec index 4e1f64e35f5..605aedaf108 100644 --- a/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec +++ b/src/objective-c/examples/Sample/Pods/Local Podspecs/RxLibrary.podspec @@ -5,7 +5,8 @@ Pod::Spec.new do |s| s.author = { 'Jorge Canizales' => 'jcanizales@google.com' } - s.source_files = '*.{h,m}' + s.source_files = '*.{h,m}', 'transformations/*.{h,m}', 'private/*.{h,m}' + s.private_header_files = 'private/*.h' s.platform = :ios s.ios.deployment_target = '6.0' s.requires_arc = true diff --git a/src/objective-c/examples/Sample/Pods/Manifest.lock b/src/objective-c/examples/Sample/Pods/Manifest.lock index 9bc407dafab..fee4b43bec3 100644 --- a/src/objective-c/examples/Sample/Pods/Manifest.lock +++ b/src/objective-c/examples/Sample/Pods/Manifest.lock @@ -9,6 +9,6 @@ EXTERNAL SOURCES: :path: ../../RxLibrary SPEC CHECKSUMS: - RxLibrary: fc24868ee72616e8c4e58128b439811fdade0da4 + RxLibrary: 70cfcf1573ec16a375b4fe61d976a3188aab9303 COCOAPODS: 0.35.0 diff --git a/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj index 426cb991de2..68290dd5e8f 100644 --- a/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj +++ b/src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj @@ -10,253 +10,54 @@ 46 objects - 00061C3922BA01C61542886C - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - GRXWriter+Immediate.m - sourceTree - <group> - - 0014294E408866C876275712 - - fileRef - 00061C3922BA01C61542886C - isa - PBXBuildFile - - 033F82759B99EF3786C6C3AB - - fileRef - EBD4E0AE1D9C793A8420AA8F - isa - PBXBuildFile - - 073184615871F8C7E53BF14F - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-RxLibrary.xcconfig - sourceTree - <group> - - 074C7BFE33E5A8B65490CD74 - - fileRef - 6C69DB42AABCB52A9652A925 - isa - PBXBuildFile - - 0D88B5DF071D95A30D664FF6 - - fileRef - 00061C3922BA01C61542886C - isa - PBXBuildFile - - 0E76C0DE38838984ADBE9793 - - isa - PBXTargetDependency - name - Pods-Sample-RxLibrary - target - 5D62B0B091242C70E6F86CAF - targetProxy - 6CE91202B3CB22AD98A8D8DD - - 0E77891D6F14157CEFE7E0AB - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample-RxLibrary-Private.xcconfig - path - ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig - sourceTree - <group> - - 0EF90C125A8C853D6900067E - - buildActionMask - 2147483647 - files - - A9657244C4119ECE09EE0780 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 0F54B7DB9C41BEA754222626 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Pods-SampleTests-acknowledgements.plist - sourceTree - <group> - - 10420B1B517C0F7BFC1629D6 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - Pods-SampleTests-RxLibrary-prefix.pch - path - ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch - sourceTree - <group> - - 17882F47BB3F8879EADC6877 - - children - - ED20D5EB599CC4E0E8E6F6F4 - B960F8B548AAFF747493F848 - 6C69DB42AABCB52A9652A925 - C0AFDE847E9A73FB99BE85CA - B3E633C4D93071411657B4CC - BA6147A19780CE00E1877F27 - E025FBABACF462C5EDEB8F04 - - isa - PBXGroup - name - Pods - path - Target Support Files/Pods - sourceTree - <group> - - 17B62DC84258EA204EC14FC6 - - isa - PBXTargetDependency - name - Pods-SampleTests-RxLibrary - target - 9EED35B98793FD4884D527D7 - targetProxy - AD71151A44A1A6BB85C70D05 - - 1A919D1671FBC2A501B2B80E - - buildConfigurations - - 79FAE9523C4CB0EF1158F9A0 - 3FCF54B65C82686C35E6A695 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 1B96F18B31A3C8F512494663 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - GRXWriteable.h - sourceTree - <group> - - 1D0CED76BEB5A08AE74DA509 + 00949E44051CD97851DEFF3B fileRef - BD301B295FA10BA71944E6A7 + 9CFAC09E370EA1C96C8D2880 isa PBXBuildFile - 1DD32401F91AA06C7AC30E87 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-Sample.release.xcconfig - sourceTree - <group> - - 1E52CE0A26CA218416895820 + 01F5B724A99ADB3547023C72 fileRef - 1B96F18B31A3C8F512494663 + 1868370C0050315A6B835D42 isa PBXBuildFile - 1F4EFE5811548D073C9AE7F7 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - GRXWriter+Transformations.m - sourceTree - <group> - - 20FAE2C205A83A18304F55D3 + 0239F1B46D24E21A8042F47F buildConfigurationList - 3CED27F6BA01528C8C816522 + 8919AE774852DD128A7CB510 buildPhases - 5E942AABDFCC15C6D8A85F77 - EEDF7C277603B79A9BE8324B + A71CC1B520D2DFF451839FE2 + 896F697BD1BEAF8A081337EB buildRules dependencies - 7E0A207ED9A829B259BAF98E + 6EB14BC96525C955FBD5CC75 isa PBXNativeTarget name - Pods + Pods-Sample productName - Pods + Pods-Sample productReference - 6F8086848D877F06E765F3B6 + DF94410F5DC0A0AB69336DF4 productType com.apple.product-type.library.static - 2439530CF70B0AEDF7D20F2F + 024F840533A6674922DB7899 + + fileRef + 46513F4AD14CBD2377C1E7A1 + isa + PBXBuildFile + + 0260773D27B4AE159FB0B22D includeInIndex 1 @@ -265,24 +66,31 @@ lastKnownFileType sourcecode.c.h path - GRXImmediateWriter.h + GRXWriter+Immediate.h sourceTree <group> - 246FBFA8A2E45D74C161F0D4 + 026236C3432E9DBC10A40748 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc path - GRXWriter.h + Pods-SampleTests-dummy.m sourceTree <group> - 251E2B5CA237FEEC44071A78 + 0385BCBCA0601E80FAD2A901 + + fileRef + 46513F4AD14CBD2377C1E7A1 + isa + PBXBuildFile + + 0879DBE6FFA1852D106330B4 buildSettings @@ -349,42 +157,95 @@ name Debug - 2536F48732661916E7F98AF4 + 092D0456252ED3F90F66084D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-Sample-environment.h + sourceTree + <group> + + 0BC8818D3A097831FDE0750B + + fileRef + BC50D76123DA4B85E6AD77B4 + isa + PBXBuildFile + + 0C57EED724EBF58759F9F6DF fileRef - 246FBFA8A2E45D74C161F0D4 + 4BB75B0FC7359E8EA8672954 isa PBXBuildFile - 25515F1B6F5C5FC0FC5B2023 + 0D09CEB9308FA5BACEB5F84C + + children + + 30063D2979A72CA1050BD4A6 + DB3528F609E6177E1C5A691C + 026236C3432E9DBC10A40748 + EF8B807C5A2059D6C709450D + 8B503889F903CED9A12E5C87 + 591702CE7D8AF91674F1640F + DB677464758307786D68CCE9 + + isa + PBXGroup + name + Pods-SampleTests + path + Target Support Files/Pods-SampleTests + sourceTree + <group> + + 0D53085043D992DC00E29F0A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXWriteable.h + sourceTree + <group> + + 0F20828B67FDCB990B1818E9 baseConfigurationReference - BA6147A19780CE00E1877F27 + DB677464758307786D68CCE9 buildSettings ALWAYS_SEARCH_USER_PATHS NO COPY_PHASE_STRIP - NO + YES DSTROOT /tmp/xcodeproj.dst - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 GCC_PRECOMPILE_PREFIX_HEADER YES - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + OTHER_LDFLAGS OTHER_LIBTOOLFLAGS @@ -397,38 +258,125 @@ iphoneos SKIP_INSTALL YES + VALIDATE_PRODUCT + YES isa XCBuildConfiguration name - Debug + Release + + 11072993378724E9AF9CAF85 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SampleTests-RxLibrary.a + sourceTree + BUILT_PRODUCTS_DIR + + 1146D04C598DEBA045C96C2F + + buildActionMask + 2147483647 + files + + 1F3162E71EE5AA2B65DEC06D + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 114F64D42E2AF2F3EBDE9BCB + + buildActionMask + 2147483647 + files + + 1D31B6F63B148D2EA5637823 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 124B93EFC16A2026269840B2 + + isa + PBXTargetDependency + name + Pods-RxLibrary + target + 6BFD156F312F6CAA1E5B00CA + targetProxy + DB007D27F74F8F72C72A1079 + + 14D92BB2ED12213381BD2EB9 + + buildConfigurationList + C4342DDEEF3C3290956C21DF + buildPhases + + 432AE81157886BE484236751 + 87700F015FA41F53D88CA4BC + + buildRules + + dependencies + + F8B4778EF3030EEC2E9927CE + + isa + PBXNativeTarget + name + Pods-SampleTests + productName + Pods-SampleTests + productReference + 42A375125393D0613249D046 + productType + com.apple.product-type.library.static + + 15DC9A153BC412DB41B7F154 + + fileRef + 5AEFA85A5F1AD206D68B0576 + isa + PBXBuildFile - 26766544901BC361ADA15529 + 15F64D3D7D10DB47599A72EB includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc + name + GRXMappingWriter.m path - Pods-Sample.debug.xcconfig + transformations/GRXMappingWriter.m sourceTree <group> - 281E734DE47EFFBE3BF9EB6D + 16E6BBD46D9745611EF313FB fileRef - 2439530CF70B0AEDF7D20F2F + BECFE3DCB323841851972996 isa PBXBuildFile - 2BBE3F72E34FB1C4FCE57F41 + 17F4C2F25813E7A4588FF233 buildConfigurations - BD0C47F343CA107135A8B9F2 - 636DF1F4C61C5AA7645709FA + B153046F0CBA526564A9673C + B960FF1BE77D3F4459EEB1E0 defaultConfigurationIsVisible 0 @@ -437,88 +385,172 @@ isa XCConfigurationList - 2D16B1B846727EA61BFB6D3F + 1868370C0050315A6B835D42 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + GRXNSScalarEnumerator.h + path + private/GRXNSScalarEnumerator.h + sourceTree + <group> + + 19001096C873023095C4F032 fileRef - C4DD5ACCFDD651DB710A7AC6 + EB29FAB1F81F0D17BDAD72D0 isa PBXBuildFile - 2D6F8181094C5DE060DD3540 + 1B8264EEFEF4AD585182D256 includeInIndex 1 isa PBXFileReference lastKnownFileType - text - name - Podfile + text.xcconfig path - ../Podfile + Pods-Sample.debug.xcconfig sourceTree - SOURCE_ROOT - xcLanguageSpecificationIdentifier - xcode.lang.ruby + <group> - 2D9FCC93E8EC668156F428D9 + 1C8DFDF9C457D910DC1FD227 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h path - GRXImmediateWriter.m + Pods-environment.h sourceTree <group> - 2E1D14017CD6D1DF2F25DA2E + 1D31B6F63B148D2EA5637823 + + fileRef + 22DB20D833E7D26AEA6513D6 + isa + PBXBuildFile + + 1E5420835E4862DBA55002A9 + + fileRef + BECFE3DCB323841851972996 + isa + PBXBuildFile + + 1F3162E71EE5AA2B65DEC06D + + fileRef + 56CE61A20C6F88CC0CE888C8 + isa + PBXBuildFile + + 22531AF83592134D3879C3E1 fileRef - 816CFE69CF10239B3EFBCBF1 + 15F64D3D7D10DB47599A72EB isa PBXBuildFile - 34547F4C6AC4B31274C6887D + 22DB20D833E7D26AEA6513D6 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc path - Pods-SampleTests-environment.h + Pods-dummy.m sourceTree <group> - 34C114FAF0ED12406E0FFB5F + 245F9E9690E6E08D291FC94C fileRef - 1F4EFE5811548D073C9AE7F7 + BC52B0661F25B25CE382296C isa PBXBuildFile - 3538730220221D8890A16973 + 266008D38F1E72755C711699 fileRef - EBD4E0AE1D9C793A8420AA8F + 026236C3432E9DBC10A40748 isa PBXBuildFile - 359EFFFF445825D09A49A284 + 2663F4401A9075DAC0B24171 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-RxLibrary-dummy.m + sourceTree + <group> + + 26E6ACBF137DBC325B4E7DA7 + + buildConfigurationList + B05A2B15C8A03AABA163D7D7 + buildPhases + + 114F64D42E2AF2F3EBDE9BCB + DCAB71BD665AF17533987B69 + + buildRules + + dependencies + + 124B93EFC16A2026269840B2 + + isa + PBXNativeTarget + name + Pods + productName + Pods + productReference + 5C30ABB95D604B483422D72A + productType + com.apple.product-type.library.static + + 27E123435067CC11FE103999 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-Sample.release.xcconfig + sourceTree + <group> + + 288A25371032891C824CF4AA fileRef - C4DD5ACCFDD651DB710A7AC6 + 838341407CEBBFB19D25C45A isa PBXBuildFile - 388A0A86C10335BD8BA6069B + 29B274FDF882AB8B39814FE6 baseConfigurationReference - 26766544901BC361ADA15529 + 687D79F4C2484F58E9796051 buildSettings ALWAYS_SEARCH_USER_PATHS @@ -533,6 +565,8 @@ 0 GCC_PRECOMPILE_PREFIX_HEADER YES + GCC_PREFIX_HEADER + Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch GCC_PREPROCESSOR_DEFINITIONS DEBUG=1 @@ -562,341 +596,172 @@ name Debug - 3BE0763D6A2984A3588C51F3 + 2AADA4C52A284ED5D41C7CF5 - buildActionMask - 2147483647 - files - - A6364C40CAC538ABF3DDE60C - + fileRef + 0D53085043D992DC00E29F0A isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - 3C53511285FA3AEF9ACE450F + 2B05A4C21D00E8CF0DE88447 - buildActionMask - 2147483647 - files - - FD4FDDAA137AAC4ECC193E65 - 1E52CE0A26CA218416895820 - 033F82759B99EF3786C6C3AB - CA58438D9F3E61D68DE07BB0 - A8484F554272234EC1DA0229 - A5F3698797D4DA1AFBCA61F0 - + includeInIndex + 1 isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + Pods-SampleTests-RxLibrary-prefix.pch + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch + sourceTree + <group> - 3CED27F6BA01528C8C816522 + 2B341576464148A01DCFB28B - buildConfigurations - - 25515F1B6F5C5FC0FC5B2023 - 6C8561D023F024FB9671765B - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + 3AD75C69A61408EF8BE0F247 isa - XCConfigurationList + PBXBuildFile - 3E250631C4B54FA19123352E + 2B49DCA723ECBC0F2777B960 fileRef - 2D9FCC93E8EC668156F428D9 + BC52B0661F25B25CE382296C isa PBXBuildFile - 3FCF54B65C82686C35E6A695 + 2D6833D4D544AC13450405B1 - baseConfigurationReference - 0E77891D6F14157CEFE7E0AB - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 8.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - + fileRef + 2663F4401A9075DAC0B24171 isa - XCBuildConfiguration - name - Release + PBXBuildFile - 402AEA377C3925F10F39E9CB + 2D7732FBE1A5A7FC42D4DC4B fileRef - 816CFE69CF10239B3EFBCBF1 + 56CE61A20C6F88CC0CE888C8 isa PBXBuildFile - 446E4587689AB45B32C6B76A + 2DA405F6E578008991B3F9EA fileRef - 00061C3922BA01C61542886C + BECFE3DCB323841851972996 isa PBXBuildFile - 44B1E75D8EFE8AED04C78FB7 + 2F91A2AD622F87D98C9B0E1E fileRef - D44C1815FF998CE19AF260F7 + 0D53085043D992DC00E29F0A isa PBXBuildFile - 44EAD826ACB27F88B80500A1 + 2FE1D288B8389F925AA3CE0C - explicitFileType - archive.ar includeInIndex - 0 - isa - PBXFileReference - path - libPods-Sample.a - sourceTree - BUILT_PRODUCTS_DIR - - 4545C1984951202819F52915 - - fileRef - 246FBFA8A2E45D74C161F0D4 - isa - PBXBuildFile - - 46C034308E68A95A172FD281 - - fileRef - 2D9FCC93E8EC668156F428D9 - isa - PBXBuildFile - - 46E75B83BEFA486A489F2FB5 - - includeInIndex - 1 + 1 isa PBXFileReference lastKnownFileType text.xcconfig - name - Pods-SampleTests-RxLibrary.xcconfig path - ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary.xcconfig + Pods-RxLibrary-Private.xcconfig sourceTree <group> - 477CC2FC7C249C2918424B8D + 30063D2979A72CA1050BD4A6 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + text path - Pods-SampleTests.release.xcconfig + Pods-SampleTests-acknowledgements.markdown sourceTree <group> - 4BB07CE9F73F22C44B89EC9F + 3133D1CCCF4F1FE3E893509C includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + text.xcconfig path - GRXWriter.m + Pods-RxLibrary.xcconfig sourceTree <group> - 502BB8D05700DD95603B152D + 352B4C7135E3BBBFEBAB7F55 fileRef - 816CFE69CF10239B3EFBCBF1 + BA9F62DDE37FF0D601A4D5EA isa PBXBuildFile - 53DFD2191AC1853EC39421DF + 355670384FC160AB6C32765E - includeInIndex - 1 + children + + 56CE61A20C6F88CC0CE888C8 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXGroup name - Pods-Sample-RxLibrary-prefix.pch - path - ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch + iOS sourceTree <group> - 548BF298DFD0AB1E85BFD224 - - buildActionMask - 2147483647 - files - - 359EFFFF445825D09A49A284 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 55F613C8D46B4C3EE36596A4 + 36C139FD3DEDB8CA2A1D3295 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + text path - Pods-Sample-environment.h + Pods-acknowledgements.markdown sourceTree <group> - 569EE7C2B5DC944C87116DDD - - buildActionMask - 2147483647 - files - - BCF96ACB49A4C581F6C4FB72 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 5C1A6CAF7D4B0AADC6E86AB5 + 36FF37EAC7E918C4CD867776 - baseConfigurationReference - 70699B620DD649C9FC80B596 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 8.0 - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - + fileRef + EB29FAB1F81F0D17BDAD72D0 isa - XCBuildConfiguration - name - Debug + PBXBuildFile - 5D485A8180289AB7135979D4 + 3749A34D3DFA6E2F3539E546 - children + buildConfigurations - 2439530CF70B0AEDF7D20F2F - 2D9FCC93E8EC668156F428D9 - 1B96F18B31A3C8F512494663 - 816CFE69CF10239B3EFBCBF1 - 246FBFA8A2E45D74C161F0D4 - 4BB07CE9F73F22C44B89EC9F - EBD4E0AE1D9C793A8420AA8F - 00061C3922BA01C61542886C - D13801CD3BED29EB3EB28C87 - 1F4EFE5811548D073C9AE7F7 - BD301B295FA10BA71944E6A7 - D44C1815FF998CE19AF260F7 - D2B713C74AFBCA4A9C709F44 + 0879DBE6FFA1852D106330B4 + 6B88B9AB87714A903970EAED + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - PBXGroup - name - RxLibrary - path - ../../../RxLibrary - sourceTree - <group> + XCConfigurationList - 5D62B0B091242C70E6F86CAF + 3800855A656C8D0813062074 buildConfigurationList - 1A919D1671FBC2A501B2B80E + 9508723D4C0D4321A5188108 buildPhases - 80BFFCFE10F415F6D4AA05BD - 3BE0763D6A2984A3588C51F3 - C099EA9920009567F1CC8E6F + F779618174957BE31FCCDE56 + 45FC41033EB61B16BC8151B9 + 8AB7020D9B71B1B4F34249BE buildRules @@ -905,98 +770,84 @@ isa PBXNativeTarget name - Pods-Sample-RxLibrary + Pods-SampleTests-RxLibrary productName - Pods-Sample-RxLibrary + Pods-SampleTests-RxLibrary productReference - B5E5D1402D71983EBFCAC80A + 11072993378724E9AF9CAF85 productType com.apple.product-type.library.static - 5E942AABDFCC15C6D8A85F77 + 397A12919FB4BDD608FE207C - buildActionMask - 2147483647 - files + children - 074C7BFE33E5A8B65490CD74 + B4FB10339A6A2E1AAF255802 + 5840BDD08ED67C12ADB1DF08 + 817F8B2E38A51910E8F8EC7D + 8B05D39455D5B23720961FA4 + F2BB78774BCEFD5DDDF38239 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXGroup + sourceTree + <group> - 6269A76A3AFAD59C7AE98E1E + 3A4DE73D0D0274E782C1A564 + + fileRef + 56CE61A20C6F88CC0CE888C8 + isa + PBXBuildFile + + 3AD75C69A61408EF8BE0F247 - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.objc path - libPods-SampleTests.a + GRXWriteable.m sourceTree - BUILT_PRODUCTS_DIR + <group> - 62CA148DC83850E7AD0BBC72 + 3C3F1A188E25219C230FFD4F fileRef - 6721F6605F810F0E3E99A008 + 9DADE0CF857B717294F7F74F isa PBXBuildFile - 636DF1F4C61C5AA7645709FA + 404D4F98249F3383235463A4 - baseConfigurationReference - D4FB4028CE077DDD8A803F26 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 8.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - + fileRef + 56CE61A20C6F88CC0CE888C8 isa - XCBuildConfiguration - name - Release + PBXBuildFile + + 407E794549893DD91A2ED84E + + fileRef + DB0257E62EC33F3F316EF017 + isa + PBXBuildFile + + 42A375125393D0613249D046 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SampleTests.a + sourceTree + BUILT_PRODUCTS_DIR - 6721F6605F810F0E3E99A008 + 42B461F095E85911637DFD60 includeInIndex 1 @@ -1004,150 +855,176 @@ PBXFileReference lastKnownFileType sourcecode.c.objc + name + Pods-SampleTests-RxLibrary-dummy.m path - Pods-SampleTests-dummy.m + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m sourceTree <group> - 68BB1D7B3AA00144450F5F1C + 432AE81157886BE484236751 + + buildActionMask + 2147483647 + files + + 266008D38F1E72755C711699 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 43CC797FB2A733DF5B7A9F05 + + fileRef + 15F64D3D7D10DB47599A72EB + isa + PBXBuildFile + + 458FF1EEF4EB9646C699F3DD + + fileRef + 57AC9BF19B9635D7476CA5FA + isa + PBXBuildFile + + 45A1913C8F48686C1FC82520 fileRef - ACD86D4B746F1151268E7F57 + 9DADE0CF857B717294F7F74F isa PBXBuildFile - 6A7ADEEB77C72E01BBCBF89C + 45FC41033EB61B16BC8151B9 buildActionMask 2147483647 files - EE32FC2DAC0BD2116BB4F552 - 9CFC94D08F567982ED81D0AC - 3538730220221D8890A16973 - C30D693B18D43C87B0A38159 - 4545C1984951202819F52915 - 1D0CED76BEB5A08AE74DA509 + 2D7732FBE1A5A7FC42D4DC4B isa - PBXHeadersBuildPhase + PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - 6C69DB42AABCB52A9652A925 + 46513F4AD14CBD2377C1E7A1 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h + name + GRXNSFastEnumerator.h path - Pods-dummy.m + private/GRXNSFastEnumerator.h sourceTree <group> - 6C8561D023F024FB9671765B + 46A8EFCC59CF17E048EC34ED - baseConfigurationReference - E025FBABACF462C5EDEB8F04 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_PRECOMPILE_PREFIX_HEADER - YES - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 8.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - + fileRef + 5AEFA85A5F1AD206D68B0576 isa - XCBuildConfiguration - name - Release + PBXBuildFile - 6CE91202B3CB22AD98A8D8DD + 46FAFA88CA3E774263422EB9 - containerPortal - E72217186F5258779AB341C4 + fileRef + 3AD75C69A61408EF8BE0F247 isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 5D62B0B091242C70E6F86CAF - remoteInfo - Pods-Sample-RxLibrary + PBXBuildFile - 6E0139A4BF1CBFDAB998D762 + 4946B2D315E9BF5CBACD7D52 - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + text.plist.xml path - libPods-RxLibrary.a + Pods-acknowledgements.plist sourceTree - BUILT_PRODUCTS_DIR + <group> - 6F8086848D877F06E765F3B6 + 4954E8CE730737CD2991E502 - explicitFileType - archive.ar - includeInIndex - 0 + children + + BECFE3DCB323841851972996 + BC52B0661F25B25CE382296C + 9CFAC09E370EA1C96C8D2880 + 15F64D3D7D10DB47599A72EB + 5AEFA85A5F1AD206D68B0576 + 4BB75B0FC7359E8EA8672954 + 46513F4AD14CBD2377C1E7A1 + 636AC1003F2C71FFD74542CD + 1868370C0050315A6B835D42 + 57AC9BF19B9635D7476CA5FA + 0D53085043D992DC00E29F0A + 3AD75C69A61408EF8BE0F247 + DB0257E62EC33F3F316EF017 + BDA58E5E1AE450540A2B0227 + 0260773D27B4AE159FB0B22D + EB29FAB1F81F0D17BDAD72D0 + 838341407CEBBFB19D25C45A + F763F3DF1B47888E75D0ED9C + 9DADE0CF857B717294F7F74F + BA9F62DDE37FF0D601A4D5EA + D49849E96C0C5FFB93C810CD + isa - PBXFileReference + PBXGroup + name + RxLibrary path - libPods.a + ../../../RxLibrary sourceTree - BUILT_PRODUCTS_DIR + <group> - 70699B620DD649C9FC80B596 + 4972C151CE9A8A15BC1AE2C8 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.h + name + Pods-Sample-RxLibrary-prefix.pch path - Pods-SampleTests.debug.xcconfig + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch sourceTree <group> - 708D5526684493C21D4B351D + 4BB47C74830C63C90981278E + + buildActionMask + 2147483647 + files + + 245F9E9690E6E08D291FC94C + A96854FB48432263FE68C313 + AA52EF1CD8A3683472BD86FE + BB88043BB37FC0261BA90A30 + 54A02FC8DA14CEC49EA8C8D5 + B7902691B66134F3764663D9 + 19001096C873023095C4F032 + E86A17CE1D79ECDCEBF91109 + 8BB6B6B3653FC309CB8EB3A0 + 7BBF3F432525D33FCB074BD5 + 2D6833D4D544AC13450405B1 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 4BB75B0FC7359E8EA8672954 includeInIndex 1 @@ -1155,364 +1032,452 @@ PBXFileReference lastKnownFileType sourcecode.c.objc + name + GRXNSBlockEnumerator.m path - Pods-RxLibrary-dummy.m + private/GRXNSBlockEnumerator.m sourceTree <group> - 71EAA6DC03A9DA40C184D310 + 50FF607D5DA961C6BEF4ABAC fileRef - 4BB07CE9F73F22C44B89EC9F + 838341407CEBBFB19D25C45A isa PBXBuildFile - 73BE487FD7206FA1037433A9 + 5280A583CA6C6C66698AE67C - buildConfigurations - - C7522ABF8E5F673B2B51B846 - 9DAF30B69F82D25455209E07 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + DB0257E62EC33F3F316EF017 isa - XCConfigurationList + PBXBuildFile - 77B5A8963EF74F9CE1CDEBEF + 54A02FC8DA14CEC49EA8C8D5 - containerPortal - E72217186F5258779AB341C4 + fileRef + 57AC9BF19B9635D7476CA5FA isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - CA2EA15026724E5FE7863617 - remoteInfo - Pods-RxLibrary + PBXBuildFile - 78C1945CE480BC3E085811D5 + 56CE61A20C6F88CC0CE888C8 - fileRef - 9CA52DBDD25FD65977423056 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework + sourceTree + DEVELOPER_DIR - 79FAE9523C4CB0EF1158F9A0 + 57AC9BF19B9635D7476CA5FA - baseConfigurationReference - 0E77891D6F14157CEFE7E0AB - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 8.0 - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - + includeInIndex + 1 isa - XCBuildConfiguration + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Debug + GRXNSScalarEnumerator.m + path + private/GRXNSScalarEnumerator.m + sourceTree + <group> - 7E0A207ED9A829B259BAF98E + 5840BDD08ED67C12ADB1DF08 + children + + 4954E8CE730737CD2991E502 + isa - PBXTargetDependency + PBXGroup name - Pods-RxLibrary - target - CA2EA15026724E5FE7863617 - targetProxy - 77B5A8963EF74F9CE1CDEBEF + Development Pods + sourceTree + <group> + + 591702CE7D8AF91674F1640F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-SampleTests.debug.xcconfig + sourceTree + <group> - 7F305BF2D2399198431240B2 + 594F98D43B96AB5C11E61C10 fileRef - D44C1815FF998CE19AF260F7 + F763F3DF1B47888E75D0ED9C isa PBXBuildFile - 80BFFCFE10F415F6D4AA05BD + 5AEFA85A5F1AD206D68B0576 - buildActionMask - 2147483647 - files - - 8B988DE4EEF45D03E1FE4011 - 502BB8D05700DD95603B152D - 0D88B5DF071D95A30D664FF6 - CC015D517558717A179F07EB - CA7A5D5A911B21E060A7C9A8 - DF707F9ADA38C19530138855 - 68BB1D7B3AA00144450F5F1C - + includeInIndex + 1 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + GRXNSBlockEnumerator.h + path + private/GRXNSBlockEnumerator.h + sourceTree + <group> - 80ED48A94404B285C3BAD2A2 + 5B8A3BFE016346EF080D52C6 buildActionMask 2147483647 files - 2D16B1B846727EA61BFB6D3F + 3A4DE73D0D0274E782C1A564 isa PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - 816CFE69CF10239B3EFBCBF1 + 5C30ABB95D604B483422D72A + explicitFileType + archive.ar includeInIndex - 1 + 0 isa PBXFileReference - lastKnownFileType - sourcecode.c.objc path - GRXWriteable.m + libPods.a sourceTree - <group> + BUILT_PRODUCTS_DIR - 8258E01A573DC26563C24CD3 + 5DE93D7B39D2D1AD7336C4AC - children - - 8E115C0A94168699797FD383 - + fileRef + 838341407CEBBFB19D25C45A isa - PBXGroup - name - Frameworks - sourceTree - <group> + PBXBuildFile - 8454D1F76F981D7967AFEB64 + 621587D6C7759FBE7096D185 - buildConfigurations - - 251E2B5CA237FEEC44071A78 - E429BB9EF652206D69B38B4B - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + 46513F4AD14CBD2377C1E7A1 isa - XCConfigurationList + PBXBuildFile - 8998DF528EA3268FD2F3312F + 636AC1003F2C71FFD74542CD - buildConfigurationList - AAD81C09A25B9BF7DA0C1C86 - buildPhases - - BA1F7D67EB7832C536803BEB - 548BF298DFD0AB1E85BFD224 - - buildRules - - dependencies - - 17B62DC84258EA204EC14FC6 - + includeInIndex + 1 isa - PBXNativeTarget + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Pods-SampleTests - productName - Pods-SampleTests - productReference - 6269A76A3AFAD59C7AE98E1E - productType - com.apple.product-type.library.static - - 8AF2FEBF81B82548A9CD7D5E - - buildConfigurations - - 388A0A86C10335BD8BA6069B - 972E288F65487B1145B953C3 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList + GRXNSFastEnumerator.m + path + private/GRXNSFastEnumerator.m + sourceTree + <group> - 8B988DE4EEF45D03E1FE4011 + 687D79F4C2484F58E9796051 - fileRef - 2D9FCC93E8EC668156F428D9 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SampleTests-RxLibrary-Private.xcconfig + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig + sourceTree + <group> - 8CDD9B1A9971F8E45E6ECCFE + 69E8FF71552D08D72B9068F1 children - 6F8086848D877F06E765F3B6 - 6E0139A4BF1CBFDAB998D762 - 44EAD826ACB27F88B80500A1 - B5E5D1402D71983EBFCAC80A - 6269A76A3AFAD59C7AE98E1E - F8FA1EE55435B1DD5386F9B7 + 36C139FD3DEDB8CA2A1D3295 + 4946B2D315E9BF5CBACD7D52 + 22DB20D833E7D26AEA6513D6 + 1C8DFDF9C457D910DC1FD227 + E14CB6F332A9E58BB5F76C07 + 6AC13D00A5A61BDA0DE5FAAF + A577CB571492B4F951064FCF isa PBXGroup name - Products + Pods + path + Target Support Files/Pods sourceTree <group> - 8D0ECACB7BF0FD50C8BA90EF + 6AC13D00A5A61BDA0DE5FAAF includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + text.xcconfig path - Pods-Sample-dummy.m + Pods.debug.xcconfig sourceTree <group> - 8D141FF420B8F70654BEB651 + 6B5B56ED61BE76782DF02817 - buildActionMask - 2147483647 - files - - 46C034308E68A95A172FD281 - 2E1D14017CD6D1DF2F25DA2E - 446E4587689AB45B32C6B76A - 34C114FAF0ED12406E0FFB5F - 71EAA6DC03A9DA40C184D310 - 44B1E75D8EFE8AED04C78FB7 - C7F1D04BA7ECEB89811F5AE8 - + baseConfigurationReference + 687D79F4C2484F58E9796051 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + XCBuildConfiguration + name + Release - 8E115C0A94168699797FD383 + 6B88B9AB87714A903970EAED - children + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + YES + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES + COPY_PHASE_STRIP + NO + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PREPROCESSOR_DEFINITIONS + + RELEASE=1 + + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + STRIP_INSTALLED_PRODUCT + NO + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 6BFD156F312F6CAA1E5B00CA + + buildConfigurationList + 962FF5FAC21292530C615D05 + buildPhases - C4DD5ACCFDD651DB710A7AC6 + 4BB47C74830C63C90981278E + 5B8A3BFE016346EF080D52C6 + A4C1C82F355864E7D3E200DD + buildRules + + dependencies + isa - PBXGroup + PBXNativeTarget name - iOS - sourceTree - <group> + Pods-RxLibrary + productName + Pods-RxLibrary + productReference + A579EC5BE7E68C55CA5FECDE + productType + com.apple.product-type.library.static - 8FDD88F3116CD60BDFADE08D + 6D1D41BAE4E325572FAC7B17 - includeInIndex - 1 + fileRef + 9DADE0CF857B717294F7F74F isa - PBXFileReference - lastKnownFileType - text - path - Pods-SampleTests-acknowledgements.markdown - sourceTree - <group> + PBXBuildFile - 9147D56A68B32B154574B4B1 + 6E00FD6D197F0D1332D11199 - children - - 2D6F8181094C5DE060DD3540 - DA385F717CB8DC97197F9779 - 8258E01A573DC26563C24CD3 - 8CDD9B1A9971F8E45E6ECCFE - BC215B3ADAA2B59CC8E1E0D2 - + baseConfigurationReference + 1B8264EEFEF4AD585182D256 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + isa - PBXGroup - sourceTree - <group> + XCBuildConfiguration + name + Debug - 93706FFF29E959C0D0FB35B8 + 6E0669CB3E76E19FC854BA74 fileRef - BD301B295FA10BA71944E6A7 + 4BB75B0FC7359E8EA8672954 isa PBXBuildFile - 972E288F65487B1145B953C3 + 6EB14BC96525C955FBD5CC75 + + isa + PBXTargetDependency + name + Pods-Sample-RxLibrary + target + F6C59E5B4CFE053E9F98000E + targetProxy + A0215878A7EC41E833B5F1D2 + + 74F28D2155D125C3068F96BE baseConfigurationReference - 1DD32401F91AA06C7AC30E87 + 6AC13D00A5A61BDA0DE5FAAF buildSettings ALWAYS_SEARCH_USER_PATHS NO COPY_PHASE_STRIP - YES + NO DSTROOT /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 GCC_PRECOMPILE_PREFIX_HEADER YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET 8.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - OTHER_LDFLAGS OTHER_LIBTOOLFLAGS @@ -1525,40 +1490,64 @@ iphoneos SKIP_INSTALL YES - VALIDATE_PRODUCT - YES isa XCBuildConfiguration name - Release + Debug - 9CA52DBDD25FD65977423056 + 7A8627E1649F66DEE014EB46 - includeInIndex - 1 + children + + D53A8F2B11E6C2C187AFFF1D + B50ECED4CEC7554ED6077619 + BC50D76123DA4B85E6AD77B4 + 092D0456252ED3F90F66084D + AA99564782B655791B053E58 + 1B8264EEFEF4AD585182D256 + 27E123435067CC11FE103999 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc + PBXGroup name - Pods-SampleTests-RxLibrary-dummy.m + Pods-Sample path - ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-dummy.m + Target Support Files/Pods-Sample sourceTree <group> - 9CFC94D08F567982ED81D0AC + 7AC4B3F3D7BB132642153A38 + + fileRef + 0260773D27B4AE159FB0B22D + isa + PBXBuildFile + + 7BBF3F432525D33FCB074BD5 fileRef - 1B96F18B31A3C8F512494663 + BA9F62DDE37FF0D601A4D5EA isa PBXBuildFile - 9DAF30B69F82D25455209E07 + 7DA2A517A18D85B390FB122A + + containerPortal + FBF79DDF04ADEAED54BA2286 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 3800855A656C8D0813062074 + remoteInfo + Pods-SampleTests-RxLibrary + + 7E9B63EFA2466C4456A0695A baseConfigurationReference - B16330C6E1974F73301EFA15 + 2FE1D288B8389F925AA3CE0C buildSettings ALWAYS_SEARCH_USER_PATHS @@ -1605,118 +1594,237 @@ name Release - 9E294E4639886DA2A66D2F45 + 7FACBF2C8AF0403DD1C11015 includeInIndex 1 isa PBXFileReference lastKnownFileType - text + text.xcconfig + name + Pods-Sample-RxLibrary-Private.xcconfig path - Pods-Sample-acknowledgements.markdown + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-Private.xcconfig sourceTree <group> - 9EED35B98793FD4884D527D7 + 801BBA7A538CFAE6746966A7 - buildConfigurationList - 2BBE3F72E34FB1C4FCE57F41 - buildPhases + fileRef + 42B461F095E85911637DFD60 + isa + PBXBuildFile + + 817F8B2E38A51910E8F8EC7D + + children - A5F1BCFC715A1FB9A5E05F54 - 0EF90C125A8C853D6900067E - 3C53511285FA3AEF9ACE450F + 355670384FC160AB6C32765E - buildRules - - dependencies - isa - PBXNativeTarget + PBXGroup name - Pods-SampleTests-RxLibrary - productName - Pods-SampleTests-RxLibrary - productReference - F8FA1EE55435B1DD5386F9B7 - productType - com.apple.product-type.library.static + Frameworks + sourceTree + <group> + + 838341407CEBBFB19D25C45A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXWriter+Transformations.h + sourceTree + <group> + + 85D5565EC08D14A6A60F1DDA + + fileRef + 56CE61A20C6F88CC0CE888C8 + isa + PBXBuildFile + + 86586E0B51D3DC6A97D0A7F3 + + fileRef + 56CE61A20C6F88CC0CE888C8 + isa + PBXBuildFile + + 86D03B997B81819E2F39E48B + + fileRef + BC52B0661F25B25CE382296C + isa + PBXBuildFile + + 87700F015FA41F53D88CA4BC + + buildActionMask + 2147483647 + files + + 404D4F98249F3383235463A4 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 8915073BE8158EF53FE11B95 + + fileRef + EB29FAB1F81F0D17BDAD72D0 + isa + PBXBuildFile + + 8919AE774852DD128A7CB510 + + buildConfigurations + + 6E00FD6D197F0D1332D11199 + B602CFEF970BEA98E40A056C + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 896F697BD1BEAF8A081337EB + + buildActionMask + 2147483647 + files + + 86586E0B51D3DC6A97D0A7F3 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 8A7375A2F98889F35C15E2D7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-SampleTests-RxLibrary.xcconfig + path + ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary.xcconfig + sourceTree + <group> + + 8AB7020D9B71B1B4F34249BE + + buildActionMask + 2147483647 + files + + 1E5420835E4862DBA55002A9 + 00949E44051CD97851DEFF3B + 15DC9A153BC412DB41B7F154 + 0385BCBCA0601E80FAD2A901 + 01F5B724A99ADB3547023C72 + F2C6AACFE46FFA8DC383DE43 + 7AC4B3F3D7BB132642153A38 + 5DE93D7B39D2D1AD7336C4AC + 407E794549893DD91A2ED84E + 3C3F1A188E25219C230FFD4F + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - A3B182A29677AE41F3DDF60E + 8B05D39455D5B23720961FA4 children - 9E294E4639886DA2A66D2F45 - BDDB48DF5321836E03134B73 - 8D0ECACB7BF0FD50C8BA90EF - 55F613C8D46B4C3EE36596A4 - F2055AA27575926EE57B8546 - 26766544901BC361ADA15529 - 1DD32401F91AA06C7AC30E87 + 5C30ABB95D604B483422D72A + A579EC5BE7E68C55CA5FECDE + DF94410F5DC0A0AB69336DF4 + EF2EE4BC906FF9909348DAB5 + 42A375125393D0613249D046 + 11072993378724E9AF9CAF85 isa PBXGroup name - Pods-Sample - path - Target Support Files/Pods-Sample + Products sourceTree <group> - A5F1BCFC715A1FB9A5E05F54 + 8B503889F903CED9A12E5C87 - buildActionMask - 2147483647 - files - - 3E250631C4B54FA19123352E - 402AEA377C3925F10F39E9CB - 0014294E408866C876275712 - E21F75C9C5AE553D1525B15D - FFFC86AF33D17D398F42C549 - 7F305BF2D2399198431240B2 - 78C1945CE480BC3E085811D5 - + includeInIndex + 1 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + text.script.sh + path + Pods-SampleTests-resources.sh + sourceTree + <group> - A5F3698797D4DA1AFBCA61F0 + 8BB6B6B3653FC309CB8EB3A0 fileRef - BD301B295FA10BA71944E6A7 + BDA58E5E1AE450540A2B0227 isa PBXBuildFile - A6364C40CAC538ABF3DDE60C + 8CD061F02F905957F4C1D188 fileRef - C4DD5ACCFDD651DB710A7AC6 + 636AC1003F2C71FFD74542CD isa PBXBuildFile - A8484F554272234EC1DA0229 + 911BEE248BE640294A081862 - fileRef - 246FBFA8A2E45D74C161F0D4 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-RxLibrary-prefix.pch + sourceTree + <group> - A9657244C4119ECE09EE0780 + 9508723D4C0D4321A5188108 - fileRef - C4DD5ACCFDD651DB710A7AC6 + buildConfigurations + + 29B274FDF882AB8B39814FE6 + 6B5B56ED61BE76782DF02817 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - PBXBuildFile + XCConfigurationList - AAD81C09A25B9BF7DA0C1C86 + 962FF5FAC21292530C615D05 buildConfigurations - 5C1A6CAF7D4B0AADC6E86AB5 - C11B686FDA34820988E0EA76 + A150782D73BBE95DE629B03C + 7E9B63EFA2466C4456A0695A defaultConfigurationIsVisible 0 @@ -1725,82 +1833,175 @@ isa XCConfigurationList - AB030C334AF0049970BC6F69 + 9BD773E928AD698D23B20123 fileRef - D13801CD3BED29EB3EB28C87 + 1868370C0050315A6B835D42 isa PBXBuildFile - AB49EB008360ACF61F868E97 + 9CCBE9A628C305B3B089B8DD fileRef - 1B96F18B31A3C8F512494663 + BA9F62DDE37FF0D601A4D5EA isa PBXBuildFile - ACD86D4B746F1151268E7F57 + 9CFAC09E370EA1C96C8D2880 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - Pods-Sample-RxLibrary-dummy.m + GRXMappingWriter.h path - ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m + transformations/GRXMappingWriter.h + sourceTree + <group> + + 9DADE0CF857B717294F7F74F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + NSEnumerator+GRXUtil.h sourceTree <group> - AD71151A44A1A6BB85C70D05 + 9E8DC61269B141639DA7F859 + + buildActionMask + 2147483647 + files + + 16E6BBD46D9745611EF313FB + CC0A03D531EF0FF199671820 + C382F416EFA39BE2CF216044 + 621587D6C7759FBE7096D185 + C0AC333A6FE8F07600C96890 + 2F91A2AD622F87D98C9B0E1E + FDC6B84EAC9989F0827EA4F3 + 50FF607D5DA961C6BEF4ABAC + 5280A583CA6C6C66698AE67C + 6D1D41BAE4E325572FAC7B17 + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + A00077019C113466960E9DAF + + fileRef + 9CFAC09E370EA1C96C8D2880 + isa + PBXBuildFile + + A0215878A7EC41E833B5F1D2 containerPortal - E72217186F5258779AB341C4 + FBF79DDF04ADEAED54BA2286 isa PBXContainerItemProxy proxyType 1 remoteGlobalIDString - 9EED35B98793FD4884D527D7 + F6C59E5B4CFE053E9F98000E remoteInfo - Pods-SampleTests-RxLibrary + Pods-Sample-RxLibrary - B032E0762906905546DBF8B3 + A150782D73BBE95DE629B03C - fileRef - EBD4E0AE1D9C793A8420AA8F + baseConfigurationReference + 2FE1D288B8389F925AA3CE0C + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + isa - PBXBuildFile + XCBuildConfiguration + name + Debug - B16330C6E1974F73301EFA15 + A4C1C82F355864E7D3E200DD - includeInIndex - 1 + buildActionMask + 2147483647 + files + + 2DA405F6E578008991B3F9EA + A00077019C113466960E9DAF + 46A8EFCC59CF17E048EC34ED + 024F840533A6674922DB7899 + 9BD773E928AD698D23B20123 + 2AADA4C52A284ED5D41C7CF5 + CC358E38AE146C095C401760 + 288A25371032891C824CF4AA + FDC939796E70DC7D141E29FC + 45A1913C8F48686C1FC82520 + isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-RxLibrary-Private.xcconfig - sourceTree - <group> + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - B3E633C4D93071411657B4CC + A577CB571492B4F951064FCF includeInIndex 1 isa PBXFileReference lastKnownFileType - text.script.sh + text.xcconfig path - Pods-resources.sh + Pods.release.xcconfig sourceTree <group> - B5E5D1402D71983EBFCAC80A + A579EC5BE7E68C55CA5FECDE explicitFileType archive.ar @@ -1809,37 +2010,146 @@ isa PBXFileReference path - libPods-Sample-RxLibrary.a + libPods-RxLibrary.a sourceTree BUILT_PRODUCTS_DIR - B960F8B548AAFF747493F848 + A71CC1B520D2DFF451839FE2 + + buildActionMask + 2147483647 + files + + 0BC8818D3A097831FDE0750B + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + A8AFEFDF4700447BBCDF9E10 + + baseConfigurationReference + 591702CE7D8AF91674F1640F + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + A96854FB48432263FE68C313 + + fileRef + 15F64D3D7D10DB47599A72EB + isa + PBXBuildFile + + AA52EF1CD8A3683472BD86FE + + fileRef + 4BB75B0FC7359E8EA8672954 + isa + PBXBuildFile + + AA99564782B655791B053E58 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.plist.xml + text.script.sh path - Pods-acknowledgements.plist + Pods-Sample-resources.sh sourceTree <group> - BA1F7D67EB7832C536803BEB + AF9F0D991C2913F55496D06E - buildActionMask - 2147483647 - files - - 62CA148DC83850E7AD0BBC72 - + baseConfigurationReference + A577CB571492B4F951064FCF + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_PRECOMPILE_PREFIX_HEADER + YES + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + OTHER_LIBTOOLFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + XCBuildConfiguration + name + Release - BA6147A19780CE00E1877F27 + B034EE43C1EF96D1CBD1328A includeInIndex 1 @@ -1847,37 +2157,31 @@ PBXFileReference lastKnownFileType text.xcconfig + name + Pods-Sample-RxLibrary.xcconfig path - Pods.debug.xcconfig + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary.xcconfig sourceTree <group> - BC215B3ADAA2B59CC8E1E0D2 + B05A2B15C8A03AABA163D7D7 - children + buildConfigurations - 17882F47BB3F8879EADC6877 - A3B182A29677AE41F3DDF60E - EE39E3EB35643DA11DB4107A + 74F28D2155D125C3068F96BE + AF9F0D991C2913F55496D06E + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - PBXGroup - name - Targets Support Files - sourceTree - <group> - - BCF96ACB49A4C581F6C4FB72 - - fileRef - C4DD5ACCFDD651DB710A7AC6 - isa - PBXBuildFile + XCConfigurationList - BD0C47F343CA107135A8B9F2 + B153046F0CBA526564A9673C baseConfigurationReference - D4FB4028CE077DDD8A803F26 + 7FACBF2C8AF0403DD1C11015 buildSettings ALWAYS_SEARCH_USER_PATHS @@ -1893,7 +2197,7 @@ GCC_PRECOMPILE_PREFIX_HEADER YES GCC_PREFIX_HEADER - Target Support Files/Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-prefix.pch + Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch GCC_PREPROCESSOR_DEFINITIONS DEBUG=1 @@ -1923,20 +2227,24 @@ name Debug - BD301B295FA10BA71944E6A7 + B4FB10339A6A2E1AAF255802 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + text + name + Podfile path - NSEnumerator+GRXUtil.h + ../Podfile sourceTree - <group> + SOURCE_ROOT + xcLanguageSpecificationIdentifier + xcode.lang.ruby - BDDB48DF5321836E03134B73 + B50ECED4CEC7554ED6077619 includeInIndex 1 @@ -1949,41 +2257,10 @@ sourceTree <group> - C099EA9920009567F1CC8E6F - - buildActionMask - 2147483647 - files - - 281E734DE47EFFBE3BF9EB6D - AB49EB008360ACF61F868E97 - B032E0762906905546DBF8B3 - AB030C334AF0049970BC6F69 - 2536F48732661916E7F98AF4 - 93706FFF29E959C0D0FB35B8 - - isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - C0AFDE847E9A73FB99BE85CA - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-environment.h - sourceTree - <group> - - C11B686FDA34820988E0EA76 + B602CFEF970BEA98E40A056C baseConfigurationReference - 477CC2FC7C249C2918424B8D + 27E123435067CC11FE103999 buildSettings ALWAYS_SEARCH_USER_PATHS @@ -2028,57 +2305,57 @@ name Release - C30D693B18D43C87B0A38159 + B78477CA74AEFC96C25B49B4 fileRef - D13801CD3BED29EB3EB28C87 + BDA58E5E1AE450540A2B0227 isa PBXBuildFile - C4DD5ACCFDD651DB710A7AC6 + B7902691B66134F3764663D9 + fileRef + 3AD75C69A61408EF8BE0F247 isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework - sourceTree - DEVELOPER_DIR + PBXBuildFile + + B90592E4E39AFD1E769F9A95 + + fileRef + F763F3DF1B47888E75D0ED9C + isa + PBXBuildFile - C7522ABF8E5F673B2B51B846 + B960FF1BE77D3F4459EEB1E0 baseConfigurationReference - B16330C6E1974F73301EFA15 + 7FACBF2C8AF0403DD1C11015 buildSettings ALWAYS_SEARCH_USER_PATHS NO COPY_PHASE_STRIP - NO + YES DSTROOT /tmp/xcodeproj.dst - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 GCC_PRECOMPILE_PREFIX_HEADER YES GCC_PREFIX_HEADER - Target Support Files/Pods-RxLibrary/Pods-RxLibrary-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO + Target Support Files/Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-prefix.pch INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET 8.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + OTHER_LDFLAGS OTHER_LIBTOOLFLAGS @@ -2091,151 +2368,237 @@ iphoneos SKIP_INSTALL YES + VALIDATE_PRODUCT + YES isa XCBuildConfiguration name - Debug + Release - C7F1D04BA7ECEB89811F5AE8 + BA9F62DDE37FF0D601A4D5EA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + NSEnumerator+GRXUtil.m + sourceTree + <group> + + BB88043BB37FC0261BA90A30 fileRef - 708D5526684493C21D4B351D + 636AC1003F2C71FFD74542CD isa PBXBuildFile - CA2EA15026724E5FE7863617 + BC50D76123DA4B85E6AD77B4 - buildConfigurationList - 73BE487FD7206FA1037433A9 - buildPhases - - 8D141FF420B8F70654BEB651 - 569EE7C2B5DC944C87116DDD - 6A7ADEEB77C72E01BBCBF89C - - buildRules - - dependencies - + includeInIndex + 1 isa - PBXNativeTarget - name - Pods-RxLibrary - productName - Pods-RxLibrary - productReference - 6E0139A4BF1CBFDAB998D762 - productType - com.apple.product-type.library.static + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-Sample-dummy.m + sourceTree + <group> - CA58438D9F3E61D68DE07BB0 + BC52B0661F25B25CE382296C - fileRef - D13801CD3BED29EB3EB28C87 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXImmediateWriter.m + sourceTree + <group> - CA7A5D5A911B21E060A7C9A8 + BDA58E5E1AE450540A2B0227 - fileRef - 4BB07CE9F73F22C44B89EC9F + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + GRXWriter.m + sourceTree + <group> - CC015D517558717A179F07EB + BECFE3DCB323841851972996 - fileRef - 1F4EFE5811548D073C9AE7F7 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + GRXImmediateWriter.h + sourceTree + <group> - CD55EA3FDCE78270B7AD57C1 + BFE770FF3C0847AB995A82CA buildActionMask 2147483647 files - F2258DDD414D3E7F794A8D57 + 86D03B997B81819E2F39E48B + 43CC797FB2A733DF5B7A9F05 + 6E0669CB3E76E19FC854BA74 + CBA4FEEF7E642535FB39D878 + FC1BEDED07CA4D91AFEB56BD + 46FAFA88CA3E774263422EB9 + 8915073BE8158EF53FE11B95 + B90592E4E39AFD1E769F9A95 + F6383D21195A5BEFC51F6618 + 352B4C7135E3BBBFEBAB7F55 + E8F0B998CE49FF732F312133 isa PBXSourcesBuildPhase runOnlyForDeploymentPostprocessing 0 - CE7EA2A3E87B73883477BA0E + C0AC333A6FE8F07600C96890 fileRef - C4DD5ACCFDD651DB710A7AC6 + 1868370C0050315A6B835D42 isa PBXBuildFile - D0574DAAAAAA7164F6C504B0 + C382F416EFA39BE2CF216044 - includeInIndex - 1 + fileRef + 5AEFA85A5F1AD206D68B0576 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXBuildFile + + C4342DDEEF3C3290956C21DF + + buildConfigurations + + A8AFEFDF4700447BBCDF9E10 + 0F20828B67FDCB990B1818E9 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + CBA4FEEF7E642535FB39D878 + + fileRef + 636AC1003F2C71FFD74542CD + isa + PBXBuildFile + + CC0A03D531EF0FF199671820 + + fileRef + 9CFAC09E370EA1C96C8D2880 + isa + PBXBuildFile + + CC358E38AE146C095C401760 + + fileRef + 0260773D27B4AE159FB0B22D + isa + PBXBuildFile + + D49849E96C0C5FFB93C810CD + + children + + 3133D1CCCF4F1FE3E893509C + 2FE1D288B8389F925AA3CE0C + 2663F4401A9075DAC0B24171 + 911BEE248BE640294A081862 + B034EE43C1EF96D1CBD1328A + 7FACBF2C8AF0403DD1C11015 + E232BDE68610C0AC98C0D29F + 4972C151CE9A8A15BC1AE2C8 + 8A7375A2F98889F35C15E2D7 + 687D79F4C2484F58E9796051 + 42B461F095E85911637DFD60 + 2B05A4C21D00E8CF0DE88447 + + isa + PBXGroup + name + Support Files path - Pods-RxLibrary-prefix.pch + ../examples/Sample/Pods/Target Support Files/Pods-RxLibrary sourceTree <group> - D13801CD3BED29EB3EB28C87 + D53A8F2B11E6C2C187AFFF1D includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + text path - GRXWriter+Transformations.h + Pods-Sample-acknowledgements.markdown sourceTree <group> - D2B713C74AFBCA4A9C709F44 + DB007D27F74F8F72C72A1079 - children - - 073184615871F8C7E53BF14F - B16330C6E1974F73301EFA15 - 708D5526684493C21D4B351D - D0574DAAAAAA7164F6C504B0 - DE7537ED152395F49840CBC4 - 0E77891D6F14157CEFE7E0AB - ACD86D4B746F1151268E7F57 - 53DFD2191AC1853EC39421DF - 46E75B83BEFA486A489F2FB5 - D4FB4028CE077DDD8A803F26 - 9CA52DBDD25FD65977423056 - 10420B1B517C0F7BFC1629D6 - + containerPortal + FBF79DDF04ADEAED54BA2286 isa - PBXGroup - name - Support Files + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 6BFD156F312F6CAA1E5B00CA + remoteInfo + Pods-RxLibrary + + DB0257E62EC33F3F316EF017 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h path - ../examples/Sample/Pods/Target Support Files/Pods-RxLibrary + GRXWriter.h sourceTree <group> - D44C1815FF998CE19AF260F7 + DB3528F609E6177E1C5A691C includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + text.plist.xml path - NSEnumerator+GRXUtil.m + Pods-SampleTests-acknowledgements.plist sourceTree <group> - D4FB4028CE077DDD8A803F26 + DB677464758307786D68CCE9 includeInIndex 1 @@ -2243,326 +2606,283 @@ PBXFileReference lastKnownFileType text.xcconfig - name - Pods-SampleTests-RxLibrary-Private.xcconfig path - ../Pods-SampleTests-RxLibrary/Pods-SampleTests-RxLibrary-Private.xcconfig + Pods-SampleTests.release.xcconfig sourceTree <group> - DA385F717CB8DC97197F9779 + DCAB71BD665AF17533987B69 - children + buildActionMask + 2147483647 + files - 5D485A8180289AB7135979D4 + 85D5565EC08D14A6A60F1DDA isa - PBXGroup - name - Development Pods + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + DF94410F5DC0A0AB69336DF4 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-Sample.a sourceTree - <group> + BUILT_PRODUCTS_DIR - DE7537ED152395F49840CBC4 + E14CB6F332A9E58BB5F76C07 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig - name - Pods-Sample-RxLibrary.xcconfig + text.script.sh path - ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary.xcconfig + Pods-resources.sh sourceTree <group> - DF707F9ADA38C19530138855 - - fileRef - D44C1815FF998CE19AF260F7 - isa - PBXBuildFile - - E025FBABACF462C5EDEB8F04 + E232BDE68610C0AC98C0D29F includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc + name + Pods-Sample-RxLibrary-dummy.m path - Pods.release.xcconfig + ../Pods-Sample-RxLibrary/Pods-Sample-RxLibrary-dummy.m sourceTree <group> - E21F75C9C5AE553D1525B15D + E86A17CE1D79ECDCEBF91109 fileRef - 1F4EFE5811548D073C9AE7F7 + F763F3DF1B47888E75D0ED9C isa PBXBuildFile - E429BB9EF652206D69B38B4B - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES - COPY_PHASE_STRIP - NO - ENABLE_NS_ASSERTIONS - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PREPROCESSOR_DEFINITIONS - - RELEASE=1 - - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 8.0 - STRIP_INSTALLED_PRODUCT - NO - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - E72217186F5258779AB341C4 + E8F0B998CE49FF732F312133 - attributes - - LastUpgradeCheck - 0510 - - buildConfigurationList - 8454D1F76F981D7967AFEB64 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 + fileRef + E232BDE68610C0AC98C0D29F isa - PBXProject - knownRegions - - en - - mainGroup - 9147D56A68B32B154574B4B1 - productRefGroup - 8CDD9B1A9971F8E45E6ECCFE - projectDirPath - - projectReferences - - projectRoot - - targets - - 20FAE2C205A83A18304F55D3 - CA2EA15026724E5FE7863617 - F88FB4C4D5E45ABA4FE79557 - 5D62B0B091242C70E6F86CAF - 8998DF528EA3268FD2F3312F - 9EED35B98793FD4884D527D7 - + PBXBuildFile - E8EEC1310BE1A1C26A6CC94F + EB29FAB1F81F0D17BDAD72D0 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.script.sh + sourcecode.c.objc path - Pods-SampleTests-resources.sh + GRXWriter+Immediate.m sourceTree <group> - EBD4E0AE1D9C793A8420AA8F + EF2EE4BC906FF9909348DAB5 + explicitFileType + archive.ar includeInIndex - 1 + 0 isa PBXFileReference - lastKnownFileType - sourcecode.c.h path - GRXWriter+Immediate.h + libPods-Sample-RxLibrary.a sourceTree - <group> + BUILT_PRODUCTS_DIR - ED20D5EB599CC4E0E8E6F6F4 + EF8B807C5A2059D6C709450D includeInIndex 1 isa PBXFileReference lastKnownFileType - text + sourcecode.c.h path - Pods-acknowledgements.markdown + Pods-SampleTests-environment.h sourceTree <group> - EE32FC2DAC0BD2116BB4F552 - - fileRef - 2439530CF70B0AEDF7D20F2F - isa - PBXBuildFile - - EE39E3EB35643DA11DB4107A + F2BB78774BCEFD5DDDF38239 children - 8FDD88F3116CD60BDFADE08D - 0F54B7DB9C41BEA754222626 - 6721F6605F810F0E3E99A008 - 34547F4C6AC4B31274C6887D - E8EEC1310BE1A1C26A6CC94F - 70699B620DD649C9FC80B596 - 477CC2FC7C249C2918424B8D + 69E8FF71552D08D72B9068F1 + 7A8627E1649F66DEE014EB46 + 0D09CEB9308FA5BACEB5F84C isa PBXGroup name - Pods-SampleTests - path - Target Support Files/Pods-SampleTests + Targets Support Files sourceTree <group> - EEDF7C277603B79A9BE8324B - - buildActionMask - 2147483647 - files - - CE7EA2A3E87B73883477BA0E - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - F2055AA27575926EE57B8546 + F2C6AACFE46FFA8DC383DE43 - includeInIndex - 1 + fileRef + 0D53085043D992DC00E29F0A isa - PBXFileReference - lastKnownFileType - text.script.sh - path - Pods-Sample-resources.sh - sourceTree - <group> + PBXBuildFile - F2258DDD414D3E7F794A8D57 + F6383D21195A5BEFC51F6618 fileRef - 8D0ECACB7BF0FD50C8BA90EF + BDA58E5E1AE450540A2B0227 isa PBXBuildFile - F88FB4C4D5E45ABA4FE79557 + F6C59E5B4CFE053E9F98000E buildConfigurationList - 8AF2FEBF81B82548A9CD7D5E + 17F4C2F25813E7A4588FF233 buildPhases - CD55EA3FDCE78270B7AD57C1 - 80ED48A94404B285C3BAD2A2 + BFE770FF3C0847AB995A82CA + 1146D04C598DEBA045C96C2F + 9E8DC61269B141639DA7F859 buildRules dependencies - - 0E76C0DE38838984ADBE9793 - + isa PBXNativeTarget name - Pods-Sample + Pods-Sample-RxLibrary productName - Pods-Sample + Pods-Sample-RxLibrary productReference - 44EAD826ACB27F88B80500A1 + EF2EE4BC906FF9909348DAB5 productType com.apple.product-type.library.static - F8FA1EE55435B1DD5386F9B7 + F763F3DF1B47888E75D0ED9C - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.objc path - libPods-SampleTests-RxLibrary.a + GRXWriter+Transformations.m sourceTree - BUILT_PRODUCTS_DIR + <group> + + F779618174957BE31FCCDE56 + + buildActionMask + 2147483647 + files + + 2B49DCA723ECBC0F2777B960 + 22531AF83592134D3879C3E1 + 0C57EED724EBF58759F9F6DF + 8CD061F02F905957F4C1D188 + 458FF1EEF4EB9646C699F3DD + 2B341576464148A01DCFB28B + 36FF37EAC7E918C4CD867776 + 594F98D43B96AB5C11E61C10 + B78477CA74AEFC96C25B49B4 + 9CCBE9A628C305B3B089B8DD + 801BBA7A538CFAE6746966A7 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + F8B4778EF3030EEC2E9927CE + + isa + PBXTargetDependency + name + Pods-SampleTests-RxLibrary + target + 3800855A656C8D0813062074 + targetProxy + 7DA2A517A18D85B390FB122A + + FBF79DDF04ADEAED54BA2286 + + attributes + + LastUpgradeCheck + 0510 + + buildConfigurationList + 3749A34D3DFA6E2F3539E546 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + + mainGroup + 397A12919FB4BDD608FE207C + productRefGroup + 8B05D39455D5B23720961FA4 + projectDirPath + + projectReferences + + projectRoot + + targets + + 26E6ACBF137DBC325B4E7DA7 + 6BFD156F312F6CAA1E5B00CA + 0239F1B46D24E21A8042F47F + F6C59E5B4CFE053E9F98000E + 14D92BB2ED12213381BD2EB9 + 3800855A656C8D0813062074 + + + FC1BEDED07CA4D91AFEB56BD + + fileRef + 57AC9BF19B9635D7476CA5FA + isa + PBXBuildFile - FD4FDDAA137AAC4ECC193E65 + FDC6B84EAC9989F0827EA4F3 fileRef - 2439530CF70B0AEDF7D20F2F + 0260773D27B4AE159FB0B22D isa PBXBuildFile - FFFC86AF33D17D398F42C549 + FDC939796E70DC7D141E29FC fileRef - 4BB07CE9F73F22C44B89EC9F + DB0257E62EC33F3F316EF017 isa PBXBuildFile rootObject - E72217186F5258779AB341C4 + FBF79DDF04ADEAED54BA2286 From 645466e0899bfe811acc746d23d8eb15f784fdd3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 09:18:33 -0800 Subject: [PATCH 06/59] Initial sketch --- include/grpc++/completion_queue.h | 9 ++++- include/grpc++/impl/call.h | 4 +-- include/grpc++/server_context.h | 20 +++++++++++ src/cpp/client/client_unary_call.cc | 5 +-- src/cpp/common/call.cc | 3 +- src/cpp/common/completion_queue.cc | 51 +++++++++++++++++++---------- src/cpp/server/server.cc | 9 +++-- src/cpp/server/server_context.cc | 18 ++++++++-- 8 files changed, 90 insertions(+), 29 deletions(-) diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index c5267f8563c..9a4fa9f2e10 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -55,6 +55,7 @@ class ServerReaderWriter; class CompletionQueue; class Server; +class ServerContext; class CompletionQueueTag { public: @@ -62,7 +63,9 @@ class CompletionQueueTag { // Called prior to returning from Next(), return value // is the status of the operation (return status is the default thing // to do) - virtual void FinalizeResult(void **tag, bool *status) = 0; + // If this function returns false, the tag is dropped and not returned + // from the completion queue + virtual bool FinalizeResult(void **tag, bool *status) = 0; }; // grpc_completion_queue wrapper class @@ -99,6 +102,7 @@ class CompletionQueue { template friend class ::grpc::ServerReaderWriter; friend class ::grpc::Server; + friend class ::grpc::ServerContext; friend Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, @@ -109,6 +113,9 @@ class CompletionQueue { // Cannot be mixed with calls to Next(). bool Pluck(CompletionQueueTag *tag); + // Does a single polling pluck on tag + void TryPluck(CompletionQueueTag *tag); + grpc_completion_queue *cq_; // owned }; diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 4ab226339d3..20c60fc5455 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -65,7 +65,7 @@ class CallOpBuffer : public CompletionQueueTag { void AddSendInitialMetadata( std::multimap *metadata); void AddSendInitialMetadata(ClientContext *ctx); - void AddRecvInitialMetadata(ClientContext* ctx); + void AddRecvInitialMetadata(ClientContext *ctx); void AddSendMessage(const google::protobuf::Message &message); void AddRecvMessage(google::protobuf::Message *message); void AddClientSendClose(); @@ -80,7 +80,7 @@ class CallOpBuffer : public CompletionQueueTag { void FillOps(grpc_op *ops, size_t *nops); // Called by completion queue just prior to returning from Next() or Pluck() - void FinalizeResult(void **tag, bool *status) override; + bool FinalizeResult(void **tag, bool *status) override; bool got_message = false; diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index 853f91f4671..e2e14d9ef76 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -34,8 +34,11 @@ #ifndef __GRPCPP_SERVER_CONTEXT_H_ #define __GRPCPP_SERVER_CONTEXT_H_ +#include + #include #include +#include #include "config.h" @@ -76,6 +79,8 @@ class ServerContext final { void AddInitialMetadata(const grpc::string& key, const grpc::string& value); void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); + bool IsCancelled() { return completion_op_.CheckCancelled(cq_); } + std::multimap client_metadata() { return client_metadata_; } @@ -97,11 +102,26 @@ class ServerContext final { template friend class ::grpc::ServerReaderWriter; + class CompletionOp final : public CompletionQueueTag { + public: + bool FinalizeResult(void** tag, bool* status) override; + + bool CheckCancelled(CompletionQueue* cq); + + private: + std::mutex mu_; + bool finalized_ = false; + int cancelled_ = 0; + }; + ServerContext(gpr_timespec deadline, grpc_metadata* metadata, size_t metadata_count); + CompletionOp completion_op_; + std::chrono::system_clock::time_point deadline_; grpc_call* call_ = nullptr; + CompletionQueue* cq_ = nullptr; bool sent_initial_metadata_ = false; std::multimap client_metadata_; std::multimap initial_metadata_; diff --git a/src/cpp/client/client_unary_call.cc b/src/cpp/client/client_unary_call.cc index 03a03261285..7b904fc0f53 100644 --- a/src/cpp/client/client_unary_call.cc +++ b/src/cpp/client/client_unary_call.cc @@ -63,9 +63,10 @@ Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, class ClientAsyncRequest final : public CallOpBuffer { public: - void FinalizeResult(void **tag, bool *status) override { - CallOpBuffer::FinalizeResult(tag, status); + bool FinalizeResult(void **tag, bool *status) override { + bool r = CallOpBuffer::FinalizeResult(tag, status); delete this; + return r; } }; diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index 04af36f312f..49cf9650c76 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -231,7 +231,7 @@ void CallOpBuffer::FillOps(grpc_op* ops, size_t* nops) { } } -void CallOpBuffer::FinalizeResult(void** tag, bool* status) { +bool CallOpBuffer::FinalizeResult(void** tag, bool* status) { // Release send buffers. if (send_message_buf_) { grpc_byte_buffer_destroy(send_message_buf_); @@ -274,6 +274,7 @@ void CallOpBuffer::FinalizeResult(void** tag, bool* status) { if (recv_closed_) { *recv_closed_ = cancelled_buf_ != 0; } + return true; } Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue.cc index 4419b4b2f14..c330d21a467 100644 --- a/src/cpp/common/completion_queue.cc +++ b/src/cpp/common/completion_queue.cc @@ -43,7 +43,7 @@ namespace grpc { CompletionQueue::CompletionQueue() { cq_ = grpc_completion_queue_create(); } -CompletionQueue::CompletionQueue(grpc_completion_queue *take) : cq_(take) {} +CompletionQueue::CompletionQueue(grpc_completion_queue* take) : cq_(take) {} CompletionQueue::~CompletionQueue() { grpc_completion_queue_destroy(cq_); } @@ -52,34 +52,51 @@ void CompletionQueue::Shutdown() { grpc_completion_queue_shutdown(cq_); } // Helper class so we can declare a unique_ptr with grpc_event class EventDeleter { public: - void operator()(grpc_event *ev) { + void operator()(grpc_event* ev) { if (ev) grpc_event_finish(ev); } }; -bool CompletionQueue::Next(void **tag, bool *ok) { +bool CompletionQueue::Next(void** tag, bool* ok) { std::unique_ptr ev; - ev.reset(grpc_completion_queue_next(cq_, gpr_inf_future)); - if (ev->type == GRPC_QUEUE_SHUTDOWN) { - return false; + for (;;) { + ev.reset(grpc_completion_queue_next(cq_, gpr_inf_future)); + if (ev->type == GRPC_QUEUE_SHUTDOWN) { + return false; + } + auto cq_tag = static_cast(ev->tag); + *ok = ev->data.op_complete == GRPC_OP_OK; + *tag = cq_tag; + if (cq_tag->FinalizeResult(tag, ok)) { + return true; + } } - auto cq_tag = static_cast(ev->tag); - *ok = ev->data.op_complete == GRPC_OP_OK; - *tag = cq_tag; - cq_tag->FinalizeResult(tag, ok); - return true; } -bool CompletionQueue::Pluck(CompletionQueueTag *tag) { +bool CompletionQueue::Pluck(CompletionQueueTag* tag) { std::unique_ptr ev; - ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_future)); + for (;;) { + ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_future)); + bool ok = ev->data.op_complete == GRPC_OP_OK; + void* ignored = tag; + if (tag->FinalizeResult(&ignored, &ok)) { + GPR_ASSERT(ignored == tag); + return ok; + } + } +} + +void CompletionQueue::TryPluck(CompletionQueueTag* tag) { + std::unique_ptr ev; + + ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_past)); + if (!ev) return; bool ok = ev->data.op_complete == GRPC_OP_OK; - void *ignored = tag; - tag->FinalizeResult(&ignored, &ok); - GPR_ASSERT(ignored == tag); - return ok; + void* ignored = tag; + // the tag must be swallowed if using TryPluck + GPR_ASSERT(!tag->FinalizeResult(&ignored, &ok)); } } // namespace grpc diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index ee9a1daa8e9..8fffea640f7 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -163,10 +163,11 @@ class Server::SyncRequest final : public CompletionQueueTag { this)); } - void FinalizeResult(void** tag, bool* status) override { + bool FinalizeResult(void** tag, bool* status) override { if (!*status) { grpc_completion_queue_destroy(cq_); } + return true; } class CallData final { @@ -310,11 +311,11 @@ class Server::AsyncRequest final : public CompletionQueueTag { grpc_metadata_array_destroy(&array_); } - void FinalizeResult(void** tag, bool* status) override { + bool FinalizeResult(void** tag, bool* status) override { *tag = tag_; if (*status && request_) { if (payload_) { - *status = *status && DeserializeProto(payload_, request_); + *status = DeserializeProto(payload_, request_); } else { *status = false; } @@ -331,8 +332,10 @@ class Server::AsyncRequest final : public CompletionQueueTag { } ctx_->call_ = call_; Call call(call_, server_, cq_); + // just the pointers inside call are copied here stream_->BindCall(&call); delete this; + return true; } private: diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index df4c4dc3146..b9d85b95e93 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -40,7 +40,7 @@ namespace grpc { ServerContext::ServerContext() {} -ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata *metadata, +ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata* metadata, size_t metadata_count) : deadline_(Timespec2Timepoint(deadline)) { for (size_t i = 0; i < metadata_count; i++) { @@ -58,13 +58,25 @@ ServerContext::~ServerContext() { } void ServerContext::AddInitialMetadata(const grpc::string& key, - const grpc::string& value) { + const grpc::string& value) { initial_metadata_.insert(std::make_pair(key, value)); } void ServerContext::AddTrailingMetadata(const grpc::string& key, - const grpc::string& value) { + const grpc::string& value) { trailing_metadata_.insert(std::make_pair(key, value)); } +bool ServerContext::CompletionOp::CheckCancelled(CompletionQueue* cq) { + cq->TryPluck(this); + std::lock_guard g(mu_); + return finalized_ ? cancelled_ != 0 : false; +} + +bool ServerContext::CompletionOp::FinalizeResult(void** tag, bool* status) { + std::lock_guard g(mu_); + finalized_ = true; + return false; +} + } // namespace grpc From 5b41d4ff4095fa99a31d07f22a8e69947196df9d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 18 Feb 2015 10:21:57 -0800 Subject: [PATCH 07/59] Added interop support for default root SSL certs --- src/node/interop/interop_client.js | 14 +++++++++++--- src/node/test/interop_sanity_test.js | 21 +++++++++++++-------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 8737af6cde9..00284d0855a 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -280,11 +280,16 @@ var test_cases = { * @param {function} done Callback to call when the test is completed. Included * primarily for use with mocha */ -function runTest(address, host_override, test_case, tls, done) { +function runTest(address, host_override, test_case, tls, test_ca, done) { // TODO(mlumish): enable TLS functionality var options = {}; if (tls) { - var ca_path = path.join(__dirname, '../test/data/ca.pem'); + var ca_path; + if (test_ca) { + ca_path = path.join(__dirname, '../test/data/ca.pem'); + } else { + ca_path = process.env.SSL_CERT_FILE; + } var ca_data = fs.readFileSync(ca_path); var creds = grpc.Credentials.createSsl(ca_data); options.credentials = creds; @@ -304,7 +309,10 @@ if (require.main === module) { 'use_tls', 'use_test_ca'] }); runTest(argv.server_host + ':' + argv.server_port, argv.server_host_override, - argv.test_case, argv.use_tls === 'true'); + argv.test_case, argv.use_tls === 'true', argv.use_test_ca === 'true', + function () { + console.log('OK:', argv.test_case); + }); } /** diff --git a/src/node/test/interop_sanity_test.js b/src/node/test/interop_sanity_test.js index 81cd9fa5b95..070a02e0fe8 100644 --- a/src/node/test/interop_sanity_test.js +++ b/src/node/test/interop_sanity_test.js @@ -53,30 +53,35 @@ describe('Interop tests', function() { }); // This depends on not using a binary stream it('should pass empty_unary', function(done) { - interop_client.runTest(port, name_override, 'empty_unary', true, done); + interop_client.runTest(port, name_override, 'empty_unary', true, true, + done); }); // This fails due to an unknown bug it('should pass large_unary', function(done) { - interop_client.runTest(port, name_override, 'large_unary', true, done); + interop_client.runTest(port, name_override, 'large_unary', true, true, + done); }); it('should pass client_streaming', function(done) { - interop_client.runTest(port, name_override, 'client_streaming', true, done); + interop_client.runTest(port, name_override, 'client_streaming', true, true, + done); }); it('should pass server_streaming', function(done) { - interop_client.runTest(port, name_override, 'server_streaming', true, done); + interop_client.runTest(port, name_override, 'server_streaming', true, true, + done); }); it('should pass ping_pong', function(done) { - interop_client.runTest(port, name_override, 'ping_pong', true, done); + interop_client.runTest(port, name_override, 'ping_pong', true, true, done); }); it('should pass empty_stream', function(done) { - interop_client.runTest(port, name_override, 'empty_stream', true, done); + interop_client.runTest(port, name_override, 'empty_stream', true, true, + done); }); it('should pass cancel_after_begin', function(done) { interop_client.runTest(port, name_override, 'cancel_after_begin', true, - done); + true, done); }); it('should pass cancel_after_first_response', function(done) { interop_client.runTest(port, name_override, 'cancel_after_first_response', - true, done); + true, true, done); }); }); From 47b30b0b26e676d78e2683d1f9bb710ab237f138 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 18 Feb 2015 11:31:55 -0800 Subject: [PATCH 08/59] Added prod SSL support to Node Dockerfile --- tools/dockerfile/grpc_node/Dockerfile | 7 +++++++ tools/gce_setup/grpc_docker.sh | 19 ++++++++++++++++--- tools/gce_setup/shared_startup_funcs.sh | 4 ++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/tools/dockerfile/grpc_node/Dockerfile b/tools/dockerfile/grpc_node/Dockerfile index ce582d2ef12..59aa8cfd1c6 100644 --- a/tools/dockerfile/grpc_node/Dockerfile +++ b/tools/dockerfile/grpc_node/Dockerfile @@ -11,4 +11,11 @@ RUN make install_c -C /var/local/git/grpc RUN cd /var/local/git/grpc/src/node && npm install && node-gyp rebuild +# Add a cacerts directory containing the Google root pem file, allowing the +# ruby client to access the production test instance +ADD cacerts cacerts + +# Add a service_account directory containing the auth creds file +ADD service_account service_account + CMD ["/usr/bin/nodejs", "/var/local/git/grpc/src/node/interop/interop_server.js", "--use_tls=true", "--port=8040"] \ No newline at end of file diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 1c38582cb81..980a4f6932a 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -766,7 +766,7 @@ grpc_interop_test() { echo " $ssh_cmd" echo "on $host" [[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run - gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" & + gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" & PID=$! sleep 10 echo "pid is $PID" @@ -821,7 +821,7 @@ grpc_cloud_prod_test() { echo " $ssh_cmd" echo "on $host" [[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run - gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" & + gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" & PID=$! sleep 10 echo "pid is $PID" @@ -1015,11 +1015,24 @@ grpc_interop_gen_php_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_interop_gen_node_cmd() { local cmd_prefix="sudo docker run grpc/node"; - local test_script="/usr/bin/nodejs /var/local/git/grpc/src/node/interop/interop_client.js --use_tls=true"; + local test_script="/usr/bin/nodejs /var/local/git/grpc/src/node/interop/interop_client.js --use_tls=true --use_test_ca=true"; local the_cmd="$cmd_prefix $test_script $@"; echo $the_cmd } +# constructs the full dockerized node interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_gen_node_cmd() { + local cmd_prefix="sudo docker run grpc/node"; + local test_script="/usr/bin/nodejs /var/local/git/grpc/src/node/interop/interop_client.js --use_tls=true"; + local gfe_flags=$(_grpc_prod_gfe_flags); + local the_cmd="$cmd_prefix $test_script $gfe_flags $@"; + echo $the_cmd +} + # constructs the full dockerized cpp interop test cmd. # # call-seq: diff --git a/tools/gce_setup/shared_startup_funcs.sh b/tools/gce_setup/shared_startup_funcs.sh index a6f73d16367..2257466d58b 100755 --- a/tools/gce_setup/shared_startup_funcs.sh +++ b/tools/gce_setup/shared_startup_funcs.sh @@ -388,6 +388,10 @@ grpc_dockerfile_install() { grpc_docker_sync_roots_pem $dockerfile_dir/cacerts || return 1; grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1; } + [[ $image_label == "grpc/node" ]] && { + grpc_docker_sync_roots_pem $dockerfile_dir/cacerts || return 1; + grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1; + } [[ $image_label == "grpc/cxx" ]] && { grpc_docker_sync_roots_pem $dockerfile_dir/cacerts || return 1; grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1; From 492968f7d92bae2b9c88059521ad2f5c81594d8f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 13:14:03 -0800 Subject: [PATCH 09/59] Server side cancellation receive support --- include/grpc++/completion_queue.h | 2 +- include/grpc++/server_context.h | 20 +++----- include/grpc++/stream.h | 12 ----- src/cpp/common/completion_queue.cc | 5 +- src/cpp/server/server.cc | 8 ++- src/cpp/server/server_context.cc | 70 ++++++++++++++++++++++---- test/cpp/end2end/async_end2end_test.cc | 12 ++++- 7 files changed, 87 insertions(+), 42 deletions(-) diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index 9a4fa9f2e10..cec0ef0a8d7 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -114,7 +114,7 @@ class CompletionQueue { bool Pluck(CompletionQueueTag *tag); // Does a single polling pluck on tag - void TryPluck(CompletionQueueTag *tag); + void TryPluck(CompletionQueueTag *tag, bool forever); grpc_completion_queue *cq_; // owned }; diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index e2e14d9ef76..81dcb21d139 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -34,8 +34,6 @@ #ifndef __GRPCPP_SERVER_CONTEXT_H_ #define __GRPCPP_SERVER_CONTEXT_H_ -#include - #include #include #include @@ -63,7 +61,9 @@ class ServerWriter; template class ServerReaderWriter; +class Call; class CallOpBuffer; +class CompletionQueue; class Server; // Interface of server side rpc context. @@ -79,7 +79,7 @@ class ServerContext final { void AddInitialMetadata(const grpc::string& key, const grpc::string& value); void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); - bool IsCancelled() { return completion_op_.CheckCancelled(cq_); } + bool IsCancelled(); std::multimap client_metadata() { return client_metadata_; @@ -102,22 +102,14 @@ class ServerContext final { template friend class ::grpc::ServerReaderWriter; - class CompletionOp final : public CompletionQueueTag { - public: - bool FinalizeResult(void** tag, bool* status) override; - - bool CheckCancelled(CompletionQueue* cq); + class CompletionOp; - private: - std::mutex mu_; - bool finalized_ = false; - int cancelled_ = 0; - }; + void BeginCompletionOp(Call* call); ServerContext(gpr_timespec deadline, grpc_metadata* metadata, size_t metadata_count); - CompletionOp completion_op_; + CompletionOp* completion_op_ = nullptr; std::chrono::system_clock::time_point deadline_; grpc_call* call_ = nullptr; diff --git a/include/grpc++/stream.h b/include/grpc++/stream.h index 20ba3fb7905..a37062b42d7 100644 --- a/include/grpc++/stream.h +++ b/include/grpc++/stream.h @@ -576,8 +576,6 @@ class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface { if (status.IsOk()) { finish_buf_.AddSendMessage(msg); } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } @@ -589,8 +587,6 @@ class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface { finish_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); ctx_->sent_initial_metadata_ = true; } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } @@ -636,8 +632,6 @@ class ServerAsyncReader : public ServerAsyncStreamingInterface, if (status.IsOk()) { finish_buf_.AddSendMessage(msg); } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } @@ -649,8 +643,6 @@ class ServerAsyncReader : public ServerAsyncStreamingInterface, finish_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); ctx_->sent_initial_metadata_ = true; } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } @@ -697,8 +689,6 @@ class ServerAsyncWriter : public ServerAsyncStreamingInterface, finish_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); ctx_->sent_initial_metadata_ = true; } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } @@ -753,8 +743,6 @@ class ServerAsyncReaderWriter : public ServerAsyncStreamingInterface, finish_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); ctx_->sent_initial_metadata_ = true; } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue.cc index c330d21a467..f9bb8689b63 100644 --- a/src/cpp/common/completion_queue.cc +++ b/src/cpp/common/completion_queue.cc @@ -88,10 +88,11 @@ bool CompletionQueue::Pluck(CompletionQueueTag* tag) { } } -void CompletionQueue::TryPluck(CompletionQueueTag* tag) { +void CompletionQueue::TryPluck(CompletionQueueTag* tag, bool forever) { std::unique_ptr ev; - ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_past)); + ev.reset(grpc_completion_queue_pluck( + cq_, tag, forever ? gpr_inf_future : gpr_inf_past)); if (!ev) return; bool ok = ev->data.op_complete == GRPC_OP_OK; void* ignored = tag; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 8fffea640f7..cf6b02293fb 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -205,6 +205,7 @@ class Server::SyncRequest final : public CompletionQueueTag { if (has_response_payload_) { res.reset(method_->AllocateResponseProto()); } + ctx_.BeginCompletionOp(&call_); auto status = method_->handler()->RunHandler( MethodHandler::HandlerParameter(&call_, &ctx_, req.get(), res.get())); CallOpBuffer buf; @@ -215,10 +216,12 @@ class Server::SyncRequest final : public CompletionQueueTag { buf.AddSendMessage(*res); } buf.AddServerSendStatus(&ctx_.trailing_metadata_, status); - bool cancelled; - buf.AddServerRecvClose(&cancelled); call_.PerformOps(&buf); GPR_ASSERT(cq_.Pluck(&buf)); + void* ignored_tag; + bool ignored_ok; + cq_.Shutdown(); + GPR_ASSERT(cq_.Next(&ignored_tag, &ignored_ok) == false); } private: @@ -332,6 +335,7 @@ class Server::AsyncRequest final : public CompletionQueueTag { } ctx_->call_ = call_; Call call(call_, server_, cq_); + ctx_->BeginCompletionOp(&call); // just the pointers inside call are copied here stream_->BindCall(&call); delete this; diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index b9d85b95e93..9412f2762f0 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -34,10 +34,59 @@ #include #include #include +#include #include "src/cpp/util/time.h" namespace grpc { +// CompletionOp + +class ServerContext::CompletionOp final : public CallOpBuffer { + public: + CompletionOp(); + bool FinalizeResult(void** tag, bool* status) override; + + bool CheckCancelled(CompletionQueue* cq); + + void Unref(); + + private: + std::mutex mu_; + int refs_ = 2; // initial refs: one in the server context, one in the cq + bool finalized_ = false; + bool cancelled_ = false; +}; + +ServerContext::CompletionOp::CompletionOp() { AddServerRecvClose(&cancelled_); } + +void ServerContext::CompletionOp::Unref() { + std::unique_lock lock(mu_); + if (--refs_ == 0) { + lock.unlock(); + delete this; + } +} + +bool ServerContext::CompletionOp::CheckCancelled(CompletionQueue* cq) { + cq->TryPluck(this, false); + std::lock_guard g(mu_); + return finalized_ ? cancelled_ : false; +} + +bool ServerContext::CompletionOp::FinalizeResult(void** tag, bool* status) { + GPR_ASSERT(CallOpBuffer::FinalizeResult(tag, status)); + std::unique_lock lock(mu_); + finalized_ = true; + if (!*status) cancelled_ = true; + if (--refs_ == 0) { + lock.unlock(); + delete this; + } + return false; +} + +// ServerContext body + ServerContext::ServerContext() {} ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata* metadata, @@ -55,6 +104,15 @@ ServerContext::~ServerContext() { if (call_) { grpc_call_destroy(call_); } + if (completion_op_) { + completion_op_->Unref(); + } +} + +void ServerContext::BeginCompletionOp(Call* call) { + GPR_ASSERT(!completion_op_); + completion_op_ = new CompletionOp(); + call->PerformOps(completion_op_); } void ServerContext::AddInitialMetadata(const grpc::string& key, @@ -67,16 +125,8 @@ void ServerContext::AddTrailingMetadata(const grpc::string& key, trailing_metadata_.insert(std::make_pair(key, value)); } -bool ServerContext::CompletionOp::CheckCancelled(CompletionQueue* cq) { - cq->TryPluck(this); - std::lock_guard g(mu_); - return finalized_ ? cancelled_ != 0 : false; -} - -bool ServerContext::CompletionOp::FinalizeResult(void** tag, bool* status) { - std::lock_guard g(mu_); - finalized_ = true; - return false; +bool ServerContext::IsCancelled() { + return completion_op_ && completion_op_->CheckCancelled(cq_); } } // namespace grpc diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 7e827cb0e57..2e28a86d97f 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -90,7 +90,17 @@ class AsyncEnd2endTest : public ::testing::Test { server_ = builder.BuildAndStart(); } - void TearDown() override { server_->Shutdown(); } + void TearDown() override { + server_->Shutdown(); + void* ignored_tag; + bool ignored_ok; + cli_cq_.Shutdown(); + srv_cq_.Shutdown(); + while (cli_cq_.Next(&ignored_tag, &ignored_ok)) + ; + while (srv_cq_.Next(&ignored_tag, &ignored_ok)) + ; + } void ResetStub() { std::shared_ptr channel = From 6a769e0f52e57f6871f1146489e33765e7d9aa03 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Wed, 18 Feb 2015 14:04:29 -0800 Subject: [PATCH 10/59] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 99e19db337b..ab7fc083fde 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,22 @@ Copyright 2015 Google Inc. See grpc/INSTALL for installation instructions for various platforms. +#Repository Structure + +This repository contains source code for gRPC libraries for multiple lanugages. + + * C source code: [src/core] (src/core) + * C++ source code: [src/cpp] (src/cpp) + * Python source code: [src/python] (src/python) + * Python source code: [src/ruby] (src/ruby) + * Ruby source code: [src/node] (src/node) + * PHP source code: [src/php] (src/php) + * Python source code: [src/csharp] (src/csharp) + +Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. +Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. + + #Overview From 9b98bd89af3e715e98f7111b9a389ecc92dbb20c Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Wed, 18 Feb 2015 22:47:25 +0000 Subject: [PATCH 11/59] Add a src/python/README.md. --- src/python/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 src/python/README.md diff --git a/src/python/README.md b/src/python/README.md new file mode 100755 index 00000000000..be2f2bedf9c --- /dev/null +++ b/src/python/README.md @@ -0,0 +1,34 @@ +GRPC Python +========= + +The Python facility of GRPC. + + +Prerequisites +----------------------- + +Python 2.7, virtualenv, pip, libprotobuf-dev, and libprotoc-dev. + + +Building from source +---------------------- + +- Build the GRPC core +E.g, from the root of the grpc [git repo](https://github.com/google/grpc) +``` +$ make shared_c static_c +``` + +- Use build_python.sh to build the Python code and install it into a virtual environment +``` +$ tools/run_tests/build_python.sh +``` + + +Testing +----------------------- + +- Use run_python.sh to run GRPC as it was installed into the virtual environment +``` +$ tools/run_tests/run_python.sh +``` From 8c3ed009a835e01dcee690cecaeeaf7fecf3e98e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 18 Feb 2015 15:00:56 -0800 Subject: [PATCH 12/59] Added auth functionality and interop tests --- src/node/index.js | 32 +++++ src/node/interop/interop_client.js | 48 ++++++- src/node/interop/messages.proto | 10 +- src/node/package.json | 3 +- src/node/src/client.js | 193 +++++++++++++++++------------ 5 files changed, 206 insertions(+), 80 deletions(-) diff --git a/src/node/index.js b/src/node/index.js index baef4d03c68..8b5b1ea9a61 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -73,6 +73,36 @@ function load(filename) { return loadObject(builder.ns); } +/** + * Get a function that a client can use to update metadata with authentication + * information from a Google Auth credential object. + * @param {Object} credential The credential object to use + * @return {function(Object, callback)} Metadata updater function + */ +function getGoogleAuthDelegate(credential) { + /** + * Update a metadata object with authentication information. + * @param {Object} metadata Metadata object + * @param {function(Error, Object)} callback + */ + return function updateMetadata(metadata, callback) { + metadata = _.clone(metadata); + if (metadata.Authorization) { + metadata.Authorization = _.clone(metadata.Authorization); + } else { + metadata.Authorization = []; + } + credential.getAccessToken(function(err, token) { + if (err) { + callback(err); + return; + } + metadata.Authorization.push('Bearer ' + token); + callback(null, metadata); + }); + }; +} + /** * See docs for loadObject */ @@ -106,3 +136,5 @@ exports.Credentials = grpc.Credentials; * ServerCredentials factories */ exports.ServerCredentials = grpc.ServerCredentials; + +exports.getGoogleAuthDelegate = getGoogleAuthDelegate; diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 00284d0855a..9a19a509f39 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -35,9 +35,14 @@ var fs = require('fs'); var path = require('path'); var grpc = require('..'); var testProto = grpc.load(__dirname + '/test.proto').grpc.testing; +var GoogleAuth = require('googleauth'); var assert = require('assert'); +var AUTH_SCOPE = 'https://www.googleapis.com/auth/xapi.zoo'; +var AUTH_SCOPE_RESPONSE = 'xapi.zoo'; +var AUTH_USER = '155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk@developer.gserviceaccount.com'; + /** * Create a buffer filled with size zeroes * @param {number} size The length of the buffer @@ -255,6 +260,45 @@ function cancelAfterFirstResponse(client, done) { }); } +/** + * Run one of the authentication tests. + * @param {Client} client The client to test against + * @param {function} done Callback to call when the test is completed. Included + * primarily for use with mocha + */ +function authTest(client, done) { + (new GoogleAuth()).getApplicationDefault(function(err, credential) { + assert.ifError(err); + if (credential.createScopedRequired()) { + credential = credential.createScoped(AUTH_SCOPE); + } + client.updateMetadata = grpc.getGoogleAuthDelegate(credential); + var arg = { + response_type: testProto.PayloadType.COMPRESSABLE, + response_size: 314159, + payload: { + body: zeroBuffer(271828) + }, + fill_username: true, + fill_oauth_scope: true + }; + var call = client.unaryCall(arg, function(err, resp) { + assert.ifError(err); + assert.strictEqual(resp.payload.type, testProto.PayloadType.COMPRESSABLE); + assert.strictEqual(resp.payload.body.limit - resp.payload.body.offset, + 314159); + assert.strictEqual(resp.username, AUTH_USER); + assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE); + }); + call.on('status', function(status) { + assert.strictEqual(status.code, grpc.status.OK); + if (done) { + done(); + } + }); + }); +} + /** * Map from test case names to test functions */ @@ -266,7 +310,9 @@ var test_cases = { ping_pong: pingPong, empty_stream: emptyStream, cancel_after_begin: cancelAfterBegin, - cancel_after_first_response: cancelAfterFirstResponse + cancel_after_first_response: cancelAfterFirstResponse, + compute_engine_creds: authTest, + service_account_creds: authTest }; /** diff --git a/src/node/interop/messages.proto b/src/node/interop/messages.proto index 29db0dd8b1a..1d95154cf49 100644 --- a/src/node/interop/messages.proto +++ b/src/node/interop/messages.proto @@ -36,6 +36,12 @@ message SimpleRequest { // Optional input payload sent along with the request. optional Payload payload = 3; + + // Whether SimpleResponse should include username. + optional bool fill_username = 4; + + // Whether SimpleResponse should include OAuth scope. + optional bool fill_oauth_scope = 5; } // Unary response, as configured by the request. @@ -44,7 +50,9 @@ message SimpleResponse { optional Payload payload = 1; // The user the request came from, for verifying authentication was // successful when the client expected it. - optional int64 effective_gaia_user_id = 2; + optional string username = 2; + // OAuth scope. + optional string oauth_scope = 3; } // Client-streaming request. diff --git a/src/node/package.json b/src/node/package.json index 8f81014c1e8..821641ce19b 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -14,7 +14,8 @@ }, "devDependencies": { "mocha": "~1.21.0", - "minimist": "^1.1.0" + "minimist": "^1.1.0", + "googleauth": "google/google-auth-library-nodejs" }, "main": "index.js" } diff --git a/src/node/src/client.js b/src/node/src/client.js index 81fa65eb263..19c3144c7d9 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -224,25 +224,32 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { emitter.cancel = function cancel() { call.cancel(); }; - var client_batch = {}; - client_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; - client_batch[grpc.opType.SEND_MESSAGE] = serialize(argument); - client_batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true; - client_batch[grpc.opType.RECV_INITIAL_METADATA] = true; - client_batch[grpc.opType.RECV_MESSAGE] = true; - client_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; - call.startBatch(client_batch, function(err, response) { - if (err) { - callback(err); + this.updateMetadata(metadata, function(error, metadata) { + if (error) { + call.cancel(); + callback(error); return; } - if (response.status.code != grpc.status.OK) { - callback(response.status); - return; - } - emitter.emit('status', response.status); - emitter.emit('metadata', response.metadata); - callback(null, deserialize(response.read)); + var client_batch = {}; + client_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; + client_batch[grpc.opType.SEND_MESSAGE] = serialize(argument); + client_batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true; + client_batch[grpc.opType.RECV_INITIAL_METADATA] = true; + client_batch[grpc.opType.RECV_MESSAGE] = true; + client_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; + call.startBatch(client_batch, function(err, response) { + if (err) { + callback(err); + return; + } + if (response.status.code != grpc.status.OK) { + callback(response.status); + return; + } + emitter.emit('status', response.status); + emitter.emit('metadata', response.metadata); + callback(null, deserialize(response.read)); + }); }); return emitter; } @@ -279,30 +286,37 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { metadata = {}; } var stream = new ClientWritableStream(call, serialize); - var metadata_batch = {}; - metadata_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; - metadata_batch[grpc.opType.RECV_INITIAL_METADATA] = true; - call.startBatch(metadata_batch, function(err, response) { - if (err) { - callback(err); - return; - } - stream.emit('metadata', response.metadata); - }); - var client_batch = {}; - client_batch[grpc.opType.RECV_MESSAGE] = true; - client_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; - call.startBatch(client_batch, function(err, response) { - if (err) { - callback(err); - return; - } - if (response.status.code != grpc.status.OK) { - callback(response.status); + this.updateMetadata(metadata, function(error, metadata) { + if (error) { + call.cancel(); + callback(error); return; } - stream.emit('status', response.status); - callback(null, deserialize(response.read)); + var metadata_batch = {}; + metadata_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; + metadata_batch[grpc.opType.RECV_INITIAL_METADATA] = true; + call.startBatch(metadata_batch, function(err, response) { + if (err) { + callback(err); + return; + } + stream.emit('metadata', response.metadata); + }); + var client_batch = {}; + client_batch[grpc.opType.RECV_MESSAGE] = true; + client_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; + call.startBatch(client_batch, function(err, response) { + if (err) { + callback(err); + return; + } + if (response.status.code != grpc.status.OK) { + callback(response.status); + return; + } + stream.emit('status', response.status); + callback(null, deserialize(response.read)); + }); }); return stream; } @@ -339,24 +353,31 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) { metadata = {}; } var stream = new ClientReadableStream(call, deserialize); - var start_batch = {}; - start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; - start_batch[grpc.opType.RECV_INITIAL_METADATA] = true; - start_batch[grpc.opType.SEND_MESSAGE] = serialize(argument); - start_batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true; - call.startBatch(start_batch, function(err, response) { - if (err) { - throw err; - } - stream.emit('metadata', response.metadata); - }); - var status_batch = {}; - status_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; - call.startBatch(status_batch, function(err, response) { - if (err) { - throw err; + this.updateMetadata(metadata, function(error, metadata) { + if (error) { + call.cancel(); + stream.emit('error', error); + return; } - stream.emit('status', response.status); + var start_batch = {}; + start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; + start_batch[grpc.opType.RECV_INITIAL_METADATA] = true; + start_batch[grpc.opType.SEND_MESSAGE] = serialize(argument); + start_batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true; + call.startBatch(start_batch, function(err, response) { + if (err) { + throw err; + } + stream.emit('metadata', response.metadata); + }); + var status_batch = {}; + status_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; + call.startBatch(status_batch, function(err, response) { + if (err) { + throw err; + } + stream.emit('status', response.status); + }); }); return stream; } @@ -391,22 +412,29 @@ function makeBidiStreamRequestFunction(method, serialize, deserialize) { metadata = {}; } var stream = new ClientDuplexStream(call, serialize, deserialize); - var start_batch = {}; - start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; - start_batch[grpc.opType.RECV_INITIAL_METADATA] = true; - call.startBatch(start_batch, function(err, response) { - if (err) { - throw err; - } - stream.emit('metadata', response.metadata); - }); - var status_batch = {}; - status_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; - call.startBatch(status_batch, function(err, response) { - if (err) { - throw err; + this.updateMetadata(metadata, function(error, metadata) { + if (error) { + call.cancel(); + stream.emit('error', error); + return; } - stream.emit('status', response.status); + var start_batch = {}; + start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata; + start_batch[grpc.opType.RECV_INITIAL_METADATA] = true; + call.startBatch(start_batch, function(err, response) { + if (err) { + throw err; + } + stream.emit('metadata', response.metadata); + }); + var status_batch = {}; + status_batch[grpc.opType.RECV_STATUS_ON_CLIENT] = true; + call.startBatch(status_batch, function(err, response) { + if (err) { + throw err; + } + stream.emit('status', response.status); + }); }); return stream; } @@ -438,8 +466,17 @@ function makeClientConstructor(service) { * @constructor * @param {string} address The address of the server to connect to * @param {Object} options Options to pass to the underlying channel + * @param {function(Object, function)=} updateMetadata function to update the + * metadata for each request */ - function Client(address, options) { + function Client(address, options, updateMetadata) { + if (updateMetadata) { + this.updateMetadata = updateMetadata; + } else { + this.updateMetadata = function(metadata, callback) { + callback(null, metadata); + }; + } this.channel = new grpc.Channel(address, options); } @@ -458,11 +495,13 @@ function makeClientConstructor(service) { method_type = 'unary'; } } - Client.prototype[decapitalize(method.name)] = - requester_makers[method_type]( - prefix + capitalize(method.name), - common.serializeCls(method.resolvedRequestType.build()), - common.deserializeCls(method.resolvedResponseType.build())); + var serialize = common.serializeCls(method.resolvedRequestType.build()); + var deserialize = common.deserializeCls( + method.resolvedResponseType.build()); + Client.prototype[decapitalize(method.name)] = requester_makers[method_type]( + prefix + capitalize(method.name), serialize, deserialize); + Client.prototype[decapitalize(method.name)].serialize = serialize; + Client.prototype[decapitalize(method.name)].deserialize = deserialize; }); Client.service = service; From 501d9d0811ad5c22db2615e38af9d5c95cb5cfa1 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 18 Feb 2015 15:06:45 -0800 Subject: [PATCH 13/59] Added node auth interop test command --- tools/gce_setup/grpc_docker.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 980a4f6932a..3499735f4ab 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -1020,7 +1020,7 @@ grpc_interop_gen_node_cmd() { echo $the_cmd } -# constructs the full dockerized node interop test cmd. +# constructs the full dockerized node gce=>prod interop test cmd. # # call-seq: # flags= .... # generic flags to include the command @@ -1033,6 +1033,21 @@ grpc_cloud_prod_gen_node_cmd() { echo $the_cmd } +# constructs the full dockerized node service_account auth interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_auth_service_account_creds_gen_node_cmd() { + local cmd_prefix="sudo docker run grpc/node"; + local test_script="/usr/bin/nodejs /var/local/git/grpc/src/node/interop/interop_client.js --use_tls=true"; + local gfe_flags=$(_grpc_prod_gfe_flags); + local env_prefix="SSL_CERT_FILE=/cacerts/roots.pem" + env_prefix+=" GOOGLE_APPLICATION_CREDENTIALS=/service_account/stubbyCloudTestingTest-7dd63462c60c.json" + local the_cmd="$env_prefix $cmd_prefix $test_script $gfe_flags $@"; + echo $the_cmd +} + # constructs the full dockerized cpp interop test cmd. # # call-seq: From c7625b0e5f89575bd74c5ab84962624fce6a7a80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 15:18:58 -0800 Subject: [PATCH 14/59] Move header #include --- include/grpc++/server_context.h | 1 - src/cpp/server/server_context.cc | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index 5b999909b19..d327d8b41e5 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -36,7 +36,6 @@ #include #include -#include #include "config.h" diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 71e3b464d9a..92775c9492a 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -32,6 +32,9 @@ */ #include + +#include + #include #include #include From d24d13d6eb295f263ffca3def45dd6dc4b053ced Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 15:35:32 -0800 Subject: [PATCH 15/59] Simplify TryPluck --- include/grpc++/completion_queue.h | 2 +- src/cpp/common/completion_queue.cc | 20 ++++++++------------ src/cpp/server/server_context.cc | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index 0bfbd5db7c5..0075482d717 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -114,7 +114,7 @@ class CompletionQueue { bool Pluck(CompletionQueueTag *tag); // Does a single polling pluck on tag - void TryPluck(CompletionQueueTag *tag, bool forever); + void TryPluck(CompletionQueueTag *tag); grpc_completion_queue *cq_; // owned }; diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue.cc index 5d186e06cc4..414966c1cdf 100644 --- a/src/cpp/common/completion_queue.cc +++ b/src/cpp/common/completion_queue.cc @@ -77,22 +77,18 @@ bool CompletionQueue::Next(void** tag, bool* ok) { bool CompletionQueue::Pluck(CompletionQueueTag* tag) { std::unique_ptr ev; - for (;;) { - ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_future)); - bool ok = ev->data.op_complete == GRPC_OP_OK; - void* ignored = tag; - if (tag->FinalizeResult(&ignored, &ok)) { - GPR_ASSERT(ignored == tag); - return ok; - } - } + ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_future)); + bool ok = ev->data.op_complete == GRPC_OP_OK; + void* ignored = tag; + GPR_ASSERT(tag->FinalizeResult(&ignored, &ok)); + GPR_ASSERT(ignored == tag); + return ok; } -void CompletionQueue::TryPluck(CompletionQueueTag* tag, bool forever) { +void CompletionQueue::TryPluck(CompletionQueueTag* tag) { std::unique_ptr ev; - ev.reset(grpc_completion_queue_pluck( - cq_, tag, forever ? gpr_inf_future : gpr_inf_past)); + ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_past)); if (!ev) return; bool ok = ev->data.op_complete == GRPC_OP_OK; void* ignored = tag; diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 92775c9492a..1aa18bcac57 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -71,7 +71,7 @@ void ServerContext::CompletionOp::Unref() { } bool ServerContext::CompletionOp::CheckCancelled(CompletionQueue* cq) { - cq->TryPluck(this, false); + cq->TryPluck(this); std::lock_guard g(mu_); return finalized_ ? cancelled_ : false; } From 2627e4e0a917cc438bff186d0bea2bee030ac98a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 15:54:14 -0800 Subject: [PATCH 16/59] Merge with async unary changes --- include/grpc++/async_unary_call.h | 4 ---- src/compiler/cpp_generator.cc | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/grpc++/async_unary_call.h b/include/grpc++/async_unary_call.h index 105250ce9d7..b4a654c4a98 100644 --- a/include/grpc++/async_unary_call.h +++ b/include/grpc++/async_unary_call.h @@ -111,8 +111,6 @@ class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface { if (status.IsOk()) { finish_buf_.AddSendMessage(msg); } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } @@ -124,8 +122,6 @@ class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface { finish_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); ctx_->sent_initial_metadata_ = true; } - bool cancelled = false; - finish_buf_.AddServerRecvClose(&cancelled); finish_buf_.AddServerSendStatus(&ctx_->trailing_metadata_, status); call_.PerformOps(&finish_buf_); } diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index b73b000a1cb..f10824e6b07 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -386,7 +386,7 @@ void PrintSourceClientMethod(google::protobuf::io::Printer *printer, "const $Request$& request, " "::grpc::CompletionQueue* cq, void* tag) {\n"); printer->Print(*vars, - " return new ClientAsyncResponseReader< $Response$>(" + " return new ::grpc::ClientAsyncResponseReader< $Response$>(" "channel(), cq, " "::grpc::RpcMethod($Service$_method_names[$Idx$]), " "context, request, tag);\n" From 897931903ba2781afe0edeed60d3fae3fb8b726e Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Wed, 18 Feb 2015 15:58:01 -0800 Subject: [PATCH 17/59] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab7fc083fde..714a513fc91 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ See grpc/INSTALL for installation instructions for various platforms. #Repository Structure -This repository contains source code for gRPC libraries for multiple lanugages. +This repository contains source code for gRPC libraries for multiple lanugages written on top +of shared C core library [src/core] (src/core). - * C source code: [src/core] (src/core) * C++ source code: [src/cpp] (src/cpp) * Python source code: [src/python] (src/python) * Python source code: [src/ruby] (src/ruby) From 839ed1078e9c94d8a0cc6a72d1208113e169772e Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Wed, 18 Feb 2015 16:06:21 -0800 Subject: [PATCH 18/59] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 714a513fc91..2b049d206bd 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ of shared C core library [src/core] (src/core). * C++ source code: [src/cpp] (src/cpp) * Python source code: [src/python] (src/python) - * Python source code: [src/ruby] (src/ruby) - * Ruby source code: [src/node] (src/node) + * Ruby source code: [src/ruby] (src/ruby) + * NodeJS source code: [src/node] (src/node) * PHP source code: [src/php] (src/php) - * Python source code: [src/csharp] (src/csharp) + * C# source code: [src/csharp] (src/csharp) Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. From 59ea16ff44843aaf4501f361d31af564ee7f2bcf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 16:18:08 -0800 Subject: [PATCH 19/59] Fix a race where an fd can be deleted during polling --- src/core/iomgr/fd_posix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index e3571e8e280..4f52339bc14 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -295,6 +295,8 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, grpc_fd_watcher *watcher) { /* keep track of pollers that have requested our events, in case they change */ + grpc_fd_ref(fd); + gpr_mu_lock(&fd->watcher_mu); watcher->next = &fd->watcher_root; watcher->prev = watcher->next->prev; @@ -312,6 +314,8 @@ void grpc_fd_end_poll(grpc_fd_watcher *watcher) { watcher->next->prev = watcher->prev; watcher->prev->next = watcher->next; gpr_mu_unlock(&watcher->fd->watcher_mu); + + grpc_fd_unref(watcher->fd); } void grpc_fd_become_readable(grpc_fd *fd, int allow_synchronous_callback) { From 9409ad80208b7fe6376c926dc8bf8282d9004a36 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 18 Feb 2015 16:19:56 -0800 Subject: [PATCH 20/59] Adds copyright notices to the GRPCClient files. --- src/objective-c/GRPCClient/GRPCCall.h | 33 +++++++++++++++++++ src/objective-c/GRPCClient/GRPCCall.m | 33 +++++++++++++++++++ src/objective-c/GRPCClient/GRPCMethodName.h | 33 +++++++++++++++++++ src/objective-c/GRPCClient/GRPCMethodName.m | 33 +++++++++++++++++++ .../GRPCClient/private/GRPCChannel.h | 33 +++++++++++++++++++ .../GRPCClient/private/GRPCChannel.m | 33 +++++++++++++++++++ .../GRPCClient/private/GRPCCompletionQueue.h | 33 +++++++++++++++++++ .../GRPCClient/private/GRPCCompletionQueue.m | 33 +++++++++++++++++++ .../GRPCClient/private/GRPCDelegateWrapper.h | 33 +++++++++++++++++++ .../GRPCClient/private/GRPCDelegateWrapper.m | 33 +++++++++++++++++++ .../private/GRPCMethodName+HTTP2Encoding.h | 33 +++++++++++++++++++ .../private/GRPCMethodName+HTTP2Encoding.m | 33 +++++++++++++++++++ .../GRPCClient/private/NSData+GRPC.h | 33 +++++++++++++++++++ .../GRPCClient/private/NSData+GRPC.m | 33 +++++++++++++++++++ .../GRPCClient/private/NSDictionary+GRPC.h | 33 +++++++++++++++++++ .../GRPCClient/private/NSDictionary+GRPC.m | 33 +++++++++++++++++++ .../GRPCClient/private/NSError+GRPC.h | 33 +++++++++++++++++++ .../GRPCClient/private/NSError+GRPC.m | 33 +++++++++++++++++++ 18 files changed, 594 insertions(+) diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index db138fd1ee3..10437cb8bcb 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import #import diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index b9248be5dbc..46a1e232e35 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRPCCall.h" #include diff --git a/src/objective-c/GRPCClient/GRPCMethodName.h b/src/objective-c/GRPCClient/GRPCMethodName.h index 4fb86d20991..a62c4797885 100644 --- a/src/objective-c/GRPCClient/GRPCMethodName.h +++ b/src/objective-c/GRPCClient/GRPCMethodName.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import // See the README file for an introduction to this library. diff --git a/src/objective-c/GRPCClient/GRPCMethodName.m b/src/objective-c/GRPCClient/GRPCMethodName.m index be9fd4b85bc..fbaf24b9f08 100644 --- a/src/objective-c/GRPCClient/GRPCMethodName.m +++ b/src/objective-c/GRPCClient/GRPCMethodName.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRPCMethodName.h" @implementation GRPCMethodName diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h index 8772acc12fb..7442f1fae44 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.h +++ b/src/objective-c/GRPCClient/private/GRPCChannel.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import struct grpc_channel; diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index af4a01ee05d..3e6952cfa38 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRPCChannel.h" #import diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h index 503df94dd49..0a8e397443e 100644 --- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h +++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import struct grpc_completion_queue; diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m index d2508daec42..c81e9a2a988 100644 --- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m +++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRPCCompletionQueue.h" #import diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h index 70a07f817f4..b8a73b12df9 100644 --- a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import @protocol GRXWriteable; diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m index 7c64850d7e8..73a2f51f1b9 100644 --- a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRPCDelegateWrapper.h" #import diff --git a/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h index 504c669f920..05e35bb1a39 100644 --- a/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h +++ b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import #import "GRPCMethodName.h" diff --git a/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m index 2e9fe8d60b1..3fb9af25ec4 100644 --- a/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m +++ b/src/objective-c/GRPCClient/private/GRPCMethodName+HTTP2Encoding.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "GRPCMethodName+HTTP2Encoding.h" @implementation GRPCMethodName (HTTP2Encoding) diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.h b/src/objective-c/GRPCClient/private/NSData+GRPC.h index 8cb7b76ebca..936c2a0e8ae 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.h +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import struct grpc_byte_buffer; diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 47f7a07d7a8..b5f952722cd 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "NSData+GRPC.h" #include diff --git a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h index b717b108e4b..bf0233fd460 100644 --- a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h +++ b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import struct grpc_metadata; diff --git a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m index a24396d3a95..345ff3e1e6d 100644 --- a/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSDictionary+GRPC.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "NSDictionary+GRPC.h" #include diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.h b/src/objective-c/GRPCClient/private/NSError+GRPC.h index 949d1dd819f..b7439fa0673 100644 --- a/src/objective-c/GRPCClient/private/NSError+GRPC.h +++ b/src/objective-c/GRPCClient/private/NSError+GRPC.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import // TODO(jcanizales): Make the domain string public. diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.m b/src/objective-c/GRPCClient/private/NSError+GRPC.m index 73ce112f151..4fc1249efc2 100644 --- a/src/objective-c/GRPCClient/private/NSError+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSError+GRPC.m @@ -1,3 +1,36 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #import "NSError+GRPC.h" #include From 522d7122a8ac44adb4885782287ed73214b9f48d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 19 Feb 2015 01:28:02 +0100 Subject: [PATCH 21/59] Polishing Makefile to better install targets. -) renamed cpp_plugin and ruby_plugin to grpc_cpp_plugin and grpc_ruby_plugin. -) installing plugins. -) install will now run protobuf's installation too. -) adding documentation about installation prefix. --- INSTALL | 5 +++ Makefile | 68 ++++++++++++++++++++++++----------- build.json | 4 +-- templates/Makefile.template | 70 +++++++++++++++---------------------- 4 files changed, 84 insertions(+), 63 deletions(-) diff --git a/INSTALL b/INSTALL index f1e7aa7bf43..2f5f29c788f 100644 --- a/INSTALL +++ b/INSTALL @@ -23,6 +23,11 @@ Building the python wrapper requires the following: # apt-get install python-all-dev python-virtualenv +If you want to install in a different directory than the default /usr/lib, you can +override it on the command line: + + # make install prefix=/opt + ******************************* * More detailled instructions * diff --git a/Makefile b/Makefile index f1fa9dba127..68dd0048978 100644 --- a/Makefile +++ b/Makefile @@ -332,9 +332,9 @@ endif .SECONDARY = %.pb.h %.pb.cc -PROTOC_PLUGINS= $(BINDIR)/$(CONFIG)/cpp_plugin $(BINDIR)/$(CONFIG)/ruby_plugin +PROTOC_PLUGINS = $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(BINDIR)/$(CONFIG)/grpc_ruby_plugin ifeq ($(DEP_MISSING),) -all: static shared +all: static shared plugins dep_error: @echo "You shouldn't see this message - all of your dependencies are correct." else @@ -498,7 +498,7 @@ timeout_encoding_test: $(BINDIR)/$(CONFIG)/timeout_encoding_test transport_metadata_test: $(BINDIR)/$(CONFIG)/transport_metadata_test async_end2end_test: $(BINDIR)/$(CONFIG)/async_end2end_test channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test -cpp_plugin: $(BINDIR)/$(CONFIG)/cpp_plugin +grpc_cpp_plugin: $(BINDIR)/$(CONFIG)/grpc_cpp_plugin credentials_test: $(BINDIR)/$(CONFIG)/credentials_test end2end_test: $(BINDIR)/$(CONFIG)/end2end_test interop_client: $(BINDIR)/$(CONFIG)/interop_client @@ -508,7 +508,7 @@ pubsub_publisher_test: $(BINDIR)/$(CONFIG)/pubsub_publisher_test pubsub_subscriber_test: $(BINDIR)/$(CONFIG)/pubsub_subscriber_test qps_client: $(BINDIR)/$(CONFIG)/qps_client qps_server: $(BINDIR)/$(CONFIG)/qps_server -ruby_plugin: $(BINDIR)/$(CONFIG)/ruby_plugin +grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin status_test: $(BINDIR)/$(CONFIG)/status_test thread_pool_test: $(BINDIR)/$(CONFIG)/thread_pool_test chttp2_fake_security_cancel_after_accept_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test @@ -905,6 +905,8 @@ shared_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) grpc_csharp_ext: shared_csharp +plugins: $(PROTOC_PLUGINS) + privatelibs: privatelibs_c privatelibs_cxx privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_thread_stress.a $(LIBDIR)/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_thread_stress_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read_legacy.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a @@ -1912,7 +1914,7 @@ $(OBJDIR)/$(CONFIG)/%.o : %.cc $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< -install: install_c install_cxx +install: install_c install_cxx install-protobuf install-plugins install_c: install-headers_c install-static_c install-shared_c @@ -1946,6 +1948,8 @@ install-static_cxx: static_cxx strip-static_cxx $(E) "[INSTALL] Installing libgrpc++.a" $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a + + install-shared_c: shared_c strip-shared_c ifeq ($(SYSTEM),MINGW32) $(E) "[INSTALL] Installing gpr.$(SHARED_EXT)" @@ -1986,7 +1990,8 @@ ifneq ($(SYSTEM),Darwin) endif endif -install-shared_cxx: shared_cxx strip-shared_cxx + +install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c ifeq ($(SYSTEM),MINGW32) $(E) "[INSTALL] Installing grpc++.$(SHARED_EXT)" $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(prefix)/lib/grpc++.$(SHARED_EXT) @@ -2004,6 +2009,7 @@ ifneq ($(SYSTEM),Darwin) endif endif + install-shared_csharp: shared_csharp strip-shared_csharp ifeq ($(SYSTEM),MINGW32) $(E) "[INSTALL] Installing grpc_csharp_ext.$(SHARED_EXT)" @@ -2022,7 +2028,29 @@ ifneq ($(SYSTEM),Darwin) endif endif + +install-protobuf: $(PROTOBUF_DEP) +ifneq ($(PROTOBUF_DEP),) + $(E) "[INSTALL] Installing embedded protobufs" + $(Q) $(MAKE) -C third_party/protobuf install prefix=$(prefix) +ifneq ($(SYSTEM),MINGW32) +ifneq ($(SYSTEM),Darwin) + $(Q) ldconfig +endif +endif +endif + +install-plugins: $(PROTOC_PLUGINS) +ifeq ($(SYSTEM),MINGW32) + $(Q) false +else + $(E) "[INSTALL] Installing grpc protoc plugins" + $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(prefix)/bin/grpc_cpp_plugin + $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(prefix)/bin/grpc_ruby_plugin +endif + clean: + $(E) "[CLEAN] Cleaning build directories." $(Q) $(RM) -rf $(OBJDIR) $(LIBDIR) $(BINDIR) $(GENDIR) @@ -7350,35 +7378,35 @@ endif endif -CPP_PLUGIN_SRC = \ +GRPC_CPP_PLUGIN_SRC = \ src/compiler/cpp_generator.cc \ src/compiler/cpp_plugin.cc \ -CPP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CPP_PLUGIN_SRC)))) +GRPC_CPP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_CPP_PLUGIN_SRC)))) ifeq ($(NO_PROTOBUF),true) # You can't build the protoc plugins if you don't have protobuf 3.0.0+. -$(BINDIR)/$(CONFIG)/cpp_plugin: protobuf_dep_error +$(BINDIR)/$(CONFIG)/grpc_cpp_plugin: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/cpp_plugin: $(PROTOBUF_DEP) $(CPP_PLUGIN_OBJS) +$(BINDIR)/$(CONFIG)/grpc_cpp_plugin: $(PROTOBUF_DEP) $(GRPC_CPP_PLUGIN_OBJS) $(E) "[HOSTLD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(CPP_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/cpp_plugin + $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GRPC_CPP_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/grpc_cpp_plugin endif $(OBJDIR)/$(CONFIG)/src/compiler/cpp_generator.o: $(OBJDIR)/$(CONFIG)/src/compiler/cpp_plugin.o: -deps_cpp_plugin: $(CPP_PLUGIN_OBJS:.o=.dep) +deps_grpc_cpp_plugin: $(GRPC_CPP_PLUGIN_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) --include $(CPP_PLUGIN_OBJS:.o=.dep) +-include $(GRPC_CPP_PLUGIN_OBJS:.o=.dep) endif @@ -7677,35 +7705,35 @@ endif endif -RUBY_PLUGIN_SRC = \ +GRPC_RUBY_PLUGIN_SRC = \ src/compiler/ruby_generator.cc \ src/compiler/ruby_plugin.cc \ -RUBY_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(RUBY_PLUGIN_SRC)))) +GRPC_RUBY_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_RUBY_PLUGIN_SRC)))) ifeq ($(NO_PROTOBUF),true) # You can't build the protoc plugins if you don't have protobuf 3.0.0+. -$(BINDIR)/$(CONFIG)/ruby_plugin: protobuf_dep_error +$(BINDIR)/$(CONFIG)/grpc_ruby_plugin: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/ruby_plugin: $(PROTOBUF_DEP) $(RUBY_PLUGIN_OBJS) +$(BINDIR)/$(CONFIG)/grpc_ruby_plugin: $(PROTOBUF_DEP) $(GRPC_RUBY_PLUGIN_OBJS) $(E) "[HOSTLD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(RUBY_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/ruby_plugin + $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GRPC_RUBY_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/grpc_ruby_plugin endif $(OBJDIR)/$(CONFIG)/src/compiler/ruby_generator.o: $(OBJDIR)/$(CONFIG)/src/compiler/ruby_plugin.o: -deps_ruby_plugin: $(RUBY_PLUGIN_OBJS:.o=.dep) +deps_grpc_ruby_plugin: $(GRPC_RUBY_PLUGIN_OBJS:.o=.dep) ifneq ($(NO_DEPS),true) --include $(RUBY_PLUGIN_OBJS:.o=.dep) +-include $(GRPC_RUBY_PLUGIN_OBJS:.o=.dep) endif diff --git a/build.json b/build.json index c552228496d..c7c640d2c21 100644 --- a/build.json +++ b/build.json @@ -1575,7 +1575,7 @@ ] }, { - "name": "cpp_plugin", + "name": "grpc_cpp_plugin", "build": "protoc", "language": "c++", "headers": [ @@ -1747,7 +1747,7 @@ ] }, { - "name": "ruby_plugin", + "name": "grpc_ruby_plugin", "build": "protoc", "language": "c++", "src": [ diff --git a/templates/Makefile.template b/templates/Makefile.template index 178ace6bcf0..79ec95dd138 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -349,7 +349,7 @@ endif .SECONDARY = %.pb.h %.pb.cc -PROTOC_PLUGINS=\ +PROTOC_PLUGINS =\ % for tgt in targets: % if tgt.build == 'protoc': $(BINDIR)/$(CONFIG)/${tgt.name}\ @@ -357,7 +357,7 @@ PROTOC_PLUGINS=\ % endfor ifeq ($(DEP_MISSING),) -all: static shared\ +all: static shared plugins\ % for tgt in targets: % if tgt.build == 'all': $(BINDIR)/$(CONFIG)/${tgt.name}\ @@ -538,6 +538,8 @@ shared_csharp: shared_c \ grpc_csharp_ext: shared_csharp +plugins: $(PROTOC_PLUGINS) + privatelibs: privatelibs_c privatelibs_cxx privatelibs_c: \ @@ -716,7 +718,7 @@ $(OBJDIR)/$(CONFIG)/%.o : %.cc $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< -install: install_c install_cxx +install: install_c install_cxx install-protobuf install-plugins install_c: install-headers_c install-static_c install-shared_c @@ -758,9 +760,9 @@ install-static_cxx: static_cxx strip-static_cxx % endif % endfor -install-shared_c: shared_c strip-shared_c +<%def name="install_shared(lang_filter)">\ % for lib in libs: -% if lib.language == "c": +% if lib.language == lang_filter: % if lib.build == "all": ifeq ($(SYSTEM),MINGW32) $(E) "[INSTALL] Installing ${lib.name}.$(SHARED_EXT)" @@ -781,56 +783,42 @@ ifneq ($(SYSTEM),Darwin) $(Q) ldconfig endif endif + -install-shared_cxx: shared_cxx strip-shared_cxx -% for lib in libs: -% if lib.language == "c++": -% if lib.build == "all": -ifeq ($(SYSTEM),MINGW32) - $(E) "[INSTALL] Installing ${lib.name}.$(SHARED_EXT)" - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/${lib.name}.$(SHARED_EXT) $(prefix)/lib/${lib.name}.$(SHARED_EXT) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a -else - $(E) "[INSTALL] Installing lib${lib.name}.$(SHARED_EXT)" - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so -endif -endif -% endif -% endif -% endfor +install-shared_c: shared_c strip-shared_c +${install_shared("c")} + +install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c +${install_shared("c++")} + +install-shared_csharp: shared_csharp strip-shared_csharp +${install_shared("csharp")} + +install-protobuf: $(PROTOBUF_DEP) +ifneq ($(PROTOBUF_DEP),) + $(E) "[INSTALL] Installing embedded protobufs" + $(Q) $(MAKE) -C third_party/protobuf install prefix=$(prefix) ifneq ($(SYSTEM),MINGW32) ifneq ($(SYSTEM),Darwin) $(Q) ldconfig endif endif +endif -install-shared_csharp: shared_csharp strip-shared_csharp -% for lib in libs: -% if lib.language == "csharp": -% if lib.build == "all": +install-plugins: $(PROTOC_PLUGINS) ifeq ($(SYSTEM),MINGW32) - $(E) "[INSTALL] Installing ${lib.name}.$(SHARED_EXT)" - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/${lib.name}.$(SHARED_EXT) $(prefix)/lib/${lib.name}.$(SHARED_EXT) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a + $(Q) false else - $(E) "[INSTALL] Installing lib${lib.name}.$(SHARED_EXT)" - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so -endif -endif -% endif + $(E) "[INSTALL] Installing grpc protoc plugins" +% for tgt in targets: +% if tgt.build == 'protoc': + $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/${tgt.name} $(prefix)/bin/${tgt.name} % endif % endfor -ifneq ($(SYSTEM),MINGW32) -ifneq ($(SYSTEM),Darwin) - $(Q) ldconfig -endif endif clean: + $(E) "[CLEAN] Cleaning build directories." $(Q) $(RM) -rf $(OBJDIR) $(LIBDIR) $(BINDIR) $(GENDIR) From bdc8baf4fc76baef38fb572e51755bd4e60aa349 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 18 Feb 2015 17:06:34 -0800 Subject: [PATCH 22/59] Added comment about where Google credentials come from --- src/node/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node/index.js b/src/node/index.js index f7cbdf004e2..1bef2072dde 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -75,7 +75,8 @@ function load(filename) { /** * Get a function that a client can use to update metadata with authentication - * information from a Google Auth credential object. + * information from a Google Auth credential object, which comes from the + * googleauth library. * @param {Object} credential The credential object to use * @return {function(Object, callback)} Metadata updater function */ From 43a2b176f1825151a379cb171896f134580ae4c4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Feb 2015 17:17:51 -0800 Subject: [PATCH 23/59] Fix a TSAN reported race I think this was the frequent crash in uds_cancel_after_invoke. The race happens because a channel is deleted concurrently with an address being resolved (and UDS gets the resolution fast enough for this to actually happen). The fix is to guarantee no callbacks will be made after cancel has been called (which was the original guaranteee that got lost somewhere). --- src/core/channel/client_setup.c | 29 ++++++++++++++++++++++++ src/core/channel/client_setup.h | 6 +++++ src/core/surface/channel_create.c | 5 +++- src/core/surface/secure_channel_create.c | 5 +++- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/core/channel/client_setup.c b/src/core/channel/client_setup.c index bb6d3638074..6d892d6c924 100644 --- a/src/core/channel/client_setup.c +++ b/src/core/channel/client_setup.c @@ -49,8 +49,11 @@ struct grpc_client_setup { grpc_alarm backoff_alarm; gpr_timespec current_backoff_interval; int in_alarm; + int in_cb; + int cancelled; gpr_mu mu; + gpr_cv cv; grpc_client_setup_request *active_request; int refs; }; @@ -67,6 +70,7 @@ gpr_timespec grpc_client_setup_request_deadline(grpc_client_setup_request *r) { static void destroy_setup(grpc_client_setup *s) { gpr_mu_destroy(&s->mu); + gpr_cv_destroy(&s->cv); s->done(s->user_data); grpc_channel_args_destroy(s->args); gpr_free(s); @@ -111,6 +115,10 @@ static void setup_cancel(grpc_transport_setup *sp) { int cancel_alarm = 0; gpr_mu_lock(&s->mu); + s->cancelled = 1; + while (s->in_cb) { + gpr_cv_wait(&s->cv, &s->mu, gpr_inf_future); + } GPR_ASSERT(s->refs > 0); /* effectively cancels the current request (if any) */ @@ -129,6 +137,24 @@ static void setup_cancel(grpc_transport_setup *sp) { } } +int grpc_client_setup_cb_begin(grpc_client_setup_request *r) { + gpr_mu_lock(&r->setup->mu); + if (r->setup->cancelled) { + gpr_mu_unlock(&r->setup->mu); + return 0; + } + r->setup->in_cb++; + gpr_mu_unlock(&r->setup->mu); + return 1; +} + +void grpc_client_setup_cb_end(grpc_client_setup_request *r) { + gpr_mu_lock(&r->setup->mu); + r->setup->in_cb--; + if (r->setup->cancelled) gpr_cv_signal(&r->setup->cv); + gpr_mu_unlock(&r->setup->mu); +} + /* vtable for transport setup */ static const grpc_transport_setup_vtable setup_vtable = {setup_initiate, setup_cancel}; @@ -142,6 +168,7 @@ void grpc_client_setup_create_and_attach( s->base.vtable = &setup_vtable; gpr_mu_init(&s->mu); + gpr_cv_init(&s->cv); s->refs = 1; s->mdctx = mdctx; s->initiate = initiate; @@ -151,6 +178,8 @@ void grpc_client_setup_create_and_attach( s->args = grpc_channel_args_copy(args); s->current_backoff_interval = gpr_time_from_micros(1000000); s->in_alarm = 0; + s->in_cb = 0; + s->cancelled = 0; grpc_client_channel_set_transport_setup(newly_minted_channel, &s->base); } diff --git a/src/core/channel/client_setup.h b/src/core/channel/client_setup.h index 6ac3fe62f19..f2b64265bc3 100644 --- a/src/core/channel/client_setup.h +++ b/src/core/channel/client_setup.h @@ -58,6 +58,12 @@ void grpc_client_setup_request_finish(grpc_client_setup_request *r, const grpc_channel_args *grpc_client_setup_get_channel_args( grpc_client_setup_request *r); +/* Call before calling back into the setup listener, and call only if + this function returns 1. If it returns 1, also promise to call + grpc_client_setup_cb_end */ +int grpc_client_setup_cb_begin(grpc_client_setup_request *r); +void grpc_client_setup_cb_end(grpc_client_setup_request *r); + /* Get the deadline for a request passed in to initiate. Implementations should make a best effort to honor this deadline. */ gpr_timespec grpc_client_setup_request_deadline(grpc_client_setup_request *r); diff --git a/src/core/surface/channel_create.c b/src/core/surface/channel_create.c index 7a5f62ed53e..3104b1d00d5 100644 --- a/src/core/surface/channel_create.c +++ b/src/core/surface/channel_create.c @@ -107,13 +107,16 @@ static void on_connect(void *rp, grpc_endpoint *tcp) { } else { return; } - } else { + } else if (grpc_client_setup_cb_begin(r->cs_request)) { grpc_create_chttp2_transport( r->setup->setup_callback, r->setup->setup_user_data, grpc_client_setup_get_channel_args(r->cs_request), tcp, NULL, 0, grpc_client_setup_get_mdctx(r->cs_request), 1); + grpc_client_setup_cb_end(r->cs_request); done(r, 1); return; + } else { + done(r, 0); } } diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c index c6968f4b24b..8e56868d420 100644 --- a/src/core/surface/secure_channel_create.c +++ b/src/core/surface/secure_channel_create.c @@ -97,12 +97,15 @@ static void on_secure_transport_setup_done(void *rp, if (status != GRPC_SECURITY_OK) { gpr_log(GPR_ERROR, "Secure transport setup failed with error %d.", status); done(r, 0); - } else { + } else if (grpc_client_setup_cb_begin(r->cs_request)) { grpc_create_chttp2_transport( r->setup->setup_callback, r->setup->setup_user_data, grpc_client_setup_get_channel_args(r->cs_request), secure_endpoint, NULL, 0, grpc_client_setup_get_mdctx(r->cs_request), 1); + grpc_client_setup_cb_end(r->cs_request); done(r, 1); + } else { + done(r, 0); } } From 90bd7c4c4daec7cc777439ba69688e995b01889f Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Wed, 18 Feb 2015 18:51:16 -0800 Subject: [PATCH 24/59] Fixing sprintf and a few other things. --- src/core/security/credentials.c | 6 ++++++ src/core/security/json_token.c | 9 ++++----- test/core/security/fetch_oauth2.c | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index 60e82d9dfae..a21c27bff94 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -336,6 +336,12 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( grpc_credentials_status status = GRPC_CREDENTIALS_OK; grpc_json *json = NULL; + if (response == NULL) { + gpr_log(GPR_ERROR, "Received NULL response."); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + if (response->body_length > 0) { null_terminated_body = gpr_malloc(response->body_length + 1); null_terminated_body[response->body_length] = '\0'; diff --git a/src/core/security/json_token.c b/src/core/security/json_token.c index c85b0cd8475..20d62e2b438 100644 --- a/src/core/security/json_token.c +++ b/src/core/security/json_token.c @@ -206,15 +206,14 @@ static char *encoded_jwt_claim(const grpc_auth_json_key *json_key, char *result = NULL; gpr_timespec now = gpr_now(); gpr_timespec expiration = gpr_time_add(now, token_lifetime); - /* log10(2^64) ~= 20 */ - char now_str[24]; - char expiration_str[24]; + char now_str[GPR_LTOA_MIN_BUFSIZE]; + char expiration_str[GPR_LTOA_MIN_BUFSIZE]; if (gpr_time_cmp(token_lifetime, grpc_max_auth_token_lifetime) > 0) { gpr_log(GPR_INFO, "Cropping token lifetime to maximum allowed value."); expiration = gpr_time_add(now, grpc_max_auth_token_lifetime); } - sprintf(now_str, "%ld", now.tv_sec); - sprintf(expiration_str, "%ld", expiration.tv_sec); + gpr_ltoa(now.tv_sec, now_str); + gpr_ltoa(expiration.tv_sec, expiration_str); child = create_child(NULL, json, "iss", json_key->client_email, GRPC_JSON_STRING); diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 369c34a5a5a..63150874489 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -95,7 +95,7 @@ static grpc_credentials *create_service_account_creds( break; } current += bytes_read; - } while (sizeof(json_key) > (current - json_key)); + } while (sizeof(json_key) > (size_t)(current - json_key)); if ((current - json_key) == sizeof(json_key)) { gpr_log(GPR_ERROR, "Json key file %s exceeds size limit (%d bytes).", From 20d6c1aa2ac95a1415620398266199c85fd21e90 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 18 Feb 2015 22:01:22 -0800 Subject: [PATCH 25/59] Do not need a Mac-specific CPU header yet as there are no CPU-specific features in use yet --- src/core/support/cpu_posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/support/cpu_posix.c b/src/core/support/cpu_posix.c index 91f722530ca..91ce80c364e 100644 --- a/src/core/support/cpu_posix.c +++ b/src/core/support/cpu_posix.c @@ -35,8 +35,6 @@ #ifdef GPR_CPU_POSIX -#include "src/core/support/cpu.h" - #include #include #include From cad5f0a44859e27736bfb4ce5fc374781c54bbc1 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 18 Feb 2015 22:02:52 -0800 Subject: [PATCH 26/59] Some compilers expect class SyncRequest to be declared fully and not just forward-declared before the constructor for Server because this is needed to manage exception handling for the class std::list that is templated on SyncRequest --- src/cpp/server/server.cc | 156 +++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index da98cf5ce0d..0d0d38a1151 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -49,84 +49,6 @@ namespace grpc { -Server::Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned, - ServerCredentials* creds) - : started_(false), - shutdown_(false), - num_running_cb_(0), - thread_pool_(thread_pool), - thread_pool_owned_(thread_pool_owned), - secure_(creds != nullptr) { - if (creds) { - server_ = - grpc_secure_server_create(creds->GetRawCreds(), cq_.cq(), nullptr); - } else { - server_ = grpc_server_create(cq_.cq(), nullptr); - } -} - -Server::Server() { - // Should not be called. - GPR_ASSERT(false); -} - -Server::~Server() { - std::unique_lock lock(mu_); - if (started_ && !shutdown_) { - lock.unlock(); - Shutdown(); - } else { - lock.unlock(); - } - grpc_server_destroy(server_); - if (thread_pool_owned_) { - delete thread_pool_; - } -} - -bool Server::RegisterService(RpcService* service) { - for (int i = 0; i < service->GetMethodCount(); ++i) { - RpcServiceMethod* method = service->GetMethod(i); - void* tag = - grpc_server_register_method(server_, method->name(), nullptr, cq_.cq()); - if (!tag) { - gpr_log(GPR_DEBUG, "Attempt to register %s multiple times", - method->name()); - return false; - } - sync_methods_.emplace_back(method, tag); - } - return true; -} - -bool Server::RegisterAsyncService(AsynchronousService* service) { - GPR_ASSERT(service->dispatch_impl_ == nullptr && - "Can only register an asynchronous service against one server."); - service->dispatch_impl_ = this; - service->request_args_ = new void* [service->method_count_]; - for (size_t i = 0; i < service->method_count_; ++i) { - void* tag = - grpc_server_register_method(server_, service->method_names_[i], nullptr, - service->completion_queue()->cq()); - if (!tag) { - gpr_log(GPR_DEBUG, "Attempt to register %s multiple times", - service->method_names_[i]); - return false; - } - service->request_args_[i] = tag; - } - return true; -} - -int Server::AddPort(const grpc::string& addr) { - GPR_ASSERT(!started_); - if (secure_) { - return grpc_server_add_secure_http2_port(server_, addr.c_str()); - } else { - return grpc_server_add_http2_port(server_, addr.c_str()); - } -} - class Server::SyncRequest final : public CompletionQueueTag { public: SyncRequest(RpcServiceMethod* method, void* tag) @@ -243,6 +165,84 @@ class Server::SyncRequest final : public CompletionQueueTag { grpc_completion_queue* cq_; }; +Server::Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned, + ServerCredentials* creds) + : started_(false), + shutdown_(false), + num_running_cb_(0), + thread_pool_(thread_pool), + thread_pool_owned_(thread_pool_owned), + secure_(creds != nullptr) { + if (creds) { + server_ = + grpc_secure_server_create(creds->GetRawCreds(), cq_.cq(), nullptr); + } else { + server_ = grpc_server_create(cq_.cq(), nullptr); + } +} + +Server::Server() { + // Should not be called. + GPR_ASSERT(false); +} + +Server::~Server() { + std::unique_lock lock(mu_); + if (started_ && !shutdown_) { + lock.unlock(); + Shutdown(); + } else { + lock.unlock(); + } + grpc_server_destroy(server_); + if (thread_pool_owned_) { + delete thread_pool_; + } +} + +bool Server::RegisterService(RpcService* service) { + for (int i = 0; i < service->GetMethodCount(); ++i) { + RpcServiceMethod* method = service->GetMethod(i); + void* tag = + grpc_server_register_method(server_, method->name(), nullptr, cq_.cq()); + if (!tag) { + gpr_log(GPR_DEBUG, "Attempt to register %s multiple times", + method->name()); + return false; + } + sync_methods_.emplace_back(method, tag); + } + return true; +} + +bool Server::RegisterAsyncService(AsynchronousService* service) { + GPR_ASSERT(service->dispatch_impl_ == nullptr && + "Can only register an asynchronous service against one server."); + service->dispatch_impl_ = this; + service->request_args_ = new void* [service->method_count_]; + for (size_t i = 0; i < service->method_count_; ++i) { + void* tag = + grpc_server_register_method(server_, service->method_names_[i], nullptr, + service->completion_queue()->cq()); + if (!tag) { + gpr_log(GPR_DEBUG, "Attempt to register %s multiple times", + service->method_names_[i]); + return false; + } + service->request_args_[i] = tag; + } + return true; +} + +int Server::AddPort(const grpc::string& addr) { + GPR_ASSERT(!started_); + if (secure_) { + return grpc_server_add_secure_http2_port(server_, addr.c_str()); + } else { + return grpc_server_add_http2_port(server_, addr.c_str()); + } +} + bool Server::Start() { GPR_ASSERT(!started_); started_ = true; From c1231eb543d0805cf91b9628a2dfd059990fd079 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 18 Feb 2015 22:15:14 -0800 Subject: [PATCH 27/59] Include typecasts so that int and size_t are not compared (since their signs don't match) --- test/cpp/client/channel_arguments_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/cpp/client/channel_arguments_test.cc b/test/cpp/client/channel_arguments_test.cc index d98b38ab68f..01c56cb795f 100644 --- a/test/cpp/client/channel_arguments_test.cc +++ b/test/cpp/client/channel_arguments_test.cc @@ -52,14 +52,14 @@ TEST_F(ChannelArgumentsTest, SetInt) { ChannelArguments channel_args; // Empty arguments. SetChannelArgs(channel_args, &args); - EXPECT_EQ(0, args.num_args); + EXPECT_EQ(static_cast(0), args.num_args); grpc::string key("key0"); channel_args.SetInt(key, 0); // Clear key early to make sure channel_args takes a copy key = ""; SetChannelArgs(channel_args, &args); - EXPECT_EQ(1, args.num_args); + EXPECT_EQ(static_cast(1), args.num_args); EXPECT_EQ(GRPC_ARG_INTEGER, args.args[0].type); EXPECT_STREQ("key0", args.args[0].key); EXPECT_EQ(0, args.args[0].value.integer); @@ -68,7 +68,7 @@ TEST_F(ChannelArgumentsTest, SetInt) { channel_args.SetInt(key, 1); key = ""; SetChannelArgs(channel_args, &args); - EXPECT_EQ(2, args.num_args); + EXPECT_EQ(static_cast(2), args.num_args); // We do not enforce order on the arguments. for (size_t i = 0; i < args.num_args; i++) { EXPECT_EQ(GRPC_ARG_INTEGER, args.args[i].type); @@ -85,7 +85,7 @@ TEST_F(ChannelArgumentsTest, SetString) { ChannelArguments channel_args; // Empty arguments. SetChannelArgs(channel_args, &args); - EXPECT_EQ(0, args.num_args); + EXPECT_EQ(static_cast(0), args.num_args); grpc::string key("key0"); grpc::string val("val0"); @@ -94,7 +94,7 @@ TEST_F(ChannelArgumentsTest, SetString) { key = ""; val = ""; SetChannelArgs(channel_args, &args); - EXPECT_EQ(1, args.num_args); + EXPECT_EQ(static_cast(1), args.num_args); EXPECT_EQ(GRPC_ARG_STRING, args.args[0].type); EXPECT_STREQ("key0", args.args[0].key); EXPECT_STREQ("val0", args.args[0].value.string); @@ -103,7 +103,7 @@ TEST_F(ChannelArgumentsTest, SetString) { val = "val1"; channel_args.SetString(key, val); SetChannelArgs(channel_args, &args); - EXPECT_EQ(2, args.num_args); + EXPECT_EQ(static_cast(2), args.num_args); // We do not enforce order on the arguments. for (size_t i = 0; i < args.num_args; i++) { EXPECT_EQ(GRPC_ARG_STRING, args.args[i].type); From d5577aac67b5bdf7603730b3238ece76003589f7 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 18 Feb 2015 22:26:48 -0800 Subject: [PATCH 28/59] More typecasts to avoid sign-comparison problems on EXPECT_EQ --- test/cpp/end2end/async_end2end_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index fe312896614..58df9476671 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -354,7 +354,7 @@ TEST_F(AsyncEnd2endTest, ClientInitialMetadataRpc) { auto client_initial_metadata = srv_ctx.client_metadata(); EXPECT_EQ(meta1.second, client_initial_metadata.find(meta1.first)->second); EXPECT_EQ(meta2.second, client_initial_metadata.find(meta2.first)->second); - EXPECT_EQ(2, client_initial_metadata.size()); + EXPECT_EQ(static_cast(2), client_initial_metadata.size()); client_ok(1); send_response.set_message(recv_request.message()); @@ -404,7 +404,7 @@ TEST_F(AsyncEnd2endTest, ServerInitialMetadataRpc) { auto server_initial_metadata = cli_ctx.GetServerInitialMetadata(); EXPECT_EQ(meta1.second, server_initial_metadata.find(meta1.first)->second); EXPECT_EQ(meta2.second, server_initial_metadata.find(meta2.first)->second); - EXPECT_EQ(2, server_initial_metadata.size()); + EXPECT_EQ(static_cast(2), server_initial_metadata.size()); send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(5)); @@ -460,7 +460,7 @@ TEST_F(AsyncEnd2endTest, ServerTrailingMetadataRpc) { auto server_trailing_metadata = cli_ctx.GetServerTrailingMetadata(); EXPECT_EQ(meta1.second, server_trailing_metadata.find(meta1.first)->second); EXPECT_EQ(meta2.second, server_trailing_metadata.find(meta2.first)->second); - EXPECT_EQ(2, server_trailing_metadata.size()); + EXPECT_EQ(static_cast(2), server_trailing_metadata.size()); } TEST_F(AsyncEnd2endTest, MetadataRpc) { @@ -500,7 +500,7 @@ TEST_F(AsyncEnd2endTest, MetadataRpc) { auto client_initial_metadata = srv_ctx.client_metadata(); EXPECT_EQ(meta1.second, client_initial_metadata.find(meta1.first)->second); EXPECT_EQ(meta2.second, client_initial_metadata.find(meta2.first)->second); - EXPECT_EQ(2, client_initial_metadata.size()); + EXPECT_EQ(static_cast(2), client_initial_metadata.size()); client_ok(1); srv_ctx.AddInitialMetadata(meta3.first, meta3.second); @@ -512,7 +512,7 @@ TEST_F(AsyncEnd2endTest, MetadataRpc) { auto server_initial_metadata = cli_ctx.GetServerInitialMetadata(); EXPECT_EQ(meta3.second, server_initial_metadata.find(meta3.first)->second); EXPECT_EQ(meta4.second, server_initial_metadata.find(meta4.first)->second); - EXPECT_EQ(2, server_initial_metadata.size()); + EXPECT_EQ(static_cast(2), server_initial_metadata.size()); send_response.set_message(recv_request.message()); srv_ctx.AddTrailingMetadata(meta5.first, meta5.second); @@ -529,7 +529,7 @@ TEST_F(AsyncEnd2endTest, MetadataRpc) { auto server_trailing_metadata = cli_ctx.GetServerTrailingMetadata(); EXPECT_EQ(meta5.second, server_trailing_metadata.find(meta5.first)->second); EXPECT_EQ(meta6.second, server_trailing_metadata.find(meta6.first)->second); - EXPECT_EQ(2, server_trailing_metadata.size()); + EXPECT_EQ(static_cast(2), server_trailing_metadata.size()); } } // namespace } // namespace testing From 1fbaad110fb927f7bc074e004e9dd0c6c58673c1 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 19 Feb 2015 07:32:33 +0000 Subject: [PATCH 29/59] Rename base/interfaces_test to base/interfaces_test_case. With this change the Python codebase now conforms to an "if it ends with _test.py then it is an executable test" rule. --- .../base/{interfaces_test.py => interfaces_test_case.py} | 0 .../src/grpc/framework/base/packets/implementations_test.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/python/src/grpc/framework/base/{interfaces_test.py => interfaces_test_case.py} (100%) diff --git a/src/python/src/grpc/framework/base/interfaces_test.py b/src/python/src/grpc/framework/base/interfaces_test_case.py similarity index 100% rename from src/python/src/grpc/framework/base/interfaces_test.py rename to src/python/src/grpc/framework/base/interfaces_test_case.py diff --git a/src/python/src/grpc/framework/base/packets/implementations_test.py b/src/python/src/grpc/framework/base/packets/implementations_test.py index 628f4b39094..e5855700c72 100644 --- a/src/python/src/grpc/framework/base/packets/implementations_test.py +++ b/src/python/src/grpc/framework/base/packets/implementations_test.py @@ -31,7 +31,7 @@ import unittest -from grpc.framework.base import interfaces_test +from grpc.framework.base import interfaces_test_case from grpc.framework.base import util from grpc.framework.base.packets import implementations from grpc.framework.foundation import logging_pool @@ -42,7 +42,7 @@ MAXIMUM_TIMEOUT = 60 class ImplementationsTest( - interfaces_test.FrontAndBackTest, unittest.TestCase): + interfaces_test_case.FrontAndBackTest, unittest.TestCase): def setUp(self): self.memory_transmission_pool = logging_pool.pool(POOL_MAX_WORKERS) @@ -53,7 +53,7 @@ class ImplementationsTest( self.back_transmission_pool = logging_pool.pool(POOL_MAX_WORKERS) self.back_utility_pool = logging_pool.pool(POOL_MAX_WORKERS) self.test_pool = logging_pool.pool(POOL_MAX_WORKERS) - self.test_servicer = interfaces_test.TestServicer(self.test_pool) + self.test_servicer = interfaces_test_case.TestServicer(self.test_pool) self.front = implementations.front( self.front_work_pool, self.front_transmission_pool, self.front_utility_pool) From a5baf18983b7966f1757063e0f635dac6e9e226b Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 18 Feb 2015 23:40:00 -0800 Subject: [PATCH 30/59] One-line fix for namespace bug --- src/compiler/cpp_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index b73b000a1cb..f10824e6b07 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -386,7 +386,7 @@ void PrintSourceClientMethod(google::protobuf::io::Printer *printer, "const $Request$& request, " "::grpc::CompletionQueue* cq, void* tag) {\n"); printer->Print(*vars, - " return new ClientAsyncResponseReader< $Response$>(" + " return new ::grpc::ClientAsyncResponseReader< $Response$>(" "channel(), cq, " "::grpc::RpcMethod($Service$_method_names[$Idx$]), " "context, request, tag);\n" From 3e2ebff8335ecf4db11a10f4cf415f7b29ebe2e0 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 19 Feb 2015 10:02:01 +0000 Subject: [PATCH 31/59] Python early_adopter changes in anticipation of interop client. --- src/python/interop/interop/methods.py | 79 ++++++--- src/python/interop/interop/server.py | 17 +- .../src/grpc/early_adopter/_face_utilities.py | 107 ++++++++----- .../src/grpc/early_adopter/implementations.py | 10 +- .../src/grpc/early_adopter/interfaces.py | 41 +++-- .../src/grpc/early_adopter/utilities.py | 150 ++++++++++++------ 6 files changed, 261 insertions(+), 143 deletions(-) diff --git a/src/python/interop/interop/methods.py b/src/python/interop/interop/methods.py index 854dbec8cc3..26c1869f93e 100644 --- a/src/python/interop/interop/methods.py +++ b/src/python/interop/interop/methods.py @@ -37,9 +37,11 @@ from interop import messages_pb2 def _empty_call(request): return empty_pb2.Empty() -EMPTY_CALL = utilities.unary_unary_rpc_method( - _empty_call, empty_pb2.Empty.SerializeToString, empty_pb2.Empty.FromString, +_CLIENT_EMPTY_CALL = utilities.unary_unary_client_rpc_method( empty_pb2.Empty.SerializeToString, empty_pb2.Empty.FromString) +_SERVER_EMPTY_CALL = utilities.unary_unary_server_rpc_method( + _empty_call, empty_pb2.Empty.FromString, + empty_pb2.Empty.SerializeToString) def _unary_call(request): @@ -48,11 +50,12 @@ def _unary_call(request): type=messages_pb2.COMPRESSABLE, body=b'\x00' * request.response_size)) -UNARY_CALL = utilities.unary_unary_rpc_method( - _unary_call, messages_pb2.SimpleRequest.SerializeToString, - messages_pb2.SimpleRequest.FromString, - messages_pb2.SimpleResponse.SerializeToString, +_CLIENT_UNARY_CALL = utilities.unary_unary_client_rpc_method( + messages_pb2.SimpleRequest.SerializeToString, messages_pb2.SimpleResponse.FromString) +_SERVER_UNARY_CALL = utilities.unary_unary_server_rpc_method( + _unary_call, messages_pb2.SimpleRequest.FromString, + messages_pb2.SimpleResponse.SerializeToString) def _streaming_output_call(request): @@ -62,12 +65,13 @@ def _streaming_output_call(request): type=request.response_type, body=b'\x00' * response_parameters.size)) -STREAMING_OUTPUT_CALL = utilities.unary_stream_rpc_method( - _streaming_output_call, +_CLIENT_STREAMING_OUTPUT_CALL = utilities.unary_stream_client_rpc_method( messages_pb2.StreamingOutputCallRequest.SerializeToString, - messages_pb2.StreamingOutputCallRequest.FromString, - messages_pb2.StreamingOutputCallResponse.SerializeToString, messages_pb2.StreamingOutputCallResponse.FromString) +_SERVER_STREAMING_OUTPUT_CALL = utilities.unary_stream_server_rpc_method( + _streaming_output_call, + messages_pb2.StreamingOutputCallRequest.FromString, + messages_pb2.StreamingOutputCallResponse.SerializeToString) def _streaming_input_call(request_iterator): @@ -78,12 +82,13 @@ def _streaming_input_call(request_iterator): return messages_pb2.StreamingInputCallResponse( aggregated_payload_size=aggregate_size) -STREAMING_INPUT_CALL = utilities.stream_unary_rpc_method( - _streaming_input_call, +_CLIENT_STREAMING_INPUT_CALL = utilities.stream_unary_client_rpc_method( messages_pb2.StreamingInputCallRequest.SerializeToString, - messages_pb2.StreamingInputCallRequest.FromString, - messages_pb2.StreamingInputCallResponse.SerializeToString, messages_pb2.StreamingInputCallResponse.FromString) +_SERVER_STREAMING_INPUT_CALL = utilities.stream_unary_server_rpc_method( + _streaming_input_call, + messages_pb2.StreamingInputCallRequest.FromString, + messages_pb2.StreamingInputCallResponse.SerializeToString) def _full_duplex_call(request_iterator): @@ -93,17 +98,47 @@ def _full_duplex_call(request_iterator): type=request.payload.type, body=b'\x00' * request.response_parameters[0].size)) -FULL_DUPLEX_CALL = utilities.stream_stream_rpc_method( - _full_duplex_call, +_CLIENT_FULL_DUPLEX_CALL = utilities.stream_stream_client_rpc_method( messages_pb2.StreamingOutputCallRequest.SerializeToString, - messages_pb2.StreamingOutputCallRequest.FromString, - messages_pb2.StreamingOutputCallResponse.SerializeToString, messages_pb2.StreamingOutputCallResponse.FromString) +_SERVER_FULL_DUPLEX_CALL = utilities.stream_stream_server_rpc_method( + _full_duplex_call, + messages_pb2.StreamingOutputCallRequest.FromString, + messages_pb2.StreamingOutputCallResponse.SerializeToString) # NOTE(nathaniel): Apparently this is the same as the full-duplex call? -HALF_DUPLEX_CALL = utilities.stream_stream_rpc_method( - _full_duplex_call, +_CLIENT_HALF_DUPLEX_CALL = utilities.stream_stream_client_rpc_method( messages_pb2.StreamingOutputCallRequest.SerializeToString, - messages_pb2.StreamingOutputCallRequest.FromString, - messages_pb2.StreamingOutputCallResponse.SerializeToString, messages_pb2.StreamingOutputCallResponse.FromString) +_SERVER_HALF_DUPLEX_CALL = utilities.stream_stream_server_rpc_method( + _full_duplex_call, + messages_pb2.StreamingOutputCallRequest.FromString, + messages_pb2.StreamingOutputCallResponse.SerializeToString) + + +_SERVICE_NAME = '/grpc.testing.TestService' + +EMPTY_CALL_METHOD_NAME = _SERVICE_NAME + '/EmptyCall' +UNARY_CALL_METHOD_NAME = _SERVICE_NAME + '/UnaryCall' +STREAMING_OUTPUT_CALL_METHOD_NAME = _SERVICE_NAME + '/StreamingOutputCall' +STREAMING_INPUT_CALL_METHOD_NAME = _SERVICE_NAME + '/StreamingInputCall' +FULL_DUPLEX_CALL_METHOD_NAME = _SERVICE_NAME + '/FullDuplexCall' +HALF_DUPLEX_CALL_METHOD_NAME = _SERVICE_NAME + '/HalfDuplexCall' + +CLIENT_METHODS = { + EMPTY_CALL_METHOD_NAME: _CLIENT_EMPTY_CALL, + UNARY_CALL_METHOD_NAME: _CLIENT_UNARY_CALL, + STREAMING_OUTPUT_CALL_METHOD_NAME: _CLIENT_STREAMING_OUTPUT_CALL, + STREAMING_INPUT_CALL_METHOD_NAME: _CLIENT_STREAMING_INPUT_CALL, + FULL_DUPLEX_CALL_METHOD_NAME: _CLIENT_FULL_DUPLEX_CALL, + HALF_DUPLEX_CALL_METHOD_NAME: _CLIENT_HALF_DUPLEX_CALL, +} + +SERVER_METHODS = { + EMPTY_CALL_METHOD_NAME: _SERVER_EMPTY_CALL, + UNARY_CALL_METHOD_NAME: _SERVER_UNARY_CALL, + STREAMING_OUTPUT_CALL_METHOD_NAME: _SERVER_STREAMING_OUTPUT_CALL, + STREAMING_INPUT_CALL_METHOD_NAME: _SERVER_STREAMING_INPUT_CALL, + FULL_DUPLEX_CALL_METHOD_NAME: _SERVER_FULL_DUPLEX_CALL, + HALF_DUPLEX_CALL_METHOD_NAME: _SERVER_HALF_DUPLEX_CALL, +} diff --git a/src/python/interop/interop/server.py b/src/python/interop/interop/server.py index 0035e062a4e..785d482fe59 100644 --- a/src/python/interop/interop/server.py +++ b/src/python/interop/interop/server.py @@ -43,19 +43,6 @@ _ONE_DAY_IN_SECONDS = 60 * 60 * 24 _PRIVATE_KEY_RESOURCE_PATH = 'credentials/server1.key' _CERTIFICATE_CHAIN_RESOURCE_PATH = 'credentials/server1.pem' -_METHODS = { - '/grpc.testing.TestService/EmptyCall': methods.EMPTY_CALL, - '/grpc.testing.TestService/UnaryCall': methods.UNARY_CALL, - '/grpc.testing.TestService/StreamingOutputCall': - methods.STREAMING_OUTPUT_CALL, - '/grpc.testing.TestService/StreamingInputCall': - methods.STREAMING_INPUT_CALL, - '/grpc.testing.TestService/FullDuplexCall': - methods.FULL_DUPLEX_CALL, - '/grpc.testing.TestService/HalfDuplexCall': - methods.HALF_DUPLEX_CALL, -} - def serve(): parser = argparse.ArgumentParser() @@ -72,10 +59,10 @@ def serve(): certificate_chain = pkg_resources.resource_string( __name__, _CERTIFICATE_CHAIN_RESOURCE_PATH) server = implementations.secure_server( - _METHODS, args.port, private_key, certificate_chain) + methods.SERVER_METHODS, args.port, private_key, certificate_chain) else: server = implementations.insecure_server( - _METHODS, args.port) + methods.SERVER_METHODS, args.port) server.start() logging.info('Server serving.') diff --git a/src/python/src/grpc/early_adopter/_face_utilities.py b/src/python/src/grpc/early_adopter/_face_utilities.py index 714f2bb79cb..3e37b08752b 100644 --- a/src/python/src/grpc/early_adopter/_face_utilities.py +++ b/src/python/src/grpc/early_adopter/_face_utilities.py @@ -37,8 +37,8 @@ from grpc.early_adopter import interfaces class _InlineUnaryUnaryMethod(face_interfaces.InlineValueInValueOutMethod): - def __init__(self, unary_unary_rpc_method): - self._method = unary_unary_rpc_method + def __init__(self, unary_unary_server_rpc_method): + self._method = unary_unary_server_rpc_method def service(self, request, context): """See face_interfaces.InlineValueInValueOutMethod.service for spec.""" @@ -47,8 +47,8 @@ class _InlineUnaryUnaryMethod(face_interfaces.InlineValueInValueOutMethod): class _InlineUnaryStreamMethod(face_interfaces.InlineValueInStreamOutMethod): - def __init__(self, unary_stream_rpc_method): - self._method = unary_stream_rpc_method + def __init__(self, unary_stream_server_rpc_method): + self._method = unary_stream_server_rpc_method def service(self, request, context): """See face_interfaces.InlineValueInStreamOutMethod.service for spec.""" @@ -57,8 +57,8 @@ class _InlineUnaryStreamMethod(face_interfaces.InlineValueInStreamOutMethod): class _InlineStreamUnaryMethod(face_interfaces.InlineStreamInValueOutMethod): - def __init__(self, stream_unary_rpc_method): - self._method = stream_unary_rpc_method + def __init__(self, stream_unary_server_rpc_method): + self._method = stream_unary_server_rpc_method def service(self, request_iterator, context): """See face_interfaces.InlineStreamInValueOutMethod.service for spec.""" @@ -67,61 +67,99 @@ class _InlineStreamUnaryMethod(face_interfaces.InlineStreamInValueOutMethod): class _InlineStreamStreamMethod(face_interfaces.InlineStreamInStreamOutMethod): - def __init__(self, stream_stream_rpc_method): - self._method = stream_stream_rpc_method + def __init__(self, stream_stream_server_rpc_method): + self._method = stream_stream_server_rpc_method def service(self, request_iterator, context): """See face_interfaces.InlineStreamInStreamOutMethod.service for spec.""" return self._method.service_stream_stream(request_iterator) -class Breakdown(object): +class ClientBreakdown(object): + """An intermediate representation of invocation-side views of RPC methods. + + Attributes: + request_serializers: A dictionary from RPC method name to callable + behavior to be used serializing request values for the RPC. + response_deserializers: A dictionary from RPC method name to callable + behavior to be used deserializing response values for the RPC. + """ + __metaclass__ = abc.ABCMeta + + +class _EasyClientBreakdown( + ClientBreakdown, + collections.namedtuple( + '_EasyClientBreakdown', + ('request_serializers', 'response_deserializers'))): + pass + + +class ServerBreakdown(object): """An intermediate representation of implementations of RPC methods. Attributes: - unary_unary_methods: - unary_stream_methods: - stream_unary_methods: - stream_stream_methods: - request_serializers: - request_deserializers: - response_serializers: - response_deserializers: + unary_unary_methods: A dictionary from RPC method name to callable + behavior implementing the RPC method for unary-unary RPC methods. + unary_stream_methods: A dictionary from RPC method name to callable + behavior implementing the RPC method for unary-stream RPC methods. + stream_unary_methods: A dictionary from RPC method name to callable + behavior implementing the RPC method for stream-unary RPC methods. + stream_stream_methods: A dictionary from RPC method name to callable + behavior implementing the RPC method for stream-stream RPC methods. + request_deserializers: A dictionary from RPC method name to callable + behavior to be used deserializing request values for the RPC. + response_serializers: A dictionary from RPC method name to callable + behavior to be used serializing response values for the RPC. """ __metaclass__ = abc.ABCMeta -class _EasyBreakdown( - Breakdown, +class _EasyServerBreakdown( + ServerBreakdown, collections.namedtuple( - '_EasyBreakdown', - ['unary_unary_methods', 'unary_stream_methods', 'stream_unary_methods', - 'stream_stream_methods', 'request_serializers', - 'request_deserializers', 'response_serializers', - 'response_deserializers'])): + '_EasyServerBreakdown', + ('unary_unary_methods', 'unary_stream_methods', 'stream_unary_methods', + 'stream_stream_methods', 'request_deserializers', + 'response_serializers'))): pass -def break_down(methods): - """Breaks down RPC methods. +def client_break_down(methods): + """Derives a ClientBreakdown from several interfaces.ClientRpcMethods. + + Args: + methods: A dictionary from RPC mthod name to + interfaces.ClientRpcMethod object describing the RPCs. + + Returns: + A ClientBreakdown corresponding to the given methods. + """ + request_serializers = {} + response_deserializers = {} + for name, method in methods.iteritems(): + request_serializers[name] = method.serialize_request + response_deserializers[name] = method.deserialize_response + return _EasyClientBreakdown(request_serializers, response_deserializers) + + +def server_break_down(methods): + """Derives a ServerBreakdown from several interfaces.ServerRpcMethods. Args: methods: A dictionary from RPC mthod name to - interfaces.RpcMethod object describing the RPCs. + interfaces.ServerRpcMethod object describing the RPCs. Returns: - A Breakdown corresponding to the given methods. + A ServerBreakdown corresponding to the given methods. """ unary_unary = {} unary_stream = {} stream_unary = {} stream_stream = {} - request_serializers = {} request_deserializers = {} response_serializers = {} - response_deserializers = {} - for name, method in methods.iteritems(): cardinality = method.cardinality() if cardinality is interfaces.Cardinality.UNARY_UNARY: @@ -132,12 +170,9 @@ def break_down(methods): stream_unary[name] = _InlineStreamUnaryMethod(method) elif cardinality is interfaces.Cardinality.STREAM_STREAM: stream_stream[name] = _InlineStreamStreamMethod(method) - request_serializers[name] = method.serialize_request request_deserializers[name] = method.deserialize_request response_serializers[name] = method.serialize_response - response_deserializers[name] = method.deserialize_response - return _EasyBreakdown( + return _EasyServerBreakdown( unary_unary, unary_stream, stream_unary, stream_stream, - request_serializers, request_deserializers, response_serializers, - response_deserializers) + request_deserializers, response_serializers) diff --git a/src/python/src/grpc/early_adopter/implementations.py b/src/python/src/grpc/early_adopter/implementations.py index cd9dd5a57d6..c549317d15d 100644 --- a/src/python/src/grpc/early_adopter/implementations.py +++ b/src/python/src/grpc/early_adopter/implementations.py @@ -92,7 +92,7 @@ class _Server(interfaces.Server): def _build_server(methods, port, private_key, certificate_chain): - breakdown = _face_utilities.break_down(methods) + breakdown = _face_utilities.server_break_down(methods) return _Server(breakdown, port, private_key, certificate_chain) @@ -101,8 +101,8 @@ def insecure_server(methods, port): Args: methods: A dictionary from RPC method name to - interfaces.RpcMethod object describing the RPCs to be - serviced by the created server. + interfaces.ServerRpcMethod object describing the RPCs to + be serviced by the created server. port: The port on which to serve. Returns: @@ -117,8 +117,8 @@ def secure_server(methods, port, private_key, certificate_chain): Args: methods: A dictionary from RPC method name to - interfaces.RpcMethod object describing the RPCs to be - serviced by the created server. + interfaces.ServerRpcMethod object describing the RPCs to + be serviced by the created server. port: The port on which to serve. private_key: A pem-encoded private key. certificate_chain: A pem-encoded certificate chain. diff --git a/src/python/src/grpc/early_adopter/interfaces.py b/src/python/src/grpc/early_adopter/interfaces.py index 8d9a3121333..0ec371f8e88 100644 --- a/src/python/src/grpc/early_adopter/interfaces.py +++ b/src/python/src/grpc/early_adopter/interfaces.py @@ -44,7 +44,7 @@ class Cardinality(enum.Enum): class RpcMethod(object): - """A sum type for the implementation of an RPC method.""" + """A type for the common aspects of RPC method specifications.""" __metaclass__ = abc.ABCMeta @abc.abstractmethod @@ -59,6 +59,11 @@ class RpcMethod(object): """ raise NotImplementedError() + +class ClientRpcMethod(RpcMethod): + """Invocation-side description of an RPC method.""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod def serialize_request(self, request): """Serializes a request value. @@ -72,6 +77,25 @@ class RpcMethod(object): """ raise NotImplementedError() + @abc.abstractmethod + def deserialize_response(self, serialized_response): + """Deserializes a response value. + + Args: + serialized_response: A bytestring that is the + serialization of a response value appropriate for this + RpcMethod. + + Returns: + A response value corresponding to the given bytestring. + """ + raise NotImplementedError() + + +class ServerRpcMethod(RpcMethod): + """Service-side description of an RPC method.""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod def deserialize_request(self, serialized_request): """Deserializes a request value. @@ -99,20 +123,6 @@ class RpcMethod(object): """ raise NotImplementedError() - @abc.abstractmethod - def deserialize_response(self, serialized_response): - """Deserializes a response value. - - Args: - serialized_response: A bytestring that is the - serialization of a response value appropriate for this - RpcMethod. - - Returns: - A response value corresponding to the given bytestring. - """ - raise NotImplementedError() - @abc.abstractmethod def service_unary_unary(self, request): """Carries out this RPC. @@ -182,7 +192,6 @@ class Server(object): """A GRPC Server.""" __metaclass__ = abc.ABCMeta - @abc.abstractmethod def start(self): """Instructs this server to commence service of RPCs.""" diff --git a/src/python/src/grpc/early_adopter/utilities.py b/src/python/src/grpc/early_adopter/utilities.py index a4ee253d830..9277d3f6ad4 100644 --- a/src/python/src/grpc/early_adopter/utilities.py +++ b/src/python/src/grpc/early_adopter/utilities.py @@ -32,7 +32,7 @@ from grpc.early_adopter import interfaces -class _RpcMethod(interfaces.RpcMethod): +class _RpcMethod(interfaces.ClientRpcMethod, interfaces.ServerRpcMethod): def __init__( self, cardinality, unary_unary, unary_stream, stream_unary, @@ -85,129 +85,181 @@ class _RpcMethod(interfaces.RpcMethod): return self._stream_stream(request_iterator) -def unary_unary_rpc_method( - behavior, request_serializer, request_deserializer, response_serializer, - response_deserializer): - """Constructs an interfaces.RpcMethod for the given behavior. +def unary_unary_client_rpc_method(request_serializer, response_deserializer): + """Constructs an interfaces.ClientRpcMethod for a unary-unary RPC method. + + Args: + request_serializer: A callable that when called on a request + value returns a bytestring corresponding to that value. + response_deserializer: A callable that when called on a + bytestring returns the response value corresponding to + that bytestring. + + Returns: + An interfaces.ClientRpcMethod constructed from the given + arguments representing a unary-request/unary-response RPC + method. + """ + return _RpcMethod( + interfaces.Cardinality.UNARY_UNARY, None, None, None, None, + request_serializer, None, None, response_deserializer) + + +def unary_stream_client_rpc_method(request_serializer, response_deserializer): + """Constructs an interfaces.ClientRpcMethod for a unary-stream RPC method. + + Args: + request_serializer: A callable that when called on a request + value returns a bytestring corresponding to that value. + response_deserializer: A callable that when called on a + bytestring returns the response value corresponding to + that bytestring. + + Returns: + An interfaces.ClientRpcMethod constructed from the given + arguments representing a unary-request/streaming-response + RPC method. + """ + return _RpcMethod( + interfaces.Cardinality.UNARY_STREAM, None, None, None, None, + request_serializer, None, None, response_deserializer) + + +def stream_unary_client_rpc_method(request_serializer, response_deserializer): + """Constructs an interfaces.ClientRpcMethod for a stream-unary RPC method. + + Args: + request_serializer: A callable that when called on a request + value returns a bytestring corresponding to that value. + response_deserializer: A callable that when called on a + bytestring returns the response value corresponding to + that bytestring. + + Returns: + An interfaces.ClientRpcMethod constructed from the given + arguments representing a streaming-request/unary-response + RPC method. + """ + return _RpcMethod( + interfaces.Cardinality.STREAM_UNARY, None, None, None, None, + request_serializer, None, None, response_deserializer) + + +def stream_stream_client_rpc_method(request_serializer, response_deserializer): + """Constructs an interfaces.ClientRpcMethod for a stream-stream RPC method. + + Args: + request_serializer: A callable that when called on a request + value returns a bytestring corresponding to that value. + response_deserializer: A callable that when called on a + bytestring returns the response value corresponding to + that bytestring. + + Returns: + An interfaces.ClientRpcMethod constructed from the given + arguments representing a + streaming-request/streaming-response RPC method. + """ + return _RpcMethod( + interfaces.Cardinality.STREAM_STREAM, None, None, None, None, + request_serializer, None, None, response_deserializer) + + +def unary_unary_server_rpc_method( + behavior, request_deserializer, response_serializer): + """Constructs an interfaces.ServerRpcMethod for the given behavior. Args: behavior: A callable that implements a unary-unary RPC method that accepts a single request and returns a single response. - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. request_deserializer: A callable that when called on a bytestring returns the request value corresponding to that bytestring. response_serializer: A callable that when called on a response value returns the bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. Returns: - An interfaces.RpcMethod constructed from the given + An interfaces.ServerRpcMethod constructed from the given arguments representing a unary-request/unary-response RPC method. """ return _RpcMethod( interfaces.Cardinality.UNARY_UNARY, behavior, None, None, None, - request_serializer, request_deserializer, response_serializer, - response_deserializer) + None, request_deserializer, response_serializer, None) -def unary_stream_rpc_method( - behavior, request_serializer, request_deserializer, response_serializer, - response_deserializer): - """Constructs an interfaces.RpcMethod for the given behavior. +def unary_stream_server_rpc_method( + behavior, request_deserializer, response_serializer): + """Constructs an interfaces.ServerRpcMethod for the given behavior. Args: behavior: A callable that implements a unary-stream RPC method that accepts a single request and returns an iterator of zero or more responses. - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. request_deserializer: A callable that when called on a bytestring returns the request value corresponding to that bytestring. response_serializer: A callable that when called on a response value returns the bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. Returns: - An interfaces.RpcMethod constructed from the given + An interfaces.ServerRpcMethod constructed from the given arguments representing a unary-request/streaming-response RPC method. """ return _RpcMethod( interfaces.Cardinality.UNARY_STREAM, None, behavior, None, None, - request_serializer, request_deserializer, response_serializer, - response_deserializer) + None, request_deserializer, response_serializer, None) -def stream_unary_rpc_method( - behavior, request_serializer, request_deserializer, response_serializer, - response_deserializer): - """Constructs an interfaces.RpcMethod for the given behavior. +def stream_unary_server_rpc_method( + behavior, request_deserializer, response_serializer): + """Constructs an interfaces.ServerRpcMethod for the given behavior. Args: behavior: A callable that implements a stream-unary RPC method that accepts an iterator of zero or more requests and returns a single response. - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. request_deserializer: A callable that when called on a bytestring returns the request value corresponding to that bytestring. response_serializer: A callable that when called on a response value returns the bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. Returns: - An interfaces.RpcMethod constructed from the given + An interfaces.ServerRpcMethod constructed from the given arguments representing a streaming-request/unary-response RPC method. """ return _RpcMethod( interfaces.Cardinality.STREAM_UNARY, None, None, behavior, None, - request_serializer, request_deserializer, response_serializer, - response_deserializer) + None, request_deserializer, response_serializer, None) -def stream_stream_rpc_method( - behavior, request_serializer, request_deserializer, response_serializer, - response_deserializer): - """Constructs an interfaces.RpcMethod for the given behavior. +def stream_stream_server_rpc_method( + behavior, request_deserializer, response_serializer): + """Constructs an interfaces.ServerRpcMethod for the given behavior. Args: behavior: A callable that implements a stream-stream RPC method that accepts an iterator of zero or more requests and returns an iterator of zero or more responses. - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. request_deserializer: A callable that when called on a bytestring returns the request value corresponding to that bytestring. response_serializer: A callable that when called on a response value returns the bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. Returns: - An interfaces.RpcMethod constructed from the given + An interfaces.ServerRpcMethod constructed from the given arguments representing a streaming-request/streaming-response RPC method. """ return _RpcMethod( interfaces.Cardinality.STREAM_STREAM, None, None, None, behavior, - request_serializer, request_deserializer, response_serializer, - response_deserializer) + None, request_deserializer, response_serializer, None) From b4472d88106bf799eab0cb3deb34cbf4f42c34fb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 19 Feb 2015 08:44:56 -0800 Subject: [PATCH 32/59] fixed readme --- tools/dockerfile/grpc_base/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_base/README.md b/tools/dockerfile/grpc_base/README.md index e3b5f2ef373..5c81b02425d 100644 --- a/tools/dockerfile/grpc_base/README.md +++ b/tools/dockerfile/grpc_base/README.md @@ -2,7 +2,8 @@ Base GRPC Dockerfile ==================== Dockerfile for creating the base gRPC development Docker instance. -For now, this assumes that the development will be done on GCE instances, with source code on Git-on-Borg. +For now, this assumes that the development will be done on GCE instances, +with source code on GitHub. As of 2015/02/02, it includes - git From 3086862d201427f2ed33955e32f4d273bfc522f2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 19 Feb 2015 09:22:33 -0800 Subject: [PATCH 33/59] Changed namespace from Google.GRPC to Grpc, sorted using statements, minor refactorings --- src/csharp/GrpcApi/MathExamples.cs | 4 +- src/csharp/GrpcApi/MathGrpc.cs | 16 ++++---- src/csharp/GrpcApi/MathServiceImpl.cs | 6 +-- src/csharp/GrpcApi/TestServiceGrpc.cs | 23 ++++++----- .../GrpcApiTests/MathClientServerTests.cs | 8 ++-- src/csharp/GrpcCore/Call.cs | 4 +- src/csharp/GrpcCore/Calls.cs | 4 +- src/csharp/GrpcCore/Channel.cs | 4 +- .../GrpcCore/ClientStreamingAsyncResult.cs | 2 +- src/csharp/GrpcCore/GrpcEnvironment.cs | 4 +- src/csharp/GrpcCore/Internal/AsyncCall.cs | 14 +++---- .../BatchContextSafeHandleNotOwned.cs | 4 +- .../GrpcCore/Internal/CallSafeHandle.cs | 6 +-- .../GrpcCore/Internal/ChannelSafeHandle.cs | 2 +- .../Internal/ClientStreamingInputObserver.cs | 4 +- .../Internal/CompletionQueueSafeHandle.cs | 2 +- src/csharp/GrpcCore/Internal/Enums.cs | 2 +- .../GrpcCore/Internal/GrpcThreadPool.cs | 6 +-- .../Internal/SafeHandleZeroIsInvalid.cs | 2 +- .../GrpcCore/Internal/ServerSafeHandle.cs | 6 +-- .../Internal/ServerStreamingOutputObserver.cs | 6 +-- src/csharp/GrpcCore/Internal/Timespec.cs | 2 +- src/csharp/GrpcCore/Marshaller.cs | 2 +- src/csharp/GrpcCore/Method.cs | 2 +- src/csharp/GrpcCore/RpcException.cs | 2 +- src/csharp/GrpcCore/Server.cs | 10 ++--- src/csharp/GrpcCore/ServerCallHandler.cs | 6 +-- src/csharp/GrpcCore/ServerCalls.cs | 2 +- .../GrpcCore/ServerServiceDefinition.cs | 2 +- src/csharp/GrpcCore/Status.cs | 2 +- src/csharp/GrpcCore/StatusCode.cs | 40 +++++++++---------- .../GrpcCore/Utils/RecordingObserver.cs | 4 +- src/csharp/GrpcCore/Utils/RecordingQueue.cs | 2 +- src/csharp/GrpcCoreTests/ClientServerTest.cs | 14 +++---- .../GrpcCoreTests/GrpcEnvironmentTest.cs | 6 +-- src/csharp/GrpcCoreTests/ServerTest.cs | 10 ++--- src/csharp/GrpcCoreTests/TestResult.xml | 6 +-- src/csharp/GrpcCoreTests/TimespecTest.cs | 6 +-- src/csharp/InteropClient/Client.cs | 8 ++-- src/csharp/InteropClient/InteropClient.csproj | 9 ++--- src/csharp/MathClient/MathClient.cs | 2 +- 41 files changed, 132 insertions(+), 134 deletions(-) diff --git a/src/csharp/GrpcApi/MathExamples.cs b/src/csharp/GrpcApi/MathExamples.cs index 2202c52a277..97c91b1b1b5 100644 --- a/src/csharp/GrpcApi/MathExamples.cs +++ b/src/csharp/GrpcApi/MathExamples.cs @@ -32,10 +32,10 @@ #endregion using System; -using System.Threading.Tasks; using System.Collections.Generic; using System.Reactive.Linq; -using Google.GRPC.Core.Utils; +using System.Threading.Tasks; +using Grpc.Core.Utils; namespace math { diff --git a/src/csharp/GrpcApi/MathGrpc.cs b/src/csharp/GrpcApi/MathGrpc.cs index 44e704e4969..f938a245439 100644 --- a/src/csharp/GrpcApi/MathGrpc.cs +++ b/src/csharp/GrpcApi/MathGrpc.cs @@ -32,11 +32,11 @@ #endregion using System; -using System.Threading; -using System.Threading.Tasks; using System.Collections.Generic; using System.Reactive.Linq; -using Google.GRPC.Core; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; namespace math { @@ -99,31 +99,31 @@ namespace math public DivReply Div(DivArgs request, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(divMethod, channel); + var call = new Grpc.Core.Call(divMethod, channel); return Calls.BlockingUnaryCall(call, request, token); } public Task DivAsync(DivArgs request, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(divMethod, channel); + var call = new Grpc.Core.Call(divMethod, channel); return Calls.AsyncUnaryCall(call, request, token); } public void Fib(FibArgs request, IObserver responseObserver, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(fibMethod, channel); + var call = new Grpc.Core.Call(fibMethod, channel); Calls.AsyncServerStreamingCall(call, request, responseObserver, token); } public ClientStreamingAsyncResult Sum(CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(sumMethod, channel); + var call = new Grpc.Core.Call(sumMethod, channel); return Calls.AsyncClientStreamingCall(call, token); } public IObserver DivMany(IObserver responseObserver, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(divManyMethod, channel); + var call = new Grpc.Core.Call(divManyMethod, channel); return Calls.DuplexStreamingCall(call, responseObserver, token); } } diff --git a/src/csharp/GrpcApi/MathServiceImpl.cs b/src/csharp/GrpcApi/MathServiceImpl.cs index 1a2f98f8b26..462fab4454f 100644 --- a/src/csharp/GrpcApi/MathServiceImpl.cs +++ b/src/csharp/GrpcApi/MathServiceImpl.cs @@ -32,11 +32,11 @@ #endregion using System; -using System.Threading; -using System.Threading.Tasks; using System.Collections.Generic; using System.Reactive.Linq; -using Google.GRPC.Core.Utils; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core.Utils; namespace math { diff --git a/src/csharp/GrpcApi/TestServiceGrpc.cs b/src/csharp/GrpcApi/TestServiceGrpc.cs index 64d5c095633..15700e40ac5 100644 --- a/src/csharp/GrpcApi/TestServiceGrpc.cs +++ b/src/csharp/GrpcApi/TestServiceGrpc.cs @@ -30,12 +30,13 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endregion + using System; -using System.Threading; -using System.Threading.Tasks; using System.Collections.Generic; using System.Reactive.Linq; -using Google.GRPC.Core; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; namespace grpc.testing { @@ -119,49 +120,49 @@ namespace grpc.testing public Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(emptyCallMethod, channel); + var call = new Grpc.Core.Call(emptyCallMethod, channel); return Calls.BlockingUnaryCall(call, request, token); } public Task EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(emptyCallMethod, channel); + var call = new Grpc.Core.Call(emptyCallMethod, channel); return Calls.AsyncUnaryCall(call, request, token); } public SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(unaryCallMethod, channel); + var call = new Grpc.Core.Call(unaryCallMethod, channel); return Calls.BlockingUnaryCall(call, request, token); } public Task UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(unaryCallMethod, channel); + var call = new Grpc.Core.Call(unaryCallMethod, channel); return Calls.AsyncUnaryCall(call, request, token); } public void StreamingOutputCall(StreamingOutputCallRequest request, IObserver responseObserver, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(streamingOutputCallMethod, channel); + var call = new Grpc.Core.Call(streamingOutputCallMethod, channel); Calls.AsyncServerStreamingCall(call, request, responseObserver, token); } public ClientStreamingAsyncResult StreamingInputCall(CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(streamingInputCallMethod, channel); + var call = new Grpc.Core.Call(streamingInputCallMethod, channel); return Calls.AsyncClientStreamingCall(call, token); } public IObserver FullDuplexCall(IObserver responseObserver, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(fullDuplexCallMethod, channel); + var call = new Grpc.Core.Call(fullDuplexCallMethod, channel); return Calls.DuplexStreamingCall(call, responseObserver, token); } public IObserver HalfDuplexCall(IObserver responseObserver, CancellationToken token = default(CancellationToken)) { - var call = new Google.GRPC.Core.Call(halfDuplexCallMethod, channel); + var call = new Grpc.Core.Call(halfDuplexCallMethod, channel); return Calls.DuplexStreamingCall(call, responseObserver, token); } } diff --git a/src/csharp/GrpcApiTests/MathClientServerTests.cs b/src/csharp/GrpcApiTests/MathClientServerTests.cs index 9056142097b..767340d6f2b 100644 --- a/src/csharp/GrpcApiTests/MathClientServerTests.cs +++ b/src/csharp/GrpcApiTests/MathClientServerTests.cs @@ -32,12 +32,12 @@ #endregion using System; -using NUnit.Framework; -using Google.GRPC.Core; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Google.GRPC.Core.Utils; -using System.Collections.Generic; +using Grpc.Core; +using Grpc.Core.Utils; +using NUnit.Framework; namespace math.Tests { diff --git a/src/csharp/GrpcCore/Call.cs b/src/csharp/GrpcCore/Call.cs index 93a7507b2fa..72dca688952 100644 --- a/src/csharp/GrpcCore/Call.cs +++ b/src/csharp/GrpcCore/Call.cs @@ -32,9 +32,9 @@ #endregion using System; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core +namespace Grpc.Core { public class Call { diff --git a/src/csharp/GrpcCore/Calls.cs b/src/csharp/GrpcCore/Calls.cs index e5ddd879d68..b67332676ac 100644 --- a/src/csharp/GrpcCore/Calls.cs +++ b/src/csharp/GrpcCore/Calls.cs @@ -34,9 +34,9 @@ using System; using System.Threading; using System.Threading.Tasks; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core +namespace Grpc.Core { // NOTE: this class is work-in-progress diff --git a/src/csharp/GrpcCore/Channel.cs b/src/csharp/GrpcCore/Channel.cs index d1f795541cc..942651cf393 100644 --- a/src/csharp/GrpcCore/Channel.cs +++ b/src/csharp/GrpcCore/Channel.cs @@ -35,9 +35,9 @@ using System; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core +namespace Grpc.Core { public class Channel : IDisposable { diff --git a/src/csharp/GrpcCore/ClientStreamingAsyncResult.cs b/src/csharp/GrpcCore/ClientStreamingAsyncResult.cs index f82fe5f26ce..44580a11542 100644 --- a/src/csharp/GrpcCore/ClientStreamingAsyncResult.cs +++ b/src/csharp/GrpcCore/ClientStreamingAsyncResult.cs @@ -34,7 +34,7 @@ using System; using System.Threading.Tasks; -namespace Google.GRPC.Core +namespace Grpc.Core { /// /// Return type for client streaming async method. diff --git a/src/csharp/GrpcCore/GrpcEnvironment.cs b/src/csharp/GrpcCore/GrpcEnvironment.cs index 55a6cac8f69..0e3a0a581cd 100644 --- a/src/csharp/GrpcCore/GrpcEnvironment.cs +++ b/src/csharp/GrpcCore/GrpcEnvironment.cs @@ -32,10 +32,10 @@ #endregion using System; -using Google.GRPC.Core.Internal; using System.Runtime.InteropServices; +using Grpc.Core.Internal; -namespace Google.GRPC.Core +namespace Grpc.Core { /// /// Encapsulates initialization and shutdown of gRPC library. diff --git a/src/csharp/GrpcCore/Internal/AsyncCall.cs b/src/csharp/GrpcCore/Internal/AsyncCall.cs index ce0ba30d53d..5e96092e270 100644 --- a/src/csharp/GrpcCore/Internal/AsyncCall.cs +++ b/src/csharp/GrpcCore/Internal/AsyncCall.cs @@ -32,14 +32,14 @@ #endregion using System; -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; -using System.Runtime.CompilerServices; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// Handles native call lifecycle and provides convenience methods. @@ -381,7 +381,7 @@ namespace Google.GRPC.Core.Internal private void CompleteStreamObserver(Status status) { - if (status.StatusCode != StatusCode.GRPC_STATUS_OK) + if (status.StatusCode != StatusCode.OK) { // TODO: wrap to handle exceptions; readObserver.OnError(new RpcException(status)); @@ -413,13 +413,13 @@ namespace Google.GRPC.Core.Internal if (error != GRPCOpError.GRPC_OP_OK) { tcs.SetException(new RpcException( - new Status(StatusCode.GRPC_STATUS_INTERNAL, "Internal error occured.") + new Status(StatusCode.Internal, "Internal error occured.") )); return; } var status = ctx.GetReceivedStatus(); - if (status.StatusCode != StatusCode.GRPC_STATUS_OK) + if (status.StatusCode != StatusCode.OK) { tcs.SetException(new RpcException(status)); return; diff --git a/src/csharp/GrpcCore/Internal/BatchContextSafeHandleNotOwned.cs b/src/csharp/GrpcCore/Internal/BatchContextSafeHandleNotOwned.cs index ddfd94a3b56..75cd30e1a2d 100644 --- a/src/csharp/GrpcCore/Internal/BatchContextSafeHandleNotOwned.cs +++ b/src/csharp/GrpcCore/Internal/BatchContextSafeHandleNotOwned.cs @@ -33,9 +33,9 @@ using System; using System.Runtime.InteropServices; -using Google.GRPC.Core; +using Grpc.Core; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// Not owned version of diff --git a/src/csharp/GrpcCore/Internal/CallSafeHandle.cs b/src/csharp/GrpcCore/Internal/CallSafeHandle.cs index 55d66a62ca7..659a383b4bd 100644 --- a/src/csharp/GrpcCore/Internal/CallSafeHandle.cs +++ b/src/csharp/GrpcCore/Internal/CallSafeHandle.cs @@ -32,11 +32,11 @@ #endregion using System; -using System.Runtime.InteropServices; using System.Diagnostics; -using Google.GRPC.Core; +using System.Runtime.InteropServices; +using Grpc.Core; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { //TODO: rename the delegate internal delegate void CompletionCallbackDelegate(GRPCOpError error, IntPtr batchContextPtr); diff --git a/src/csharp/GrpcCore/Internal/ChannelSafeHandle.cs b/src/csharp/GrpcCore/Internal/ChannelSafeHandle.cs index 379c83d5375..f15ead35724 100644 --- a/src/csharp/GrpcCore/Internal/ChannelSafeHandle.cs +++ b/src/csharp/GrpcCore/Internal/ChannelSafeHandle.cs @@ -36,7 +36,7 @@ using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// grpc_channel from diff --git a/src/csharp/GrpcCore/Internal/ClientStreamingInputObserver.cs b/src/csharp/GrpcCore/Internal/ClientStreamingInputObserver.cs index 4d10a9bdf96..fb59e86e2d7 100644 --- a/src/csharp/GrpcCore/Internal/ClientStreamingInputObserver.cs +++ b/src/csharp/GrpcCore/Internal/ClientStreamingInputObserver.cs @@ -32,9 +32,9 @@ #endregion using System; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { internal class ClientStreamingInputObserver : IObserver { diff --git a/src/csharp/GrpcCore/Internal/CompletionQueueSafeHandle.cs b/src/csharp/GrpcCore/Internal/CompletionQueueSafeHandle.cs index 5ea436df197..3f01fdbfd05 100644 --- a/src/csharp/GrpcCore/Internal/CompletionQueueSafeHandle.cs +++ b/src/csharp/GrpcCore/Internal/CompletionQueueSafeHandle.cs @@ -35,7 +35,7 @@ using System; using System.Runtime.InteropServices; using System.Threading.Tasks; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// grpc_completion_queue from diff --git a/src/csharp/GrpcCore/Internal/Enums.cs b/src/csharp/GrpcCore/Internal/Enums.cs index d38896ec843..f363050b07e 100644 --- a/src/csharp/GrpcCore/Internal/Enums.cs +++ b/src/csharp/GrpcCore/Internal/Enums.cs @@ -34,7 +34,7 @@ using System; using System.Runtime.InteropServices; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// from grpc/grpc.h diff --git a/src/csharp/GrpcCore/Internal/GrpcThreadPool.cs b/src/csharp/GrpcCore/Internal/GrpcThreadPool.cs index 634a0b2d721..9e69fe2f430 100644 --- a/src/csharp/GrpcCore/Internal/GrpcThreadPool.cs +++ b/src/csharp/GrpcCore/Internal/GrpcThreadPool.cs @@ -32,13 +32,13 @@ #endregion using System; -using Google.GRPC.Core.Internal; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; -using System.Collections.Generic; +using Grpc.Core.Internal; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// Pool of threads polling on the same completion queue. diff --git a/src/csharp/GrpcCore/Internal/SafeHandleZeroIsInvalid.cs b/src/csharp/GrpcCore/Internal/SafeHandleZeroIsInvalid.cs index 59f08d4ca89..aa6fce2e969 100644 --- a/src/csharp/GrpcCore/Internal/SafeHandleZeroIsInvalid.cs +++ b/src/csharp/GrpcCore/Internal/SafeHandleZeroIsInvalid.cs @@ -34,7 +34,7 @@ using System; using System.Runtime.InteropServices; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// Safe handle to wrap native objects. diff --git a/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs b/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs index 047bde1addf..de9bbaf7c12 100644 --- a/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs +++ b/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs @@ -32,11 +32,11 @@ #endregion using System; -using System.Runtime.InteropServices; -using System.Diagnostics; using System.Collections.Concurrent; +using System.Diagnostics; +using System.Runtime.InteropServices; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { // TODO: we need to make sure that the delegates are not collected before invoked. internal delegate void ServerShutdownCallbackDelegate(IntPtr eventPtr); diff --git a/src/csharp/GrpcCore/Internal/ServerStreamingOutputObserver.cs b/src/csharp/GrpcCore/Internal/ServerStreamingOutputObserver.cs index e9cb65cb3b0..08d99214754 100644 --- a/src/csharp/GrpcCore/Internal/ServerStreamingOutputObserver.cs +++ b/src/csharp/GrpcCore/Internal/ServerStreamingOutputObserver.cs @@ -32,9 +32,9 @@ #endregion using System; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// Observer that writes all arriving messages to a call abstraction (in blocking fashion) @@ -52,7 +52,7 @@ namespace Google.GRPC.Core.Internal public void OnCompleted() { // TODO: how bad is the Wait here? - call.SendStatusFromServerAsync(new Status(StatusCode.GRPC_STATUS_OK, "")).Wait(); + call.SendStatusFromServerAsync(new Status(StatusCode.OK, "")).Wait(); } public void OnError(Exception error) diff --git a/src/csharp/GrpcCore/Internal/Timespec.cs b/src/csharp/GrpcCore/Internal/Timespec.cs index 38b75180dc5..b191ecde94c 100644 --- a/src/csharp/GrpcCore/Internal/Timespec.cs +++ b/src/csharp/GrpcCore/Internal/Timespec.cs @@ -35,7 +35,7 @@ using System; using System.Runtime.InteropServices; using System.Threading; -namespace Google.GRPC.Core.Internal +namespace Grpc.Core.Internal { /// /// gpr_timespec from grpc/support/time.h diff --git a/src/csharp/GrpcCore/Marshaller.cs b/src/csharp/GrpcCore/Marshaller.cs index f031354fd2d..602e0eb8240 100644 --- a/src/csharp/GrpcCore/Marshaller.cs +++ b/src/csharp/GrpcCore/Marshaller.cs @@ -33,7 +33,7 @@ using System; -namespace Google.GRPC.Core +namespace Grpc.Core { /// /// For serializing and deserializing messages. diff --git a/src/csharp/GrpcCore/Method.cs b/src/csharp/GrpcCore/Method.cs index 64a4f71396d..c94aa8161fe 100644 --- a/src/csharp/GrpcCore/Method.cs +++ b/src/csharp/GrpcCore/Method.cs @@ -33,7 +33,7 @@ using System; -namespace Google.GRPC.Core +namespace Grpc.Core { public enum MethodType { diff --git a/src/csharp/GrpcCore/RpcException.cs b/src/csharp/GrpcCore/RpcException.cs index 9ec1d2f2f33..5a9d0039bc9 100644 --- a/src/csharp/GrpcCore/RpcException.cs +++ b/src/csharp/GrpcCore/RpcException.cs @@ -33,7 +33,7 @@ using System; -namespace Google.GRPC.Core +namespace Grpc.Core { public class RpcException : Exception { diff --git a/src/csharp/GrpcCore/Server.cs b/src/csharp/GrpcCore/Server.cs index 91842d81821..002592a3d88 100644 --- a/src/csharp/GrpcCore/Server.cs +++ b/src/csharp/GrpcCore/Server.cs @@ -32,14 +32,14 @@ #endregion using System; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Threading.Tasks; using System.Collections.Concurrent; using System.Collections.Generic; -using Google.GRPC.Core.Internal; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Grpc.Core.Internal; -namespace Google.GRPC.Core +namespace Grpc.Core { /// /// Server is implemented only to be able to do diff --git a/src/csharp/GrpcCore/ServerCallHandler.cs b/src/csharp/GrpcCore/ServerCallHandler.cs index 48d1eaa3359..1296947f34d 100644 --- a/src/csharp/GrpcCore/ServerCallHandler.cs +++ b/src/csharp/GrpcCore/ServerCallHandler.cs @@ -32,9 +32,9 @@ #endregion using System; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; -namespace Google.GRPC.Core +namespace Grpc.Core { internal interface IServerCallHandler { @@ -111,7 +111,7 @@ namespace Google.GRPC.Core var finishedTask = asyncCall.ServerSideStreamingRequestCallAsync(new NullObserver()); - asyncCall.SendStatusFromServerAsync(new Status(StatusCode.GRPC_STATUS_UNIMPLEMENTED, "No such method.")).Wait(); + asyncCall.SendStatusFromServerAsync(new Status(StatusCode.Unimplemented, "No such method.")).Wait(); finishedTask.Wait(); } diff --git a/src/csharp/GrpcCore/ServerCalls.cs b/src/csharp/GrpcCore/ServerCalls.cs index 273029cab60..bed77796de1 100644 --- a/src/csharp/GrpcCore/ServerCalls.cs +++ b/src/csharp/GrpcCore/ServerCalls.cs @@ -33,7 +33,7 @@ using System; -namespace Google.GRPC.Core +namespace Grpc.Core { // TODO: perhaps add also serverSideStreaming and clientSideStreaming diff --git a/src/csharp/GrpcCore/ServerServiceDefinition.cs b/src/csharp/GrpcCore/ServerServiceDefinition.cs index 1eb17837e44..231c3760620 100644 --- a/src/csharp/GrpcCore/ServerServiceDefinition.cs +++ b/src/csharp/GrpcCore/ServerServiceDefinition.cs @@ -34,7 +34,7 @@ using System; using System.Collections.Generic; -namespace Google.GRPC.Core +namespace Grpc.Core { public class ServerServiceDefinition { diff --git a/src/csharp/GrpcCore/Status.cs b/src/csharp/GrpcCore/Status.cs index 6430e6b7ab7..5ea1df7b481 100644 --- a/src/csharp/GrpcCore/Status.cs +++ b/src/csharp/GrpcCore/Status.cs @@ -34,7 +34,7 @@ using System; using System.Runtime.InteropServices; -namespace Google.GRPC.Core +namespace Grpc.Core { /// /// Represents RPC result. diff --git a/src/csharp/GrpcCore/StatusCode.cs b/src/csharp/GrpcCore/StatusCode.cs index ba99f9b5e0b..1fbf9c1b687 100644 --- a/src/csharp/GrpcCore/StatusCode.cs +++ b/src/csharp/GrpcCore/StatusCode.cs @@ -33,22 +33,22 @@ using System; -namespace Google.GRPC.Core +namespace Grpc.Core { // TODO: element names should changed to comply with C# naming conventions. /// - /// grpc_status_code from grpc/status.h + /// based on grpc_status_code from grpc/status.h /// public enum StatusCode { /* Not an error; returned on success HTTP Mapping: 200 OK */ - GRPC_STATUS_OK = 0, + OK = 0, /* The operation was cancelled (typically by the caller). HTTP Mapping: 499 Client Closed Request */ - GRPC_STATUS_CANCELLED = 1, + Cancelled = 1, /* Unknown error. An example of where this error may be returned is if a Status value received from another address space belongs to an error-space that is not known in this address space. Also @@ -56,14 +56,14 @@ namespace Google.GRPC.Core may be converted to this error. HTTP Mapping: 500 Internal Server Error */ - GRPC_STATUS_UNKNOWN = 2, + Unknown = 2, /* Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request */ - GRPC_STATUS_INVALID_ARGUMENT = 3, + InvalidArgument = 3, /* Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a @@ -71,16 +71,16 @@ namespace Google.GRPC.Core enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout */ - GRPC_STATUS_DEADLINE_EXCEEDED = 4, + DeadlineExceeded = 4, /* Some requested entity (e.g., file or directory) was not found. HTTP Mapping: 404 Not Found */ - GRPC_STATUS_NOT_FOUND = 5, + NotFound = 5, /* Some entity that we attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict */ - GRPC_STATUS_ALREADY_EXISTS = 6, + AlreadyExists = 6, /* The caller does not have permission to execute the specified operation. PERMISSION_DENIED must not be used for rejections caused by exhausting some resource (use RESOURCE_EXHAUSTED @@ -89,17 +89,17 @@ namespace Google.GRPC.Core instead for those errors). HTTP Mapping: 403 Forbidden */ - GRPC_STATUS_PERMISSION_DENIED = 7, + PermissionDenied = 7, /* The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized */ - GRPC_STATUS_UNAUTHENTICATED = 16, + Unauthenticated = 16, /* Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests */ - GRPC_STATUS_RESOURCE_EXHAUSTED = 8, + ResourceExhausted = 8, /* Operation was rejected because the system is not in a state required for the operation's execution. For example, directory to be deleted may be non-empty, an rmdir operation is applied to @@ -126,7 +126,7 @@ namespace Google.GRPC.Core the request contains Etag related headers. So if the server does see Etag related headers in the request, it may choose to return 412 instead of 400 for this error code. */ - GRPC_STATUS_FAILED_PRECONDITION = 9, + FailedPrecondition = 9, /* The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc. @@ -134,7 +134,7 @@ namespace Google.GRPC.Core ABORTED, and UNAVAILABLE. HTTP Mapping: 409 Conflict */ - GRPC_STATUS_ABORTED = 10, + Aborted = 10, /* Operation was attempted past the valid range. E.g., seeking or reading past end of file. @@ -152,17 +152,17 @@ namespace Google.GRPC.Core they are done. HTTP Mapping: 400 Bad Request */ - GRPC_STATUS_OUT_OF_RANGE = 11, + OutOfRange = 11, /* Operation is not implemented or not supported/enabled in this service. HTTP Mapping: 501 Not Implemented */ - GRPC_STATUS_UNIMPLEMENTED = 12, + Unimplemented = 12, /* Internal errors. Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken. HTTP Mapping: 500 Internal Server Error */ - GRPC_STATUS_INTERNAL = 13, + Internal = 13, /* The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff. @@ -171,13 +171,11 @@ namespace Google.GRPC.Core ABORTED, and UNAVAILABLE. HTTP Mapping: 503 Service Unavailable */ - GRPC_STATUS_UNAVAILABLE = 14, + Unavailable = 14, /* Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error */ - GRPC_STATUS_DATA_LOSS = 15, - /* Force users to include a default branch: */ - GRPC_STATUS__DO_NOT_USE = -1 + DataLoss = 15 } } diff --git a/src/csharp/GrpcCore/Utils/RecordingObserver.cs b/src/csharp/GrpcCore/Utils/RecordingObserver.cs index 0c784e1d356..99d2725b70e 100644 --- a/src/csharp/GrpcCore/Utils/RecordingObserver.cs +++ b/src/csharp/GrpcCore/Utils/RecordingObserver.cs @@ -32,10 +32,10 @@ #endregion using System; -using System.Threading.Tasks; using System.Collections.Generic; +using System.Threading.Tasks; -namespace Google.GRPC.Core.Utils +namespace Grpc.Core.Utils { public class RecordingObserver : IObserver { diff --git a/src/csharp/GrpcCore/Utils/RecordingQueue.cs b/src/csharp/GrpcCore/Utils/RecordingQueue.cs index f8940d7584c..63992da6a95 100644 --- a/src/csharp/GrpcCore/Utils/RecordingQueue.cs +++ b/src/csharp/GrpcCore/Utils/RecordingQueue.cs @@ -36,7 +36,7 @@ using System.Threading.Tasks; using System.Collections.Generic; using System.Collections.Concurrent; -namespace Google.GRPC.Core.Utils +namespace Grpc.Core.Utils { // TODO: replace this by something that implements IAsyncEnumerator. /// diff --git a/src/csharp/GrpcCoreTests/ClientServerTest.cs b/src/csharp/GrpcCoreTests/ClientServerTest.cs index ba43e4f6a07..7e564a2fba5 100644 --- a/src/csharp/GrpcCoreTests/ClientServerTest.cs +++ b/src/csharp/GrpcCoreTests/ClientServerTest.cs @@ -32,15 +32,15 @@ #endregion using System; -using NUnit.Framework; -using Google.GRPC.Core; -using Google.GRPC.Core.Internal; -using System.Threading; using System.Diagnostics; +using System.Threading; using System.Threading.Tasks; -using Google.GRPC.Core.Utils; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; -namespace Google.GRPC.Core.Tests +namespace Grpc.Core.Tests { public class ClientServerTest { @@ -133,7 +133,7 @@ namespace Google.GRPC.Core.Tests Calls.BlockingUnaryCall(call, "ABC", default(CancellationToken)); Assert.Fail(); } catch(RpcException e) { - Assert.AreEqual(StatusCode.GRPC_STATUS_UNIMPLEMENTED, e.Status.StatusCode); + Assert.AreEqual(StatusCode.Unimplemented, e.Status.StatusCode); } } diff --git a/src/csharp/GrpcCoreTests/GrpcEnvironmentTest.cs b/src/csharp/GrpcCoreTests/GrpcEnvironmentTest.cs index 8656b1bf016..8d3aef946a6 100644 --- a/src/csharp/GrpcCoreTests/GrpcEnvironmentTest.cs +++ b/src/csharp/GrpcCoreTests/GrpcEnvironmentTest.cs @@ -32,11 +32,11 @@ #endregion using System; -using NUnit.Framework; -using Google.GRPC.Core; using System.Threading; +using Grpc.Core; +using NUnit.Framework; -namespace Google.GRPC.Core.Tests +namespace Grpc.Core.Tests { public class GrpcEnvironmentTest { diff --git a/src/csharp/GrpcCoreTests/ServerTest.cs b/src/csharp/GrpcCoreTests/ServerTest.cs index 43414a4cc49..dd30366f6a1 100644 --- a/src/csharp/GrpcCoreTests/ServerTest.cs +++ b/src/csharp/GrpcCoreTests/ServerTest.cs @@ -32,12 +32,12 @@ #endregion using System; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; using NUnit.Framework; -using Google.GRPC.Core.Internal; -using Google.GRPC.Core; -using Google.GRPC.Core.Utils; -namespace Google.GRPC.Core.Tests +namespace Grpc.Core.Tests { public class ServerTest { @@ -47,7 +47,7 @@ namespace Google.GRPC.Core.Tests GrpcEnvironment.Initialize(); Server server = new Server(); - int port = server.AddPort("localhost:0"); + server.AddPort("localhost:0"); server.Start(); server.ShutdownAsync().Wait(); diff --git a/src/csharp/GrpcCoreTests/TestResult.xml b/src/csharp/GrpcCoreTests/TestResult.xml index a5a6abd7b95..13da80739ce 100644 --- a/src/csharp/GrpcCoreTests/TestResult.xml +++ b/src/csharp/GrpcCoreTests/TestResult.xml @@ -15,17 +15,17 @@ - + - + - + diff --git a/src/csharp/GrpcCoreTests/TimespecTest.cs b/src/csharp/GrpcCoreTests/TimespecTest.cs index 21698242191..0ca84ec44bf 100644 --- a/src/csharp/GrpcCoreTests/TimespecTest.cs +++ b/src/csharp/GrpcCoreTests/TimespecTest.cs @@ -32,11 +32,11 @@ #endregion using System; -using NUnit.Framework; using System.Runtime.InteropServices; -using Google.GRPC.Core.Internal; +using Grpc.Core.Internal; +using NUnit.Framework; -namespace Google.GRPC.Core.Internal.Tests +namespace Grpc.Core.Internal.Tests { public class TimespecTest { diff --git a/src/csharp/InteropClient/Client.cs b/src/csharp/InteropClient/Client.cs index 945afe0642f..fdec6efd2ef 100644 --- a/src/csharp/InteropClient/Client.cs +++ b/src/csharp/InteropClient/Client.cs @@ -33,14 +33,14 @@ using System; using System.Collections.Generic; -using NUnit.Framework; using System.Text.RegularExpressions; -using Google.GRPC.Core; -using Google.GRPC.Core.Utils; using Google.ProtocolBuffers; +using Grpc.Core; +using Grpc.Core.Utils; +using NUnit.Framework; using grpc.testing; -namespace Google.GRPC.Interop +namespace Grpc.Interop { class Client { diff --git a/src/csharp/InteropClient/InteropClient.csproj b/src/csharp/InteropClient/InteropClient.csproj index a450f3a2feb..29590f49508 100644 --- a/src/csharp/InteropClient/InteropClient.csproj +++ b/src/csharp/InteropClient/InteropClient.csproj @@ -9,7 +9,7 @@ Exe InteropClient InteropClient - Google.GRPC.Interop.Client + Grpc.Interop.Client v4.5 @@ -33,14 +33,13 @@ x86 - - False - ..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + ..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll + diff --git a/src/csharp/MathClient/MathClient.cs b/src/csharp/MathClient/MathClient.cs index eb9b7b105b8..95a4678bb8f 100644 --- a/src/csharp/MathClient/MathClient.cs +++ b/src/csharp/MathClient/MathClient.cs @@ -33,8 +33,8 @@ using System; using System.Runtime.InteropServices; -using Google.GRPC.Core; using System.Threading; +using Grpc.Core; namespace math { From 50b91d001811df0c6cdda17137ce706d9bcb5458 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 18 Feb 2015 09:59:56 -0800 Subject: [PATCH 34/59] Removes unnecesary check from the interop teste --- src/ruby/bin/interop/interop_client.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ruby/bin/interop/interop_client.rb b/src/ruby/bin/interop/interop_client.rb index ef31f68f83b..50a14e3a961 100755 --- a/src/ruby/bin/interop/interop_client.rb +++ b/src/ruby/bin/interop/interop_client.rb @@ -211,10 +211,8 @@ class NamedTests def compute_engine_creds resp = perform_large_unary(fill_username: true, fill_oauth_scope: true) - assert(@args.oauth_scope.include?(resp.oauth_scope), - 'service_account_creds: incorrect oauth_scope') assert_equal(@args.default_service_account, resp.username, - 'service_account_creds: incorrect username') + 'compute_engine_creds: incorrect username') p 'OK: compute_engine_creds' end From df89cf83914667f39fb973e9e8fbb27caa57c4c9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 19 Feb 2015 09:38:19 -0800 Subject: [PATCH 35/59] Updated Copyright information and assembly versions for C# --- src/csharp/GrpcApi/Properties/AssemblyInfo.cs | 4 ++-- src/csharp/GrpcApiTests/Properties/AssemblyInfo.cs | 4 ++-- src/csharp/GrpcCore/Properties/AssemblyInfo.cs | 4 ++-- src/csharp/GrpcCoreTests/Properties/AssemblyInfo.cs | 4 ++-- src/csharp/InteropClient/Properties/AssemblyInfo.cs | 4 ++-- src/csharp/MathClient/Properties/AssemblyInfo.cs | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/csharp/GrpcApi/Properties/AssemblyInfo.cs b/src/csharp/GrpcApi/Properties/AssemblyInfo.cs index e0a8e4357fc..96f142dae9a 100644 --- a/src/csharp/GrpcApi/Properties/AssemblyInfo.cs +++ b/src/csharp/GrpcApi/Properties/AssemblyInfo.cs @@ -8,13 +8,13 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("")] [assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("jtattermusch")] +[assembly: AssemblyCopyright ("Google Inc. All rights reserved.")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("1.0.*")] +[assembly: AssemblyVersion ("0.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] diff --git a/src/csharp/GrpcApiTests/Properties/AssemblyInfo.cs b/src/csharp/GrpcApiTests/Properties/AssemblyInfo.cs index 5594e92e72b..ac3cfca52e1 100644 --- a/src/csharp/GrpcApiTests/Properties/AssemblyInfo.cs +++ b/src/csharp/GrpcApiTests/Properties/AssemblyInfo.cs @@ -8,13 +8,13 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("jtattermusch")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] diff --git a/src/csharp/GrpcCore/Properties/AssemblyInfo.cs b/src/csharp/GrpcCore/Properties/AssemblyInfo.cs index 0907b868336..ed3a7af8f40 100644 --- a/src/csharp/GrpcCore/Properties/AssemblyInfo.cs +++ b/src/csharp/GrpcCore/Properties/AssemblyInfo.cs @@ -8,13 +8,13 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("")] [assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("jtattermusch")] +[assembly: AssemblyCopyright ("Google Inc. All rights reserved.")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("1.0.*")] +[assembly: AssemblyVersion ("0.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] diff --git a/src/csharp/GrpcCoreTests/Properties/AssemblyInfo.cs b/src/csharp/GrpcCoreTests/Properties/AssemblyInfo.cs index a93d843889f..07f35556dfe 100644 --- a/src/csharp/GrpcCoreTests/Properties/AssemblyInfo.cs +++ b/src/csharp/GrpcCoreTests/Properties/AssemblyInfo.cs @@ -8,13 +8,13 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("jtattermusch")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] diff --git a/src/csharp/InteropClient/Properties/AssemblyInfo.cs b/src/csharp/InteropClient/Properties/AssemblyInfo.cs index 00b4bd58955..3a13173ac77 100644 --- a/src/csharp/InteropClient/Properties/AssemblyInfo.cs +++ b/src/csharp/InteropClient/Properties/AssemblyInfo.cs @@ -8,13 +8,13 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("jtattermusch")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] diff --git a/src/csharp/MathClient/Properties/AssemblyInfo.cs b/src/csharp/MathClient/Properties/AssemblyInfo.cs index aa614943acb..d24412f4978 100644 --- a/src/csharp/MathClient/Properties/AssemblyInfo.cs +++ b/src/csharp/MathClient/Properties/AssemblyInfo.cs @@ -8,13 +8,13 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("")] [assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("jtattermusch")] +[assembly: AssemblyCopyright ("Google Inc. All rights reserved.")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("1.0.*")] +[assembly: AssemblyVersion ("0.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] From c33efe4ad58a9d0fc2e60f19f59ba8c095020844 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 19 Feb 2015 09:39:49 -0800 Subject: [PATCH 36/59] Fixes the grpc.gemspec, clarifies the installation instructions --- src/ruby/README.md | 25 +++++++++++++------------ src/ruby/grpc.gemspec | 8 ++++---- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/ruby/README.md b/src/ruby/README.md index 7ece7e27065..d9e33f87fae 100755 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -1,7 +1,7 @@ gRPC Ruby ========= -A Ruby implementation of gRPC, Google's RPC library. +A Ruby implementation of gRPC. INSTALLATION PREREQUISITES @@ -10,29 +10,30 @@ INSTALLATION PREREQUISITES This requires Ruby 2.x, as the rpc api surface uses keyword args. -INSTALLING ----------- +QUICK - INSTALL +--------------- -- Install the gRPC core library - TODO: describe this, once the core distribution mechanism is defined. +- Clone this repository. +- Follow the instructions in the [INSTALL](../../INSTALL) to install grpc C core library. +- Use bundler to install +```sh +$ # from this directory +$ gem install bundler && bundle install ``` -$ gem install grpc -``` - Installing from source ---------------------- - Build or Install the gRPC core E.g, from the root of the grpc [git repo](https://github.com/google/grpc) -``` +```sh $ cd ../.. $ make && sudo make install ``` - Install Ruby 2.x. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling the exact ruby version that's used. -``` +```sh $ command curl -sSL https://rvm.io/mpapis.asc | gpg --import - $ \curl -sSL https://get.rvm.io | bash -s stable --ruby $ @@ -46,7 +47,7 @@ $ gem install bundler ``` - Finally, install grpc ruby locally. -``` +```sh $ cd $ bundle install $ rake # compiles the extension, runs the unit tests, see rake -T for other options @@ -69,6 +70,6 @@ Directory structure is the layout for [ruby extensions](http://guides.rubygems.o stub = Math::Math::Stub.new('my.test.math.server.com:8080') req = Math::DivArgs.new(dividend: 7, divisor: 3) logger.info("div(7/3): req=#{req.inspect}") -resp = stub.div(req, INFINITE_FUTURE) +resp = stub.div(req) logger.info("Answer: #{resp.inspect}") ``` diff --git a/src/ruby/grpc.gemspec b/src/ruby/grpc.gemspec index c479cc96167..bc59c234e5a 100755 --- a/src/ruby/grpc.gemspec +++ b/src/ruby/grpc.gemspec @@ -5,12 +5,12 @@ require 'grpc/version' Gem::Specification.new do |s| s.name = 'grpc' - s.version = Google::RPC::VERSION + s.version = GRPC::VERSION s.authors = ['gRPC Authors'] - s.email = 'tbetbetbe@gmail.com' + s.email = 'temiola@google.com' s.homepage = 'https://github.com/google/grpc/tree/master/src/ruby' - s.summary = 'Google RPC system in Ruby' - s.description = 'Send RPCs from Ruby using Google\'s RPC system' + s.summary = 'GRPC system in Ruby' + s.description = 'Send RPCs from Ruby using GRPC' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- spec/*`.split("\n") From caf7b78703bdb15e4e98103416fa23f5b7d52677 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 19 Feb 2015 09:46:20 -0800 Subject: [PATCH 37/59] nit in README --- src/csharp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/README.md b/src/csharp/README.md index f56ddabda5a..fdc6f680416 100755 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -1,7 +1,7 @@ gRPC C# ======= -A C# implementation of gRPC, Google's RPC library. +A C# implementation of gRPC. EXPERIMENTAL ONLY ----------------- From 850290ff7cd2776de48522ec8e0914171d97d60d Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 19 Feb 2015 09:59:44 -0800 Subject: [PATCH 38/59] Fix a bug in Makefile where cpp_plugin name hadn't been updated yet where it was used. --- Makefile | 20 ++++++++++---------- templates/Makefile.template | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 68dd0048978..fc11670d7ab 100644 --- a/Makefile +++ b/Makefile @@ -1808,7 +1808,7 @@ else $(GENDIR)/examples/pubsub/empty.pb.cc: examples/pubsub/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1817,7 +1817,7 @@ else $(GENDIR)/examples/pubsub/label.pb.cc: examples/pubsub/label.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1826,7 +1826,7 @@ else $(GENDIR)/examples/pubsub/pubsub.pb.cc: examples/pubsub/pubsub.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1835,7 +1835,7 @@ else $(GENDIR)/test/cpp/interop/empty.pb.cc: test/cpp/interop/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1844,7 +1844,7 @@ else $(GENDIR)/test/cpp/interop/messages.pb.cc: test/cpp/interop/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1853,7 +1853,7 @@ else $(GENDIR)/test/cpp/interop/test.pb.cc: test/cpp/interop/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1862,7 +1862,7 @@ else $(GENDIR)/test/cpp/qps/qpstest.pb.cc: test/cpp/qps/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1871,7 +1871,7 @@ else $(GENDIR)/test/cpp/util/echo.pb.cc: test/cpp/util/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1880,7 +1880,7 @@ else $(GENDIR)/test/cpp/util/echo_duplicate.pb.cc: test/cpp/util/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1889,7 +1889,7 @@ else $(GENDIR)/test/cpp/util/messages.pb.cc: test/cpp/util/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif diff --git a/templates/Makefile.template b/templates/Makefile.template index 79ec95dd138..b302623cd94 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -692,7 +692,7 @@ else $(GENDIR)/${p}.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/cpp_plugin $< + $(Q) $(PROTOC) --cpp_out=$(GENDIR) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif % endfor From 0e24d5b70f954d9799af181aba42c01022309ebb Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 19 Feb 2015 10:04:04 -0800 Subject: [PATCH 39/59] Fixes case, other minor corrections --- src/ruby/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ruby/README.md b/src/ruby/README.md index d9e33f87fae..42f307aa5d5 100755 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -7,14 +7,14 @@ A Ruby implementation of gRPC. INSTALLATION PREREQUISITES -------------------------- -This requires Ruby 2.x, as the rpc api surface uses keyword args. +This requires Ruby 2.x, as the RPC API surface uses keyword args. QUICK - INSTALL --------------- - Clone this repository. -- Follow the instructions in the [INSTALL](../../INSTALL) to install grpc C core library. +- Follow the instructions in [INSTALL](../../INSTALL) to install the gRPC C core. - Use bundler to install ```sh $ # from this directory @@ -24,8 +24,8 @@ $ gem install bundler && bundle install Installing from source ---------------------- -- Build or Install the gRPC core -E.g, from the root of the grpc [git repo](https://github.com/google/grpc) +- Build the gRPC C core +E.g, from the root of the gRPC [git repo](https://github.com/google/grpc) ```sh $ cd ../.. $ make && sudo make install @@ -46,7 +46,7 @@ $ # and that the rvm command is installed $ gem install bundler ``` -- Finally, install grpc ruby locally. +- Finally, install the gRPC gem locally. ```sh $ cd $ bundle install @@ -61,7 +61,7 @@ Directory structure is the layout for [ruby extensions](http://guides.rubygems.o - ext: the gRPC ruby extension - lib: - the entrypoint grpc ruby library to be used in a 'require' statement + the entrypoint gRPC ruby library to be used in a 'require' statement - spec: Rspec unittest - bin: From 512da888c46d14b53e909bde99aa23ef42a3ff33 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 10:54:48 -0800 Subject: [PATCH 40/59] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2b049d206bd..d4140c54837 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ of shared C core library [src/core] (src/core). Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. +#Documentation + +You can find more detailed documentation of grpc in [grpc-common repository](http://github.com/grpc/grpc-common). #Overview From c284c545614160efc7ab010fbdc137656209a5b8 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:06:58 -0800 Subject: [PATCH 41/59] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index d4140c54837..42e1c5a5e00 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ of shared C core library [src/core] (src/core). * NodeJS source code: [src/node] (src/node) * PHP source code: [src/php] (src/php) * C# source code: [src/csharp] (src/csharp) + * Objective-C source code: [src/objective-c] (src/objective-c) Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. @@ -26,6 +27,19 @@ Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. You can find more detailed documentation of grpc in [grpc-common repository](http://github.com/grpc/grpc-common). +#Current Status of libraries + +Libraries in different languages are in different state of development. We are seeking contributions for all of these libraries. + + * shared C core library [src/core] (src/core) : Early adopter ready - Alpha. + * C++ Library: [src/cpp] (src/cpp) : Early adopter ready - Alpha. + * Python Library: [src/python] (src/python) : Early adopter ready - Alpha. + * Ruby Library: [src/ruby] (src/ruby) : Early adopter ready - Alpha. + * NodeJS Library: [src/node] (src/node) : Early adopter ready - Alpha. + * PHP Library: [src/php] (src/php) : Pre-Alpha. + * C# Library: [src/csharp] (src/csharp) : Pre-Alpha. + * Objective-C Library: [src/objective-c] (src/objective-c): Pre-Alpha. + #Overview From 4040e656c011470e1ccb2fe595bfc8a22769203c Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:26:16 -0800 Subject: [PATCH 42/59] Create README.md --- src/core/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/core/README.md diff --git a/src/core/README.md b/src/core/README.md new file mode 100644 index 00000000000..407dc4f7019 --- /dev/null +++ b/src/core/README.md @@ -0,0 +1,9 @@ +#Overview + +This directory contains source code for shared C library. Libraries in other languages in this repository (C++, Ruby, +Python, PHP, NodeJS, Objective-C) are layered on top of this library. + +#Status + +Alpha : Ready for early adopters + From 80949e36d3a54129bdfe2460ad5604b4cdd892f3 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:27:07 -0800 Subject: [PATCH 43/59] Create README.md --- src/cpp/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/cpp/README.md diff --git a/src/cpp/README.md b/src/cpp/README.md new file mode 100644 index 00000000000..a2eb9a08c81 --- /dev/null +++ b/src/cpp/README.md @@ -0,0 +1,9 @@ + +#Overview + +This directory contains source code for C++ implementation of gRPC. + +#Status + +Alpha : Ready for early adopters + From 1b360d3ac7104bb19f322f7f244f6575b3189fb2 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:28:07 -0800 Subject: [PATCH 44/59] Update README.md --- src/csharp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/README.md b/src/csharp/README.md index a16f1e719e1..c4e2f674ad6 100755 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -3,7 +3,7 @@ gRPC C# A C# implementation of gRPC, Google's RPC library. -EXPERIMENTAL ONLY +Status ----------------- **This gRPC C# implementation is work-in-progress and is not expected to work yet.** From 06aef235e956f8d8d751afd21ee67c07a8c39832 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:28:57 -0800 Subject: [PATCH 45/59] Update README.md --- src/node/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/README.md b/src/node/README.md index c342b7ca575..8880213e9a9 100644 --- a/src/node/README.md +++ b/src/node/README.md @@ -1,5 +1,9 @@ # Node.js gRPC Library +## Status + +Alpha : Ready for early adopters + ## Installation First, clone this repository (NPM package coming soon). Then follow the instructions in the `INSTALL` file in the root of the repository to install the C core library that this package depends on. From db80aff06f91f35359724ebd1759320b95484530 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 19 Feb 2015 11:29:12 -0800 Subject: [PATCH 46/59] Remove cpu.h which is no longer a thing --- build.json | 1 - 1 file changed, 1 deletion(-) diff --git a/build.json b/build.json index c7c640d2c21..1e11a4daade 100644 --- a/build.json +++ b/build.json @@ -239,7 +239,6 @@ "include/grpc/support/useful.h" ], "headers": [ - "src/core/support/cpu.h", "src/core/support/env.h", "src/core/support/file.h", "src/core/support/murmur_hash.h", From 300748ea7da1e2aa8166c34908a7799dcea0665e Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:30:40 -0800 Subject: [PATCH 47/59] Update README.md --- src/php/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/php/README.md b/src/php/README.md index 620c68fd7b5..e47dafcc081 100755 --- a/src/php/README.md +++ b/src/php/README.md @@ -1,4 +1,12 @@ -# PHP wrapper for the GRPC interfaces. + +#Overview + +This directory contains source code for PHP implementation of gRPC layered on shared C library. + +#Status + +Pre-Alpha : Not ready for usage yet. + ## LAYOUT From 691dbcc7f96bebbbacbdfb27dd2e95fc0f0cc7d4 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:31:20 -0800 Subject: [PATCH 48/59] Update README.md --- src/php/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/README.md b/src/php/README.md index e47dafcc081..40c79e0dd40 100755 --- a/src/php/README.md +++ b/src/php/README.md @@ -5,7 +5,7 @@ This directory contains source code for PHP implementation of gRPC layered on sh #Status -Pre-Alpha : Not ready for usage yet. +Pre-Alpha : This gRPC PHP implementation is work-in-progress and is not expected to work yet. ## LAYOUT From fca87034a341820094188e2cfd532f0b4f15f361 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:34:43 -0800 Subject: [PATCH 49/59] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42e1c5a5e00..268d4f4dbfb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. #Documentation -You can find more detailed documentation of grpc in [grpc-common repository](http://github.com/grpc/grpc-common). +You can find more detailed documentation about grpc in [grpc-common repository](http://github.com/grpc/grpc-common). #Current Status of libraries From ad82155cd5e57fd604cfe717cc0dbf75af1d3317 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Thu, 19 Feb 2015 11:44:49 -0800 Subject: [PATCH 50/59] Update README.md --- src/ruby/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ruby/README.md b/src/ruby/README.md index 7ece7e27065..9b157d1ce7f 100755 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -3,6 +3,10 @@ gRPC Ruby A Ruby implementation of gRPC, Google's RPC library. +Status +------- + +Alpha : Ready for early adopters INSTALLATION PREREQUISITES -------------------------- From a143af389ee552f96163505ef56644a757de57c6 Mon Sep 17 00:00:00 2001 From: Mugur Marculescu Date: Thu, 19 Feb 2015 11:49:55 -0800 Subject: [PATCH 51/59] Small change to documentation text. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 268d4f4dbfb..19851767536 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. #Documentation -You can find more detailed documentation about grpc in [grpc-common repository](http://github.com/grpc/grpc-common). +You can find more detailed documentation and examples in the [grpc-common repository](http://github.com/grpc/grpc-common). #Current Status of libraries From 50556477d491da6c42d4f258f6e27ef2177ff568 Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Thu, 19 Feb 2015 12:37:35 -0800 Subject: [PATCH 52/59] add missing header --- Makefile | 1 + build.json | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 68dd0048978..b581a56a4e3 100644 --- a/Makefile +++ b/Makefile @@ -3069,6 +3069,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/server_context.h \ include/grpc++/server_credentials.h \ include/grpc++/status.h \ + include/grpc++/status_code_enum.h \ include/grpc++/stream.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) diff --git a/build.json b/build.json index c7c640d2c21..413863fc883 100644 --- a/build.json +++ b/build.json @@ -416,6 +416,7 @@ "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", "include/grpc++/status.h", + "include/grpc++/status_code_enum.h", "include/grpc++/stream.h" ], "headers": [ From 1a986969d75eb19a42b4be4cdd4d085533f9b1da Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Thu, 19 Feb 2015 12:40:46 -0800 Subject: [PATCH 53/59] add more missing headers --- Makefile | 2 ++ build.json | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b581a56a4e3..08527e4c3a0 100644 --- a/Makefile +++ b/Makefile @@ -3064,6 +3064,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/internal_stub.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ + include/grpc++/impl/service_type.h \ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ @@ -3071,6 +3072,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/status.h \ include/grpc++/status_code_enum.h \ include/grpc++/stream.h \ + include/grpc++/thread_pool_interface.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) diff --git a/build.json b/build.json index 413863fc883..d06bf7a2060 100644 --- a/build.json +++ b/build.json @@ -411,13 +411,15 @@ "include/grpc++/impl/internal_stub.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/impl/service_type.h", "include/grpc++/server.h", "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", "include/grpc++/status.h", "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h" + "include/grpc++/stream.h", + "include/grpc++/thread_pool_interface.h" ], "headers": [ "src/cpp/client/channel.h", From 9ea2e3aecd1845125f0a97a7cc53617f5df3d4ff Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 19 Feb 2015 13:36:56 -0800 Subject: [PATCH 54/59] Added files to the node package --- src/node/package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/node/package.json b/src/node/package.json index 821641ce19b..642d80e26f0 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -17,5 +17,15 @@ "minimist": "^1.1.0", "googleauth": "google/google-auth-library-nodejs" }, + "files": [ + "README.md", + "index.js", + "binding.gyp", + "examples", + "ext", + "interop", + "src", + "test" + ], "main": "index.js" } From f8a9b1c191c752a2e45bac6700d7192dad240e7c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 19 Feb 2015 13:46:30 -0800 Subject: [PATCH 55/59] Added lint script --- src/node/.jshintrc | 28 ++++++++++++++++++++++++++++ src/node/package.json | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 src/node/.jshintrc diff --git a/src/node/.jshintrc b/src/node/.jshintrc new file mode 100644 index 00000000000..1d930c34ca1 --- /dev/null +++ b/src/node/.jshintrc @@ -0,0 +1,28 @@ +{ + "bitwise": true, + "curly": true, + "eqeqeq": true, + "esnext": true, + "freeze": true, + "immed": true, + "indent": 2, + "latedef": "nofunc", + "maxlen": 100, + "newcap": true, + "node": true, + "noarg": true, + "quotmark": "single", + "strict": true, + "trailing": true, + "undef": true, + "unused": true, + "globals": { + /* Mocha-provided globals */ + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false + } +} \ No newline at end of file diff --git a/src/node/package.json b/src/node/package.json index 821641ce19b..1d4c3f6e6a2 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -3,10 +3,12 @@ "version": "0.2.0", "description": "gRPC Library for Node", "scripts": { + "lint": "jshint src test examples interop index.js", "test": "./node_modules/mocha/bin/mocha" }, "dependencies": { "bindings": "^1.2.1", + "jshint": "^2.5.5", "nan": "~1.3.0", "protobufjs": "murgatroid99/ProtoBuf.js", "underscore": "^1.7.0", From dca966d39ca15d125bcbc25853ce066410adfeb9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 19 Feb 2015 14:37:18 -0800 Subject: [PATCH 56/59] Fixed lint errors --- src/node/.jshintrc | 6 ++--- src/node/examples/math_server.js | 5 ++--- src/node/examples/perf_test.js | 33 +++++++++++++++------------- src/node/examples/stock_server.js | 2 ++ src/node/index.js | 2 ++ src/node/interop/interop_client.js | 7 ++++-- src/node/interop/interop_server.js | 2 ++ src/node/package.json | 2 +- src/node/src/client.js | 23 +++++++++++-------- src/node/src/common.js | 2 ++ src/node/src/server.js | 12 +++++----- src/node/test/call_test.js | 2 ++ src/node/test/channel_test.js | 2 ++ src/node/test/constant_test.js | 2 ++ src/node/test/end_to_end_test.js | 4 +++- src/node/test/interop_sanity_test.js | 2 ++ src/node/test/math_client_test.js | 4 +++- src/node/test/surface_test.js | 4 ++-- 18 files changed, 74 insertions(+), 42 deletions(-) diff --git a/src/node/.jshintrc b/src/node/.jshintrc index 1d930c34ca1..8237e0d2b64 100644 --- a/src/node/.jshintrc +++ b/src/node/.jshintrc @@ -7,7 +7,7 @@ "immed": true, "indent": 2, "latedef": "nofunc", - "maxlen": 100, + "maxlen": 80, "newcap": true, "node": true, "noarg": true, @@ -15,7 +15,7 @@ "strict": true, "trailing": true, "undef": true, - "unused": true, + "unused": "vars", "globals": { /* Mocha-provided globals */ "describe": false, @@ -25,4 +25,4 @@ "after": false, "afterEach": false } -} \ No newline at end of file +} diff --git a/src/node/examples/math_server.js b/src/node/examples/math_server.js index 89bc0de3ba0..ae548c89e40 100644 --- a/src/node/examples/math_server.js +++ b/src/node/examples/math_server.js @@ -31,9 +31,8 @@ * */ -var _ = require('underscore'); -var ProtoBuf = require('protobufjs'); -var fs = require('fs'); +'use strict'; + var util = require('util'); var Transform = require('stream').Transform; diff --git a/src/node/examples/perf_test.js b/src/node/examples/perf_test.js index c5e28727369..31083e09872 100644 --- a/src/node/examples/perf_test.js +++ b/src/node/examples/perf_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var grpc = require('..'); var testProto = grpc.load(__dirname + '/../interop/test.proto').grpc.testing; var _ = require('underscore'); @@ -44,7 +46,6 @@ function runTest(iterations, callback) { function runIterations(finish) { var start = process.hrtime(); var intervals = []; - var pending = iterations; function next(i) { if (i >= iterations) { testServer.server.shutdown(); @@ -69,28 +70,30 @@ function runTest(iterations, callback) { function warmUp(num) { var pending = num; + function startCall() { + client.emptyCall({}, function(err, resp) { + pending--; + if (pending === 0) { + runIterations(callback); + } + }); + } for (var i = 0; i < num; i++) { - (function(i) { - client.emptyCall({}, function(err, resp) { - pending--; - if (pending === 0) { - runIterations(callback); - } - }); - })(i); + startCall(); } } warmUp(100); } -function percentile(arr, percentile) { - if (percentile > 99) { - percentile = 99; +function percentile(arr, pct) { + if (pct > 99) { + pct = 99; } - if (percentile < 0) { - percentile = 0; + if (pct < 0) { + pct = 0; } - return arr[(arr.length * percentile / 100)|0]; + var index = Math.floor(arr.length * pct / 100); + return arr[index]; } if (require.main === module) { diff --git a/src/node/examples/stock_server.js b/src/node/examples/stock_server.js index b226a715732..e475c9cb4cc 100644 --- a/src/node/examples/stock_server.js +++ b/src/node/examples/stock_server.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var _ = require('underscore'); var grpc = require('..'); var examples = grpc.load(__dirname + '/stock.proto').examples; diff --git a/src/node/index.js b/src/node/index.js index 1bef2072dde..4b5302e4382 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var _ = require('underscore'); var ProtoBuf = require('protobufjs'); diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index fc2fdf4dc9d..eaf254bcfef 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var fs = require('fs'); var path = require('path'); var grpc = require('..'); @@ -41,7 +43,8 @@ var assert = require('assert'); var AUTH_SCOPE = 'https://www.googleapis.com/auth/xapi.zoo'; var AUTH_SCOPE_RESPONSE = 'xapi.zoo'; -var AUTH_USER = '155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk@developer.gserviceaccount.com'; +var AUTH_USER = ('155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk' + + '@developer.gserviceaccount.com'); /** * Create a buffer filled with size zeroes @@ -318,7 +321,7 @@ var test_cases = { /** * Execute a single test case. * @param {string} address The address of the server to connect to, in the - * format "hostname:port" + * format 'hostname:port' * @param {string} host_overrirde The hostname of the server to use as an SSL * override * @param {string} test_case The name of the test case to run diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index c97d2344550..125ede17464 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var fs = require('fs'); var path = require('path'); var _ = require('underscore'); diff --git a/src/node/package.json b/src/node/package.json index 1d4c3f6e6a2..7aa0083e699 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -4,7 +4,7 @@ "description": "gRPC Library for Node", "scripts": { "lint": "jshint src test examples interop index.js", - "test": "./node_modules/mocha/bin/mocha" + "test": "./node_modules/mocha/bin/mocha && npm run-script lint" }, "dependencies": { "bindings": "^1.2.1", diff --git a/src/node/src/client.js b/src/node/src/client.js index 19c3144c7d9..aaa7be79c9d 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var _ = require('underscore'); var capitalize = require('underscore.string/capitalize'); @@ -77,6 +79,7 @@ function ClientWritableStream(call, serialize) { * @param {function(Error=)} callback Called when the write is complete */ function _write(chunk, encoding, callback) { + /* jshint validthis: true */ var batch = {}; batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk); this.call.startBatch(batch, function(err, event) { @@ -85,7 +88,7 @@ function _write(chunk, encoding, callback) { } callback(); }); -}; +} ClientWritableStream.prototype._write = _write; @@ -111,6 +114,7 @@ function ClientReadableStream(call, deserialize) { * @param {*} size Ignored because we use objectMode=true */ function _read(size) { + /* jshint validthis: true */ var self = this; /** * Callback to be called when a READ event is received. Pushes the data onto @@ -126,7 +130,7 @@ function _read(size) { return; } var data = event.read; - if (self.push(self.deserialize(data)) && data != null) { + if (self.push(self.deserialize(data)) && data !== null) { var read_batch = {}; read_batch[grpc.opType.RECV_MESSAGE] = true; self.call.startBatch(read_batch, readCallback); @@ -144,7 +148,7 @@ function _read(size) { self.call.startBatch(read_batch, readCallback); } } -}; +} ClientReadableStream.prototype._read = _read; @@ -163,10 +167,6 @@ function ClientDuplexStream(call, serialize, deserialize) { Duplex.call(this, {objectMode: true}); this.serialize = common.wrapIgnoreNull(serialize); this.deserialize = common.wrapIgnoreNull(deserialize); - var self = this; - var finished = false; - // Indicates that a read is currently pending - var reading = false; this.call = call; this.on('finish', function() { var batch = {}; @@ -182,6 +182,7 @@ ClientDuplexStream.prototype._write = _write; * Cancel the ongoing call */ function cancel() { + /* jshint validthis: true */ this.call.cancel(); } @@ -213,6 +214,7 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { * @return {EventEmitter} An event emitter for stream related events */ function makeUnaryRequest(argument, callback, metadata, deadline) { + /* jshint validthis: true */ if (deadline === undefined) { deadline = Infinity; } @@ -242,7 +244,7 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { callback(err); return; } - if (response.status.code != grpc.status.OK) { + if (response.status.code !== grpc.status.OK) { callback(response.status); return; } @@ -278,6 +280,7 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { * @return {EventEmitter} An event emitter for stream related events */ function makeClientStreamRequest(callback, metadata, deadline) { + /* jshint validthis: true */ if (deadline === undefined) { deadline = Infinity; } @@ -310,7 +313,7 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { callback(err); return; } - if (response.status.code != grpc.status.OK) { + if (response.status.code !== grpc.status.OK) { callback(response.status); return; } @@ -345,6 +348,7 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) { * @return {EventEmitter} An event emitter for stream related events */ function makeServerStreamRequest(argument, metadata, deadline) { + /* jshint validthis: true */ if (deadline === undefined) { deadline = Infinity; } @@ -404,6 +408,7 @@ function makeBidiStreamRequestFunction(method, serialize, deserialize) { * @return {EventEmitter} An event emitter for stream related events */ function makeBidiStreamRequest(metadata, deadline) { + /* jshint validthis: true */ if (deadline === undefined) { deadline = Infinity; } diff --git a/src/node/src/common.js b/src/node/src/common.js index 848c96742d9..eec8f0f9878 100644 --- a/src/node/src/common.js +++ b/src/node/src/common.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var _ = require('underscore'); var capitalize = require('underscore.string/capitalize'); diff --git a/src/node/src/server.js b/src/node/src/server.js index 48c349ef99d..91dde022518 100644 --- a/src/node/src/server.js +++ b/src/node/src/server.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var _ = require('underscore'); var capitalize = require('underscore.string/capitalize'); @@ -217,6 +219,7 @@ function ServerWritableStream(call, serialize) { * complete */ function _write(chunk, encoding, callback) { + /* jshint validthis: true */ var batch = {}; batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk); this.call.startBatch(batch, function(err, value) { @@ -251,6 +254,7 @@ function ServerReadableStream(call, deserialize) { * @param {number} size Ignored */ function _read(size) { + /* jshint validthis: true */ var self = this; /** * Callback to be called when a READ event is received. Pushes the data onto @@ -267,7 +271,7 @@ function _read(size) { return; } var data = event.read; - if (self.push(self.deserialize(data)) && data != null) { + if (self.push(self.deserialize(data)) && data !== null) { var read_batch = {}; read_batch[grpc.opType.RECV_MESSAGE] = true; self.call.startBatch(read_batch, readCallback); @@ -424,7 +428,6 @@ function Server(getMetadata, options) { var handlers = this.handlers; var server = new grpc.Server(options); this._server = server; - var started = false; /** * Start the server and begin handling requests * @this Server @@ -456,8 +459,7 @@ function Server(getMetadata, options) { return; } server.requestCall(handleNewCall); - var handler = undefined; - var deadline = details.deadline; + var handler; if (handlers.hasOwnProperty(method)) { handler = handlers[method]; } else { @@ -465,7 +467,7 @@ function Server(getMetadata, options) { batch[grpc.opType.SEND_INITIAL_METADATA] = {}; batch[grpc.opType.SEND_STATUS_FROM_SERVER] = { code: grpc.status.UNIMPLEMENTED, - details: "This method is not available on this server.", + details: 'This method is not available on this server.', metadata: {} }; batch[grpc.opType.RECV_CLOSE_ON_SERVER] = true; diff --git a/src/node/test/call_test.js b/src/node/test/call_test.js index c1a7e95fa09..7b2b36ae371 100644 --- a/src/node/test/call_test.js +++ b/src/node/test/call_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var assert = require('assert'); var grpc = require('bindings')('grpc.node'); diff --git a/src/node/test/channel_test.js b/src/node/test/channel_test.js index 449a8cc4c36..33200c99ee2 100644 --- a/src/node/test/channel_test.js +++ b/src/node/test/channel_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var assert = require('assert'); var grpc = require('bindings')('grpc.node'); diff --git a/src/node/test/constant_test.js b/src/node/test/constant_test.js index 4a403868c7c..ecc98ec4438 100644 --- a/src/node/test/constant_test.js +++ b/src/node/test/constant_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var assert = require('assert'); var grpc = require('bindings')('grpc.node'); diff --git a/src/node/test/end_to_end_test.js b/src/node/test/end_to_end_test.js index 8e99d6f1628..1cc19286917 100644 --- a/src/node/test/end_to_end_test.js +++ b/src/node/test/end_to_end_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var assert = require('assert'); var grpc = require('bindings')('grpc.node'); @@ -227,7 +229,7 @@ describe('end-to-end', function() { response_batch[grpc.opType.RECV_CLOSE_ON_SERVER] = true; server_call.startBatch(response_batch, function(err, response) { assert(response['send status']); - assert(!response['cancelled']); + assert(!response.cancelled); done(); }); }); diff --git a/src/node/test/interop_sanity_test.js b/src/node/test/interop_sanity_test.js index d1bdd1660f0..8dc933eac56 100644 --- a/src/node/test/interop_sanity_test.js +++ b/src/node/test/interop_sanity_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var interop_server = require('../interop/interop_server.js'); var interop_client = require('../interop/interop_client.js'); diff --git a/src/node/test/math_client_test.js b/src/node/test/math_client_test.js index fd946e0325d..d83f64116f7 100644 --- a/src/node/test/math_client_test.js +++ b/src/node/test/math_client_test.js @@ -31,6 +31,8 @@ * */ +'use strict'; + var assert = require('assert'); var grpc = require('..'); @@ -59,7 +61,7 @@ describe('Math client', function() { }); it('should handle a single request', function(done) { var arg = {dividend: 7, divisor: 4}; - var call = math_client.div(arg, function handleDivResult(err, value) { + math_client.div(arg, function handleDivResult(err, value) { assert.ifError(err); assert.equal(value.quotient, 1); assert.equal(value.remainder, 3); diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index d6694724e54..91d8197bee1 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -31,9 +31,9 @@ * */ -var assert = require('assert'); +'use strict'; -var surface_server = require('../src/server.js'); +var assert = require('assert'); var surface_client = require('../src/client.js'); From 788b766dba30bc33c6bcee596c8804ee003de337 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 19 Feb 2015 15:09:05 -0800 Subject: [PATCH 57/59] Fix internal include path --- src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m index 7c64850d7e8..4cf52673e26 100644 --- a/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m +++ b/src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m @@ -1,6 +1,6 @@ #import "GRPCDelegateWrapper.h" -#import +#import @interface GRPCDelegateWrapper () // These are atomic so that cancellation can nillify them from any thread. From f8e297a3c0e2a8ad9babf02fad06f293b92fc0d0 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 19 Feb 2015 15:39:32 -0800 Subject: [PATCH 58/59] Added protoc plugin for Python GRPC. --- Makefile | 102 ++++-- build.json | 36 +- src/compiler/python_generator.cc | 332 +++++++++++++++++++ src/compiler/python_generator.h | 51 +++ src/compiler/python_plugin.cc | 87 +++++ vsprojects/vs2013/gpr.vcxproj | 1 - vsprojects/vs2013/gpr.vcxproj.filters | 3 - vsprojects/vs2013/gpr_shared.vcxproj | 1 - vsprojects/vs2013/gpr_shared.vcxproj.filters | 3 - 9 files changed, 563 insertions(+), 53 deletions(-) create mode 100644 src/compiler/python_generator.cc create mode 100644 src/compiler/python_generator.h create mode 100644 src/compiler/python_plugin.cc diff --git a/Makefile b/Makefile index 91c94c8071e..e1dedb59129 100644 --- a/Makefile +++ b/Makefile @@ -332,7 +332,7 @@ endif .SECONDARY = %.pb.h %.pb.cc -PROTOC_PLUGINS = $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(BINDIR)/$(CONFIG)/grpc_ruby_plugin +PROTOC_PLUGINS = $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(BINDIR)/$(CONFIG)/grpc_python_plugin ifeq ($(DEP_MISSING),) all: static shared plugins dep_error: @@ -499,6 +499,8 @@ transport_metadata_test: $(BINDIR)/$(CONFIG)/transport_metadata_test async_end2end_test: $(BINDIR)/$(CONFIG)/async_end2end_test channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test grpc_cpp_plugin: $(BINDIR)/$(CONFIG)/grpc_cpp_plugin +grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin +grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin credentials_test: $(BINDIR)/$(CONFIG)/credentials_test end2end_test: $(BINDIR)/$(CONFIG)/end2end_test interop_client: $(BINDIR)/$(CONFIG)/interop_client @@ -508,7 +510,6 @@ pubsub_publisher_test: $(BINDIR)/$(CONFIG)/pubsub_publisher_test pubsub_subscriber_test: $(BINDIR)/$(CONFIG)/pubsub_subscriber_test qps_client: $(BINDIR)/$(CONFIG)/qps_client qps_server: $(BINDIR)/$(CONFIG)/qps_server -grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin status_test: $(BINDIR)/$(CONFIG)/status_test thread_pool_test: $(BINDIR)/$(CONFIG)/thread_pool_test chttp2_fake_security_cancel_after_accept_test: $(BINDIR)/$(CONFIG)/chttp2_fake_security_cancel_after_accept_test @@ -2047,6 +2048,7 @@ else $(E) "[INSTALL] Installing grpc protoc plugins" $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(prefix)/bin/grpc_cpp_plugin $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(prefix)/bin/grpc_ruby_plugin + $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_python_plugin $(prefix)/bin/grpc_python_plugin endif clean: @@ -7413,6 +7415,70 @@ ifneq ($(NO_DEPS),true) endif +GRPC_RUBY_PLUGIN_SRC = \ + src/compiler/ruby_generator.cc \ + src/compiler/ruby_plugin.cc \ + +GRPC_RUBY_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_RUBY_PLUGIN_SRC)))) + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/grpc_ruby_plugin: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/grpc_ruby_plugin: $(PROTOBUF_DEP) $(GRPC_RUBY_PLUGIN_OBJS) + $(E) "[HOSTLD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GRPC_RUBY_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/grpc_ruby_plugin + +endif + +$(OBJDIR)/$(CONFIG)/src/compiler/ruby_generator.o: +$(OBJDIR)/$(CONFIG)/src/compiler/ruby_plugin.o: + +deps_grpc_ruby_plugin: $(GRPC_RUBY_PLUGIN_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(GRPC_RUBY_PLUGIN_OBJS:.o=.dep) +endif + + +GRPC_PYTHON_PLUGIN_SRC = \ + src/compiler/python_generator.cc \ + src/compiler/python_plugin.cc \ + +GRPC_PYTHON_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_PYTHON_PLUGIN_SRC)))) + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/grpc_python_plugin: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/grpc_python_plugin: $(PROTOBUF_DEP) $(GRPC_PYTHON_PLUGIN_OBJS) + $(E) "[HOSTLD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GRPC_PYTHON_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/grpc_python_plugin + +endif + +$(OBJDIR)/$(CONFIG)/src/compiler/python_generator.o: +$(OBJDIR)/$(CONFIG)/src/compiler/python_plugin.o: + +deps_grpc_python_plugin: $(GRPC_PYTHON_PLUGIN_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(GRPC_PYTHON_PLUGIN_OBJS:.o=.dep) +endif + + CREDENTIALS_TEST_SRC = \ test/cpp/client/credentials_test.cc \ @@ -7708,38 +7774,6 @@ endif endif -GRPC_RUBY_PLUGIN_SRC = \ - src/compiler/ruby_generator.cc \ - src/compiler/ruby_plugin.cc \ - -GRPC_RUBY_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_RUBY_PLUGIN_SRC)))) - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build the protoc plugins if you don't have protobuf 3.0.0+. - -$(BINDIR)/$(CONFIG)/grpc_ruby_plugin: protobuf_dep_error - -else - -$(BINDIR)/$(CONFIG)/grpc_ruby_plugin: $(PROTOBUF_DEP) $(GRPC_RUBY_PLUGIN_OBJS) - $(E) "[HOSTLD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GRPC_RUBY_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/grpc_ruby_plugin - -endif - -$(OBJDIR)/$(CONFIG)/src/compiler/ruby_generator.o: -$(OBJDIR)/$(CONFIG)/src/compiler/ruby_plugin.o: - -deps_grpc_ruby_plugin: $(GRPC_RUBY_PLUGIN_OBJS:.o=.dep) - -ifneq ($(NO_DEPS),true) --include $(GRPC_RUBY_PLUGIN_OBJS:.o=.dep) -endif - - STATUS_TEST_SRC = \ test/cpp/util/status_test.cc \ diff --git a/build.json b/build.json index 0f9e827422c..8fdca5a2550 100644 --- a/build.json +++ b/build.json @@ -1591,6 +1591,31 @@ "deps": [], "secure": false }, + { + "name": "grpc_ruby_plugin", + "build": "protoc", + "language": "c++", + "src": [ + "src/compiler/ruby_generator.cc", + "src/compiler/ruby_plugin.cc" + ], + "deps": [], + "secure": false + }, + { + "name": "grpc_python_plugin", + "build": "protoc", + "language": "c++", + "headers": [ + "src/compiler/python_generator.h" + ], + "src": [ + "src/compiler/python_generator.cc", + "src/compiler/python_plugin.cc" + ], + "deps": [], + "secure": false + }, { "name": "credentials_test", "build": "test", @@ -1748,17 +1773,6 @@ "gpr" ] }, - { - "name": "grpc_ruby_plugin", - "build": "protoc", - "language": "c++", - "src": [ - "src/compiler/ruby_generator.cc", - "src/compiler/ruby_plugin.cc" - ], - "deps": [], - "secure": false - }, { "name": "status_test", "build": "test", diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc new file mode 100644 index 00000000000..48d90624d62 --- /dev/null +++ b/src/compiler/python_generator.cc @@ -0,0 +1,332 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include + +#include "src/compiler/python_generator.h" +#include +#include +#include +#include + +using google::protobuf::FileDescriptor; +using google::protobuf::ServiceDescriptor; +using google::protobuf::MethodDescriptor; +using google::protobuf::io::Printer; +using google::protobuf::io::StringOutputStream; +using std::initializer_list; +using std::map; +using std::string; + +namespace grpc_python_generator { +namespace { +////////////////////////////////// +// BEGIN FORMATTING BOILERPLATE // +////////////////////////////////// + +// Converts an initializer list of the form { key0, value0, key1, value1, ... } +// into a map of key* to value*. Is merely a readability helper for later code. +map ListToDict(const initializer_list& values) { + assert(values.size() % 2 == 0); + map value_map; + auto value_iter = values.begin(); + for (unsigned i = 0; i < values.size()/2; ++i) { + string key = *value_iter; + ++value_iter; + string value = *value_iter; + value_map[key] = value; + ++value_iter; + } + return value_map; +} + +// Provides RAII indentation handling. Use as: +// { +// IndentScope raii_my_indent_var_name_here(my_py_printer); +// // constructor indented my_py_printer +// ... +// // destructor called at end of scope, un-indenting my_py_printer +// } +class IndentScope { + public: + explicit IndentScope(Printer* printer) : printer_(printer) { + printer_->Indent(); + } + + ~IndentScope() { + printer_->Outdent(); + } + + private: + Printer* printer_; +}; + +//////////////////////////////// +// END FORMATTING BOILERPLATE // +//////////////////////////////// + +void PrintService(const ServiceDescriptor* service, + Printer* out) { + string doc = ""; + map dict = ListToDict({ + "Service", service->name(), + "Documentation", doc, + }); + out->Print(dict, "class $Service$Service(object):\n"); + { + IndentScope raii_class_indent(out); + out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); + out->Print("def __init__(self):\n"); + { + IndentScope raii_method_indent(out); + out->Print("pass\n"); + } + } +} + +void PrintServicer(const ServiceDescriptor* service, + Printer* out) { + string doc = ""; + map dict = ListToDict({ + "Service", service->name(), + "Documentation", doc, + }); + out->Print(dict, "class $Service$Servicer(object):\n"); + { + IndentScope raii_class_indent(out); + out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); + for (int i = 0; i < service->method_count(); ++i) { + auto meth = service->method(i); + out->Print("def $Method$(self, arg):\n", "Method", meth->name()); + { + IndentScope raii_method_indent(out); + out->Print("raise NotImplementedError()\n"); + } + } + } +} + +void PrintStub(const ServiceDescriptor* service, + Printer* out) { + string doc = ""; + map dict = ListToDict({ + "Service", service->name(), + "Documentation", doc, + }); + out->Print(dict, "class $Service$Stub(object):\n"); + { + IndentScope raii_class_indent(out); + out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); + for (int i = 0; i < service->method_count(); ++i) { + const MethodDescriptor* meth = service->method(i); + auto methdict = ListToDict({"Method", meth->name()}); + out->Print(methdict, "def $Method$(self, arg):\n"); + { + IndentScope raii_method_indent(out); + out->Print("raise NotImplementedError()\n"); + } + out->Print(methdict, "$Method$.async = None\n"); + } + } +} + +void PrintStubImpl(const ServiceDescriptor* service, + Printer* out) { + map dict = ListToDict({ + "Service", service->name(), + }); + out->Print(dict, "class _$Service$Stub($Service$Stub):\n"); + { + IndentScope raii_class_indent(out); + out->Print("def __init__(self, face_stub, default_timeout):\n"); + { + IndentScope raii_method_indent(out); + out->Print("self._face_stub = face_stub\n" + "self._default_timeout = default_timeout\n" + "stub_self = self\n"); + + for (int i = 0; i < service->method_count(); ++i) { + const MethodDescriptor* meth = service->method(i); + bool server_streaming = meth->server_streaming(); + bool client_streaming = meth->client_streaming(); + std::string blocking_call, future_call; + if (server_streaming) { + if (client_streaming) { + blocking_call = "stub_self._face_stub.inline_stream_in_stream_out"; + future_call = blocking_call; + } else { + blocking_call = "stub_self._face_stub.inline_value_in_stream_out"; + future_call = blocking_call; + } + } else { + if (client_streaming) { + blocking_call = "stub_self._face_stub.blocking_stream_in_value_out"; + future_call = "stub_self._face_stub.future_stream_in_value_out"; + } else { + blocking_call = "stub_self._face_stub.blocking_value_in_value_out"; + future_call = "stub_self._face_stub.future_value_in_value_out"; + } + } + // TODO(atash): use the solution described at + // http://stackoverflow.com/a/2982 to bind 'async' attribute + // functions to def'd functions instead of using callable attributes. + auto methdict = ListToDict({ + "Method", meth->name(), + "BlockingCall", blocking_call, + "FutureCall", future_call + }); + out->Print(methdict, "class $Method$(object):\n"); + { + IndentScope raii_callable_indent(out); + out->Print("def __call__(self, arg):\n"); + { + IndentScope raii_callable_call_indent(out); + out->Print(methdict, + "return $BlockingCall$(\"$Method$\", arg, " + "stub_self._default_timeout)\n"); + } + out->Print("def async(self, arg):\n"); + { + IndentScope raii_callable_async_indent(out); + out->Print(methdict, + "return $FutureCall$(\"$Method$\", arg, " + "stub_self._default_timeout)\n"); + } + } + out->Print(methdict, "self.$Method$ = $Method$()\n"); + } + } + } +} + +void PrintStubGenerators(const ServiceDescriptor* service, Printer* out) { + map dict = ListToDict({ + "Service", service->name(), + }); + // Write out a generator of linked pairs of Server/Stub + out->Print(dict, "def mock_$Service$(servicer, default_timeout):\n"); + { + IndentScope raii_mock_indent(out); + out->Print("value_in_value_out = {}\n" + "value_in_stream_out = {}\n" + "stream_in_value_out = {}\n" + "stream_in_stream_out = {}\n"); + for (int i = 0; i < service->method_count(); ++i) { + const MethodDescriptor* meth = service->method(i); + std::string super_interface, meth_dict; + bool server_streaming = meth->server_streaming(); + bool client_streaming = meth->client_streaming(); + if (server_streaming) { + if (client_streaming) { + super_interface = "InlineStreamInStreamOutMethod"; + meth_dict = "stream_in_stream_out"; + } else { + super_interface = "InlineValueInStreamOutMethod"; + meth_dict = "value_in_stream_out"; + } + } else { + if (client_streaming) { + super_interface = "InlineStreamInValueOutMethod"; + meth_dict = "stream_in_value_out"; + } else { + super_interface = "InlineValueInValueOutMethod"; + meth_dict = "value_in_value_out"; + } + } + map methdict = ListToDict({ + "Method", meth->name(), + "SuperInterface", super_interface, + "MethodDict", meth_dict + }); + out->Print( + methdict, "class $Method$(_face_interfaces.$SuperInterface$):\n"); + { + IndentScope raii_inline_class_indent(out); + out->Print("def service(self, request, context):\n"); + { + IndentScope raii_inline_class_fn_indent(out); + out->Print(methdict, "return servicer.$Method$(request)\n"); + } + } + out->Print(methdict, "$MethodDict$['$Method$'] = $Method$()\n"); + } + out->Print( + "face_linked_pair = _face_testing.server_and_stub(default_timeout," + "inline_value_in_value_out_methods=value_in_value_out," + "inline_value_in_stream_out_methods=value_in_stream_out," + "inline_stream_in_value_out_methods=stream_in_value_out," + "inline_stream_in_stream_out_methods=stream_in_stream_out)\n"); + out->Print("class LinkedPair(object):\n"); + { + IndentScope raii_linked_pair(out); + out->Print("def __init__(self, server, stub):\n"); + { + IndentScope raii_linked_pair_init(out); + out->Print("self.server = server\n" + "self.stub = stub\n"); + } + } + out->Print( + dict, + "stub = _$Service$Stub(face_linked_pair.stub, default_timeout)\n"); + out->Print("return LinkedPair(None, stub)\n"); + } +} + +} // namespace + +string GetServices(const FileDescriptor* file) { + string output; + StringOutputStream output_stream(&output); + Printer out(&output_stream, '$'); + out.Print("import abc\n"); + out.Print("import google3\n"); + out.Print("from grpc.framework.face import demonstration as _face_testing\n"); + out.Print("from grpc.framework.face import interfaces as _face_interfaces\n"); + + for (int i = 0; i < file->service_count(); ++i) { + auto service = file->service(i); + PrintService(service, &out); + PrintServicer(service, &out); + PrintStub(service, &out); + PrintStubImpl(service, &out); + PrintStubGenerators(service, &out); + } + return output; +} + +} // namespace grpc_python_generator diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h new file mode 100644 index 00000000000..673ef7b23b3 --- /dev/null +++ b/src/compiler/python_generator.h @@ -0,0 +1,51 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef __GRPC_COMPILER_PYTHON_GENERATOR_H__ +#define __GRPC_COMPILER_PYTHON_GENERATOR_H__ + +#include + +namespace google { +namespace protobuf { +class FileDescriptor; +} // namespace protobuf +} // namespace google + +namespace grpc_python_generator { + +std::string GetServices(const google::protobuf::FileDescriptor* file); + +} // namespace grpc_python_generator + +#endif // __GRPC_COMPILER_PYTHON_GENERATOR_H__ diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc new file mode 100644 index 00000000000..ebe3660619b --- /dev/null +++ b/src/compiler/python_plugin.cc @@ -0,0 +1,87 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +// Generates a Python gRPC service interface out of Protobuf IDL. + +#include +#include + +#include "src/compiler/python_generator.h" +#include +#include +#include +#include +#include + +using google::protobuf::FileDescriptor; +using google::protobuf::compiler::CodeGenerator; +using google::protobuf::compiler::GeneratorContext; +using google::protobuf::compiler::PluginMain; +using google::protobuf::io::CodedOutputStream; +using google::protobuf::io::ZeroCopyOutputStream; +using std::string; + +class PythonGrpcGenerator : public CodeGenerator { + public: + PythonGrpcGenerator() {} + ~PythonGrpcGenerator() override {} + + bool Generate(const FileDescriptor* file, + const string& parameter, + GeneratorContext* context, + string* error) const override { + // Get output file name. + string file_name; + static const int proto_suffix_length = 6; // length of ".proto" + if (file->name().size() > proto_suffix_length && + file->name().find_last_of(".proto") == file->name().size() - 1) { + file_name = file->name().substr( + 0, file->name().size() - proto_suffix_length) + "_pb2.py"; + } else { + *error = "Invalid proto file name. Proto file must end with .proto"; + return false; + } + + std::unique_ptr output( + context->OpenForInsert(file_name, "module_scope")); + CodedOutputStream coded_out(output.get()); + string code = grpc_python_generator::GetServices(file); + coded_out.WriteRaw(code.data(), code.size()); + return true; + } +}; + +int main(int argc, char* argv[]) { + PythonGrpcGenerator generator; + return PluginMain(argc, argv, &generator); +} diff --git a/vsprojects/vs2013/gpr.vcxproj b/vsprojects/vs2013/gpr.vcxproj index f6516b89537..3d970079a42 100644 --- a/vsprojects/vs2013/gpr.vcxproj +++ b/vsprojects/vs2013/gpr.vcxproj @@ -101,7 +101,6 @@ - diff --git a/vsprojects/vs2013/gpr.vcxproj.filters b/vsprojects/vs2013/gpr.vcxproj.filters index 1e908a5ba51..9b78c3a390a 100644 --- a/vsprojects/vs2013/gpr.vcxproj.filters +++ b/vsprojects/vs2013/gpr.vcxproj.filters @@ -167,9 +167,6 @@ - - src\core\support - src\core\support diff --git a/vsprojects/vs2013/gpr_shared.vcxproj b/vsprojects/vs2013/gpr_shared.vcxproj index b9131e381c1..892490e3248 100644 --- a/vsprojects/vs2013/gpr_shared.vcxproj +++ b/vsprojects/vs2013/gpr_shared.vcxproj @@ -101,7 +101,6 @@ - diff --git a/vsprojects/vs2013/gpr_shared.vcxproj.filters b/vsprojects/vs2013/gpr_shared.vcxproj.filters index 1e908a5ba51..9b78c3a390a 100644 --- a/vsprojects/vs2013/gpr_shared.vcxproj.filters +++ b/vsprojects/vs2013/gpr_shared.vcxproj.filters @@ -167,9 +167,6 @@ - - src\core\support - src\core\support From d81b6e331210feb3319c6536a55f67f250a44b1b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 19 Feb 2015 16:12:02 -0800 Subject: [PATCH 59/59] Removed reference to non-existent header --- src/node/ext/node_grpc.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index 965186e0cc6..9f5095839cb 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -38,7 +38,6 @@ #include "call.h" #include "channel.h" -#include "event.h" #include "server.h" #include "completion_queue_async_worker.h" #include "credentials.h"