2012-08-25 10:38:29 +00:00
|
|
|
//
|
2013-01-31 21:22:37 +00:00
|
|
|
// GooglePlusSampleSignInViewController.h
|
2012-08-25 10:38:29 +00:00
|
|
|
//
|
|
|
|
// Copyright 2012 Google Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
2013-01-31 21:22:37 +00:00
|
|
|
#import "GPPSignIn.h"
|
2012-08-25 10:38:29 +00:00
|
|
|
|
2013-01-31 21:22:37 +00:00
|
|
|
@class GPPSignInButton;
|
2012-08-25 10:38:29 +00:00
|
|
|
|
|
|
|
// A view controller for the Google+ sign-in button which initiates a standard
|
|
|
|
// OAuth 2.0 flow and provides an access token and a refresh token. A "Sign out"
|
|
|
|
// button is provided to allow users to sign out of this application.
|
|
|
|
@interface GooglePlusSampleSignInViewController : UIViewController<
|
2013-01-31 21:22:37 +00:00
|
|
|
GPPSignInDelegate>
|
2012-08-25 10:38:29 +00:00
|
|
|
|
|
|
|
// The button that handles Google+ sign-in.
|
2013-01-31 21:22:37 +00:00
|
|
|
@property (retain, nonatomic) IBOutlet GPPSignInButton *signInButton;
|
2012-08-25 10:38:29 +00:00
|
|
|
// A label to display the result of the sign-in action.
|
|
|
|
@property (retain, nonatomic) IBOutlet UILabel *signInAuthStatus;
|
2013-01-31 21:22:37 +00:00
|
|
|
// A label to display the signed-in user's display name.
|
|
|
|
@property (retain, nonatomic) IBOutlet UILabel *signInDisplayName;
|
2012-08-25 10:38:29 +00:00
|
|
|
// A button to sign out of this application.
|
|
|
|
@property (retain, nonatomic) IBOutlet UIButton *signOutButton;
|
2013-01-31 21:22:37 +00:00
|
|
|
// A switch for whether to request for Google+ History's
|
|
|
|
// https://www.googleapis.com/auth/plus.moments.write scope.
|
|
|
|
@property (retain, nonatomic) IBOutlet UISwitch *plusMomentsWriteScope;
|
|
|
|
// A switch for whether to request
|
|
|
|
// https://www.googleapis.com/auth/userinfo.email scope to get user's email
|
|
|
|
// address after the sign-in action.
|
|
|
|
@property (retain, nonatomic) IBOutlet UISwitch *userinfoEmailScope;
|
2012-08-25 10:38:29 +00:00
|
|
|
|
|
|
|
// Called when the user presses the "Sign out" button.
|
|
|
|
- (IBAction)signOut:(id)sender;
|
2013-01-31 21:22:37 +00:00
|
|
|
// Called when the user toggles Google+ History's
|
|
|
|
// https://www.googleapis.com/auth/plus.moments.write scope.
|
|
|
|
- (IBAction)plusMomentsWriteScopeToggle:(id)sender;
|
|
|
|
// Called when the user toggles the
|
|
|
|
// https://www.googleapis.com/auth/userinfo.email scope.
|
|
|
|
- (IBAction)userinfoEmailScopeToggle:(id)sender;
|
2012-08-25 10:38:29 +00:00
|
|
|
|
|
|
|
@end
|