mirror of https://github.com/grpc/grpc.git
parent
44fb295d9f
commit
2410f99161
8 changed files with 635 additions and 1847 deletions
@ -0,0 +1,134 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: route_guide.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
@class RGDFeature; |
||||
@class RGDPoint; |
||||
@class RGDRectangle; |
||||
@class RGDRouteNote; |
||||
@class RGDRouteSummary; |
||||
|
||||
|
||||
#pragma mark - RGDRouteGuideRoot |
||||
|
||||
@interface RGDRouteGuideRoot : GPBRootObject |
||||
@end |
||||
|
||||
#pragma mark - RGDPoint |
||||
|
||||
typedef GPB_ENUM(RGDPoint_FieldNumber) { |
||||
RGDPoint_FieldNumber_Latitude = 1, |
||||
RGDPoint_FieldNumber_Longitude = 2, |
||||
}; |
||||
|
||||
// Points are represented as latitude-longitude pairs in the E7 representation
|
||||
// (degrees multiplied by 10**7 and rounded to the nearest integer).
|
||||
// Latitudes should be in the range +/- 90 degrees and longitude should be in
|
||||
// the range +/- 180 degrees (inclusive).
|
||||
@interface RGDPoint : GPBMessage |
||||
|
||||
@property(nonatomic, readwrite) int32_t latitude; |
||||
|
||||
@property(nonatomic, readwrite) int32_t longitude; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDRectangle |
||||
|
||||
typedef GPB_ENUM(RGDRectangle_FieldNumber) { |
||||
RGDRectangle_FieldNumber_Lo = 1, |
||||
RGDRectangle_FieldNumber_Hi = 2, |
||||
}; |
||||
|
||||
// A latitude-longitude rectangle, represented as two diagonally opposite
|
||||
// points "lo" and "hi".
|
||||
@interface RGDRectangle : GPBMessage |
||||
|
||||
// One corner of the rectangle.
|
||||
@property(nonatomic, readwrite) BOOL hasLo; |
||||
@property(nonatomic, readwrite, strong) RGDPoint *lo; |
||||
|
||||
// The other corner of the rectangle.
|
||||
@property(nonatomic, readwrite) BOOL hasHi; |
||||
@property(nonatomic, readwrite, strong) RGDPoint *hi; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDFeature |
||||
|
||||
typedef GPB_ENUM(RGDFeature_FieldNumber) { |
||||
RGDFeature_FieldNumber_Name = 1, |
||||
RGDFeature_FieldNumber_Location = 2, |
||||
}; |
||||
|
||||
// A feature names something at a given point.
|
||||
//
|
||||
// If a feature could not be named, the name is empty.
|
||||
@interface RGDFeature : GPBMessage |
||||
|
||||
// The name of the feature.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// The point where the feature is detected.
|
||||
@property(nonatomic, readwrite) BOOL hasLocation; |
||||
@property(nonatomic, readwrite, strong) RGDPoint *location; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDRouteNote |
||||
|
||||
typedef GPB_ENUM(RGDRouteNote_FieldNumber) { |
||||
RGDRouteNote_FieldNumber_Location = 1, |
||||
RGDRouteNote_FieldNumber_Message = 2, |
||||
}; |
||||
|
||||
// A RouteNote is a message sent while at a given point.
|
||||
@interface RGDRouteNote : GPBMessage |
||||
|
||||
// The location from which the message is sent.
|
||||
@property(nonatomic, readwrite) BOOL hasLocation; |
||||
@property(nonatomic, readwrite, strong) RGDPoint *location; |
||||
|
||||
// The message to be sent.
|
||||
@property(nonatomic, readwrite, copy) NSString *message; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDRouteSummary |
||||
|
||||
typedef GPB_ENUM(RGDRouteSummary_FieldNumber) { |
||||
RGDRouteSummary_FieldNumber_PointCount = 1, |
||||
RGDRouteSummary_FieldNumber_FeatureCount = 2, |
||||
RGDRouteSummary_FieldNumber_Distance = 3, |
||||
RGDRouteSummary_FieldNumber_ElapsedTime = 4, |
||||
}; |
||||
|
||||
// A RouteSummary is received in response to a RecordRoute rpc.
|
||||
//
|
||||
// It contains the number of individual points received, the number of
|
||||
// detected features, and the total distance covered as the cumulative sum of
|
||||
// the distance between each point.
|
||||
@interface RGDRouteSummary : GPBMessage |
||||
|
||||
// The number of points received.
|
||||
@property(nonatomic, readwrite) int32_t pointCount; |
||||
|
||||
// The number of known features passed while traversing the route.
|
||||
@property(nonatomic, readwrite) int32_t featureCount; |
||||
|
||||
// The distance covered in metres.
|
||||
@property(nonatomic, readwrite) int32_t distance; |
||||
|
||||
// The duration of the traversal in seconds.
|
||||
@property(nonatomic, readwrite) int32_t elapsedTime; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
@ -0,0 +1,355 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: route_guide.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
|
||||
#import "RouteGuide.pbobjc.h" |
||||
|
||||
#pragma mark - RGDRouteGuideRoot |
||||
|
||||
@implementation RGDRouteGuideRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *RGDRouteGuideRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"grpc.example.routeguide" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - RGDPoint |
||||
|
||||
@implementation RGDPoint |
||||
|
||||
@dynamic latitude; |
||||
@dynamic longitude; |
||||
|
||||
typedef struct RGDPoint_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
int32_t latitude; |
||||
int32_t longitude; |
||||
} RGDPoint_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "latitude", |
||||
.number = RGDPoint_FieldNumber_Latitude, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(RGDPoint_Storage, latitude), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "longitude", |
||||
.number = RGDPoint_FieldNumber_Longitude, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(RGDPoint_Storage, longitude), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[RGDPoint class] |
||||
rootClass:[RGDRouteGuideRoot class] |
||||
file:RGDRouteGuideRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(RGDPoint_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDRectangle |
||||
|
||||
@implementation RGDRectangle |
||||
|
||||
@dynamic hasLo, lo; |
||||
@dynamic hasHi, hi; |
||||
|
||||
typedef struct RGDRectangle_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
RGDPoint *lo; |
||||
RGDPoint *hi; |
||||
} RGDRectangle_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "lo", |
||||
.number = RGDRectangle_FieldNumber_Lo, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(RGDRectangle_Storage, lo), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(RGDPoint), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "hi", |
||||
.number = RGDRectangle_FieldNumber_Hi, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(RGDRectangle_Storage, hi), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(RGDPoint), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRectangle class] |
||||
rootClass:[RGDRouteGuideRoot class] |
||||
file:RGDRouteGuideRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(RGDRectangle_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDFeature |
||||
|
||||
@implementation RGDFeature |
||||
|
||||
@dynamic name; |
||||
@dynamic hasLocation, location; |
||||
|
||||
typedef struct RGDFeature_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *name; |
||||
RGDPoint *location; |
||||
} RGDFeature_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = RGDFeature_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(RGDFeature_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "location", |
||||
.number = RGDFeature_FieldNumber_Location, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(RGDFeature_Storage, location), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(RGDPoint), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[RGDFeature class] |
||||
rootClass:[RGDRouteGuideRoot class] |
||||
file:RGDRouteGuideRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(RGDFeature_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDRouteNote |
||||
|
||||
@implementation RGDRouteNote |
||||
|
||||
@dynamic hasLocation, location; |
||||
@dynamic message; |
||||
|
||||
typedef struct RGDRouteNote_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
RGDPoint *location; |
||||
NSString *message; |
||||
} RGDRouteNote_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "location", |
||||
.number = RGDRouteNote_FieldNumber_Location, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(RGDRouteNote_Storage, location), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(RGDPoint), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "message", |
||||
.number = RGDRouteNote_FieldNumber_Message, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(RGDRouteNote_Storage, message), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRouteNote class] |
||||
rootClass:[RGDRouteGuideRoot class] |
||||
file:RGDRouteGuideRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(RGDRouteNote_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - RGDRouteSummary |
||||
|
||||
@implementation RGDRouteSummary |
||||
|
||||
@dynamic pointCount; |
||||
@dynamic featureCount; |
||||
@dynamic distance; |
||||
@dynamic elapsedTime; |
||||
|
||||
typedef struct RGDRouteSummary_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
int32_t pointCount; |
||||
int32_t featureCount; |
||||
int32_t distance; |
||||
int32_t elapsedTime; |
||||
} RGDRouteSummary_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "pointCount", |
||||
.number = RGDRouteSummary_FieldNumber_PointCount, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(RGDRouteSummary_Storage, pointCount), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "featureCount", |
||||
.number = RGDRouteSummary_FieldNumber_FeatureCount, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(RGDRouteSummary_Storage, featureCount), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "distance", |
||||
.number = RGDRouteSummary_FieldNumber_Distance, |
||||
.hasIndex = 2, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(RGDRouteSummary_Storage, distance), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "elapsedTime", |
||||
.number = RGDRouteSummary_FieldNumber_ElapsedTime, |
||||
.hasIndex = 3, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(RGDRouteSummary_Storage, elapsedTime), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRouteSummary class] |
||||
rootClass:[RGDRouteGuideRoot class] |
||||
file:RGDRouteGuideRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(RGDRouteSummary_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
@ -0,0 +1,43 @@ |
||||
#import "RouteGuide.pbobjc.h" |
||||
#import <gRPC/ProtoService.h> |
||||
|
||||
|
||||
@protocol GRXWriteable; |
||||
@protocol GRXWriter; |
||||
|
||||
@protocol RGDRouteGuide <NSObject> |
||||
|
||||
#pragma mark GetFeature(Point) returns (Feature) |
||||
|
||||
- (void)getFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler; |
||||
|
||||
- (ProtoRPC *)RPCToGetFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler; |
||||
|
||||
|
||||
#pragma mark ListFeatures(Rectangle) returns (stream Feature) |
||||
|
||||
- (void)listFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler; |
||||
|
||||
- (ProtoRPC *)RPCToListFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler; |
||||
|
||||
|
||||
#pragma mark RecordRoute(stream Point) returns (RouteSummary) |
||||
|
||||
- (void)recordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler; |
||||
|
||||
- (ProtoRPC *)RPCToRecordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler; |
||||
|
||||
|
||||
#pragma mark RouteChat(stream RouteNote) returns (stream RouteNote) |
||||
|
||||
- (void)routeChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler; |
||||
|
||||
- (ProtoRPC *)RPCToRouteChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler; |
||||
|
||||
|
||||
@end |
||||
|
||||
// Basic service implementation, over gRPC, that only does marshalling and parsing.
|
||||
@interface RGDRouteGuide : ProtoService<RGDRouteGuide> |
||||
- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER; |
||||
@end |
@ -0,0 +1,72 @@ |
||||
#import "RouteGuide.pbrpc.h" |
||||
#import <gRPC/GRXWriteable.h> |
||||
#import <gRPC/GRXWriter+Immediate.h> |
||||
#import <gRPC/ProtoRPC.h> |
||||
|
||||
static NSString *const kPackageName = @"grpc.example.routeguide"; |
||||
static NSString *const kServiceName = @"RouteGuide"; |
||||
|
||||
@implementation RGDRouteGuide |
||||
|
||||
// Designated initializer |
||||
- (instancetype)initWithHost:(NSString *)host { |
||||
return (self = [super initWithHost:host packageName:kPackageName serviceName:kServiceName]); |
||||
} |
||||
|
||||
// Override superclass initializer to disallow different package and service names. |
||||
- (instancetype)initWithHost:(NSString *)host |
||||
packageName:(NSString *)packageName |
||||
serviceName:(NSString *)serviceName { |
||||
return [self initWithHost:host]; |
||||
} |
||||
|
||||
|
||||
#pragma mark GetFeature(Point) returns (Feature) |
||||
|
||||
- (void)getFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler{ |
||||
[[self RPCToGetFeatureWithRequest:request handler:handler] start]; |
||||
} |
||||
// Returns a not-yet-started RPC object. |
||||
- (ProtoRPC *)RPCToGetFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler{ |
||||
return [self RPCToMethod:@"GetFeature" |
||||
requestsWriter:[GRXWriter writerWithValue:request] |
||||
responseClass:[RGDFeature class] |
||||
responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; |
||||
} |
||||
#pragma mark ListFeatures(Rectangle) returns (stream Feature) |
||||
|
||||
- (void)listFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler{ |
||||
[[self RPCToListFeaturesWithRequest:request handler:handler] start]; |
||||
} |
||||
// Returns a not-yet-started RPC object. |
||||
- (ProtoRPC *)RPCToListFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler{ |
||||
return [self RPCToMethod:@"ListFeatures" |
||||
requestsWriter:[GRXWriter writerWithValue:request] |
||||
responseClass:[RGDFeature class] |
||||
responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; |
||||
} |
||||
#pragma mark RecordRoute(stream Point) returns (RouteSummary) |
||||
|
||||
- (void)recordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler{ |
||||
[[self RPCToRecordRouteWithRequestsWriter:request handler:handler] start]; |
||||
} |
||||
// Returns a not-yet-started RPC object. |
||||
- (ProtoRPC *)RPCToRecordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler{ |
||||
return [self RPCToMethod:@"RecordRoute" |
||||
requestsWriter:request |
||||
responseClass:[RGDRouteSummary class] |
||||
responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]]; |
||||
} |
||||
#pragma mark RouteChat(stream RouteNote) returns (stream RouteNote) |
||||
|
||||
- (void)routeChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler{ |
||||
[[self RPCToRouteChatWithRequestsWriter:request handler:handler] start]; |
||||
} |
||||
// Returns a not-yet-started RPC object. |
||||
- (ProtoRPC *)RPCToRouteChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler{ |
||||
return [self RPCToMethod:@"RouteChat" |
||||
requestsWriter:request |
||||
responseClass:[RGDRouteNote class] |
||||
responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]]; |
||||
} |
||||
@end |
@ -1,387 +0,0 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
|
||||
#import <ProtocolBuffers/ProtocolBuffers.h> |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
@class ObjectiveCFileOptions; |
||||
@class ObjectiveCFileOptionsBuilder; |
||||
@class PBDescriptorProto; |
||||
@class PBDescriptorProtoBuilder; |
||||
@class PBDescriptorProtoExtensionRange; |
||||
@class PBDescriptorProtoExtensionRangeBuilder; |
||||
@class PBEnumDescriptorProto; |
||||
@class PBEnumDescriptorProtoBuilder; |
||||
@class PBEnumOptions; |
||||
@class PBEnumOptionsBuilder; |
||||
@class PBEnumValueDescriptorProto; |
||||
@class PBEnumValueDescriptorProtoBuilder; |
||||
@class PBEnumValueOptions; |
||||
@class PBEnumValueOptionsBuilder; |
||||
@class PBFieldDescriptorProto; |
||||
@class PBFieldDescriptorProtoBuilder; |
||||
@class PBFieldOptions; |
||||
@class PBFieldOptionsBuilder; |
||||
@class PBFileDescriptorProto; |
||||
@class PBFileDescriptorProtoBuilder; |
||||
@class PBFileDescriptorSet; |
||||
@class PBFileDescriptorSetBuilder; |
||||
@class PBFileOptions; |
||||
@class PBFileOptionsBuilder; |
||||
@class PBMessageOptions; |
||||
@class PBMessageOptionsBuilder; |
||||
@class PBMethodDescriptorProto; |
||||
@class PBMethodDescriptorProtoBuilder; |
||||
@class PBMethodOptions; |
||||
@class PBMethodOptionsBuilder; |
||||
@class PBOneofDescriptorProto; |
||||
@class PBOneofDescriptorProtoBuilder; |
||||
@class PBServiceDescriptorProto; |
||||
@class PBServiceDescriptorProtoBuilder; |
||||
@class PBServiceOptions; |
||||
@class PBServiceOptionsBuilder; |
||||
@class PBSourceCodeInfo; |
||||
@class PBSourceCodeInfoBuilder; |
||||
@class PBSourceCodeInfoLocation; |
||||
@class PBSourceCodeInfoLocationBuilder; |
||||
@class PBUninterpretedOption; |
||||
@class PBUninterpretedOptionBuilder; |
||||
@class PBUninterpretedOptionNamePart; |
||||
@class PBUninterpretedOptionNamePartBuilder; |
||||
@class RGDFeature; |
||||
@class RGDFeatureBuilder; |
||||
@class RGDPoint; |
||||
@class RGDPointBuilder; |
||||
@class RGDRectangle; |
||||
@class RGDRectangleBuilder; |
||||
@class RGDRouteNote; |
||||
@class RGDRouteNoteBuilder; |
||||
@class RGDRouteSummary; |
||||
@class RGDRouteSummaryBuilder; |
||||
|
||||
|
||||
|
||||
@interface RGDRouteGuideRoot : NSObject { |
||||
} |
||||
+ (PBExtensionRegistry*) extensionRegistry; |
||||
+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry; |
||||
@end |
||||
|
||||
@interface RGDPoint : PBGeneratedMessage<GeneratedMessageProtocol> { |
||||
@private |
||||
BOOL hasLatitude_:1; |
||||
BOOL hasLongitude_:1; |
||||
SInt32 latitude; |
||||
SInt32 longitude; |
||||
} |
||||
- (BOOL) hasLatitude; |
||||
- (BOOL) hasLongitude; |
||||
@property (readonly) SInt32 latitude; |
||||
@property (readonly) SInt32 longitude; |
||||
|
||||
+ (instancetype) defaultInstance; |
||||
- (instancetype) defaultInstance; |
||||
|
||||
- (BOOL) isInitialized; |
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; |
||||
- (RGDPointBuilder*) builder; |
||||
+ (RGDPointBuilder*) builder; |
||||
+ (RGDPointBuilder*) builderWithPrototype:(RGDPoint*) prototype; |
||||
- (RGDPointBuilder*) toBuilder; |
||||
|
||||
+ (RGDPoint*) parseFromData:(NSData*) data; |
||||
+ (RGDPoint*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input; |
||||
+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input; |
||||
+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
@end |
||||
|
||||
@interface RGDPointBuilder : PBGeneratedMessageBuilder { |
||||
@private |
||||
RGDPoint* resultPoint; |
||||
} |
||||
|
||||
- (RGDPoint*) defaultInstance; |
||||
|
||||
- (RGDPointBuilder*) clear; |
||||
- (RGDPointBuilder*) clone; |
||||
|
||||
- (RGDPoint*) build; |
||||
- (RGDPoint*) buildPartial; |
||||
|
||||
- (RGDPointBuilder*) mergeFrom:(RGDPoint*) other; |
||||
- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; |
||||
- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
|
||||
- (BOOL) hasLatitude; |
||||
- (SInt32) latitude; |
||||
- (RGDPointBuilder*) setLatitude:(SInt32) value; |
||||
- (RGDPointBuilder*) clearLatitude; |
||||
|
||||
- (BOOL) hasLongitude; |
||||
- (SInt32) longitude; |
||||
- (RGDPointBuilder*) setLongitude:(SInt32) value; |
||||
- (RGDPointBuilder*) clearLongitude; |
||||
@end |
||||
|
||||
@interface RGDRectangle : PBGeneratedMessage<GeneratedMessageProtocol> { |
||||
@private |
||||
BOOL hasLo_:1; |
||||
BOOL hasHi_:1; |
||||
RGDPoint* lo; |
||||
RGDPoint* hi; |
||||
} |
||||
- (BOOL) hasLo; |
||||
- (BOOL) hasHi; |
||||
@property (readonly, strong) RGDPoint* lo; |
||||
@property (readonly, strong) RGDPoint* hi; |
||||
|
||||
+ (instancetype) defaultInstance; |
||||
- (instancetype) defaultInstance; |
||||
|
||||
- (BOOL) isInitialized; |
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; |
||||
- (RGDRectangleBuilder*) builder; |
||||
+ (RGDRectangleBuilder*) builder; |
||||
+ (RGDRectangleBuilder*) builderWithPrototype:(RGDRectangle*) prototype; |
||||
- (RGDRectangleBuilder*) toBuilder; |
||||
|
||||
+ (RGDRectangle*) parseFromData:(NSData*) data; |
||||
+ (RGDRectangle*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input; |
||||
+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input; |
||||
+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
@end |
||||
|
||||
@interface RGDRectangleBuilder : PBGeneratedMessageBuilder { |
||||
@private |
||||
RGDRectangle* resultRectangle; |
||||
} |
||||
|
||||
- (RGDRectangle*) defaultInstance; |
||||
|
||||
- (RGDRectangleBuilder*) clear; |
||||
- (RGDRectangleBuilder*) clone; |
||||
|
||||
- (RGDRectangle*) build; |
||||
- (RGDRectangle*) buildPartial; |
||||
|
||||
- (RGDRectangleBuilder*) mergeFrom:(RGDRectangle*) other; |
||||
- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; |
||||
- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
|
||||
- (BOOL) hasLo; |
||||
- (RGDPoint*) lo; |
||||
- (RGDRectangleBuilder*) setLo:(RGDPoint*) value; |
||||
- (RGDRectangleBuilder*) setLoBuilder:(RGDPointBuilder*) builderForValue; |
||||
- (RGDRectangleBuilder*) mergeLo:(RGDPoint*) value; |
||||
- (RGDRectangleBuilder*) clearLo; |
||||
|
||||
- (BOOL) hasHi; |
||||
- (RGDPoint*) hi; |
||||
- (RGDRectangleBuilder*) setHi:(RGDPoint*) value; |
||||
- (RGDRectangleBuilder*) setHiBuilder:(RGDPointBuilder*) builderForValue; |
||||
- (RGDRectangleBuilder*) mergeHi:(RGDPoint*) value; |
||||
- (RGDRectangleBuilder*) clearHi; |
||||
@end |
||||
|
||||
@interface RGDFeature : PBGeneratedMessage<GeneratedMessageProtocol> { |
||||
@private |
||||
BOOL hasName_:1; |
||||
BOOL hasLocation_:1; |
||||
NSString* name; |
||||
RGDPoint* location; |
||||
} |
||||
- (BOOL) hasName; |
||||
- (BOOL) hasLocation; |
||||
@property (readonly, strong) NSString* name; |
||||
@property (readonly, strong) RGDPoint* location; |
||||
|
||||
+ (instancetype) defaultInstance; |
||||
- (instancetype) defaultInstance; |
||||
|
||||
- (BOOL) isInitialized; |
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; |
||||
- (RGDFeatureBuilder*) builder; |
||||
+ (RGDFeatureBuilder*) builder; |
||||
+ (RGDFeatureBuilder*) builderWithPrototype:(RGDFeature*) prototype; |
||||
- (RGDFeatureBuilder*) toBuilder; |
||||
|
||||
+ (RGDFeature*) parseFromData:(NSData*) data; |
||||
+ (RGDFeature*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input; |
||||
+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input; |
||||
+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
@end |
||||
|
||||
@interface RGDFeatureBuilder : PBGeneratedMessageBuilder { |
||||
@private |
||||
RGDFeature* resultFeature; |
||||
} |
||||
|
||||
- (RGDFeature*) defaultInstance; |
||||
|
||||
- (RGDFeatureBuilder*) clear; |
||||
- (RGDFeatureBuilder*) clone; |
||||
|
||||
- (RGDFeature*) build; |
||||
- (RGDFeature*) buildPartial; |
||||
|
||||
- (RGDFeatureBuilder*) mergeFrom:(RGDFeature*) other; |
||||
- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; |
||||
- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
|
||||
- (BOOL) hasName; |
||||
- (NSString*) name; |
||||
- (RGDFeatureBuilder*) setName:(NSString*) value; |
||||
- (RGDFeatureBuilder*) clearName; |
||||
|
||||
- (BOOL) hasLocation; |
||||
- (RGDPoint*) location; |
||||
- (RGDFeatureBuilder*) setLocation:(RGDPoint*) value; |
||||
- (RGDFeatureBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue; |
||||
- (RGDFeatureBuilder*) mergeLocation:(RGDPoint*) value; |
||||
- (RGDFeatureBuilder*) clearLocation; |
||||
@end |
||||
|
||||
@interface RGDRouteNote : PBGeneratedMessage<GeneratedMessageProtocol> { |
||||
@private |
||||
BOOL hasMessage_:1; |
||||
BOOL hasLocation_:1; |
||||
NSString* message; |
||||
RGDPoint* location; |
||||
} |
||||
- (BOOL) hasLocation; |
||||
- (BOOL) hasMessage; |
||||
@property (readonly, strong) RGDPoint* location; |
||||
@property (readonly, strong) NSString* message; |
||||
|
||||
+ (instancetype) defaultInstance; |
||||
- (instancetype) defaultInstance; |
||||
|
||||
- (BOOL) isInitialized; |
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; |
||||
- (RGDRouteNoteBuilder*) builder; |
||||
+ (RGDRouteNoteBuilder*) builder; |
||||
+ (RGDRouteNoteBuilder*) builderWithPrototype:(RGDRouteNote*) prototype; |
||||
- (RGDRouteNoteBuilder*) toBuilder; |
||||
|
||||
+ (RGDRouteNote*) parseFromData:(NSData*) data; |
||||
+ (RGDRouteNote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input; |
||||
+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input; |
||||
+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
@end |
||||
|
||||
@interface RGDRouteNoteBuilder : PBGeneratedMessageBuilder { |
||||
@private |
||||
RGDRouteNote* resultRouteNote; |
||||
} |
||||
|
||||
- (RGDRouteNote*) defaultInstance; |
||||
|
||||
- (RGDRouteNoteBuilder*) clear; |
||||
- (RGDRouteNoteBuilder*) clone; |
||||
|
||||
- (RGDRouteNote*) build; |
||||
- (RGDRouteNote*) buildPartial; |
||||
|
||||
- (RGDRouteNoteBuilder*) mergeFrom:(RGDRouteNote*) other; |
||||
- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; |
||||
- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
|
||||
- (BOOL) hasLocation; |
||||
- (RGDPoint*) location; |
||||
- (RGDRouteNoteBuilder*) setLocation:(RGDPoint*) value; |
||||
- (RGDRouteNoteBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue; |
||||
- (RGDRouteNoteBuilder*) mergeLocation:(RGDPoint*) value; |
||||
- (RGDRouteNoteBuilder*) clearLocation; |
||||
|
||||
- (BOOL) hasMessage; |
||||
- (NSString*) message; |
||||
- (RGDRouteNoteBuilder*) setMessage:(NSString*) value; |
||||
- (RGDRouteNoteBuilder*) clearMessage; |
||||
@end |
||||
|
||||
@interface RGDRouteSummary : PBGeneratedMessage<GeneratedMessageProtocol> { |
||||
@private |
||||
BOOL hasPointCount_:1; |
||||
BOOL hasFeatureCount_:1; |
||||
BOOL hasDistance_:1; |
||||
BOOL hasElapsedTime_:1; |
||||
SInt32 pointCount; |
||||
SInt32 featureCount; |
||||
SInt32 distance; |
||||
SInt32 elapsedTime; |
||||
} |
||||
- (BOOL) hasPointCount; |
||||
- (BOOL) hasFeatureCount; |
||||
- (BOOL) hasDistance; |
||||
- (BOOL) hasElapsedTime; |
||||
@property (readonly) SInt32 pointCount; |
||||
@property (readonly) SInt32 featureCount; |
||||
@property (readonly) SInt32 distance; |
||||
@property (readonly) SInt32 elapsedTime; |
||||
|
||||
+ (instancetype) defaultInstance; |
||||
- (instancetype) defaultInstance; |
||||
|
||||
- (BOOL) isInitialized; |
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; |
||||
- (RGDRouteSummaryBuilder*) builder; |
||||
+ (RGDRouteSummaryBuilder*) builder; |
||||
+ (RGDRouteSummaryBuilder*) builderWithPrototype:(RGDRouteSummary*) prototype; |
||||
- (RGDRouteSummaryBuilder*) toBuilder; |
||||
|
||||
+ (RGDRouteSummary*) parseFromData:(NSData*) data; |
||||
+ (RGDRouteSummary*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input; |
||||
+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input; |
||||
+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
@end |
||||
|
||||
@interface RGDRouteSummaryBuilder : PBGeneratedMessageBuilder { |
||||
@private |
||||
RGDRouteSummary* resultRouteSummary; |
||||
} |
||||
|
||||
- (RGDRouteSummary*) defaultInstance; |
||||
|
||||
- (RGDRouteSummaryBuilder*) clear; |
||||
- (RGDRouteSummaryBuilder*) clone; |
||||
|
||||
- (RGDRouteSummary*) build; |
||||
- (RGDRouteSummary*) buildPartial; |
||||
|
||||
- (RGDRouteSummaryBuilder*) mergeFrom:(RGDRouteSummary*) other; |
||||
- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; |
||||
- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; |
||||
|
||||
- (BOOL) hasPointCount; |
||||
- (SInt32) pointCount; |
||||
- (RGDRouteSummaryBuilder*) setPointCount:(SInt32) value; |
||||
- (RGDRouteSummaryBuilder*) clearPointCount; |
||||
|
||||
- (BOOL) hasFeatureCount; |
||||
- (SInt32) featureCount; |
||||
- (RGDRouteSummaryBuilder*) setFeatureCount:(SInt32) value; |
||||
- (RGDRouteSummaryBuilder*) clearFeatureCount; |
||||
|
||||
- (BOOL) hasDistance; |
||||
- (SInt32) distance; |
||||
- (RGDRouteSummaryBuilder*) setDistance:(SInt32) value; |
||||
- (RGDRouteSummaryBuilder*) clearDistance; |
||||
|
||||
- (BOOL) hasElapsedTime; |
||||
- (SInt32) elapsedTime; |
||||
- (RGDRouteSummaryBuilder*) setElapsedTime:(SInt32) value; |
||||
- (RGDRouteSummaryBuilder*) clearElapsedTime; |
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue