blob: ae3a2723fc4c1860a35c12a0b3d7d9ed86567ab9 [file] [log] [blame]
Jorge Canizales9409ad82015-02-18 16:19:56 -08001/*
2 *
Yang Gao5fc90292015-02-20 09:46:22 -08003 * Copyright 2015, Google Inc.
Jorge Canizales9409ad82015-02-18 16:19:56 -08004 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following disclaimer
14 * in the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Google Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
Jorge Canizales5e0efd92015-02-17 18:23:58 -080034#import <Foundation/Foundation.h>
35
Jorge Canizalesb10776c2015-10-26 10:44:55 -070036/**
37 * A fully-qualified proto service method name. Full qualification is needed because a gRPC endpoint
38 * can implement multiple services.
39 */
Makarand Dharmapurikar6f950102016-06-07 16:52:19 -070040__attribute__((deprecated("Please use GRPCProtoMethod.")))
Jorge Canizales469d4b62015-07-03 12:02:38 -070041@interface ProtoMethod : NSObject
Jorge Canizales5e0efd92015-02-17 18:23:58 -080042@property(nonatomic, readonly) NSString *package;
Jorge Canizales1ac8f9a2015-07-03 12:05:04 -070043@property(nonatomic, readonly) NSString *service;
Jorge Canizales5e0efd92015-02-17 18:23:58 -080044@property(nonatomic, readonly) NSString *method;
Jorge Canizalesbe808e32015-07-04 14:37:58 -070045
Jorge Canizales5260f532015-07-04 14:47:41 -070046@property(nonatomic, readonly) NSString *HTTPPath;
Jorge Canizalesbe808e32015-07-04 14:37:58 -070047
Jorge Canizales5e0efd92015-02-17 18:23:58 -080048- (instancetype)initWithPackage:(NSString *)package
Jorge Canizalesbe808e32015-07-04 14:37:58 -070049 service:(NSString *)service
Jorge Canizales5e0efd92015-02-17 18:23:58 -080050 method:(NSString *)method;
51@end
Makarand Dharmapurikar6f950102016-06-07 16:52:19 -070052
53/**
Makarand Dharmapurikar4f11ab12016-06-08 10:40:00 -070054 * This subclass is empty now. Eventually we'll remove ProtoMethod class
Makarand Dharmapurikar6f950102016-06-07 16:52:19 -070055 * to avoid potential naming conflict
56 */
Yuchen Zeng36a58a72016-06-20 14:01:07 -070057#pragma clang diagnostic push
58#pragma clang diagnostic ignored "-Wdeprecated-declarations"
Makarand Dharmapurikar6f950102016-06-07 16:52:19 -070059@interface GRPCProtoMethod : ProtoMethod
Yuchen Zeng36a58a72016-06-20 14:01:07 -070060#pragma clang diagnostic pop
Makarand Dharmapurikar6f950102016-06-07 16:52:19 -070061
62@end