| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| |
| #import "Nexustalk.pb.h" |
| // @@protoc_insertion_point(imports) |
| |
| @implementation NexustalkRoot |
| static PBExtensionRegistry* extensionRegistry = nil; |
| + (PBExtensionRegistry*) extensionRegistry { |
| return extensionRegistry; |
| } |
| |
| + (void) initialize { |
| if (self == [NexustalkRoot class]) { |
| PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; |
| [self registerAllExtensions:registry]; |
| [CommontalkRoot registerAllExtensions:registry]; |
| extensionRegistry = registry; |
| } |
| } |
| + (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { |
| } |
| @end |
| |
| BOOL PacketTypeIsValidValue(PacketType value) { |
| switch (value) { |
| case PacketTypePacketTypePing: |
| case PacketTypePacketTypeHello: |
| case PacketTypePacketTypePingCamera: |
| case PacketTypePacketTypeAudioPayload: |
| case PacketTypePacketTypeStartPlayback: |
| case PacketTypePacketTypeStopPlayback: |
| case PacketTypePacketTypeClockSyncEcho: |
| case PacketTypePacketTypeLatencyMeasure: |
| case PacketTypePacketTypeOk: |
| case PacketTypePacketTypeError: |
| case PacketTypePacketTypePlaybackBegin: |
| case PacketTypePacketTypePlaybackEnd: |
| case PacketTypePacketTypePlaybackPacket: |
| case PacketTypePacketTypeLongPlaybackPacket: |
| case PacketTypePacketTypeClockSync: |
| case PacketTypePacketTypeRedirect: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| BOOL ErrorCodeIsValidValue(ErrorCode value) { |
| switch (value) { |
| case ErrorCodeErrorCameraNotConnected: |
| case ErrorCodeErrorIllegalPacket: |
| case ErrorCodeErrorAuthorizationFailed: |
| case ErrorCodeErrorNoTranscoderAvailable: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| BOOL CodecTypeIsValidValue(CodecType value) { |
| switch (value) { |
| case CodecTypeSpeex: |
| case CodecTypePcmS16Le: |
| case CodecTypeH264: |
| case CodecTypeAac: |
| case CodecTypeOpus: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| @interface Ping () |
| @end |
| |
| @implementation Ping |
| |
| - (id) init { |
| if ((self = [super init])) { |
| } |
| return self; |
| } |
| static Ping* defaultPingInstance = nil; |
| + (void) initialize { |
| if (self == [Ping class]) { |
| defaultPingInstance = [[Ping alloc] init]; |
| } |
| } |
| + (Ping*) defaultInstance { |
| return defaultPingInstance; |
| } |
| - (Ping*) defaultInstance { |
| return defaultPingInstance; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Ping*) parseFromData:(NSData*) data { |
| return (Ping*)[[[Ping builder] mergeFromData:data] build]; |
| } |
| + (Ping*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Ping*)[[[Ping builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Ping*) parseFromInputStream:(NSInputStream*) input { |
| return (Ping*)[[[Ping builder] mergeFromInputStream:input] build]; |
| } |
| + (Ping*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Ping*)[[[Ping builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Ping*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Ping*)[[[Ping builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Ping*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Ping*)[[[Ping builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PingBuilder*) builder { |
| return [[PingBuilder alloc] init]; |
| } |
| + (PingBuilder*) builderWithPrototype:(Ping*) prototype { |
| return [[Ping builder] mergeFrom:prototype]; |
| } |
| - (PingBuilder*) builder { |
| return [Ping builder]; |
| } |
| - (PingBuilder*) toBuilder { |
| return [Ping builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Ping class]]) { |
| return NO; |
| } |
| Ping *otherMessage = other; |
| return |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface PingBuilder() |
| @property (strong) Ping* result; |
| @end |
| |
| @implementation PingBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Ping alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (PingBuilder*) clear { |
| self.result = [[Ping alloc] init]; |
| return self; |
| } |
| - (PingBuilder*) clone { |
| return [Ping builderWithPrototype:result]; |
| } |
| - (Ping*) defaultInstance { |
| return [Ping defaultInstance]; |
| } |
| - (Ping*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Ping*) buildPartial { |
| Ping* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (PingBuilder*) mergeFrom:(Ping*) other { |
| if (other == [Ping defaultInstance]) { |
| return self; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (PingBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (PingBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| } |
| } |
| } |
| @end |
| |
| @interface Hello () |
| @property HelloProtocolVersion protocolVersion; |
| @property (strong) NSString* uuid; |
| @property BOOL requireConnectedCamera; |
| @property (strong) NSString* sessionToken; |
| @property BOOL isCamera; |
| @property (strong) NSString* deviceId; |
| @property (strong) NSString* userAgent; |
| @end |
| |
| @implementation Hello |
| |
| - (BOOL) hasProtocolVersion { |
| return !!hasProtocolVersion_; |
| } |
| - (void) setHasProtocolVersion:(BOOL) value_ { |
| hasProtocolVersion_ = !!value_; |
| } |
| @synthesize protocolVersion; |
| - (BOOL) hasUuid { |
| return !!hasUuid_; |
| } |
| - (void) setHasUuid:(BOOL) value_ { |
| hasUuid_ = !!value_; |
| } |
| @synthesize uuid; |
| - (BOOL) hasRequireConnectedCamera { |
| return !!hasRequireConnectedCamera_; |
| } |
| - (void) setHasRequireConnectedCamera:(BOOL) value_ { |
| hasRequireConnectedCamera_ = !!value_; |
| } |
| - (BOOL) requireConnectedCamera { |
| return !!requireConnectedCamera_; |
| } |
| - (void) setRequireConnectedCamera:(BOOL) value_ { |
| requireConnectedCamera_ = !!value_; |
| } |
| - (BOOL) hasSessionToken { |
| return !!hasSessionToken_; |
| } |
| - (void) setHasSessionToken:(BOOL) value_ { |
| hasSessionToken_ = !!value_; |
| } |
| @synthesize sessionToken; |
| - (BOOL) hasIsCamera { |
| return !!hasIsCamera_; |
| } |
| - (void) setHasIsCamera:(BOOL) value_ { |
| hasIsCamera_ = !!value_; |
| } |
| - (BOOL) isCamera { |
| return !!isCamera_; |
| } |
| - (void) setIsCamera:(BOOL) value_ { |
| isCamera_ = !!value_; |
| } |
| - (BOOL) hasDeviceId { |
| return !!hasDeviceId_; |
| } |
| - (void) setHasDeviceId:(BOOL) value_ { |
| hasDeviceId_ = !!value_; |
| } |
| @synthesize deviceId; |
| - (BOOL) hasUserAgent { |
| return !!hasUserAgent_; |
| } |
| - (void) setHasUserAgent:(BOOL) value_ { |
| hasUserAgent_ = !!value_; |
| } |
| @synthesize userAgent; |
| - (id) init { |
| if ((self = [super init])) { |
| self.protocolVersion = HelloProtocolVersionVersion1; |
| self.uuid = @""; |
| self.requireConnectedCamera = NO; |
| self.sessionToken = @""; |
| self.isCamera = NO; |
| self.deviceId = @""; |
| self.userAgent = @""; |
| } |
| return self; |
| } |
| static Hello* defaultHelloInstance = nil; |
| + (void) initialize { |
| if (self == [Hello class]) { |
| defaultHelloInstance = [[Hello alloc] init]; |
| } |
| } |
| + (Hello*) defaultInstance { |
| return defaultHelloInstance; |
| } |
| - (Hello*) defaultInstance { |
| return defaultHelloInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasProtocolVersion) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasProtocolVersion) { |
| [output writeEnum:1 value:self.protocolVersion]; |
| } |
| if (self.hasUuid) { |
| [output writeString:2 value:self.uuid]; |
| } |
| if (self.hasRequireConnectedCamera) { |
| [output writeBool:3 value:self.requireConnectedCamera]; |
| } |
| if (self.hasSessionToken) { |
| [output writeString:4 value:self.sessionToken]; |
| } |
| if (self.hasIsCamera) { |
| [output writeBool:5 value:self.isCamera]; |
| } |
| if (self.hasDeviceId) { |
| [output writeString:6 value:self.deviceId]; |
| } |
| if (self.hasUserAgent) { |
| [output writeString:7 value:self.userAgent]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasProtocolVersion) { |
| size_ += computeEnumSize(1, self.protocolVersion); |
| } |
| if (self.hasUuid) { |
| size_ += computeStringSize(2, self.uuid); |
| } |
| if (self.hasRequireConnectedCamera) { |
| size_ += computeBoolSize(3, self.requireConnectedCamera); |
| } |
| if (self.hasSessionToken) { |
| size_ += computeStringSize(4, self.sessionToken); |
| } |
| if (self.hasIsCamera) { |
| size_ += computeBoolSize(5, self.isCamera); |
| } |
| if (self.hasDeviceId) { |
| size_ += computeStringSize(6, self.deviceId); |
| } |
| if (self.hasUserAgent) { |
| size_ += computeStringSize(7, self.userAgent); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Hello*) parseFromData:(NSData*) data { |
| return (Hello*)[[[Hello builder] mergeFromData:data] build]; |
| } |
| + (Hello*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Hello*)[[[Hello builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Hello*) parseFromInputStream:(NSInputStream*) input { |
| return (Hello*)[[[Hello builder] mergeFromInputStream:input] build]; |
| } |
| + (Hello*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Hello*)[[[Hello builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Hello*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Hello*)[[[Hello builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Hello*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Hello*)[[[Hello builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (HelloBuilder*) builder { |
| return [[HelloBuilder alloc] init]; |
| } |
| + (HelloBuilder*) builderWithPrototype:(Hello*) prototype { |
| return [[Hello builder] mergeFrom:prototype]; |
| } |
| - (HelloBuilder*) builder { |
| return [Hello builder]; |
| } |
| - (HelloBuilder*) toBuilder { |
| return [Hello builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasProtocolVersion) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"protocolVersion", self.protocolVersion]; |
| } |
| if (self.hasUuid) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"uuid", self.uuid]; |
| } |
| if (self.hasRequireConnectedCamera) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"requireConnectedCamera", [NSNumber numberWithBool:self.requireConnectedCamera]]; |
| } |
| if (self.hasSessionToken) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionToken", self.sessionToken]; |
| } |
| if (self.hasIsCamera) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"isCamera", [NSNumber numberWithBool:self.isCamera]]; |
| } |
| if (self.hasDeviceId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"deviceId", self.deviceId]; |
| } |
| if (self.hasUserAgent) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"userAgent", self.userAgent]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Hello class]]) { |
| return NO; |
| } |
| Hello *otherMessage = other; |
| return |
| self.hasProtocolVersion == otherMessage.hasProtocolVersion && |
| (!self.hasProtocolVersion || self.protocolVersion == otherMessage.protocolVersion) && |
| self.hasUuid == otherMessage.hasUuid && |
| (!self.hasUuid || [self.uuid isEqual:otherMessage.uuid]) && |
| self.hasRequireConnectedCamera == otherMessage.hasRequireConnectedCamera && |
| (!self.hasRequireConnectedCamera || self.requireConnectedCamera == otherMessage.requireConnectedCamera) && |
| self.hasSessionToken == otherMessage.hasSessionToken && |
| (!self.hasSessionToken || [self.sessionToken isEqual:otherMessage.sessionToken]) && |
| self.hasIsCamera == otherMessage.hasIsCamera && |
| (!self.hasIsCamera || self.isCamera == otherMessage.isCamera) && |
| self.hasDeviceId == otherMessage.hasDeviceId && |
| (!self.hasDeviceId || [self.deviceId isEqual:otherMessage.deviceId]) && |
| self.hasUserAgent == otherMessage.hasUserAgent && |
| (!self.hasUserAgent || [self.userAgent isEqual:otherMessage.userAgent]) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasProtocolVersion) { |
| hashCode = hashCode * 31 + self.protocolVersion; |
| } |
| if (self.hasUuid) { |
| hashCode = hashCode * 31 + [self.uuid hash]; |
| } |
| if (self.hasRequireConnectedCamera) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.requireConnectedCamera] hash]; |
| } |
| if (self.hasSessionToken) { |
| hashCode = hashCode * 31 + [self.sessionToken hash]; |
| } |
| if (self.hasIsCamera) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.isCamera] hash]; |
| } |
| if (self.hasDeviceId) { |
| hashCode = hashCode * 31 + [self.deviceId hash]; |
| } |
| if (self.hasUserAgent) { |
| hashCode = hashCode * 31 + [self.userAgent hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| BOOL HelloProtocolVersionIsValidValue(HelloProtocolVersion value) { |
| switch (value) { |
| case HelloProtocolVersionVersion1: |
| case HelloProtocolVersionVersion2: |
| case HelloProtocolVersionVersion3: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| @interface HelloBuilder() |
| @property (strong) Hello* result; |
| @end |
| |
| @implementation HelloBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Hello alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (HelloBuilder*) clear { |
| self.result = [[Hello alloc] init]; |
| return self; |
| } |
| - (HelloBuilder*) clone { |
| return [Hello builderWithPrototype:result]; |
| } |
| - (Hello*) defaultInstance { |
| return [Hello defaultInstance]; |
| } |
| - (Hello*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Hello*) buildPartial { |
| Hello* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (HelloBuilder*) mergeFrom:(Hello*) other { |
| if (other == [Hello defaultInstance]) { |
| return self; |
| } |
| if (other.hasProtocolVersion) { |
| [self setProtocolVersion:other.protocolVersion]; |
| } |
| if (other.hasUuid) { |
| [self setUuid:other.uuid]; |
| } |
| if (other.hasRequireConnectedCamera) { |
| [self setRequireConnectedCamera:other.requireConnectedCamera]; |
| } |
| if (other.hasSessionToken) { |
| [self setSessionToken:other.sessionToken]; |
| } |
| if (other.hasIsCamera) { |
| [self setIsCamera:other.isCamera]; |
| } |
| if (other.hasDeviceId) { |
| [self setDeviceId:other.deviceId]; |
| } |
| if (other.hasUserAgent) { |
| [self setUserAgent:other.userAgent]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (HelloBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (HelloBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| HelloProtocolVersion value = (HelloProtocolVersion)[input readEnum]; |
| if (HelloProtocolVersionIsValidValue(value)) { |
| [self setProtocolVersion:value]; |
| } else { |
| [unknownFields mergeVarintField:1 value:value]; |
| } |
| break; |
| } |
| case 18: { |
| [self setUuid:[input readString]]; |
| break; |
| } |
| case 24: { |
| [self setRequireConnectedCamera:[input readBool]]; |
| break; |
| } |
| case 34: { |
| [self setSessionToken:[input readString]]; |
| break; |
| } |
| case 40: { |
| [self setIsCamera:[input readBool]]; |
| break; |
| } |
| case 50: { |
| [self setDeviceId:[input readString]]; |
| break; |
| } |
| case 58: { |
| [self setUserAgent:[input readString]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasProtocolVersion { |
| return result.hasProtocolVersion; |
| } |
| - (HelloProtocolVersion) protocolVersion { |
| return result.protocolVersion; |
| } |
| - (HelloBuilder*) setProtocolVersion:(HelloProtocolVersion) value { |
| result.hasProtocolVersion = YES; |
| result.protocolVersion = value; |
| return self; |
| } |
| - (HelloBuilder*) clearProtocolVersion { |
| result.hasProtocolVersion = NO; |
| result.protocolVersion = HelloProtocolVersionVersion1; |
| return self; |
| } |
| - (BOOL) hasUuid { |
| return result.hasUuid; |
| } |
| - (NSString*) uuid { |
| return result.uuid; |
| } |
| - (HelloBuilder*) setUuid:(NSString*) value { |
| result.hasUuid = YES; |
| result.uuid = value; |
| return self; |
| } |
| - (HelloBuilder*) clearUuid { |
| result.hasUuid = NO; |
| result.uuid = @""; |
| return self; |
| } |
| - (BOOL) hasRequireConnectedCamera { |
| return result.hasRequireConnectedCamera; |
| } |
| - (BOOL) requireConnectedCamera { |
| return result.requireConnectedCamera; |
| } |
| - (HelloBuilder*) setRequireConnectedCamera:(BOOL) value { |
| result.hasRequireConnectedCamera = YES; |
| result.requireConnectedCamera = value; |
| return self; |
| } |
| - (HelloBuilder*) clearRequireConnectedCamera { |
| result.hasRequireConnectedCamera = NO; |
| result.requireConnectedCamera = NO; |
| return self; |
| } |
| - (BOOL) hasSessionToken { |
| return result.hasSessionToken; |
| } |
| - (NSString*) sessionToken { |
| return result.sessionToken; |
| } |
| - (HelloBuilder*) setSessionToken:(NSString*) value { |
| result.hasSessionToken = YES; |
| result.sessionToken = value; |
| return self; |
| } |
| - (HelloBuilder*) clearSessionToken { |
| result.hasSessionToken = NO; |
| result.sessionToken = @""; |
| return self; |
| } |
| - (BOOL) hasIsCamera { |
| return result.hasIsCamera; |
| } |
| - (BOOL) isCamera { |
| return result.isCamera; |
| } |
| - (HelloBuilder*) setIsCamera:(BOOL) value { |
| result.hasIsCamera = YES; |
| result.isCamera = value; |
| return self; |
| } |
| - (HelloBuilder*) clearIsCamera { |
| result.hasIsCamera = NO; |
| result.isCamera = NO; |
| return self; |
| } |
| - (BOOL) hasDeviceId { |
| return result.hasDeviceId; |
| } |
| - (NSString*) deviceId { |
| return result.deviceId; |
| } |
| - (HelloBuilder*) setDeviceId:(NSString*) value { |
| result.hasDeviceId = YES; |
| result.deviceId = value; |
| return self; |
| } |
| - (HelloBuilder*) clearDeviceId { |
| result.hasDeviceId = NO; |
| result.deviceId = @""; |
| return self; |
| } |
| - (BOOL) hasUserAgent { |
| return result.hasUserAgent; |
| } |
| - (NSString*) userAgent { |
| return result.userAgent; |
| } |
| - (HelloBuilder*) setUserAgent:(NSString*) value { |
| result.hasUserAgent = YES; |
| result.userAgent = value; |
| return self; |
| } |
| - (HelloBuilder*) clearUserAgent { |
| result.hasUserAgent = NO; |
| result.userAgent = @""; |
| return self; |
| } |
| @end |
| |
| @interface Ok () |
| @property UInt32 udpPort; |
| @end |
| |
| @implementation Ok |
| |
| - (BOOL) hasUdpPort { |
| return !!hasUdpPort_; |
| } |
| - (void) setHasUdpPort:(BOOL) value_ { |
| hasUdpPort_ = !!value_; |
| } |
| @synthesize udpPort; |
| - (id) init { |
| if ((self = [super init])) { |
| self.udpPort = 0; |
| } |
| return self; |
| } |
| static Ok* defaultOkInstance = nil; |
| + (void) initialize { |
| if (self == [Ok class]) { |
| defaultOkInstance = [[Ok alloc] init]; |
| } |
| } |
| + (Ok*) defaultInstance { |
| return defaultOkInstance; |
| } |
| - (Ok*) defaultInstance { |
| return defaultOkInstance; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasUdpPort) { |
| [output writeUInt32:1 value:self.udpPort]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasUdpPort) { |
| size_ += computeUInt32Size(1, self.udpPort); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Ok*) parseFromData:(NSData*) data { |
| return (Ok*)[[[Ok builder] mergeFromData:data] build]; |
| } |
| + (Ok*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Ok*)[[[Ok builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Ok*) parseFromInputStream:(NSInputStream*) input { |
| return (Ok*)[[[Ok builder] mergeFromInputStream:input] build]; |
| } |
| + (Ok*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Ok*)[[[Ok builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Ok*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Ok*)[[[Ok builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Ok*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Ok*)[[[Ok builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (OkBuilder*) builder { |
| return [[OkBuilder alloc] init]; |
| } |
| + (OkBuilder*) builderWithPrototype:(Ok*) prototype { |
| return [[Ok builder] mergeFrom:prototype]; |
| } |
| - (OkBuilder*) builder { |
| return [Ok builder]; |
| } |
| - (OkBuilder*) toBuilder { |
| return [Ok builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasUdpPort) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"udpPort", [NSNumber numberWithInteger:self.udpPort]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Ok class]]) { |
| return NO; |
| } |
| Ok *otherMessage = other; |
| return |
| self.hasUdpPort == otherMessage.hasUdpPort && |
| (!self.hasUdpPort || self.udpPort == otherMessage.udpPort) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasUdpPort) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.udpPort] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface OkBuilder() |
| @property (strong) Ok* result; |
| @end |
| |
| @implementation OkBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Ok alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (OkBuilder*) clear { |
| self.result = [[Ok alloc] init]; |
| return self; |
| } |
| - (OkBuilder*) clone { |
| return [Ok builderWithPrototype:result]; |
| } |
| - (Ok*) defaultInstance { |
| return [Ok defaultInstance]; |
| } |
| - (Ok*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Ok*) buildPartial { |
| Ok* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (OkBuilder*) mergeFrom:(Ok*) other { |
| if (other == [Ok defaultInstance]) { |
| return self; |
| } |
| if (other.hasUdpPort) { |
| [self setUdpPort:other.udpPort]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (OkBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (OkBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setUdpPort:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasUdpPort { |
| return result.hasUdpPort; |
| } |
| - (UInt32) udpPort { |
| return result.udpPort; |
| } |
| - (OkBuilder*) setUdpPort:(UInt32) value { |
| result.hasUdpPort = YES; |
| result.udpPort = value; |
| return self; |
| } |
| - (OkBuilder*) clearUdpPort { |
| result.hasUdpPort = NO; |
| result.udpPort = 0; |
| return self; |
| } |
| @end |
| |
| @interface Error () |
| @property ErrorCode code; |
| @property (strong) NSString* message; |
| @end |
| |
| @implementation Error |
| |
| - (BOOL) hasCode { |
| return !!hasCode_; |
| } |
| - (void) setHasCode:(BOOL) value_ { |
| hasCode_ = !!value_; |
| } |
| @synthesize code; |
| - (BOOL) hasMessage { |
| return !!hasMessage_; |
| } |
| - (void) setHasMessage:(BOOL) value_ { |
| hasMessage_ = !!value_; |
| } |
| @synthesize message; |
| - (id) init { |
| if ((self = [super init])) { |
| self.code = ErrorCodeErrorCameraNotConnected; |
| self.message = @""; |
| } |
| return self; |
| } |
| static Error* defaultErrorInstance = nil; |
| + (void) initialize { |
| if (self == [Error class]) { |
| defaultErrorInstance = [[Error alloc] init]; |
| } |
| } |
| + (Error*) defaultInstance { |
| return defaultErrorInstance; |
| } |
| - (Error*) defaultInstance { |
| return defaultErrorInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasCode) { |
| return NO; |
| } |
| if (!self.hasMessage) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasCode) { |
| [output writeEnum:1 value:self.code]; |
| } |
| if (self.hasMessage) { |
| [output writeString:2 value:self.message]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasCode) { |
| size_ += computeEnumSize(1, self.code); |
| } |
| if (self.hasMessage) { |
| size_ += computeStringSize(2, self.message); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Error*) parseFromData:(NSData*) data { |
| return (Error*)[[[Error builder] mergeFromData:data] build]; |
| } |
| + (Error*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Error*)[[[Error builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Error*) parseFromInputStream:(NSInputStream*) input { |
| return (Error*)[[[Error builder] mergeFromInputStream:input] build]; |
| } |
| + (Error*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Error*)[[[Error builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Error*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Error*)[[[Error builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Error*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Error*)[[[Error builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (ErrorBuilder*) builder { |
| return [[ErrorBuilder alloc] init]; |
| } |
| + (ErrorBuilder*) builderWithPrototype:(Error*) prototype { |
| return [[Error builder] mergeFrom:prototype]; |
| } |
| - (ErrorBuilder*) builder { |
| return [Error builder]; |
| } |
| - (ErrorBuilder*) toBuilder { |
| return [Error builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasCode) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"code", self.code]; |
| } |
| if (self.hasMessage) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"message", self.message]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Error class]]) { |
| return NO; |
| } |
| Error *otherMessage = other; |
| return |
| self.hasCode == otherMessage.hasCode && |
| (!self.hasCode || self.code == otherMessage.code) && |
| self.hasMessage == otherMessage.hasMessage && |
| (!self.hasMessage || [self.message isEqual:otherMessage.message]) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasCode) { |
| hashCode = hashCode * 31 + self.code; |
| } |
| if (self.hasMessage) { |
| hashCode = hashCode * 31 + [self.message hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface ErrorBuilder() |
| @property (strong) Error* result; |
| @end |
| |
| @implementation ErrorBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Error alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (ErrorBuilder*) clear { |
| self.result = [[Error alloc] init]; |
| return self; |
| } |
| - (ErrorBuilder*) clone { |
| return [Error builderWithPrototype:result]; |
| } |
| - (Error*) defaultInstance { |
| return [Error defaultInstance]; |
| } |
| - (Error*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Error*) buildPartial { |
| Error* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (ErrorBuilder*) mergeFrom:(Error*) other { |
| if (other == [Error defaultInstance]) { |
| return self; |
| } |
| if (other.hasCode) { |
| [self setCode:other.code]; |
| } |
| if (other.hasMessage) { |
| [self setMessage:other.message]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (ErrorBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (ErrorBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| ErrorCode value = (ErrorCode)[input readEnum]; |
| if (ErrorCodeIsValidValue(value)) { |
| [self setCode:value]; |
| } else { |
| [unknownFields mergeVarintField:1 value:value]; |
| } |
| break; |
| } |
| case 18: { |
| [self setMessage:[input readString]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasCode { |
| return result.hasCode; |
| } |
| - (ErrorCode) code { |
| return result.code; |
| } |
| - (ErrorBuilder*) setCode:(ErrorCode) value { |
| result.hasCode = YES; |
| result.code = value; |
| return self; |
| } |
| - (ErrorBuilder*) clearCode { |
| result.hasCode = NO; |
| result.code = ErrorCodeErrorCameraNotConnected; |
| return self; |
| } |
| - (BOOL) hasMessage { |
| return result.hasMessage; |
| } |
| - (NSString*) message { |
| return result.message; |
| } |
| - (ErrorBuilder*) setMessage:(NSString*) value { |
| result.hasMessage = YES; |
| result.message = value; |
| return self; |
| } |
| - (ErrorBuilder*) clearMessage { |
| result.hasMessage = NO; |
| result.message = @""; |
| return self; |
| } |
| @end |
| |
| @interface PingCamera () |
| @end |
| |
| @implementation PingCamera |
| |
| - (id) init { |
| if ((self = [super init])) { |
| } |
| return self; |
| } |
| static PingCamera* defaultPingCameraInstance = nil; |
| + (void) initialize { |
| if (self == [PingCamera class]) { |
| defaultPingCameraInstance = [[PingCamera alloc] init]; |
| } |
| } |
| + (PingCamera*) defaultInstance { |
| return defaultPingCameraInstance; |
| } |
| - (PingCamera*) defaultInstance { |
| return defaultPingCameraInstance; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (PingCamera*) parseFromData:(NSData*) data { |
| return (PingCamera*)[[[PingCamera builder] mergeFromData:data] build]; |
| } |
| + (PingCamera*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PingCamera*)[[[PingCamera builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (PingCamera*) parseFromInputStream:(NSInputStream*) input { |
| return (PingCamera*)[[[PingCamera builder] mergeFromInputStream:input] build]; |
| } |
| + (PingCamera*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PingCamera*)[[[PingCamera builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PingCamera*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (PingCamera*)[[[PingCamera builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (PingCamera*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PingCamera*)[[[PingCamera builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PingCameraBuilder*) builder { |
| return [[PingCameraBuilder alloc] init]; |
| } |
| + (PingCameraBuilder*) builderWithPrototype:(PingCamera*) prototype { |
| return [[PingCamera builder] mergeFrom:prototype]; |
| } |
| - (PingCameraBuilder*) builder { |
| return [PingCamera builder]; |
| } |
| - (PingCameraBuilder*) toBuilder { |
| return [PingCamera builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[PingCamera class]]) { |
| return NO; |
| } |
| PingCamera *otherMessage = other; |
| return |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface PingCameraBuilder() |
| @property (strong) PingCamera* result; |
| @end |
| |
| @implementation PingCameraBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[PingCamera alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (PingCameraBuilder*) clear { |
| self.result = [[PingCamera alloc] init]; |
| return self; |
| } |
| - (PingCameraBuilder*) clone { |
| return [PingCamera builderWithPrototype:result]; |
| } |
| - (PingCamera*) defaultInstance { |
| return [PingCamera defaultInstance]; |
| } |
| - (PingCamera*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (PingCamera*) buildPartial { |
| PingCamera* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (PingCameraBuilder*) mergeFrom:(PingCamera*) other { |
| if (other == [PingCamera defaultInstance]) { |
| return self; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (PingCameraBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (PingCameraBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| } |
| } |
| } |
| @end |
| |
| @interface AudioPayload () |
| @property (strong) NSData* payload; |
| @property UInt32 sessionId; |
| @property CodecType codec; |
| @property UInt32 sampleRate; |
| @end |
| |
| @implementation AudioPayload |
| |
| - (BOOL) hasPayload { |
| return !!hasPayload_; |
| } |
| - (void) setHasPayload:(BOOL) value_ { |
| hasPayload_ = !!value_; |
| } |
| @synthesize payload; |
| - (BOOL) hasSessionId { |
| return !!hasSessionId_; |
| } |
| - (void) setHasSessionId:(BOOL) value_ { |
| hasSessionId_ = !!value_; |
| } |
| @synthesize sessionId; |
| - (BOOL) hasCodec { |
| return !!hasCodec_; |
| } |
| - (void) setHasCodec:(BOOL) value_ { |
| hasCodec_ = !!value_; |
| } |
| @synthesize codec; |
| - (BOOL) hasSampleRate { |
| return !!hasSampleRate_; |
| } |
| - (void) setHasSampleRate:(BOOL) value_ { |
| hasSampleRate_ = !!value_; |
| } |
| @synthesize sampleRate; |
| - (id) init { |
| if ((self = [super init])) { |
| self.payload = [NSData data]; |
| self.sessionId = 0; |
| self.codec = CodecTypeSpeex; |
| self.sampleRate = 0; |
| } |
| return self; |
| } |
| static AudioPayload* defaultAudioPayloadInstance = nil; |
| + (void) initialize { |
| if (self == [AudioPayload class]) { |
| defaultAudioPayloadInstance = [[AudioPayload alloc] init]; |
| } |
| } |
| + (AudioPayload*) defaultInstance { |
| return defaultAudioPayloadInstance; |
| } |
| - (AudioPayload*) defaultInstance { |
| return defaultAudioPayloadInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasPayload) { |
| return NO; |
| } |
| if (!self.hasSessionId) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasPayload) { |
| [output writeData:1 value:self.payload]; |
| } |
| if (self.hasSessionId) { |
| [output writeUInt32:2 value:self.sessionId]; |
| } |
| if (self.hasCodec) { |
| [output writeEnum:3 value:self.codec]; |
| } |
| if (self.hasSampleRate) { |
| [output writeUInt32:4 value:self.sampleRate]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasPayload) { |
| size_ += computeDataSize(1, self.payload); |
| } |
| if (self.hasSessionId) { |
| size_ += computeUInt32Size(2, self.sessionId); |
| } |
| if (self.hasCodec) { |
| size_ += computeEnumSize(3, self.codec); |
| } |
| if (self.hasSampleRate) { |
| size_ += computeUInt32Size(4, self.sampleRate); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (AudioPayload*) parseFromData:(NSData*) data { |
| return (AudioPayload*)[[[AudioPayload builder] mergeFromData:data] build]; |
| } |
| + (AudioPayload*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (AudioPayload*)[[[AudioPayload builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (AudioPayload*) parseFromInputStream:(NSInputStream*) input { |
| return (AudioPayload*)[[[AudioPayload builder] mergeFromInputStream:input] build]; |
| } |
| + (AudioPayload*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (AudioPayload*)[[[AudioPayload builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (AudioPayload*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (AudioPayload*)[[[AudioPayload builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (AudioPayload*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (AudioPayload*)[[[AudioPayload builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (AudioPayloadBuilder*) builder { |
| return [[AudioPayloadBuilder alloc] init]; |
| } |
| + (AudioPayloadBuilder*) builderWithPrototype:(AudioPayload*) prototype { |
| return [[AudioPayload builder] mergeFrom:prototype]; |
| } |
| - (AudioPayloadBuilder*) builder { |
| return [AudioPayload builder]; |
| } |
| - (AudioPayloadBuilder*) toBuilder { |
| return [AudioPayload builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasPayload) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"payload", self.payload]; |
| } |
| if (self.hasSessionId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionId", [NSNumber numberWithInteger:self.sessionId]]; |
| } |
| if (self.hasCodec) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"codec", self.codec]; |
| } |
| if (self.hasSampleRate) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sampleRate", [NSNumber numberWithInteger:self.sampleRate]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[AudioPayload class]]) { |
| return NO; |
| } |
| AudioPayload *otherMessage = other; |
| return |
| self.hasPayload == otherMessage.hasPayload && |
| (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && |
| self.hasSessionId == otherMessage.hasSessionId && |
| (!self.hasSessionId || self.sessionId == otherMessage.sessionId) && |
| self.hasCodec == otherMessage.hasCodec && |
| (!self.hasCodec || self.codec == otherMessage.codec) && |
| self.hasSampleRate == otherMessage.hasSampleRate && |
| (!self.hasSampleRate || self.sampleRate == otherMessage.sampleRate) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasPayload) { |
| hashCode = hashCode * 31 + [self.payload hash]; |
| } |
| if (self.hasSessionId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sessionId] hash]; |
| } |
| if (self.hasCodec) { |
| hashCode = hashCode * 31 + self.codec; |
| } |
| if (self.hasSampleRate) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sampleRate] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface AudioPayloadBuilder() |
| @property (strong) AudioPayload* result; |
| @end |
| |
| @implementation AudioPayloadBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[AudioPayload alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (AudioPayloadBuilder*) clear { |
| self.result = [[AudioPayload alloc] init]; |
| return self; |
| } |
| - (AudioPayloadBuilder*) clone { |
| return [AudioPayload builderWithPrototype:result]; |
| } |
| - (AudioPayload*) defaultInstance { |
| return [AudioPayload defaultInstance]; |
| } |
| - (AudioPayload*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (AudioPayload*) buildPartial { |
| AudioPayload* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (AudioPayloadBuilder*) mergeFrom:(AudioPayload*) other { |
| if (other == [AudioPayload defaultInstance]) { |
| return self; |
| } |
| if (other.hasPayload) { |
| [self setPayload:other.payload]; |
| } |
| if (other.hasSessionId) { |
| [self setSessionId:other.sessionId]; |
| } |
| if (other.hasCodec) { |
| [self setCodec:other.codec]; |
| } |
| if (other.hasSampleRate) { |
| [self setSampleRate:other.sampleRate]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (AudioPayloadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (AudioPayloadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 10: { |
| [self setPayload:[input readData]]; |
| break; |
| } |
| case 16: { |
| [self setSessionId:[input readUInt32]]; |
| break; |
| } |
| case 24: { |
| CodecType value = (CodecType)[input readEnum]; |
| if (CodecTypeIsValidValue(value)) { |
| [self setCodec:value]; |
| } else { |
| [unknownFields mergeVarintField:3 value:value]; |
| } |
| break; |
| } |
| case 32: { |
| [self setSampleRate:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasPayload { |
| return result.hasPayload; |
| } |
| - (NSData*) payload { |
| return result.payload; |
| } |
| - (AudioPayloadBuilder*) setPayload:(NSData*) value { |
| result.hasPayload = YES; |
| result.payload = value; |
| return self; |
| } |
| - (AudioPayloadBuilder*) clearPayload { |
| result.hasPayload = NO; |
| result.payload = [NSData data]; |
| return self; |
| } |
| - (BOOL) hasSessionId { |
| return result.hasSessionId; |
| } |
| - (UInt32) sessionId { |
| return result.sessionId; |
| } |
| - (AudioPayloadBuilder*) setSessionId:(UInt32) value { |
| result.hasSessionId = YES; |
| result.sessionId = value; |
| return self; |
| } |
| - (AudioPayloadBuilder*) clearSessionId { |
| result.hasSessionId = NO; |
| result.sessionId = 0; |
| return self; |
| } |
| - (BOOL) hasCodec { |
| return result.hasCodec; |
| } |
| - (CodecType) codec { |
| return result.codec; |
| } |
| - (AudioPayloadBuilder*) setCodec:(CodecType) value { |
| result.hasCodec = YES; |
| result.codec = value; |
| return self; |
| } |
| - (AudioPayloadBuilder*) clearCodec { |
| result.hasCodec = NO; |
| result.codec = CodecTypeSpeex; |
| return self; |
| } |
| - (BOOL) hasSampleRate { |
| return result.hasSampleRate; |
| } |
| - (UInt32) sampleRate { |
| return result.sampleRate; |
| } |
| - (AudioPayloadBuilder*) setSampleRate:(UInt32) value { |
| result.hasSampleRate = YES; |
| result.sampleRate = value; |
| return self; |
| } |
| - (AudioPayloadBuilder*) clearSampleRate { |
| result.hasSampleRate = NO; |
| result.sampleRate = 0; |
| return self; |
| } |
| @end |
| |
| @interface StartPlayback () |
| @property UInt32 sessionId; |
| @property CT_AVProfile profile; |
| @property Float64 startTime; |
| @property (strong) NSData* externalIp; |
| @property UInt32 externalPort; |
| @property (strong) PBAppendableArray * otherProfilesArray; |
| @property StartPlaybackProfileNotFoundAction profileNotFoundAction; |
| @end |
| |
| @implementation StartPlayback |
| |
| - (BOOL) hasSessionId { |
| return !!hasSessionId_; |
| } |
| - (void) setHasSessionId:(BOOL) value_ { |
| hasSessionId_ = !!value_; |
| } |
| @synthesize sessionId; |
| - (BOOL) hasProfile { |
| return !!hasProfile_; |
| } |
| - (void) setHasProfile:(BOOL) value_ { |
| hasProfile_ = !!value_; |
| } |
| @synthesize profile; |
| - (BOOL) hasStartTime { |
| return !!hasStartTime_; |
| } |
| - (void) setHasStartTime:(BOOL) value_ { |
| hasStartTime_ = !!value_; |
| } |
| @synthesize startTime; |
| - (BOOL) hasExternalIp { |
| return !!hasExternalIp_; |
| } |
| - (void) setHasExternalIp:(BOOL) value_ { |
| hasExternalIp_ = !!value_; |
| } |
| @synthesize externalIp; |
| - (BOOL) hasExternalPort { |
| return !!hasExternalPort_; |
| } |
| - (void) setHasExternalPort:(BOOL) value_ { |
| hasExternalPort_ = !!value_; |
| } |
| @synthesize externalPort; |
| @synthesize otherProfilesArray; |
| @dynamic otherProfiles; |
| - (BOOL) hasProfileNotFoundAction { |
| return !!hasProfileNotFoundAction_; |
| } |
| - (void) setHasProfileNotFoundAction:(BOOL) value_ { |
| hasProfileNotFoundAction_ = !!value_; |
| } |
| @synthesize profileNotFoundAction; |
| - (id) init { |
| if ((self = [super init])) { |
| self.sessionId = 0; |
| self.profile = CT_AVProfileAudioAac; |
| self.startTime = 0; |
| self.externalIp = [NSData data]; |
| self.externalPort = 0; |
| self.profileNotFoundAction = StartPlaybackProfileNotFoundActionRedirect; |
| } |
| return self; |
| } |
| static StartPlayback* defaultStartPlaybackInstance = nil; |
| + (void) initialize { |
| if (self == [StartPlayback class]) { |
| defaultStartPlaybackInstance = [[StartPlayback alloc] init]; |
| } |
| } |
| + (StartPlayback*) defaultInstance { |
| return defaultStartPlaybackInstance; |
| } |
| - (StartPlayback*) defaultInstance { |
| return defaultStartPlaybackInstance; |
| } |
| - (PBArray *)otherProfiles { |
| return otherProfilesArray; |
| } |
| - (CT_AVProfile)otherProfilesAtIndex:(NSUInteger)index { |
| return (CT_AVProfile)[otherProfilesArray enumAtIndex:index]; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasSessionId) { |
| return NO; |
| } |
| if (!self.hasProfile) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasSessionId) { |
| [output writeUInt32:1 value:self.sessionId]; |
| } |
| if (self.hasProfile) { |
| [output writeEnum:2 value:self.profile]; |
| } |
| if (self.hasStartTime) { |
| [output writeDouble:3 value:self.startTime]; |
| } |
| if (self.hasExternalIp) { |
| [output writeData:4 value:self.externalIp]; |
| } |
| if (self.hasExternalPort) { |
| [output writeUInt32:5 value:self.externalPort]; |
| } |
| const NSUInteger otherProfilesArrayCount = self.otherProfilesArray.count; |
| const CT_AVProfile *otherProfilesArrayValues = (const CT_AVProfile *)self.otherProfilesArray.data; |
| for (NSUInteger i = 0; i < otherProfilesArrayCount; ++i) { |
| [output writeEnum:6 value:otherProfilesArrayValues[i]]; |
| } |
| if (self.hasProfileNotFoundAction) { |
| [output writeEnum:7 value:self.profileNotFoundAction]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasSessionId) { |
| size_ += computeUInt32Size(1, self.sessionId); |
| } |
| if (self.hasProfile) { |
| size_ += computeEnumSize(2, self.profile); |
| } |
| if (self.hasStartTime) { |
| size_ += computeDoubleSize(3, self.startTime); |
| } |
| if (self.hasExternalIp) { |
| size_ += computeDataSize(4, self.externalIp); |
| } |
| if (self.hasExternalPort) { |
| size_ += computeUInt32Size(5, self.externalPort); |
| } |
| { |
| SInt32 dataSize = 0; |
| const NSUInteger count = self.otherProfilesArray.count; |
| const CT_AVProfile *values = (const CT_AVProfile *)self.otherProfilesArray.data; |
| for (NSUInteger i = 0; i < count; ++i) { |
| dataSize += computeEnumSizeNoTag(values[i]); |
| } |
| size_ += dataSize; |
| size_ += (SInt32)(1 * count); |
| } |
| if (self.hasProfileNotFoundAction) { |
| size_ += computeEnumSize(7, self.profileNotFoundAction); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (StartPlayback*) parseFromData:(NSData*) data { |
| return (StartPlayback*)[[[StartPlayback builder] mergeFromData:data] build]; |
| } |
| + (StartPlayback*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (StartPlayback*)[[[StartPlayback builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (StartPlayback*) parseFromInputStream:(NSInputStream*) input { |
| return (StartPlayback*)[[[StartPlayback builder] mergeFromInputStream:input] build]; |
| } |
| + (StartPlayback*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (StartPlayback*)[[[StartPlayback builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (StartPlayback*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (StartPlayback*)[[[StartPlayback builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (StartPlayback*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (StartPlayback*)[[[StartPlayback builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (StartPlaybackBuilder*) builder { |
| return [[StartPlaybackBuilder alloc] init]; |
| } |
| + (StartPlaybackBuilder*) builderWithPrototype:(StartPlayback*) prototype { |
| return [[StartPlayback builder] mergeFrom:prototype]; |
| } |
| - (StartPlaybackBuilder*) builder { |
| return [StartPlayback builder]; |
| } |
| - (StartPlaybackBuilder*) toBuilder { |
| return [StartPlayback builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasSessionId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionId", [NSNumber numberWithInteger:self.sessionId]]; |
| } |
| if (self.hasProfile) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"profile", self.profile]; |
| } |
| if (self.hasStartTime) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"startTime", [NSNumber numberWithDouble:self.startTime]]; |
| } |
| if (self.hasExternalIp) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"externalIp", self.externalIp]; |
| } |
| if (self.hasExternalPort) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"externalPort", [NSNumber numberWithInteger:self.externalPort]]; |
| } |
| [self.otherProfilesArray enumerateObjectsUsingBlock:^(id element, NSUInteger idx, BOOL *stop) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"otherProfiles", element]; |
| }]; |
| if (self.hasProfileNotFoundAction) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"profileNotFoundAction", self.profileNotFoundAction]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[StartPlayback class]]) { |
| return NO; |
| } |
| StartPlayback *otherMessage = other; |
| return |
| self.hasSessionId == otherMessage.hasSessionId && |
| (!self.hasSessionId || self.sessionId == otherMessage.sessionId) && |
| self.hasProfile == otherMessage.hasProfile && |
| (!self.hasProfile || self.profile == otherMessage.profile) && |
| self.hasStartTime == otherMessage.hasStartTime && |
| (!self.hasStartTime || self.startTime == otherMessage.startTime) && |
| self.hasExternalIp == otherMessage.hasExternalIp && |
| (!self.hasExternalIp || [self.externalIp isEqual:otherMessage.externalIp]) && |
| self.hasExternalPort == otherMessage.hasExternalPort && |
| (!self.hasExternalPort || self.externalPort == otherMessage.externalPort) && |
| [self.otherProfilesArray isEqualToArray:otherMessage.otherProfilesArray] && |
| self.hasProfileNotFoundAction == otherMessage.hasProfileNotFoundAction && |
| (!self.hasProfileNotFoundAction || self.profileNotFoundAction == otherMessage.profileNotFoundAction) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasSessionId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sessionId] hash]; |
| } |
| if (self.hasProfile) { |
| hashCode = hashCode * 31 + self.profile; |
| } |
| if (self.hasStartTime) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.startTime] hash]; |
| } |
| if (self.hasExternalIp) { |
| hashCode = hashCode * 31 + [self.externalIp hash]; |
| } |
| if (self.hasExternalPort) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.externalPort] hash]; |
| } |
| [self.otherProfilesArray enumerateObjectsUsingBlock:^(NSNumber* element, NSUInteger idx, BOOL *stop) { |
| hashCode = hashCode * 31 + element.longValue; |
| }]; |
| if (self.hasProfileNotFoundAction) { |
| hashCode = hashCode * 31 + self.profileNotFoundAction; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| BOOL StartPlaybackProfileNotFoundActionIsValidValue(StartPlaybackProfileNotFoundAction value) { |
| switch (value) { |
| case StartPlaybackProfileNotFoundActionRedirect: |
| case StartPlaybackProfileNotFoundActionUseNextAvailable: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| @interface StartPlaybackBuilder() |
| @property (strong) StartPlayback* result; |
| @end |
| |
| @implementation StartPlaybackBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[StartPlayback alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (StartPlaybackBuilder*) clear { |
| self.result = [[StartPlayback alloc] init]; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clone { |
| return [StartPlayback builderWithPrototype:result]; |
| } |
| - (StartPlayback*) defaultInstance { |
| return [StartPlayback defaultInstance]; |
| } |
| - (StartPlayback*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (StartPlayback*) buildPartial { |
| StartPlayback* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (StartPlaybackBuilder*) mergeFrom:(StartPlayback*) other { |
| if (other == [StartPlayback defaultInstance]) { |
| return self; |
| } |
| if (other.hasSessionId) { |
| [self setSessionId:other.sessionId]; |
| } |
| if (other.hasProfile) { |
| [self setProfile:other.profile]; |
| } |
| if (other.hasStartTime) { |
| [self setStartTime:other.startTime]; |
| } |
| if (other.hasExternalIp) { |
| [self setExternalIp:other.externalIp]; |
| } |
| if (other.hasExternalPort) { |
| [self setExternalPort:other.externalPort]; |
| } |
| if (other.otherProfilesArray.count > 0) { |
| if (result.otherProfilesArray == nil) { |
| result.otherProfilesArray = [other.otherProfilesArray copy]; |
| } else { |
| [result.otherProfilesArray appendArray:other.otherProfilesArray]; |
| } |
| } |
| if (other.hasProfileNotFoundAction) { |
| [self setProfileNotFoundAction:other.profileNotFoundAction]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (StartPlaybackBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (StartPlaybackBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setSessionId:[input readUInt32]]; |
| break; |
| } |
| case 16: { |
| CT_AVProfile value = (CT_AVProfile)[input readEnum]; |
| if (CT_AVProfileIsValidValue(value)) { |
| [self setProfile:value]; |
| } else { |
| [unknownFields mergeVarintField:2 value:value]; |
| } |
| break; |
| } |
| case 25: { |
| [self setStartTime:[input readDouble]]; |
| break; |
| } |
| case 34: { |
| [self setExternalIp:[input readData]]; |
| break; |
| } |
| case 40: { |
| [self setExternalPort:[input readUInt32]]; |
| break; |
| } |
| case 48: { |
| CT_AVProfile value = (CT_AVProfile)[input readEnum]; |
| if (CT_AVProfileIsValidValue(value)) { |
| [self addOtherProfiles:value]; |
| } else { |
| [unknownFields mergeVarintField:6 value:value]; |
| } |
| break; |
| } |
| case 56: { |
| StartPlaybackProfileNotFoundAction value = (StartPlaybackProfileNotFoundAction)[input readEnum]; |
| if (StartPlaybackProfileNotFoundActionIsValidValue(value)) { |
| [self setProfileNotFoundAction:value]; |
| } else { |
| [unknownFields mergeVarintField:7 value:value]; |
| } |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasSessionId { |
| return result.hasSessionId; |
| } |
| - (UInt32) sessionId { |
| return result.sessionId; |
| } |
| - (StartPlaybackBuilder*) setSessionId:(UInt32) value { |
| result.hasSessionId = YES; |
| result.sessionId = value; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clearSessionId { |
| result.hasSessionId = NO; |
| result.sessionId = 0; |
| return self; |
| } |
| - (BOOL) hasProfile { |
| return result.hasProfile; |
| } |
| - (CT_AVProfile) profile { |
| return result.profile; |
| } |
| - (StartPlaybackBuilder*) setProfile:(CT_AVProfile) value { |
| result.hasProfile = YES; |
| result.profile = value; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clearProfile { |
| result.hasProfile = NO; |
| result.profile = CT_AVProfileAudioAac; |
| return self; |
| } |
| - (BOOL) hasStartTime { |
| return result.hasStartTime; |
| } |
| - (Float64) startTime { |
| return result.startTime; |
| } |
| - (StartPlaybackBuilder*) setStartTime:(Float64) value { |
| result.hasStartTime = YES; |
| result.startTime = value; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clearStartTime { |
| result.hasStartTime = NO; |
| result.startTime = 0; |
| return self; |
| } |
| - (BOOL) hasExternalIp { |
| return result.hasExternalIp; |
| } |
| - (NSData*) externalIp { |
| return result.externalIp; |
| } |
| - (StartPlaybackBuilder*) setExternalIp:(NSData*) value { |
| result.hasExternalIp = YES; |
| result.externalIp = value; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clearExternalIp { |
| result.hasExternalIp = NO; |
| result.externalIp = [NSData data]; |
| return self; |
| } |
| - (BOOL) hasExternalPort { |
| return result.hasExternalPort; |
| } |
| - (UInt32) externalPort { |
| return result.externalPort; |
| } |
| - (StartPlaybackBuilder*) setExternalPort:(UInt32) value { |
| result.hasExternalPort = YES; |
| result.externalPort = value; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clearExternalPort { |
| result.hasExternalPort = NO; |
| result.externalPort = 0; |
| return self; |
| } |
| - (PBAppendableArray *)otherProfiles { |
| return result.otherProfilesArray; |
| } |
| - (CT_AVProfile)otherProfilesAtIndex:(NSUInteger)index { |
| return [result otherProfilesAtIndex:index]; |
| } |
| - (StartPlaybackBuilder *)addOtherProfiles:(CT_AVProfile)value { |
| if (result.otherProfilesArray == nil) { |
| result.otherProfilesArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32]; |
| } |
| [result.otherProfilesArray addEnum:value]; |
| return self; |
| } |
| - (StartPlaybackBuilder *)setOtherProfilesArray:(NSArray *)array { |
| result.otherProfilesArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32]; |
| return self; |
| } |
| - (StartPlaybackBuilder *)setOtherProfilesValues:(const CT_AVProfile *)values count:(NSUInteger)count { |
| result.otherProfilesArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32]; |
| return self; |
| } |
| - (StartPlaybackBuilder *)clearOtherProfiles { |
| result.otherProfilesArray = nil; |
| return self; |
| } |
| - (BOOL) hasProfileNotFoundAction { |
| return result.hasProfileNotFoundAction; |
| } |
| - (StartPlaybackProfileNotFoundAction) profileNotFoundAction { |
| return result.profileNotFoundAction; |
| } |
| - (StartPlaybackBuilder*) setProfileNotFoundAction:(StartPlaybackProfileNotFoundAction) value { |
| result.hasProfileNotFoundAction = YES; |
| result.profileNotFoundAction = value; |
| return self; |
| } |
| - (StartPlaybackBuilder*) clearProfileNotFoundAction { |
| result.hasProfileNotFoundAction = NO; |
| result.profileNotFoundAction = StartPlaybackProfileNotFoundActionRedirect; |
| return self; |
| } |
| @end |
| |
| @interface StopPlayback () |
| @property UInt32 sessionId; |
| @end |
| |
| @implementation StopPlayback |
| |
| - (BOOL) hasSessionId { |
| return !!hasSessionId_; |
| } |
| - (void) setHasSessionId:(BOOL) value_ { |
| hasSessionId_ = !!value_; |
| } |
| @synthesize sessionId; |
| - (id) init { |
| if ((self = [super init])) { |
| self.sessionId = 0; |
| } |
| return self; |
| } |
| static StopPlayback* defaultStopPlaybackInstance = nil; |
| + (void) initialize { |
| if (self == [StopPlayback class]) { |
| defaultStopPlaybackInstance = [[StopPlayback alloc] init]; |
| } |
| } |
| + (StopPlayback*) defaultInstance { |
| return defaultStopPlaybackInstance; |
| } |
| - (StopPlayback*) defaultInstance { |
| return defaultStopPlaybackInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasSessionId) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasSessionId) { |
| [output writeUInt32:1 value:self.sessionId]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasSessionId) { |
| size_ += computeUInt32Size(1, self.sessionId); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (StopPlayback*) parseFromData:(NSData*) data { |
| return (StopPlayback*)[[[StopPlayback builder] mergeFromData:data] build]; |
| } |
| + (StopPlayback*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (StopPlayback*)[[[StopPlayback builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (StopPlayback*) parseFromInputStream:(NSInputStream*) input { |
| return (StopPlayback*)[[[StopPlayback builder] mergeFromInputStream:input] build]; |
| } |
| + (StopPlayback*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (StopPlayback*)[[[StopPlayback builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (StopPlayback*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (StopPlayback*)[[[StopPlayback builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (StopPlayback*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (StopPlayback*)[[[StopPlayback builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (StopPlaybackBuilder*) builder { |
| return [[StopPlaybackBuilder alloc] init]; |
| } |
| + (StopPlaybackBuilder*) builderWithPrototype:(StopPlayback*) prototype { |
| return [[StopPlayback builder] mergeFrom:prototype]; |
| } |
| - (StopPlaybackBuilder*) builder { |
| return [StopPlayback builder]; |
| } |
| - (StopPlaybackBuilder*) toBuilder { |
| return [StopPlayback builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasSessionId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionId", [NSNumber numberWithInteger:self.sessionId]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[StopPlayback class]]) { |
| return NO; |
| } |
| StopPlayback *otherMessage = other; |
| return |
| self.hasSessionId == otherMessage.hasSessionId && |
| (!self.hasSessionId || self.sessionId == otherMessage.sessionId) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasSessionId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sessionId] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface StopPlaybackBuilder() |
| @property (strong) StopPlayback* result; |
| @end |
| |
| @implementation StopPlaybackBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[StopPlayback alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (StopPlaybackBuilder*) clear { |
| self.result = [[StopPlayback alloc] init]; |
| return self; |
| } |
| - (StopPlaybackBuilder*) clone { |
| return [StopPlayback builderWithPrototype:result]; |
| } |
| - (StopPlayback*) defaultInstance { |
| return [StopPlayback defaultInstance]; |
| } |
| - (StopPlayback*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (StopPlayback*) buildPartial { |
| StopPlayback* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (StopPlaybackBuilder*) mergeFrom:(StopPlayback*) other { |
| if (other == [StopPlayback defaultInstance]) { |
| return self; |
| } |
| if (other.hasSessionId) { |
| [self setSessionId:other.sessionId]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (StopPlaybackBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (StopPlaybackBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setSessionId:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasSessionId { |
| return result.hasSessionId; |
| } |
| - (UInt32) sessionId { |
| return result.sessionId; |
| } |
| - (StopPlaybackBuilder*) setSessionId:(UInt32) value { |
| result.hasSessionId = YES; |
| result.sessionId = value; |
| return self; |
| } |
| - (StopPlaybackBuilder*) clearSessionId { |
| result.hasSessionId = NO; |
| result.sessionId = 0; |
| return self; |
| } |
| @end |
| |
| @interface PlaybackBegin () |
| @property UInt32 sessionId; |
| @property (strong) NSMutableArray * channelsArray; |
| @property (strong) NSData* srtpMasterKey; |
| @property (strong) NSData* srtpMasterSalt; |
| @property UInt32 fecKVal; |
| @property UInt32 fecNVal; |
| @end |
| |
| @implementation PlaybackBegin |
| |
| - (BOOL) hasSessionId { |
| return !!hasSessionId_; |
| } |
| - (void) setHasSessionId:(BOOL) value_ { |
| hasSessionId_ = !!value_; |
| } |
| @synthesize sessionId; |
| @synthesize channelsArray; |
| @dynamic channels; |
| - (BOOL) hasSrtpMasterKey { |
| return !!hasSrtpMasterKey_; |
| } |
| - (void) setHasSrtpMasterKey:(BOOL) value_ { |
| hasSrtpMasterKey_ = !!value_; |
| } |
| @synthesize srtpMasterKey; |
| - (BOOL) hasSrtpMasterSalt { |
| return !!hasSrtpMasterSalt_; |
| } |
| - (void) setHasSrtpMasterSalt:(BOOL) value_ { |
| hasSrtpMasterSalt_ = !!value_; |
| } |
| @synthesize srtpMasterSalt; |
| - (BOOL) hasFecKVal { |
| return !!hasFecKVal_; |
| } |
| - (void) setHasFecKVal:(BOOL) value_ { |
| hasFecKVal_ = !!value_; |
| } |
| @synthesize fecKVal; |
| - (BOOL) hasFecNVal { |
| return !!hasFecNVal_; |
| } |
| - (void) setHasFecNVal:(BOOL) value_ { |
| hasFecNVal_ = !!value_; |
| } |
| @synthesize fecNVal; |
| - (id) init { |
| if ((self = [super init])) { |
| self.sessionId = 0; |
| self.srtpMasterKey = [NSData data]; |
| self.srtpMasterSalt = [NSData data]; |
| self.fecKVal = 0; |
| self.fecNVal = 0; |
| } |
| return self; |
| } |
| static PlaybackBegin* defaultPlaybackBeginInstance = nil; |
| + (void) initialize { |
| if (self == [PlaybackBegin class]) { |
| defaultPlaybackBeginInstance = [[PlaybackBegin alloc] init]; |
| } |
| } |
| + (PlaybackBegin*) defaultInstance { |
| return defaultPlaybackBeginInstance; |
| } |
| - (PlaybackBegin*) defaultInstance { |
| return defaultPlaybackBeginInstance; |
| } |
| - (NSArray *)channels { |
| return channelsArray; |
| } |
| - (PlaybackBeginStream*)channelsAtIndex:(NSUInteger)index { |
| return [channelsArray objectAtIndex:index]; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasSessionId) { |
| return NO; |
| } |
| __block BOOL isInitchannels = YES; |
| [self.channels enumerateObjectsUsingBlock:^(PlaybackBeginStream *element, NSUInteger idx, BOOL *stop) { |
| if (!element.isInitialized) { |
| isInitchannels = NO; |
| *stop = YES; |
| } |
| }]; |
| if (!isInitchannels) return isInitchannels; |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasSessionId) { |
| [output writeUInt32:1 value:self.sessionId]; |
| } |
| [self.channelsArray enumerateObjectsUsingBlock:^(PlaybackBeginStream *element, NSUInteger idx, BOOL *stop) { |
| [output writeMessage:2 value:element]; |
| }]; |
| if (self.hasSrtpMasterKey) { |
| [output writeData:3 value:self.srtpMasterKey]; |
| } |
| if (self.hasSrtpMasterSalt) { |
| [output writeData:4 value:self.srtpMasterSalt]; |
| } |
| if (self.hasFecKVal) { |
| [output writeUInt32:5 value:self.fecKVal]; |
| } |
| if (self.hasFecNVal) { |
| [output writeUInt32:6 value:self.fecNVal]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasSessionId) { |
| size_ += computeUInt32Size(1, self.sessionId); |
| } |
| [self.channelsArray enumerateObjectsUsingBlock:^(PlaybackBeginStream *element, NSUInteger idx, BOOL *stop) { |
| size_ += computeMessageSize(2, element); |
| }]; |
| if (self.hasSrtpMasterKey) { |
| size_ += computeDataSize(3, self.srtpMasterKey); |
| } |
| if (self.hasSrtpMasterSalt) { |
| size_ += computeDataSize(4, self.srtpMasterSalt); |
| } |
| if (self.hasFecKVal) { |
| size_ += computeUInt32Size(5, self.fecKVal); |
| } |
| if (self.hasFecNVal) { |
| size_ += computeUInt32Size(6, self.fecNVal); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (PlaybackBegin*) parseFromData:(NSData*) data { |
| return (PlaybackBegin*)[[[PlaybackBegin builder] mergeFromData:data] build]; |
| } |
| + (PlaybackBegin*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackBegin*)[[[PlaybackBegin builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackBegin*) parseFromInputStream:(NSInputStream*) input { |
| return (PlaybackBegin*)[[[PlaybackBegin builder] mergeFromInputStream:input] build]; |
| } |
| + (PlaybackBegin*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackBegin*)[[[PlaybackBegin builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackBegin*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (PlaybackBegin*)[[[PlaybackBegin builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (PlaybackBegin*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackBegin*)[[[PlaybackBegin builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackBeginBuilder*) builder { |
| return [[PlaybackBeginBuilder alloc] init]; |
| } |
| + (PlaybackBeginBuilder*) builderWithPrototype:(PlaybackBegin*) prototype { |
| return [[PlaybackBegin builder] mergeFrom:prototype]; |
| } |
| - (PlaybackBeginBuilder*) builder { |
| return [PlaybackBegin builder]; |
| } |
| - (PlaybackBeginBuilder*) toBuilder { |
| return [PlaybackBegin builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasSessionId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionId", [NSNumber numberWithInteger:self.sessionId]]; |
| } |
| [self.channelsArray enumerateObjectsUsingBlock:^(PlaybackBeginStream *element, NSUInteger idx, BOOL *stop) { |
| [output appendFormat:@"%@%@ {\n", indent, @"channels"]; |
| [element writeDescriptionTo:output |
| withIndent:[NSString stringWithFormat:@"%@ ", indent]]; |
| [output appendFormat:@"%@}\n", indent]; |
| }]; |
| if (self.hasSrtpMasterKey) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"srtpMasterKey", self.srtpMasterKey]; |
| } |
| if (self.hasSrtpMasterSalt) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"srtpMasterSalt", self.srtpMasterSalt]; |
| } |
| if (self.hasFecKVal) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"fecKVal", [NSNumber numberWithInteger:self.fecKVal]]; |
| } |
| if (self.hasFecNVal) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"fecNVal", [NSNumber numberWithInteger:self.fecNVal]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[PlaybackBegin class]]) { |
| return NO; |
| } |
| PlaybackBegin *otherMessage = other; |
| return |
| self.hasSessionId == otherMessage.hasSessionId && |
| (!self.hasSessionId || self.sessionId == otherMessage.sessionId) && |
| [self.channelsArray isEqualToArray:otherMessage.channelsArray] && |
| self.hasSrtpMasterKey == otherMessage.hasSrtpMasterKey && |
| (!self.hasSrtpMasterKey || [self.srtpMasterKey isEqual:otherMessage.srtpMasterKey]) && |
| self.hasSrtpMasterSalt == otherMessage.hasSrtpMasterSalt && |
| (!self.hasSrtpMasterSalt || [self.srtpMasterSalt isEqual:otherMessage.srtpMasterSalt]) && |
| self.hasFecKVal == otherMessage.hasFecKVal && |
| (!self.hasFecKVal || self.fecKVal == otherMessage.fecKVal) && |
| self.hasFecNVal == otherMessage.hasFecNVal && |
| (!self.hasFecNVal || self.fecNVal == otherMessage.fecNVal) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasSessionId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sessionId] hash]; |
| } |
| [self.channelsArray enumerateObjectsUsingBlock:^(PlaybackBeginStream *element, NSUInteger idx, BOOL *stop) { |
| hashCode = hashCode * 31 + [element hash]; |
| }]; |
| if (self.hasSrtpMasterKey) { |
| hashCode = hashCode * 31 + [self.srtpMasterKey hash]; |
| } |
| if (self.hasSrtpMasterSalt) { |
| hashCode = hashCode * 31 + [self.srtpMasterSalt hash]; |
| } |
| if (self.hasFecKVal) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.fecKVal] hash]; |
| } |
| if (self.hasFecNVal) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.fecNVal] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface PlaybackBeginStream () |
| @property UInt32 channelId; |
| @property CodecType codecType; |
| @property UInt32 sampleRate; |
| @property (strong) NSMutableArray * privateDataArray; |
| @property Float64 startTime; |
| @property UInt32 udpSsrc; |
| @property UInt32 rtpStartTime; |
| @property CT_AVProfile profile; |
| @end |
| |
| @implementation PlaybackBeginStream |
| |
| - (BOOL) hasChannelId { |
| return !!hasChannelId_; |
| } |
| - (void) setHasChannelId:(BOOL) value_ { |
| hasChannelId_ = !!value_; |
| } |
| @synthesize channelId; |
| - (BOOL) hasCodecType { |
| return !!hasCodecType_; |
| } |
| - (void) setHasCodecType:(BOOL) value_ { |
| hasCodecType_ = !!value_; |
| } |
| @synthesize codecType; |
| - (BOOL) hasSampleRate { |
| return !!hasSampleRate_; |
| } |
| - (void) setHasSampleRate:(BOOL) value_ { |
| hasSampleRate_ = !!value_; |
| } |
| @synthesize sampleRate; |
| @synthesize privateDataArray; |
| @dynamic privateData; |
| - (BOOL) hasStartTime { |
| return !!hasStartTime_; |
| } |
| - (void) setHasStartTime:(BOOL) value_ { |
| hasStartTime_ = !!value_; |
| } |
| @synthesize startTime; |
| - (BOOL) hasUdpSsrc { |
| return !!hasUdpSsrc_; |
| } |
| - (void) setHasUdpSsrc:(BOOL) value_ { |
| hasUdpSsrc_ = !!value_; |
| } |
| @synthesize udpSsrc; |
| - (BOOL) hasRtpStartTime { |
| return !!hasRtpStartTime_; |
| } |
| - (void) setHasRtpStartTime:(BOOL) value_ { |
| hasRtpStartTime_ = !!value_; |
| } |
| @synthesize rtpStartTime; |
| - (BOOL) hasProfile { |
| return !!hasProfile_; |
| } |
| - (void) setHasProfile:(BOOL) value_ { |
| hasProfile_ = !!value_; |
| } |
| @synthesize profile; |
| - (id) init { |
| if ((self = [super init])) { |
| self.channelId = 0; |
| self.codecType = CodecTypeSpeex; |
| self.sampleRate = 0; |
| self.startTime = 0; |
| self.udpSsrc = 0; |
| self.rtpStartTime = 0; |
| self.profile = CT_AVProfileAudioAac; |
| } |
| return self; |
| } |
| static PlaybackBeginStream* defaultPlaybackBeginStreamInstance = nil; |
| + (void) initialize { |
| if (self == [PlaybackBeginStream class]) { |
| defaultPlaybackBeginStreamInstance = [[PlaybackBeginStream alloc] init]; |
| } |
| } |
| + (PlaybackBeginStream*) defaultInstance { |
| return defaultPlaybackBeginStreamInstance; |
| } |
| - (PlaybackBeginStream*) defaultInstance { |
| return defaultPlaybackBeginStreamInstance; |
| } |
| - (NSArray *)privateData { |
| return privateDataArray; |
| } |
| - (NSData*)privateDataAtIndex:(NSUInteger)index { |
| return [privateDataArray objectAtIndex:index]; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasChannelId) { |
| return NO; |
| } |
| if (!self.hasCodecType) { |
| return NO; |
| } |
| if (!self.hasSampleRate) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasChannelId) { |
| [output writeUInt32:1 value:self.channelId]; |
| } |
| if (self.hasCodecType) { |
| [output writeEnum:2 value:self.codecType]; |
| } |
| if (self.hasSampleRate) { |
| [output writeUInt32:3 value:self.sampleRate]; |
| } |
| [self.privateDataArray enumerateObjectsUsingBlock:^(NSData *element, NSUInteger idx, BOOL *stop) { |
| [output writeData:4 value:element]; |
| }]; |
| if (self.hasStartTime) { |
| [output writeDouble:5 value:self.startTime]; |
| } |
| if (self.hasUdpSsrc) { |
| [output writeUInt32:6 value:self.udpSsrc]; |
| } |
| if (self.hasRtpStartTime) { |
| [output writeUInt32:7 value:self.rtpStartTime]; |
| } |
| if (self.hasProfile) { |
| [output writeEnum:8 value:self.profile]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasChannelId) { |
| size_ += computeUInt32Size(1, self.channelId); |
| } |
| if (self.hasCodecType) { |
| size_ += computeEnumSize(2, self.codecType); |
| } |
| if (self.hasSampleRate) { |
| size_ += computeUInt32Size(3, self.sampleRate); |
| } |
| { |
| __block SInt32 dataSize = 0; |
| const NSUInteger count = self.privateDataArray.count; |
| [self.privateDataArray enumerateObjectsUsingBlock:^(NSData *element, NSUInteger idx, BOOL *stop) { |
| dataSize += computeDataSizeNoTag(element); |
| }]; |
| size_ += dataSize; |
| size_ += (SInt32)(1 * count); |
| } |
| if (self.hasStartTime) { |
| size_ += computeDoubleSize(5, self.startTime); |
| } |
| if (self.hasUdpSsrc) { |
| size_ += computeUInt32Size(6, self.udpSsrc); |
| } |
| if (self.hasRtpStartTime) { |
| size_ += computeUInt32Size(7, self.rtpStartTime); |
| } |
| if (self.hasProfile) { |
| size_ += computeEnumSize(8, self.profile); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (PlaybackBeginStream*) parseFromData:(NSData*) data { |
| return (PlaybackBeginStream*)[[[PlaybackBeginStream builder] mergeFromData:data] build]; |
| } |
| + (PlaybackBeginStream*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackBeginStream*)[[[PlaybackBeginStream builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackBeginStream*) parseFromInputStream:(NSInputStream*) input { |
| return (PlaybackBeginStream*)[[[PlaybackBeginStream builder] mergeFromInputStream:input] build]; |
| } |
| + (PlaybackBeginStream*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackBeginStream*)[[[PlaybackBeginStream builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackBeginStream*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (PlaybackBeginStream*)[[[PlaybackBeginStream builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (PlaybackBeginStream*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackBeginStream*)[[[PlaybackBeginStream builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackBeginStreamBuilder*) builder { |
| return [[PlaybackBeginStreamBuilder alloc] init]; |
| } |
| + (PlaybackBeginStreamBuilder*) builderWithPrototype:(PlaybackBeginStream*) prototype { |
| return [[PlaybackBeginStream builder] mergeFrom:prototype]; |
| } |
| - (PlaybackBeginStreamBuilder*) builder { |
| return [PlaybackBeginStream builder]; |
| } |
| - (PlaybackBeginStreamBuilder*) toBuilder { |
| return [PlaybackBeginStream builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasChannelId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"channelId", [NSNumber numberWithInteger:self.channelId]]; |
| } |
| if (self.hasCodecType) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"codecType", self.codecType]; |
| } |
| if (self.hasSampleRate) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sampleRate", [NSNumber numberWithInteger:self.sampleRate]]; |
| } |
| [self.privateDataArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"privateData", obj]; |
| }]; |
| if (self.hasStartTime) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"startTime", [NSNumber numberWithDouble:self.startTime]]; |
| } |
| if (self.hasUdpSsrc) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"udpSsrc", [NSNumber numberWithInteger:self.udpSsrc]]; |
| } |
| if (self.hasRtpStartTime) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"rtpStartTime", [NSNumber numberWithInteger:self.rtpStartTime]]; |
| } |
| if (self.hasProfile) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"profile", self.profile]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[PlaybackBeginStream class]]) { |
| return NO; |
| } |
| PlaybackBeginStream *otherMessage = other; |
| return |
| self.hasChannelId == otherMessage.hasChannelId && |
| (!self.hasChannelId || self.channelId == otherMessage.channelId) && |
| self.hasCodecType == otherMessage.hasCodecType && |
| (!self.hasCodecType || self.codecType == otherMessage.codecType) && |
| self.hasSampleRate == otherMessage.hasSampleRate && |
| (!self.hasSampleRate || self.sampleRate == otherMessage.sampleRate) && |
| [self.privateDataArray isEqualToArray:otherMessage.privateDataArray] && |
| self.hasStartTime == otherMessage.hasStartTime && |
| (!self.hasStartTime || self.startTime == otherMessage.startTime) && |
| self.hasUdpSsrc == otherMessage.hasUdpSsrc && |
| (!self.hasUdpSsrc || self.udpSsrc == otherMessage.udpSsrc) && |
| self.hasRtpStartTime == otherMessage.hasRtpStartTime && |
| (!self.hasRtpStartTime || self.rtpStartTime == otherMessage.rtpStartTime) && |
| self.hasProfile == otherMessage.hasProfile && |
| (!self.hasProfile || self.profile == otherMessage.profile) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasChannelId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.channelId] hash]; |
| } |
| if (self.hasCodecType) { |
| hashCode = hashCode * 31 + self.codecType; |
| } |
| if (self.hasSampleRate) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sampleRate] hash]; |
| } |
| [self.privateDataArray enumerateObjectsUsingBlock:^(id element, NSUInteger idx, BOOL *stop) { |
| hashCode = hashCode * 31 + [element hash]; |
| }]; |
| if (self.hasStartTime) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.startTime] hash]; |
| } |
| if (self.hasUdpSsrc) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.udpSsrc] hash]; |
| } |
| if (self.hasRtpStartTime) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.rtpStartTime] hash]; |
| } |
| if (self.hasProfile) { |
| hashCode = hashCode * 31 + self.profile; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface PlaybackBeginStreamBuilder() |
| @property (strong) PlaybackBeginStream* result; |
| @end |
| |
| @implementation PlaybackBeginStreamBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[PlaybackBeginStream alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (PlaybackBeginStreamBuilder*) clear { |
| self.result = [[PlaybackBeginStream alloc] init]; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clone { |
| return [PlaybackBeginStream builderWithPrototype:result]; |
| } |
| - (PlaybackBeginStream*) defaultInstance { |
| return [PlaybackBeginStream defaultInstance]; |
| } |
| - (PlaybackBeginStream*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (PlaybackBeginStream*) buildPartial { |
| PlaybackBeginStream* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (PlaybackBeginStreamBuilder*) mergeFrom:(PlaybackBeginStream*) other { |
| if (other == [PlaybackBeginStream defaultInstance]) { |
| return self; |
| } |
| if (other.hasChannelId) { |
| [self setChannelId:other.channelId]; |
| } |
| if (other.hasCodecType) { |
| [self setCodecType:other.codecType]; |
| } |
| if (other.hasSampleRate) { |
| [self setSampleRate:other.sampleRate]; |
| } |
| if (other.privateDataArray.count > 0) { |
| if (result.privateDataArray == nil) { |
| result.privateDataArray = [[NSMutableArray alloc] initWithArray:other.privateDataArray]; |
| } else { |
| [result.privateDataArray addObjectsFromArray:other.privateDataArray]; |
| } |
| } |
| if (other.hasStartTime) { |
| [self setStartTime:other.startTime]; |
| } |
| if (other.hasUdpSsrc) { |
| [self setUdpSsrc:other.udpSsrc]; |
| } |
| if (other.hasRtpStartTime) { |
| [self setRtpStartTime:other.rtpStartTime]; |
| } |
| if (other.hasProfile) { |
| [self setProfile:other.profile]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (PlaybackBeginStreamBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setChannelId:[input readUInt32]]; |
| break; |
| } |
| case 16: { |
| CodecType value = (CodecType)[input readEnum]; |
| if (CodecTypeIsValidValue(value)) { |
| [self setCodecType:value]; |
| } else { |
| [unknownFields mergeVarintField:2 value:value]; |
| } |
| break; |
| } |
| case 24: { |
| [self setSampleRate:[input readUInt32]]; |
| break; |
| } |
| case 34: { |
| [self addPrivateData:[input readData]]; |
| break; |
| } |
| case 41: { |
| [self setStartTime:[input readDouble]]; |
| break; |
| } |
| case 48: { |
| [self setUdpSsrc:[input readUInt32]]; |
| break; |
| } |
| case 56: { |
| [self setRtpStartTime:[input readUInt32]]; |
| break; |
| } |
| case 64: { |
| CT_AVProfile value = (CT_AVProfile)[input readEnum]; |
| if (CT_AVProfileIsValidValue(value)) { |
| [self setProfile:value]; |
| } else { |
| [unknownFields mergeVarintField:8 value:value]; |
| } |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasChannelId { |
| return result.hasChannelId; |
| } |
| - (UInt32) channelId { |
| return result.channelId; |
| } |
| - (PlaybackBeginStreamBuilder*) setChannelId:(UInt32) value { |
| result.hasChannelId = YES; |
| result.channelId = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearChannelId { |
| result.hasChannelId = NO; |
| result.channelId = 0; |
| return self; |
| } |
| - (BOOL) hasCodecType { |
| return result.hasCodecType; |
| } |
| - (CodecType) codecType { |
| return result.codecType; |
| } |
| - (PlaybackBeginStreamBuilder*) setCodecType:(CodecType) value { |
| result.hasCodecType = YES; |
| result.codecType = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearCodecType { |
| result.hasCodecType = NO; |
| result.codecType = CodecTypeSpeex; |
| return self; |
| } |
| - (BOOL) hasSampleRate { |
| return result.hasSampleRate; |
| } |
| - (UInt32) sampleRate { |
| return result.sampleRate; |
| } |
| - (PlaybackBeginStreamBuilder*) setSampleRate:(UInt32) value { |
| result.hasSampleRate = YES; |
| result.sampleRate = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearSampleRate { |
| result.hasSampleRate = NO; |
| result.sampleRate = 0; |
| return self; |
| } |
| - (NSMutableArray *)privateData { |
| return result.privateDataArray; |
| } |
| - (NSData*)privateDataAtIndex:(NSUInteger)index { |
| return [result privateDataAtIndex:index]; |
| } |
| - (PlaybackBeginStreamBuilder *)addPrivateData:(NSData*)value { |
| if (result.privateDataArray == nil) { |
| result.privateDataArray = [[NSMutableArray alloc]init]; |
| } |
| [result.privateDataArray addObject:value]; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder *)setPrivateDataArray:(NSArray *)array { |
| result.privateDataArray = [[NSMutableArray alloc] initWithArray:array]; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder *)clearPrivateData { |
| result.privateDataArray = nil; |
| return self; |
| } |
| - (BOOL) hasStartTime { |
| return result.hasStartTime; |
| } |
| - (Float64) startTime { |
| return result.startTime; |
| } |
| - (PlaybackBeginStreamBuilder*) setStartTime:(Float64) value { |
| result.hasStartTime = YES; |
| result.startTime = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearStartTime { |
| result.hasStartTime = NO; |
| result.startTime = 0; |
| return self; |
| } |
| - (BOOL) hasUdpSsrc { |
| return result.hasUdpSsrc; |
| } |
| - (UInt32) udpSsrc { |
| return result.udpSsrc; |
| } |
| - (PlaybackBeginStreamBuilder*) setUdpSsrc:(UInt32) value { |
| result.hasUdpSsrc = YES; |
| result.udpSsrc = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearUdpSsrc { |
| result.hasUdpSsrc = NO; |
| result.udpSsrc = 0; |
| return self; |
| } |
| - (BOOL) hasRtpStartTime { |
| return result.hasRtpStartTime; |
| } |
| - (UInt32) rtpStartTime { |
| return result.rtpStartTime; |
| } |
| - (PlaybackBeginStreamBuilder*) setRtpStartTime:(UInt32) value { |
| result.hasRtpStartTime = YES; |
| result.rtpStartTime = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearRtpStartTime { |
| result.hasRtpStartTime = NO; |
| result.rtpStartTime = 0; |
| return self; |
| } |
| - (BOOL) hasProfile { |
| return result.hasProfile; |
| } |
| - (CT_AVProfile) profile { |
| return result.profile; |
| } |
| - (PlaybackBeginStreamBuilder*) setProfile:(CT_AVProfile) value { |
| result.hasProfile = YES; |
| result.profile = value; |
| return self; |
| } |
| - (PlaybackBeginStreamBuilder*) clearProfile { |
| result.hasProfile = NO; |
| result.profile = CT_AVProfileAudioAac; |
| return self; |
| } |
| @end |
| |
| @interface PlaybackBeginBuilder() |
| @property (strong) PlaybackBegin* result; |
| @end |
| |
| @implementation PlaybackBeginBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[PlaybackBegin alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (PlaybackBeginBuilder*) clear { |
| self.result = [[PlaybackBegin alloc] init]; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) clone { |
| return [PlaybackBegin builderWithPrototype:result]; |
| } |
| - (PlaybackBegin*) defaultInstance { |
| return [PlaybackBegin defaultInstance]; |
| } |
| - (PlaybackBegin*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (PlaybackBegin*) buildPartial { |
| PlaybackBegin* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (PlaybackBeginBuilder*) mergeFrom:(PlaybackBegin*) other { |
| if (other == [PlaybackBegin defaultInstance]) { |
| return self; |
| } |
| if (other.hasSessionId) { |
| [self setSessionId:other.sessionId]; |
| } |
| if (other.channelsArray.count > 0) { |
| if (result.channelsArray == nil) { |
| result.channelsArray = [[NSMutableArray alloc] initWithArray:other.channelsArray]; |
| } else { |
| [result.channelsArray addObjectsFromArray:other.channelsArray]; |
| } |
| } |
| if (other.hasSrtpMasterKey) { |
| [self setSrtpMasterKey:other.srtpMasterKey]; |
| } |
| if (other.hasSrtpMasterSalt) { |
| [self setSrtpMasterSalt:other.srtpMasterSalt]; |
| } |
| if (other.hasFecKVal) { |
| [self setFecKVal:other.fecKVal]; |
| } |
| if (other.hasFecNVal) { |
| [self setFecNVal:other.fecNVal]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (PlaybackBeginBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setSessionId:[input readUInt32]]; |
| break; |
| } |
| case 18: { |
| PlaybackBeginStreamBuilder* subBuilder = [PlaybackBeginStream builder]; |
| [input readMessage:subBuilder extensionRegistry:extensionRegistry]; |
| [self addChannels:[subBuilder buildPartial]]; |
| break; |
| } |
| case 26: { |
| [self setSrtpMasterKey:[input readData]]; |
| break; |
| } |
| case 34: { |
| [self setSrtpMasterSalt:[input readData]]; |
| break; |
| } |
| case 40: { |
| [self setFecKVal:[input readUInt32]]; |
| break; |
| } |
| case 48: { |
| [self setFecNVal:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasSessionId { |
| return result.hasSessionId; |
| } |
| - (UInt32) sessionId { |
| return result.sessionId; |
| } |
| - (PlaybackBeginBuilder*) setSessionId:(UInt32) value { |
| result.hasSessionId = YES; |
| result.sessionId = value; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) clearSessionId { |
| result.hasSessionId = NO; |
| result.sessionId = 0; |
| return self; |
| } |
| - (NSMutableArray *)channels { |
| return result.channelsArray; |
| } |
| - (PlaybackBeginStream*)channelsAtIndex:(NSUInteger)index { |
| return [result channelsAtIndex:index]; |
| } |
| - (PlaybackBeginBuilder *)addChannels:(PlaybackBeginStream*)value { |
| if (result.channelsArray == nil) { |
| result.channelsArray = [[NSMutableArray alloc]init]; |
| } |
| [result.channelsArray addObject:value]; |
| return self; |
| } |
| - (PlaybackBeginBuilder *)setChannelsArray:(NSArray *)array { |
| result.channelsArray = [[NSMutableArray alloc]initWithArray:array]; |
| return self; |
| } |
| - (PlaybackBeginBuilder *)clearChannels { |
| result.channelsArray = nil; |
| return self; |
| } |
| - (BOOL) hasSrtpMasterKey { |
| return result.hasSrtpMasterKey; |
| } |
| - (NSData*) srtpMasterKey { |
| return result.srtpMasterKey; |
| } |
| - (PlaybackBeginBuilder*) setSrtpMasterKey:(NSData*) value { |
| result.hasSrtpMasterKey = YES; |
| result.srtpMasterKey = value; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) clearSrtpMasterKey { |
| result.hasSrtpMasterKey = NO; |
| result.srtpMasterKey = [NSData data]; |
| return self; |
| } |
| - (BOOL) hasSrtpMasterSalt { |
| return result.hasSrtpMasterSalt; |
| } |
| - (NSData*) srtpMasterSalt { |
| return result.srtpMasterSalt; |
| } |
| - (PlaybackBeginBuilder*) setSrtpMasterSalt:(NSData*) value { |
| result.hasSrtpMasterSalt = YES; |
| result.srtpMasterSalt = value; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) clearSrtpMasterSalt { |
| result.hasSrtpMasterSalt = NO; |
| result.srtpMasterSalt = [NSData data]; |
| return self; |
| } |
| - (BOOL) hasFecKVal { |
| return result.hasFecKVal; |
| } |
| - (UInt32) fecKVal { |
| return result.fecKVal; |
| } |
| - (PlaybackBeginBuilder*) setFecKVal:(UInt32) value { |
| result.hasFecKVal = YES; |
| result.fecKVal = value; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) clearFecKVal { |
| result.hasFecKVal = NO; |
| result.fecKVal = 0; |
| return self; |
| } |
| - (BOOL) hasFecNVal { |
| return result.hasFecNVal; |
| } |
| - (UInt32) fecNVal { |
| return result.fecNVal; |
| } |
| - (PlaybackBeginBuilder*) setFecNVal:(UInt32) value { |
| result.hasFecNVal = YES; |
| result.fecNVal = value; |
| return self; |
| } |
| - (PlaybackBeginBuilder*) clearFecNVal { |
| result.hasFecNVal = NO; |
| result.fecNVal = 0; |
| return self; |
| } |
| @end |
| |
| @interface PlaybackEnd () |
| @property UInt32 sessionId; |
| @property PlaybackEndReason reason; |
| @end |
| |
| @implementation PlaybackEnd |
| |
| - (BOOL) hasSessionId { |
| return !!hasSessionId_; |
| } |
| - (void) setHasSessionId:(BOOL) value_ { |
| hasSessionId_ = !!value_; |
| } |
| @synthesize sessionId; |
| - (BOOL) hasReason { |
| return !!hasReason_; |
| } |
| - (void) setHasReason:(BOOL) value_ { |
| hasReason_ = !!value_; |
| } |
| @synthesize reason; |
| - (id) init { |
| if ((self = [super init])) { |
| self.sessionId = 0; |
| self.reason = PlaybackEndReasonErrorTimeNotAvailable; |
| } |
| return self; |
| } |
| static PlaybackEnd* defaultPlaybackEndInstance = nil; |
| + (void) initialize { |
| if (self == [PlaybackEnd class]) { |
| defaultPlaybackEndInstance = [[PlaybackEnd alloc] init]; |
| } |
| } |
| + (PlaybackEnd*) defaultInstance { |
| return defaultPlaybackEndInstance; |
| } |
| - (PlaybackEnd*) defaultInstance { |
| return defaultPlaybackEndInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasSessionId) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasSessionId) { |
| [output writeUInt32:1 value:self.sessionId]; |
| } |
| if (self.hasReason) { |
| [output writeEnum:2 value:self.reason]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasSessionId) { |
| size_ += computeUInt32Size(1, self.sessionId); |
| } |
| if (self.hasReason) { |
| size_ += computeEnumSize(2, self.reason); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (PlaybackEnd*) parseFromData:(NSData*) data { |
| return (PlaybackEnd*)[[[PlaybackEnd builder] mergeFromData:data] build]; |
| } |
| + (PlaybackEnd*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackEnd*)[[[PlaybackEnd builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackEnd*) parseFromInputStream:(NSInputStream*) input { |
| return (PlaybackEnd*)[[[PlaybackEnd builder] mergeFromInputStream:input] build]; |
| } |
| + (PlaybackEnd*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackEnd*)[[[PlaybackEnd builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackEnd*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (PlaybackEnd*)[[[PlaybackEnd builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (PlaybackEnd*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackEnd*)[[[PlaybackEnd builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackEndBuilder*) builder { |
| return [[PlaybackEndBuilder alloc] init]; |
| } |
| + (PlaybackEndBuilder*) builderWithPrototype:(PlaybackEnd*) prototype { |
| return [[PlaybackEnd builder] mergeFrom:prototype]; |
| } |
| - (PlaybackEndBuilder*) builder { |
| return [PlaybackEnd builder]; |
| } |
| - (PlaybackEndBuilder*) toBuilder { |
| return [PlaybackEnd builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasSessionId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionId", [NSNumber numberWithInteger:self.sessionId]]; |
| } |
| if (self.hasReason) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"reason", self.reason]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[PlaybackEnd class]]) { |
| return NO; |
| } |
| PlaybackEnd *otherMessage = other; |
| return |
| self.hasSessionId == otherMessage.hasSessionId && |
| (!self.hasSessionId || self.sessionId == otherMessage.sessionId) && |
| self.hasReason == otherMessage.hasReason && |
| (!self.hasReason || self.reason == otherMessage.reason) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasSessionId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sessionId] hash]; |
| } |
| if (self.hasReason) { |
| hashCode = hashCode * 31 + self.reason; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| BOOL PlaybackEndReasonIsValidValue(PlaybackEndReason value) { |
| switch (value) { |
| case PlaybackEndReasonErrorTimeNotAvailable: |
| case PlaybackEndReasonErrorProfileNotAvailable: |
| case PlaybackEndReasonErrorTranscodeNotAvailable: |
| case PlaybackEndReasonPlayEndSessionComplete: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| @interface PlaybackEndBuilder() |
| @property (strong) PlaybackEnd* result; |
| @end |
| |
| @implementation PlaybackEndBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[PlaybackEnd alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (PlaybackEndBuilder*) clear { |
| self.result = [[PlaybackEnd alloc] init]; |
| return self; |
| } |
| - (PlaybackEndBuilder*) clone { |
| return [PlaybackEnd builderWithPrototype:result]; |
| } |
| - (PlaybackEnd*) defaultInstance { |
| return [PlaybackEnd defaultInstance]; |
| } |
| - (PlaybackEnd*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (PlaybackEnd*) buildPartial { |
| PlaybackEnd* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (PlaybackEndBuilder*) mergeFrom:(PlaybackEnd*) other { |
| if (other == [PlaybackEnd defaultInstance]) { |
| return self; |
| } |
| if (other.hasSessionId) { |
| [self setSessionId:other.sessionId]; |
| } |
| if (other.hasReason) { |
| [self setReason:other.reason]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (PlaybackEndBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (PlaybackEndBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setSessionId:[input readUInt32]]; |
| break; |
| } |
| case 16: { |
| PlaybackEndReason value = (PlaybackEndReason)[input readEnum]; |
| if (PlaybackEndReasonIsValidValue(value)) { |
| [self setReason:value]; |
| } else { |
| [unknownFields mergeVarintField:2 value:value]; |
| } |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasSessionId { |
| return result.hasSessionId; |
| } |
| - (UInt32) sessionId { |
| return result.sessionId; |
| } |
| - (PlaybackEndBuilder*) setSessionId:(UInt32) value { |
| result.hasSessionId = YES; |
| result.sessionId = value; |
| return self; |
| } |
| - (PlaybackEndBuilder*) clearSessionId { |
| result.hasSessionId = NO; |
| result.sessionId = 0; |
| return self; |
| } |
| - (BOOL) hasReason { |
| return result.hasReason; |
| } |
| - (PlaybackEndReason) reason { |
| return result.reason; |
| } |
| - (PlaybackEndBuilder*) setReason:(PlaybackEndReason) value { |
| result.hasReason = YES; |
| result.reason = value; |
| return self; |
| } |
| - (PlaybackEndBuilder*) clearReason { |
| result.hasReason = NO; |
| result.reason = PlaybackEndReasonErrorTimeNotAvailable; |
| return self; |
| } |
| @end |
| |
| @interface PlaybackPacket () |
| @property UInt32 sessionId; |
| @property UInt32 channelId; |
| @property SInt32 timestampDelta; |
| @property (strong) NSData* payload; |
| @property UInt32 latencyRtpSequence; |
| @property UInt32 latencyRtpSsrc; |
| @end |
| |
| @implementation PlaybackPacket |
| |
| - (BOOL) hasSessionId { |
| return !!hasSessionId_; |
| } |
| - (void) setHasSessionId:(BOOL) value_ { |
| hasSessionId_ = !!value_; |
| } |
| @synthesize sessionId; |
| - (BOOL) hasChannelId { |
| return !!hasChannelId_; |
| } |
| - (void) setHasChannelId:(BOOL) value_ { |
| hasChannelId_ = !!value_; |
| } |
| @synthesize channelId; |
| - (BOOL) hasTimestampDelta { |
| return !!hasTimestampDelta_; |
| } |
| - (void) setHasTimestampDelta:(BOOL) value_ { |
| hasTimestampDelta_ = !!value_; |
| } |
| @synthesize timestampDelta; |
| - (BOOL) hasPayload { |
| return !!hasPayload_; |
| } |
| - (void) setHasPayload:(BOOL) value_ { |
| hasPayload_ = !!value_; |
| } |
| @synthesize payload; |
| - (BOOL) hasLatencyRtpSequence { |
| return !!hasLatencyRtpSequence_; |
| } |
| - (void) setHasLatencyRtpSequence:(BOOL) value_ { |
| hasLatencyRtpSequence_ = !!value_; |
| } |
| @synthesize latencyRtpSequence; |
| - (BOOL) hasLatencyRtpSsrc { |
| return !!hasLatencyRtpSsrc_; |
| } |
| - (void) setHasLatencyRtpSsrc:(BOOL) value_ { |
| hasLatencyRtpSsrc_ = !!value_; |
| } |
| @synthesize latencyRtpSsrc; |
| - (id) init { |
| if ((self = [super init])) { |
| self.sessionId = 0; |
| self.channelId = 0; |
| self.timestampDelta = 0; |
| self.payload = [NSData data]; |
| self.latencyRtpSequence = 0; |
| self.latencyRtpSsrc = 0; |
| } |
| return self; |
| } |
| static PlaybackPacket* defaultPlaybackPacketInstance = nil; |
| + (void) initialize { |
| if (self == [PlaybackPacket class]) { |
| defaultPlaybackPacketInstance = [[PlaybackPacket alloc] init]; |
| } |
| } |
| + (PlaybackPacket*) defaultInstance { |
| return defaultPlaybackPacketInstance; |
| } |
| - (PlaybackPacket*) defaultInstance { |
| return defaultPlaybackPacketInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasSessionId) { |
| return NO; |
| } |
| if (!self.hasChannelId) { |
| return NO; |
| } |
| if (!self.hasTimestampDelta) { |
| return NO; |
| } |
| if (!self.hasPayload) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasSessionId) { |
| [output writeUInt32:1 value:self.sessionId]; |
| } |
| if (self.hasChannelId) { |
| [output writeUInt32:2 value:self.channelId]; |
| } |
| if (self.hasTimestampDelta) { |
| [output writeSInt32:3 value:self.timestampDelta]; |
| } |
| if (self.hasPayload) { |
| [output writeData:4 value:self.payload]; |
| } |
| if (self.hasLatencyRtpSequence) { |
| [output writeUInt32:5 value:self.latencyRtpSequence]; |
| } |
| if (self.hasLatencyRtpSsrc) { |
| [output writeUInt32:6 value:self.latencyRtpSsrc]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasSessionId) { |
| size_ += computeUInt32Size(1, self.sessionId); |
| } |
| if (self.hasChannelId) { |
| size_ += computeUInt32Size(2, self.channelId); |
| } |
| if (self.hasTimestampDelta) { |
| size_ += computeSInt32Size(3, self.timestampDelta); |
| } |
| if (self.hasPayload) { |
| size_ += computeDataSize(4, self.payload); |
| } |
| if (self.hasLatencyRtpSequence) { |
| size_ += computeUInt32Size(5, self.latencyRtpSequence); |
| } |
| if (self.hasLatencyRtpSsrc) { |
| size_ += computeUInt32Size(6, self.latencyRtpSsrc); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (PlaybackPacket*) parseFromData:(NSData*) data { |
| return (PlaybackPacket*)[[[PlaybackPacket builder] mergeFromData:data] build]; |
| } |
| + (PlaybackPacket*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackPacket*)[[[PlaybackPacket builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackPacket*) parseFromInputStream:(NSInputStream*) input { |
| return (PlaybackPacket*)[[[PlaybackPacket builder] mergeFromInputStream:input] build]; |
| } |
| + (PlaybackPacket*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackPacket*)[[[PlaybackPacket builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackPacket*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (PlaybackPacket*)[[[PlaybackPacket builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (PlaybackPacket*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (PlaybackPacket*)[[[PlaybackPacket builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (PlaybackPacketBuilder*) builder { |
| return [[PlaybackPacketBuilder alloc] init]; |
| } |
| + (PlaybackPacketBuilder*) builderWithPrototype:(PlaybackPacket*) prototype { |
| return [[PlaybackPacket builder] mergeFrom:prototype]; |
| } |
| - (PlaybackPacketBuilder*) builder { |
| return [PlaybackPacket builder]; |
| } |
| - (PlaybackPacketBuilder*) toBuilder { |
| return [PlaybackPacket builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasSessionId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"sessionId", [NSNumber numberWithInteger:self.sessionId]]; |
| } |
| if (self.hasChannelId) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"channelId", [NSNumber numberWithInteger:self.channelId]]; |
| } |
| if (self.hasTimestampDelta) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"timestampDelta", [NSNumber numberWithInteger:self.timestampDelta]]; |
| } |
| if (self.hasPayload) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"payload", self.payload]; |
| } |
| if (self.hasLatencyRtpSequence) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"latencyRtpSequence", [NSNumber numberWithInteger:self.latencyRtpSequence]]; |
| } |
| if (self.hasLatencyRtpSsrc) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"latencyRtpSsrc", [NSNumber numberWithInteger:self.latencyRtpSsrc]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[PlaybackPacket class]]) { |
| return NO; |
| } |
| PlaybackPacket *otherMessage = other; |
| return |
| self.hasSessionId == otherMessage.hasSessionId && |
| (!self.hasSessionId || self.sessionId == otherMessage.sessionId) && |
| self.hasChannelId == otherMessage.hasChannelId && |
| (!self.hasChannelId || self.channelId == otherMessage.channelId) && |
| self.hasTimestampDelta == otherMessage.hasTimestampDelta && |
| (!self.hasTimestampDelta || self.timestampDelta == otherMessage.timestampDelta) && |
| self.hasPayload == otherMessage.hasPayload && |
| (!self.hasPayload || [self.payload isEqual:otherMessage.payload]) && |
| self.hasLatencyRtpSequence == otherMessage.hasLatencyRtpSequence && |
| (!self.hasLatencyRtpSequence || self.latencyRtpSequence == otherMessage.latencyRtpSequence) && |
| self.hasLatencyRtpSsrc == otherMessage.hasLatencyRtpSsrc && |
| (!self.hasLatencyRtpSsrc || self.latencyRtpSsrc == otherMessage.latencyRtpSsrc) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasSessionId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sessionId] hash]; |
| } |
| if (self.hasChannelId) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.channelId] hash]; |
| } |
| if (self.hasTimestampDelta) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.timestampDelta] hash]; |
| } |
| if (self.hasPayload) { |
| hashCode = hashCode * 31 + [self.payload hash]; |
| } |
| if (self.hasLatencyRtpSequence) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.latencyRtpSequence] hash]; |
| } |
| if (self.hasLatencyRtpSsrc) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.latencyRtpSsrc] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface PlaybackPacketBuilder() |
| @property (strong) PlaybackPacket* result; |
| @end |
| |
| @implementation PlaybackPacketBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[PlaybackPacket alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (PlaybackPacketBuilder*) clear { |
| self.result = [[PlaybackPacket alloc] init]; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clone { |
| return [PlaybackPacket builderWithPrototype:result]; |
| } |
| - (PlaybackPacket*) defaultInstance { |
| return [PlaybackPacket defaultInstance]; |
| } |
| - (PlaybackPacket*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (PlaybackPacket*) buildPartial { |
| PlaybackPacket* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (PlaybackPacketBuilder*) mergeFrom:(PlaybackPacket*) other { |
| if (other == [PlaybackPacket defaultInstance]) { |
| return self; |
| } |
| if (other.hasSessionId) { |
| [self setSessionId:other.sessionId]; |
| } |
| if (other.hasChannelId) { |
| [self setChannelId:other.channelId]; |
| } |
| if (other.hasTimestampDelta) { |
| [self setTimestampDelta:other.timestampDelta]; |
| } |
| if (other.hasPayload) { |
| [self setPayload:other.payload]; |
| } |
| if (other.hasLatencyRtpSequence) { |
| [self setLatencyRtpSequence:other.latencyRtpSequence]; |
| } |
| if (other.hasLatencyRtpSsrc) { |
| [self setLatencyRtpSsrc:other.latencyRtpSsrc]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (PlaybackPacketBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setSessionId:[input readUInt32]]; |
| break; |
| } |
| case 16: { |
| [self setChannelId:[input readUInt32]]; |
| break; |
| } |
| case 24: { |
| [self setTimestampDelta:[input readSInt32]]; |
| break; |
| } |
| case 34: { |
| [self setPayload:[input readData]]; |
| break; |
| } |
| case 40: { |
| [self setLatencyRtpSequence:[input readUInt32]]; |
| break; |
| } |
| case 48: { |
| [self setLatencyRtpSsrc:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasSessionId { |
| return result.hasSessionId; |
| } |
| - (UInt32) sessionId { |
| return result.sessionId; |
| } |
| - (PlaybackPacketBuilder*) setSessionId:(UInt32) value { |
| result.hasSessionId = YES; |
| result.sessionId = value; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clearSessionId { |
| result.hasSessionId = NO; |
| result.sessionId = 0; |
| return self; |
| } |
| - (BOOL) hasChannelId { |
| return result.hasChannelId; |
| } |
| - (UInt32) channelId { |
| return result.channelId; |
| } |
| - (PlaybackPacketBuilder*) setChannelId:(UInt32) value { |
| result.hasChannelId = YES; |
| result.channelId = value; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clearChannelId { |
| result.hasChannelId = NO; |
| result.channelId = 0; |
| return self; |
| } |
| - (BOOL) hasTimestampDelta { |
| return result.hasTimestampDelta; |
| } |
| - (SInt32) timestampDelta { |
| return result.timestampDelta; |
| } |
| - (PlaybackPacketBuilder*) setTimestampDelta:(SInt32) value { |
| result.hasTimestampDelta = YES; |
| result.timestampDelta = value; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clearTimestampDelta { |
| result.hasTimestampDelta = NO; |
| result.timestampDelta = 0; |
| return self; |
| } |
| - (BOOL) hasPayload { |
| return result.hasPayload; |
| } |
| - (NSData*) payload { |
| return result.payload; |
| } |
| - (PlaybackPacketBuilder*) setPayload:(NSData*) value { |
| result.hasPayload = YES; |
| result.payload = value; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clearPayload { |
| result.hasPayload = NO; |
| result.payload = [NSData data]; |
| return self; |
| } |
| - (BOOL) hasLatencyRtpSequence { |
| return result.hasLatencyRtpSequence; |
| } |
| - (UInt32) latencyRtpSequence { |
| return result.latencyRtpSequence; |
| } |
| - (PlaybackPacketBuilder*) setLatencyRtpSequence:(UInt32) value { |
| result.hasLatencyRtpSequence = YES; |
| result.latencyRtpSequence = value; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clearLatencyRtpSequence { |
| result.hasLatencyRtpSequence = NO; |
| result.latencyRtpSequence = 0; |
| return self; |
| } |
| - (BOOL) hasLatencyRtpSsrc { |
| return result.hasLatencyRtpSsrc; |
| } |
| - (UInt32) latencyRtpSsrc { |
| return result.latencyRtpSsrc; |
| } |
| - (PlaybackPacketBuilder*) setLatencyRtpSsrc:(UInt32) value { |
| result.hasLatencyRtpSsrc = YES; |
| result.latencyRtpSsrc = value; |
| return self; |
| } |
| - (PlaybackPacketBuilder*) clearLatencyRtpSsrc { |
| result.hasLatencyRtpSsrc = NO; |
| result.latencyRtpSsrc = 0; |
| return self; |
| } |
| @end |
| |
| @interface ClockSync () |
| @property UInt32 serverSystemTimeSec; |
| @property UInt32 serverSystemTimeMsec; |
| @end |
| |
| @implementation ClockSync |
| |
| - (BOOL) hasServerSystemTimeSec { |
| return !!hasServerSystemTimeSec_; |
| } |
| - (void) setHasServerSystemTimeSec:(BOOL) value_ { |
| hasServerSystemTimeSec_ = !!value_; |
| } |
| @synthesize serverSystemTimeSec; |
| - (BOOL) hasServerSystemTimeMsec { |
| return !!hasServerSystemTimeMsec_; |
| } |
| - (void) setHasServerSystemTimeMsec:(BOOL) value_ { |
| hasServerSystemTimeMsec_ = !!value_; |
| } |
| @synthesize serverSystemTimeMsec; |
| - (id) init { |
| if ((self = [super init])) { |
| self.serverSystemTimeSec = 0; |
| self.serverSystemTimeMsec = 0; |
| } |
| return self; |
| } |
| static ClockSync* defaultClockSyncInstance = nil; |
| + (void) initialize { |
| if (self == [ClockSync class]) { |
| defaultClockSyncInstance = [[ClockSync alloc] init]; |
| } |
| } |
| + (ClockSync*) defaultInstance { |
| return defaultClockSyncInstance; |
| } |
| - (ClockSync*) defaultInstance { |
| return defaultClockSyncInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasServerSystemTimeSec) { |
| return NO; |
| } |
| if (!self.hasServerSystemTimeMsec) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasServerSystemTimeSec) { |
| [output writeUInt32:1 value:self.serverSystemTimeSec]; |
| } |
| if (self.hasServerSystemTimeMsec) { |
| [output writeUInt32:2 value:self.serverSystemTimeMsec]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasServerSystemTimeSec) { |
| size_ += computeUInt32Size(1, self.serverSystemTimeSec); |
| } |
| if (self.hasServerSystemTimeMsec) { |
| size_ += computeUInt32Size(2, self.serverSystemTimeMsec); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (ClockSync*) parseFromData:(NSData*) data { |
| return (ClockSync*)[[[ClockSync builder] mergeFromData:data] build]; |
| } |
| + (ClockSync*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (ClockSync*)[[[ClockSync builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (ClockSync*) parseFromInputStream:(NSInputStream*) input { |
| return (ClockSync*)[[[ClockSync builder] mergeFromInputStream:input] build]; |
| } |
| + (ClockSync*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (ClockSync*)[[[ClockSync builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (ClockSync*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (ClockSync*)[[[ClockSync builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (ClockSync*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (ClockSync*)[[[ClockSync builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (ClockSyncBuilder*) builder { |
| return [[ClockSyncBuilder alloc] init]; |
| } |
| + (ClockSyncBuilder*) builderWithPrototype:(ClockSync*) prototype { |
| return [[ClockSync builder] mergeFrom:prototype]; |
| } |
| - (ClockSyncBuilder*) builder { |
| return [ClockSync builder]; |
| } |
| - (ClockSyncBuilder*) toBuilder { |
| return [ClockSync builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasServerSystemTimeSec) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"serverSystemTimeSec", [NSNumber numberWithInteger:self.serverSystemTimeSec]]; |
| } |
| if (self.hasServerSystemTimeMsec) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"serverSystemTimeMsec", [NSNumber numberWithInteger:self.serverSystemTimeMsec]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[ClockSync class]]) { |
| return NO; |
| } |
| ClockSync *otherMessage = other; |
| return |
| self.hasServerSystemTimeSec == otherMessage.hasServerSystemTimeSec && |
| (!self.hasServerSystemTimeSec || self.serverSystemTimeSec == otherMessage.serverSystemTimeSec) && |
| self.hasServerSystemTimeMsec == otherMessage.hasServerSystemTimeMsec && |
| (!self.hasServerSystemTimeMsec || self.serverSystemTimeMsec == otherMessage.serverSystemTimeMsec) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasServerSystemTimeSec) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.serverSystemTimeSec] hash]; |
| } |
| if (self.hasServerSystemTimeMsec) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.serverSystemTimeMsec] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface ClockSyncBuilder() |
| @property (strong) ClockSync* result; |
| @end |
| |
| @implementation ClockSyncBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[ClockSync alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (ClockSyncBuilder*) clear { |
| self.result = [[ClockSync alloc] init]; |
| return self; |
| } |
| - (ClockSyncBuilder*) clone { |
| return [ClockSync builderWithPrototype:result]; |
| } |
| - (ClockSync*) defaultInstance { |
| return [ClockSync defaultInstance]; |
| } |
| - (ClockSync*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (ClockSync*) buildPartial { |
| ClockSync* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (ClockSyncBuilder*) mergeFrom:(ClockSync*) other { |
| if (other == [ClockSync defaultInstance]) { |
| return self; |
| } |
| if (other.hasServerSystemTimeSec) { |
| [self setServerSystemTimeSec:other.serverSystemTimeSec]; |
| } |
| if (other.hasServerSystemTimeMsec) { |
| [self setServerSystemTimeMsec:other.serverSystemTimeMsec]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (ClockSyncBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (ClockSyncBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setServerSystemTimeSec:[input readUInt32]]; |
| break; |
| } |
| case 16: { |
| [self setServerSystemTimeMsec:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasServerSystemTimeSec { |
| return result.hasServerSystemTimeSec; |
| } |
| - (UInt32) serverSystemTimeSec { |
| return result.serverSystemTimeSec; |
| } |
| - (ClockSyncBuilder*) setServerSystemTimeSec:(UInt32) value { |
| result.hasServerSystemTimeSec = YES; |
| result.serverSystemTimeSec = value; |
| return self; |
| } |
| - (ClockSyncBuilder*) clearServerSystemTimeSec { |
| result.hasServerSystemTimeSec = NO; |
| result.serverSystemTimeSec = 0; |
| return self; |
| } |
| - (BOOL) hasServerSystemTimeMsec { |
| return result.hasServerSystemTimeMsec; |
| } |
| - (UInt32) serverSystemTimeMsec { |
| return result.serverSystemTimeMsec; |
| } |
| - (ClockSyncBuilder*) setServerSystemTimeMsec:(UInt32) value { |
| result.hasServerSystemTimeMsec = YES; |
| result.serverSystemTimeMsec = value; |
| return self; |
| } |
| - (ClockSyncBuilder*) clearServerSystemTimeMsec { |
| result.hasServerSystemTimeMsec = NO; |
| result.serverSystemTimeMsec = 0; |
| return self; |
| } |
| @end |
| |
| @interface ClockSyncEcho () |
| @property UInt32 serverSystemTimeEchoSec; |
| @property UInt32 serverSystemTimeEchoMsec; |
| @property UInt32 clientSystemTimeSec; |
| @property UInt32 clientSystemTimeMsec; |
| @end |
| |
| @implementation ClockSyncEcho |
| |
| - (BOOL) hasServerSystemTimeEchoSec { |
| return !!hasServerSystemTimeEchoSec_; |
| } |
| - (void) setHasServerSystemTimeEchoSec:(BOOL) value_ { |
| hasServerSystemTimeEchoSec_ = !!value_; |
| } |
| @synthesize serverSystemTimeEchoSec; |
| - (BOOL) hasServerSystemTimeEchoMsec { |
| return !!hasServerSystemTimeEchoMsec_; |
| } |
| - (void) setHasServerSystemTimeEchoMsec:(BOOL) value_ { |
| hasServerSystemTimeEchoMsec_ = !!value_; |
| } |
| @synthesize serverSystemTimeEchoMsec; |
| - (BOOL) hasClientSystemTimeSec { |
| return !!hasClientSystemTimeSec_; |
| } |
| - (void) setHasClientSystemTimeSec:(BOOL) value_ { |
| hasClientSystemTimeSec_ = !!value_; |
| } |
| @synthesize clientSystemTimeSec; |
| - (BOOL) hasClientSystemTimeMsec { |
| return !!hasClientSystemTimeMsec_; |
| } |
| - (void) setHasClientSystemTimeMsec:(BOOL) value_ { |
| hasClientSystemTimeMsec_ = !!value_; |
| } |
| @synthesize clientSystemTimeMsec; |
| - (id) init { |
| if ((self = [super init])) { |
| self.serverSystemTimeEchoSec = 0; |
| self.serverSystemTimeEchoMsec = 0; |
| self.clientSystemTimeSec = 0; |
| self.clientSystemTimeMsec = 0; |
| } |
| return self; |
| } |
| static ClockSyncEcho* defaultClockSyncEchoInstance = nil; |
| + (void) initialize { |
| if (self == [ClockSyncEcho class]) { |
| defaultClockSyncEchoInstance = [[ClockSyncEcho alloc] init]; |
| } |
| } |
| + (ClockSyncEcho*) defaultInstance { |
| return defaultClockSyncEchoInstance; |
| } |
| - (ClockSyncEcho*) defaultInstance { |
| return defaultClockSyncEchoInstance; |
| } |
| - (BOOL) isInitialized { |
| if (!self.hasServerSystemTimeEchoSec) { |
| return NO; |
| } |
| if (!self.hasServerSystemTimeEchoMsec) { |
| return NO; |
| } |
| if (!self.hasClientSystemTimeSec) { |
| return NO; |
| } |
| if (!self.hasClientSystemTimeMsec) { |
| return NO; |
| } |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasServerSystemTimeEchoSec) { |
| [output writeUInt32:1 value:self.serverSystemTimeEchoSec]; |
| } |
| if (self.hasServerSystemTimeEchoMsec) { |
| [output writeUInt32:2 value:self.serverSystemTimeEchoMsec]; |
| } |
| if (self.hasClientSystemTimeSec) { |
| [output writeUInt32:3 value:self.clientSystemTimeSec]; |
| } |
| if (self.hasClientSystemTimeMsec) { |
| [output writeUInt32:4 value:self.clientSystemTimeMsec]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasServerSystemTimeEchoSec) { |
| size_ += computeUInt32Size(1, self.serverSystemTimeEchoSec); |
| } |
| if (self.hasServerSystemTimeEchoMsec) { |
| size_ += computeUInt32Size(2, self.serverSystemTimeEchoMsec); |
| } |
| if (self.hasClientSystemTimeSec) { |
| size_ += computeUInt32Size(3, self.clientSystemTimeSec); |
| } |
| if (self.hasClientSystemTimeMsec) { |
| size_ += computeUInt32Size(4, self.clientSystemTimeMsec); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (ClockSyncEcho*) parseFromData:(NSData*) data { |
| return (ClockSyncEcho*)[[[ClockSyncEcho builder] mergeFromData:data] build]; |
| } |
| + (ClockSyncEcho*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (ClockSyncEcho*)[[[ClockSyncEcho builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (ClockSyncEcho*) parseFromInputStream:(NSInputStream*) input { |
| return (ClockSyncEcho*)[[[ClockSyncEcho builder] mergeFromInputStream:input] build]; |
| } |
| + (ClockSyncEcho*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (ClockSyncEcho*)[[[ClockSyncEcho builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (ClockSyncEcho*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (ClockSyncEcho*)[[[ClockSyncEcho builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (ClockSyncEcho*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (ClockSyncEcho*)[[[ClockSyncEcho builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (ClockSyncEchoBuilder*) builder { |
| return [[ClockSyncEchoBuilder alloc] init]; |
| } |
| + (ClockSyncEchoBuilder*) builderWithPrototype:(ClockSyncEcho*) prototype { |
| return [[ClockSyncEcho builder] mergeFrom:prototype]; |
| } |
| - (ClockSyncEchoBuilder*) builder { |
| return [ClockSyncEcho builder]; |
| } |
| - (ClockSyncEchoBuilder*) toBuilder { |
| return [ClockSyncEcho builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasServerSystemTimeEchoSec) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"serverSystemTimeEchoSec", [NSNumber numberWithInteger:self.serverSystemTimeEchoSec]]; |
| } |
| if (self.hasServerSystemTimeEchoMsec) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"serverSystemTimeEchoMsec", [NSNumber numberWithInteger:self.serverSystemTimeEchoMsec]]; |
| } |
| if (self.hasClientSystemTimeSec) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"clientSystemTimeSec", [NSNumber numberWithInteger:self.clientSystemTimeSec]]; |
| } |
| if (self.hasClientSystemTimeMsec) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"clientSystemTimeMsec", [NSNumber numberWithInteger:self.clientSystemTimeMsec]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[ClockSyncEcho class]]) { |
| return NO; |
| } |
| ClockSyncEcho *otherMessage = other; |
| return |
| self.hasServerSystemTimeEchoSec == otherMessage.hasServerSystemTimeEchoSec && |
| (!self.hasServerSystemTimeEchoSec || self.serverSystemTimeEchoSec == otherMessage.serverSystemTimeEchoSec) && |
| self.hasServerSystemTimeEchoMsec == otherMessage.hasServerSystemTimeEchoMsec && |
| (!self.hasServerSystemTimeEchoMsec || self.serverSystemTimeEchoMsec == otherMessage.serverSystemTimeEchoMsec) && |
| self.hasClientSystemTimeSec == otherMessage.hasClientSystemTimeSec && |
| (!self.hasClientSystemTimeSec || self.clientSystemTimeSec == otherMessage.clientSystemTimeSec) && |
| self.hasClientSystemTimeMsec == otherMessage.hasClientSystemTimeMsec && |
| (!self.hasClientSystemTimeMsec || self.clientSystemTimeMsec == otherMessage.clientSystemTimeMsec) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasServerSystemTimeEchoSec) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.serverSystemTimeEchoSec] hash]; |
| } |
| if (self.hasServerSystemTimeEchoMsec) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.serverSystemTimeEchoMsec] hash]; |
| } |
| if (self.hasClientSystemTimeSec) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.clientSystemTimeSec] hash]; |
| } |
| if (self.hasClientSystemTimeMsec) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.clientSystemTimeMsec] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface ClockSyncEchoBuilder() |
| @property (strong) ClockSyncEcho* result; |
| @end |
| |
| @implementation ClockSyncEchoBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[ClockSyncEcho alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (ClockSyncEchoBuilder*) clear { |
| self.result = [[ClockSyncEcho alloc] init]; |
| return self; |
| } |
| - (ClockSyncEchoBuilder*) clone { |
| return [ClockSyncEcho builderWithPrototype:result]; |
| } |
| - (ClockSyncEcho*) defaultInstance { |
| return [ClockSyncEcho defaultInstance]; |
| } |
| - (ClockSyncEcho*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (ClockSyncEcho*) buildPartial { |
| ClockSyncEcho* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (ClockSyncEchoBuilder*) mergeFrom:(ClockSyncEcho*) other { |
| if (other == [ClockSyncEcho defaultInstance]) { |
| return self; |
| } |
| if (other.hasServerSystemTimeEchoSec) { |
| [self setServerSystemTimeEchoSec:other.serverSystemTimeEchoSec]; |
| } |
| if (other.hasServerSystemTimeEchoMsec) { |
| [self setServerSystemTimeEchoMsec:other.serverSystemTimeEchoMsec]; |
| } |
| if (other.hasClientSystemTimeSec) { |
| [self setClientSystemTimeSec:other.clientSystemTimeSec]; |
| } |
| if (other.hasClientSystemTimeMsec) { |
| [self setClientSystemTimeMsec:other.clientSystemTimeMsec]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (ClockSyncEchoBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (ClockSyncEchoBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setServerSystemTimeEchoSec:[input readUInt32]]; |
| break; |
| } |
| case 16: { |
| [self setServerSystemTimeEchoMsec:[input readUInt32]]; |
| break; |
| } |
| case 24: { |
| [self setClientSystemTimeSec:[input readUInt32]]; |
| break; |
| } |
| case 32: { |
| [self setClientSystemTimeMsec:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasServerSystemTimeEchoSec { |
| return result.hasServerSystemTimeEchoSec; |
| } |
| - (UInt32) serverSystemTimeEchoSec { |
| return result.serverSystemTimeEchoSec; |
| } |
| - (ClockSyncEchoBuilder*) setServerSystemTimeEchoSec:(UInt32) value { |
| result.hasServerSystemTimeEchoSec = YES; |
| result.serverSystemTimeEchoSec = value; |
| return self; |
| } |
| - (ClockSyncEchoBuilder*) clearServerSystemTimeEchoSec { |
| result.hasServerSystemTimeEchoSec = NO; |
| result.serverSystemTimeEchoSec = 0; |
| return self; |
| } |
| - (BOOL) hasServerSystemTimeEchoMsec { |
| return result.hasServerSystemTimeEchoMsec; |
| } |
| - (UInt32) serverSystemTimeEchoMsec { |
| return result.serverSystemTimeEchoMsec; |
| } |
| - (ClockSyncEchoBuilder*) setServerSystemTimeEchoMsec:(UInt32) value { |
| result.hasServerSystemTimeEchoMsec = YES; |
| result.serverSystemTimeEchoMsec = value; |
| return self; |
| } |
| - (ClockSyncEchoBuilder*) clearServerSystemTimeEchoMsec { |
| result.hasServerSystemTimeEchoMsec = NO; |
| result.serverSystemTimeEchoMsec = 0; |
| return self; |
| } |
| - (BOOL) hasClientSystemTimeSec { |
| return result.hasClientSystemTimeSec; |
| } |
| - (UInt32) clientSystemTimeSec { |
| return result.clientSystemTimeSec; |
| } |
| - (ClockSyncEchoBuilder*) setClientSystemTimeSec:(UInt32) value { |
| result.hasClientSystemTimeSec = YES; |
| result.clientSystemTimeSec = value; |
| return self; |
| } |
| - (ClockSyncEchoBuilder*) clearClientSystemTimeSec { |
| result.hasClientSystemTimeSec = NO; |
| result.clientSystemTimeSec = 0; |
| return self; |
| } |
| - (BOOL) hasClientSystemTimeMsec { |
| return result.hasClientSystemTimeMsec; |
| } |
| - (UInt32) clientSystemTimeMsec { |
| return result.clientSystemTimeMsec; |
| } |
| - (ClockSyncEchoBuilder*) setClientSystemTimeMsec:(UInt32) value { |
| result.hasClientSystemTimeMsec = YES; |
| result.clientSystemTimeMsec = value; |
| return self; |
| } |
| - (ClockSyncEchoBuilder*) clearClientSystemTimeMsec { |
| result.hasClientSystemTimeMsec = NO; |
| result.clientSystemTimeMsec = 0; |
| return self; |
| } |
| @end |
| |
| @interface LatencyMeasure () |
| @property UInt64 earliestTime; |
| @property UInt64 latestTime; |
| @property UInt32 latencyRtpSequence; |
| @property UInt32 latencyRtpSsrc; |
| @end |
| |
| @implementation LatencyMeasure |
| |
| - (BOOL) hasEarliestTime { |
| return !!hasEarliestTime_; |
| } |
| - (void) setHasEarliestTime:(BOOL) value_ { |
| hasEarliestTime_ = !!value_; |
| } |
| @synthesize earliestTime; |
| - (BOOL) hasLatestTime { |
| return !!hasLatestTime_; |
| } |
| - (void) setHasLatestTime:(BOOL) value_ { |
| hasLatestTime_ = !!value_; |
| } |
| @synthesize latestTime; |
| - (BOOL) hasLatencyRtpSequence { |
| return !!hasLatencyRtpSequence_; |
| } |
| - (void) setHasLatencyRtpSequence:(BOOL) value_ { |
| hasLatencyRtpSequence_ = !!value_; |
| } |
| @synthesize latencyRtpSequence; |
| - (BOOL) hasLatencyRtpSsrc { |
| return !!hasLatencyRtpSsrc_; |
| } |
| - (void) setHasLatencyRtpSsrc:(BOOL) value_ { |
| hasLatencyRtpSsrc_ = !!value_; |
| } |
| @synthesize latencyRtpSsrc; |
| - (id) init { |
| if ((self = [super init])) { |
| self.earliestTime = 0L; |
| self.latestTime = 0L; |
| self.latencyRtpSequence = 0; |
| self.latencyRtpSsrc = 0; |
| } |
| return self; |
| } |
| static LatencyMeasure* defaultLatencyMeasureInstance = nil; |
| + (void) initialize { |
| if (self == [LatencyMeasure class]) { |
| defaultLatencyMeasureInstance = [[LatencyMeasure alloc] init]; |
| } |
| } |
| + (LatencyMeasure*) defaultInstance { |
| return defaultLatencyMeasureInstance; |
| } |
| - (LatencyMeasure*) defaultInstance { |
| return defaultLatencyMeasureInstance; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasEarliestTime) { |
| [output writeUInt64:1 value:self.earliestTime]; |
| } |
| if (self.hasLatestTime) { |
| [output writeUInt64:2 value:self.latestTime]; |
| } |
| if (self.hasLatencyRtpSequence) { |
| [output writeUInt32:3 value:self.latencyRtpSequence]; |
| } |
| if (self.hasLatencyRtpSsrc) { |
| [output writeUInt32:4 value:self.latencyRtpSsrc]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasEarliestTime) { |
| size_ += computeUInt64Size(1, self.earliestTime); |
| } |
| if (self.hasLatestTime) { |
| size_ += computeUInt64Size(2, self.latestTime); |
| } |
| if (self.hasLatencyRtpSequence) { |
| size_ += computeUInt32Size(3, self.latencyRtpSequence); |
| } |
| if (self.hasLatencyRtpSsrc) { |
| size_ += computeUInt32Size(4, self.latencyRtpSsrc); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (LatencyMeasure*) parseFromData:(NSData*) data { |
| return (LatencyMeasure*)[[[LatencyMeasure builder] mergeFromData:data] build]; |
| } |
| + (LatencyMeasure*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (LatencyMeasure*)[[[LatencyMeasure builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (LatencyMeasure*) parseFromInputStream:(NSInputStream*) input { |
| return (LatencyMeasure*)[[[LatencyMeasure builder] mergeFromInputStream:input] build]; |
| } |
| + (LatencyMeasure*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (LatencyMeasure*)[[[LatencyMeasure builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (LatencyMeasure*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (LatencyMeasure*)[[[LatencyMeasure builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (LatencyMeasure*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (LatencyMeasure*)[[[LatencyMeasure builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (LatencyMeasureBuilder*) builder { |
| return [[LatencyMeasureBuilder alloc] init]; |
| } |
| + (LatencyMeasureBuilder*) builderWithPrototype:(LatencyMeasure*) prototype { |
| return [[LatencyMeasure builder] mergeFrom:prototype]; |
| } |
| - (LatencyMeasureBuilder*) builder { |
| return [LatencyMeasure builder]; |
| } |
| - (LatencyMeasureBuilder*) toBuilder { |
| return [LatencyMeasure builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasEarliestTime) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"earliestTime", [NSNumber numberWithLongLong:self.earliestTime]]; |
| } |
| if (self.hasLatestTime) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"latestTime", [NSNumber numberWithLongLong:self.latestTime]]; |
| } |
| if (self.hasLatencyRtpSequence) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"latencyRtpSequence", [NSNumber numberWithInteger:self.latencyRtpSequence]]; |
| } |
| if (self.hasLatencyRtpSsrc) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"latencyRtpSsrc", [NSNumber numberWithInteger:self.latencyRtpSsrc]]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[LatencyMeasure class]]) { |
| return NO; |
| } |
| LatencyMeasure *otherMessage = other; |
| return |
| self.hasEarliestTime == otherMessage.hasEarliestTime && |
| (!self.hasEarliestTime || self.earliestTime == otherMessage.earliestTime) && |
| self.hasLatestTime == otherMessage.hasLatestTime && |
| (!self.hasLatestTime || self.latestTime == otherMessage.latestTime) && |
| self.hasLatencyRtpSequence == otherMessage.hasLatencyRtpSequence && |
| (!self.hasLatencyRtpSequence || self.latencyRtpSequence == otherMessage.latencyRtpSequence) && |
| self.hasLatencyRtpSsrc == otherMessage.hasLatencyRtpSsrc && |
| (!self.hasLatencyRtpSsrc || self.latencyRtpSsrc == otherMessage.latencyRtpSsrc) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasEarliestTime) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.earliestTime] hash]; |
| } |
| if (self.hasLatestTime) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.latestTime] hash]; |
| } |
| if (self.hasLatencyRtpSequence) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.latencyRtpSequence] hash]; |
| } |
| if (self.hasLatencyRtpSsrc) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.latencyRtpSsrc] hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface LatencyMeasureBuilder() |
| @property (strong) LatencyMeasure* result; |
| @end |
| |
| @implementation LatencyMeasureBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[LatencyMeasure alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (LatencyMeasureBuilder*) clear { |
| self.result = [[LatencyMeasure alloc] init]; |
| return self; |
| } |
| - (LatencyMeasureBuilder*) clone { |
| return [LatencyMeasure builderWithPrototype:result]; |
| } |
| - (LatencyMeasure*) defaultInstance { |
| return [LatencyMeasure defaultInstance]; |
| } |
| - (LatencyMeasure*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (LatencyMeasure*) buildPartial { |
| LatencyMeasure* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (LatencyMeasureBuilder*) mergeFrom:(LatencyMeasure*) other { |
| if (other == [LatencyMeasure defaultInstance]) { |
| return self; |
| } |
| if (other.hasEarliestTime) { |
| [self setEarliestTime:other.earliestTime]; |
| } |
| if (other.hasLatestTime) { |
| [self setLatestTime:other.latestTime]; |
| } |
| if (other.hasLatencyRtpSequence) { |
| [self setLatencyRtpSequence:other.latencyRtpSequence]; |
| } |
| if (other.hasLatencyRtpSsrc) { |
| [self setLatencyRtpSsrc:other.latencyRtpSsrc]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (LatencyMeasureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (LatencyMeasureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 8: { |
| [self setEarliestTime:[input readUInt64]]; |
| break; |
| } |
| case 16: { |
| [self setLatestTime:[input readUInt64]]; |
| break; |
| } |
| case 24: { |
| [self setLatencyRtpSequence:[input readUInt32]]; |
| break; |
| } |
| case 32: { |
| [self setLatencyRtpSsrc:[input readUInt32]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasEarliestTime { |
| return result.hasEarliestTime; |
| } |
| - (UInt64) earliestTime { |
| return result.earliestTime; |
| } |
| - (LatencyMeasureBuilder*) setEarliestTime:(UInt64) value { |
| result.hasEarliestTime = YES; |
| result.earliestTime = value; |
| return self; |
| } |
| - (LatencyMeasureBuilder*) clearEarliestTime { |
| result.hasEarliestTime = NO; |
| result.earliestTime = 0L; |
| return self; |
| } |
| - (BOOL) hasLatestTime { |
| return result.hasLatestTime; |
| } |
| - (UInt64) latestTime { |
| return result.latestTime; |
| } |
| - (LatencyMeasureBuilder*) setLatestTime:(UInt64) value { |
| result.hasLatestTime = YES; |
| result.latestTime = value; |
| return self; |
| } |
| - (LatencyMeasureBuilder*) clearLatestTime { |
| result.hasLatestTime = NO; |
| result.latestTime = 0L; |
| return self; |
| } |
| - (BOOL) hasLatencyRtpSequence { |
| return result.hasLatencyRtpSequence; |
| } |
| - (UInt32) latencyRtpSequence { |
| return result.latencyRtpSequence; |
| } |
| - (LatencyMeasureBuilder*) setLatencyRtpSequence:(UInt32) value { |
| result.hasLatencyRtpSequence = YES; |
| result.latencyRtpSequence = value; |
| return self; |
| } |
| - (LatencyMeasureBuilder*) clearLatencyRtpSequence { |
| result.hasLatencyRtpSequence = NO; |
| result.latencyRtpSequence = 0; |
| return self; |
| } |
| - (BOOL) hasLatencyRtpSsrc { |
| return result.hasLatencyRtpSsrc; |
| } |
| - (UInt32) latencyRtpSsrc { |
| return result.latencyRtpSsrc; |
| } |
| - (LatencyMeasureBuilder*) setLatencyRtpSsrc:(UInt32) value { |
| result.hasLatencyRtpSsrc = YES; |
| result.latencyRtpSsrc = value; |
| return self; |
| } |
| - (LatencyMeasureBuilder*) clearLatencyRtpSsrc { |
| result.hasLatencyRtpSsrc = NO; |
| result.latencyRtpSsrc = 0; |
| return self; |
| } |
| @end |
| |
| @interface Redirect () |
| @property (strong) NS_RETURNS_NOT_RETAINED NSString* newHost; |
| @end |
| |
| @implementation Redirect |
| |
| - (BOOL) hasNewHost { |
| return !!hasNewHost_; |
| } |
| - (void) setHasNewHost:(BOOL) value_ { |
| hasNewHost_ = !!value_; |
| } |
| @synthesize newHost; |
| - (id) init { |
| if ((self = [super init])) { |
| self.newHost = @""; |
| } |
| return self; |
| } |
| static Redirect* defaultRedirectInstance = nil; |
| + (void) initialize { |
| if (self == [Redirect class]) { |
| defaultRedirectInstance = [[Redirect alloc] init]; |
| } |
| } |
| + (Redirect*) defaultInstance { |
| return defaultRedirectInstance; |
| } |
| - (Redirect*) defaultInstance { |
| return defaultRedirectInstance; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasNewHost) { |
| [output writeString:1 value:self.newHost]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasNewHost) { |
| size_ += computeStringSize(1, self.newHost); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Redirect*) parseFromData:(NSData*) data { |
| return (Redirect*)[[[Redirect builder] mergeFromData:data] build]; |
| } |
| + (Redirect*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Redirect*)[[[Redirect builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Redirect*) parseFromInputStream:(NSInputStream*) input { |
| return (Redirect*)[[[Redirect builder] mergeFromInputStream:input] build]; |
| } |
| + (Redirect*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Redirect*)[[[Redirect builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Redirect*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Redirect*)[[[Redirect builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Redirect*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Redirect*)[[[Redirect builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (RedirectBuilder*) builder { |
| return [[RedirectBuilder alloc] init]; |
| } |
| + (RedirectBuilder*) builderWithPrototype:(Redirect*) prototype { |
| return [[Redirect builder] mergeFrom:prototype]; |
| } |
| - (RedirectBuilder*) builder { |
| return [Redirect builder]; |
| } |
| - (RedirectBuilder*) toBuilder { |
| return [Redirect builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasNewHost) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"newHost", self.newHost]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Redirect class]]) { |
| return NO; |
| } |
| Redirect *otherMessage = other; |
| return |
| self.hasNewHost == otherMessage.hasNewHost && |
| (!self.hasNewHost || [self.newHost isEqual:otherMessage.newHost]) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasNewHost) { |
| hashCode = hashCode * 31 + [self.newHost hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface RedirectBuilder() |
| @property (strong) Redirect* result; |
| @end |
| |
| @implementation RedirectBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Redirect alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (RedirectBuilder*) clear { |
| self.result = [[Redirect alloc] init]; |
| return self; |
| } |
| - (RedirectBuilder*) clone { |
| return [Redirect builderWithPrototype:result]; |
| } |
| - (Redirect*) defaultInstance { |
| return [Redirect defaultInstance]; |
| } |
| - (Redirect*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Redirect*) buildPartial { |
| Redirect* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (RedirectBuilder*) mergeFrom:(Redirect*) other { |
| if (other == [Redirect defaultInstance]) { |
| return self; |
| } |
| if (other.hasNewHost) { |
| [self setNewHost:other.newHost]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (RedirectBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (RedirectBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; |
| while (YES) { |
| SInt32 tag = [input readTag]; |
| switch (tag) { |
| case 0: |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| default: { |
| if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { |
| [self setUnknownFields:[unknownFields build]]; |
| return self; |
| } |
| break; |
| } |
| case 10: { |
| [self setNewHost:[input readString]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasNewHost { |
| return result.hasNewHost; |
| } |
| - (NSString*) newHost { |
| return result.newHost; |
| } |
| - (RedirectBuilder*) setNewHost:(NSString*) value { |
| result.hasNewHost = YES; |
| result.newHost = value; |
| return self; |
| } |
| - (RedirectBuilder*) clearNewHost { |
| result.hasNewHost = NO; |
| result.newHost = @""; |
| return self; |
| } |
| @end |
| |
| |
| // @@protoc_insertion_point(global_scope) |