blob: 31867b928fe19a00367b2350d77ee360c9531b3a [file] [log] [blame]
//
// Copyright 2018 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 <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
* EDOProtocolObject encodes and decodes a protocol to be transferred within a single service
*/
@interface EDOProtocolObject : NSObject <NSSecureCoding>
/** Check if the given @c object is a protocol. */
+ (BOOL)isProtocol:(id)object;
@property(nonatomic, readonly) NSString *protocolName;
/** Mark it as designated so that we can call super init without any compiler warnings */
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
/** Initialize the wrapper object with the protocol */
- (instancetype)initWithProtocol:(Protocol *)protocol NS_DESIGNATED_INITIALIZER;
/**
* @remark init is not an available initializer. Use the <b>EarlGrey</b> macro
* to start an interaction.
*/
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END