Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
3eba9075
Commit
3eba9075
authored
8 years ago
by
Makarand Dharmapurikar
Browse files
Options
Downloads
Patches
Plain Diff
using camelCase for output_label now
parent
a7cc9005
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard
+4
-4
4 additions, 4 deletions
...s/objective-c/route_guide/Misc/Base.lproj/Main.storyboard
examples/objective-c/route_guide/ViewControllers.m
+37
-37
37 additions, 37 deletions
examples/objective-c/route_guide/ViewControllers.m
with
41 additions
and
41 deletions
examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard
+
4
−
4
View file @
3eba9075
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</view>
</view>
<tabBarItem
key=
"tabBarItem"
title=
"Get Feature"
image=
"first"
id=
"acW-dT-cKf"
/>
<tabBarItem
key=
"tabBarItem"
title=
"Get Feature"
image=
"first"
id=
"acW-dT-cKf"
/>
<connections>
<connections>
<outlet
property=
"output
_l
abel"
destination=
"2ga-Gd-X9q"
id=
"yXF-xa-kbD"
/>
<outlet
property=
"output
L
abel"
destination=
"2ga-Gd-X9q"
id=
"yXF-xa-kbD"
/>
</connections>
</connections>
</viewController>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"W5J-7L-Pyd"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"W5J-7L-Pyd"
sceneMemberID=
"firstResponder"
/>
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
</view>
</view>
<tabBarItem
key=
"tabBarItem"
title=
"List Features"
image=
"second"
id=
"cPa-gy-q4n"
/>
<tabBarItem
key=
"tabBarItem"
title=
"List Features"
image=
"second"
id=
"cPa-gy-q4n"
/>
<connections>
<connections>
<outlet
property=
"output
_l
abel"
destination=
"8mE-gq-NQc"
id=
"6rw-Kd-21X"
/>
<outlet
property=
"output
L
abel"
destination=
"8mE-gq-NQc"
id=
"6rw-Kd-21X"
/>
</connections>
</connections>
</viewController>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"4Nw-L8-lE0"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"4Nw-L8-lE0"
sceneMemberID=
"firstResponder"
/>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
</view>
</view>
<tabBarItem
key=
"tabBarItem"
title=
"Record Route"
image=
"first"
id=
"PLK-Jm-UyM"
/>
<tabBarItem
key=
"tabBarItem"
title=
"Record Route"
image=
"first"
id=
"PLK-Jm-UyM"
/>
<connections>
<connections>
<outlet
property=
"output
_l
abel"
destination=
"9wL-iS-tp8"
id=
"xhd-zm-66g"
/>
<outlet
property=
"output
L
abel"
destination=
"9wL-iS-tp8"
id=
"xhd-zm-66g"
/>
</connections>
</connections>
</viewController>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"9RW-dt-a4q"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"9RW-dt-a4q"
sceneMemberID=
"firstResponder"
/>
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
</view>
</view>
<tabBarItem
key=
"tabBarItem"
title=
"Route Chat"
image=
"second"
id=
"p2G-IC-yAR"
/>
<tabBarItem
key=
"tabBarItem"
title=
"Route Chat"
image=
"second"
id=
"p2G-IC-yAR"
/>
<connections>
<connections>
<outlet
property=
"output
_l
abel"
destination=
"131-U2-Ogk"
id=
"fNw-M5-x1D"
/>
<outlet
property=
"output
L
abel"
destination=
"131-U2-Ogk"
id=
"fNw-M5-x1D"
/>
</connections>
</connections>
</viewController>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"yUz-se-Cfi"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"yUz-se-Cfi"
sceneMemberID=
"firstResponder"
/>
...
...
This diff is collapsed.
Click to expand it.
examples/objective-c/route_guide/ViewControllers.m
+
37
−
37
View file @
3eba9075
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
#import <RxLibrary/GRXWriter+Immediate.h>
#import <RxLibrary/GRXWriter+Immediate.h>
#import <RxLibrary/GRXWriter+Transformations.h>
#import <RxLibrary/GRXWriter+Transformations.h>
static
NSString
*
const
kHostAddress
=
@"
localhost
:50051"
;
static
NSString
*
const
kHostAddress
=
@"
192.168.1.120
:50051"
;
/** Category to override RTGPoint's description. */
/** Category to override RTGPoint's description. */
@interface
RTGPoint
(
Description
)
@interface
RTGPoint
(
Description
)
...
@@ -83,7 +83,7 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -83,7 +83,7 @@ static NSString * const kHostAddress = @"localhost:50051";
@interface
GetFeatureViewController
:
UIViewController
{
@interface
GetFeatureViewController
:
UIViewController
{
RTGRouteGuide
*
service
;
RTGRouteGuide
*
service
;
}
}
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
_l
abel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
L
abel
;
@end
@end
@implementation
GetFeatureViewController
@implementation
GetFeatureViewController
...
@@ -91,16 +91,16 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -91,16 +91,16 @@ static NSString * const kHostAddress = @"localhost:50051";
-
(
void
)
execRequest
{
-
(
void
)
execRequest
{
void
(
^
handler
)(
RTGFeature
*
response
,
NSError
*
error
)
=
^
(
RTGFeature
*
response
,
NSError
*
error
)
{
void
(
^
handler
)(
RTGFeature
*
response
,
NSError
*
error
)
=
^
(
RTGFeature
*
response
,
NSError
*
error
)
{
if
(
response
.
name
.
length
)
{
if
(
response
.
name
.
length
)
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Found feature called %@ at %@."
,
self
.
output
_l
abel
.
text
,
response
.
location
,
response
.
name
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Found feature called %@ at %@."
,
self
.
output
L
abel
.
text
,
response
.
location
,
response
.
name
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"Found feature called %@ at %@."
,
response
.
name
,
response
.
location
);
NSLog
(
@"Found feature called %@ at %@."
,
response
.
name
,
response
.
location
);
}
else
if
(
response
)
{
}
else
if
(
response
)
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Found no features at %@"
,
self
.
output
_l
abel
.
text
,
response
.
location
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Found no features at %@"
,
self
.
output
L
abel
.
text
,
response
.
location
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"Found no features at %@"
,
response
.
location
);
NSLog
(
@"Found no features at %@"
,
response
.
location
);
}
else
{
}
else
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
_l
abel
.
text
,
error
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
L
abel
.
text
,
error
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"RPC error: %@"
,
error
);
NSLog
(
@"RPC error: %@"
,
error
);
}
}
};
};
...
@@ -123,9 +123,9 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -123,9 +123,9 @@ static NSString * const kHostAddress = @"localhost:50051";
}
}
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
self
.
output
_l
abel
.
text
=
@"RPC log:"
;
self
.
output
L
abel
.
text
=
@"RPC log:"
;
self
.
output
_l
abel
.
numberOfLines
=
0
;
self
.
output
L
abel
.
numberOfLines
=
0
;
self
.
output
_l
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
self
.
output
L
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
[
self
execRequest
];
[
self
execRequest
];
}
}
...
@@ -141,7 +141,7 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -141,7 +141,7 @@ static NSString * const kHostAddress = @"localhost:50051";
@interface
ListFeaturesViewController
:
UIViewController
{
@interface
ListFeaturesViewController
:
UIViewController
{
RTGRouteGuide
*
service
;
RTGRouteGuide
*
service
;
}
}
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
_l
abel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
L
abel
;
@end
@end
...
@@ -158,12 +158,12 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -158,12 +158,12 @@ static NSString * const kHostAddress = @"localhost:50051";
[
service
listFeaturesWithRequest
:
rectangle
[
service
listFeaturesWithRequest
:
rectangle
eventHandler:
^
(
BOOL
done
,
RTGFeature
*
response
,
NSError
*
error
)
{
eventHandler:
^
(
BOOL
done
,
RTGFeature
*
response
,
NSError
*
error
)
{
if
(
response
)
{
if
(
response
)
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Found feature at %@ called %@."
,
self
.
output
_l
abel
.
text
,
response
.
location
,
response
.
name
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Found feature at %@ called %@."
,
self
.
output
L
abel
.
text
,
response
.
location
,
response
.
name
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"Found feature at %@ called %@."
,
response
.
location
,
response
.
name
);
NSLog
(
@"Found feature at %@ called %@."
,
response
.
location
,
response
.
name
);
}
else
if
(
error
)
{
}
else
if
(
error
)
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
_l
abel
.
text
,
error
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
L
abel
.
text
,
error
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"RPC error: %@"
,
error
);
NSLog
(
@"RPC error: %@"
,
error
);
}
}
}];
}];
...
@@ -176,9 +176,9 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -176,9 +176,9 @@ static NSString * const kHostAddress = @"localhost:50051";
}
}
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
self
.
output
_l
abel
.
text
=
@"RPC log:"
;
self
.
output
L
abel
.
text
=
@"RPC log:"
;
self
.
output
_l
abel
.
numberOfLines
=
0
;
self
.
output
L
abel
.
numberOfLines
=
0
;
self
.
output
_l
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
self
.
output
L
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
[
self
execRequest
];
[
self
execRequest
];
}
}
...
@@ -195,7 +195,7 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -195,7 +195,7 @@ static NSString * const kHostAddress = @"localhost:50051";
@interface
RecordRouteViewController
:
UIViewController
{
@interface
RecordRouteViewController
:
UIViewController
{
RTGRouteGuide
*
service
;
RTGRouteGuide
*
service
;
}
}
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
_l
abel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
L
abel
;
@end
@end
...
@@ -211,8 +211,8 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -211,8 +211,8 @@ static NSString * const kHostAddress = @"localhost:50051";
RTGPoint
*
location
=
[
RTGPoint
message
];
RTGPoint
*
location
=
[
RTGPoint
message
];
location
.
longitude
=
[((
NSNumber
*
)
feature
[
@"location"
][
@"longitude"
])
intValue
];
location
.
longitude
=
[((
NSNumber
*
)
feature
[
@"location"
][
@"longitude"
])
intValue
];
location
.
latitude
=
[((
NSNumber
*
)
feature
[
@"location"
][
@"latitude"
])
intValue
];
location
.
latitude
=
[((
NSNumber
*
)
feature
[
@"location"
][
@"latitude"
])
intValue
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Visiting point %@"
,
self
.
output
_l
abel
.
text
,
location
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Visiting point %@"
,
self
.
output
L
abel
.
text
,
location
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"Visiting point %@"
,
location
);
NSLog
(
@"Visiting point %@"
,
location
);
return
location
;
return
location
;
}];
}];
...
@@ -223,16 +223,16 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -223,16 +223,16 @@ static NSString * const kHostAddress = @"localhost:50051";
NSString
*
str
=
[
NSString
stringWithFormat
:
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Finished trip with %i points
\n
Passed %i features
\n
"
@"%@
\n
Finished trip with %i points
\n
Passed %i features
\n
"
"Travelled %i meters
\n
It took %i seconds"
,
"Travelled %i meters
\n
It took %i seconds"
,
self
.
output
_l
abel
.
text
,
response
.
pointCount
,
response
.
featureCount
,
self
.
output
L
abel
.
text
,
response
.
pointCount
,
response
.
featureCount
,
response
.
distance
,
response
.
elapsedTime
];
response
.
distance
,
response
.
elapsedTime
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"Finished trip with %i points"
,
response
.
pointCount
);
NSLog
(
@"Finished trip with %i points"
,
response
.
pointCount
);
NSLog
(
@"Passed %i features"
,
response
.
featureCount
);
NSLog
(
@"Passed %i features"
,
response
.
featureCount
);
NSLog
(
@"Travelled %i meters"
,
response
.
distance
);
NSLog
(
@"Travelled %i meters"
,
response
.
distance
);
NSLog
(
@"It took %i seconds"
,
response
.
elapsedTime
);
NSLog
(
@"It took %i seconds"
,
response
.
elapsedTime
);
}
else
{
}
else
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
_l
abel
.
text
,
error
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
L
abel
.
text
,
error
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"RPC error: %@"
,
error
);
NSLog
(
@"RPC error: %@"
,
error
);
}
}
}];
}];
...
@@ -245,9 +245,9 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -245,9 +245,9 @@ static NSString * const kHostAddress = @"localhost:50051";
}
}
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
self
.
output
_l
abel
.
text
=
@"RPC log:"
;
self
.
output
L
abel
.
text
=
@"RPC log:"
;
self
.
output
_l
abel
.
numberOfLines
=
0
;
self
.
output
L
abel
.
numberOfLines
=
0
;
self
.
output
_l
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
self
.
output
L
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
[
self
execRequest
];
[
self
execRequest
];
}
}
...
@@ -263,7 +263,7 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -263,7 +263,7 @@ static NSString * const kHostAddress = @"localhost:50051";
@interface
RouteChatViewController
:
UIViewController
{
@interface
RouteChatViewController
:
UIViewController
{
RTGRouteGuide
*
service
;
RTGRouteGuide
*
service
;
}
}
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
_l
abel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
output
L
abel
;
@end
@end
...
@@ -283,12 +283,12 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -283,12 +283,12 @@ static NSString * const kHostAddress = @"localhost:50051";
eventHandler:
^
(
BOOL
done
,
RTGRouteNote
*
note
,
NSError
*
error
)
{
eventHandler:
^
(
BOOL
done
,
RTGRouteNote
*
note
,
NSError
*
error
)
{
if
(
note
)
{
if
(
note
)
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Got message %@ at %@"
,
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
Got message %@ at %@"
,
self
.
output
_l
abel
.
text
,
note
.
message
,
note
.
location
];
self
.
output
L
abel
.
text
,
note
.
message
,
note
.
location
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"Got message %@ at %@"
,
note
.
message
,
note
.
location
);
NSLog
(
@"Got message %@ at %@"
,
note
.
message
,
note
.
location
);
}
else
if
(
error
)
{
}
else
if
(
error
)
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
_l
abel
.
text
,
error
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@
\n
RPC error: %@"
,
self
.
output
L
abel
.
text
,
error
];
self
.
output
_l
abel
.
text
=
str
;
self
.
output
L
abel
.
text
=
str
;
NSLog
(
@"RPC error: %@"
,
error
);
NSLog
(
@"RPC error: %@"
,
error
);
}
}
if
(
done
)
{
if
(
done
)
{
...
@@ -304,9 +304,9 @@ static NSString * const kHostAddress = @"localhost:50051";
...
@@ -304,9 +304,9 @@ static NSString * const kHostAddress = @"localhost:50051";
}
}
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
self
.
output
_l
abel
.
text
=
@"RPC log:"
;
self
.
output
L
abel
.
text
=
@"RPC log:"
;
self
.
output
_l
abel
.
numberOfLines
=
0
;
self
.
output
L
abel
.
numberOfLines
=
0
;
self
.
output
_l
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
self
.
output
L
abel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
8
.
0
];
[
self
execRequest
];
[
self
execRequest
];
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment