Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
7.7 kB · 297 lines
Objective-C
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298// This file was automatically generated by protocompiler// DO NOT EDIT!// Compiled from stdin
#import "AWDIPMonitorInterfaceAdvisoryReport.h"#import <ProtocolBuffer/PBConstants.h>#import <ProtocolBuffer/PBHashUtil.h>#import <ProtocolBuffer/PBDataReader.h>
@implementation AWDIPMonitorInterfaceAdvisoryReport
@synthesize timestamp = _timestamp;- (void)setTimestamp:(uint64_t)v{ _has.timestamp = YES; _timestamp = v;}- (void)setHasTimestamp:(BOOL)f{ _has.timestamp = f;}- (BOOL)hasTimestamp{ return _has.timestamp;}@synthesize interfaceType = _interfaceType;- (AWDIPMonitorInterfaceType)interfaceType{ return _has.interfaceType ? _interfaceType : AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER;}- (void)setInterfaceType:(AWDIPMonitorInterfaceType)v{ _has.interfaceType = YES; _interfaceType = v;}- (void)setHasInterfaceType:(BOOL)f{ _has.interfaceType = f;}- (BOOL)hasInterfaceType{ return _has.interfaceType;}- (NSString *)interfaceTypeAsString:(AWDIPMonitorInterfaceType)value{ return AWDIPMonitorInterfaceTypeAsString(value);}- (AWDIPMonitorInterfaceType)StringAsInterfaceType:(NSString *)str{ return StringAsAWDIPMonitorInterfaceType(str);}@synthesize flags = _flags;- (void)setFlags:(uint32_t)v{ _has.flags = YES; _flags = v;}- (void)setHasFlags:(BOOL)f{ _has.flags = f;}- (BOOL)hasFlags{ return _has.flags;}@synthesize advisoryCount = _advisoryCount;- (void)setAdvisoryCount:(uint32_t)v{ _has.advisoryCount = YES; _advisoryCount = v;}- (void)setHasAdvisoryCount:(BOOL)f{ _has.advisoryCount = f;}- (BOOL)hasAdvisoryCount{ return _has.advisoryCount;}
- (NSString *)description{ return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]];}
- (NSDictionary *)dictionaryRepresentation{ NSMutableDictionary *dict = [NSMutableDictionary dictionary]; if (self->_has.timestamp) { [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestamp] forKey:@"timestamp"]; } if (self->_has.interfaceType) { [dict setObject:AWDIPMonitorInterfaceTypeAsString(self->_interfaceType) forKey:@"interface_type"]; } if (self->_has.flags) { [dict setObject:[NSNumber numberWithUnsignedInt:self->_flags] forKey:@"flags"]; } if (self->_has.advisoryCount) { [dict setObject:[NSNumber numberWithUnsignedInt:self->_advisoryCount] forKey:@"advisory_count"]; } return dict;}
BOOL AWDIPMonitorInterfaceAdvisoryReportReadFrom(AWDIPMonitorInterfaceAdvisoryReport *self, PBDataReader *reader) { while (PBReaderHasMoreData(reader)) { uint32_t tag = 0; uint8_t aType = 0;
PBReaderReadTag32AndType(reader, &tag, &aType);
if (PBReaderHasError(reader)) break;
if (aType == TYPE_END_GROUP) { break; }
switch (tag) {
case 1 /* timestamp */: { self->_has.timestamp = YES; self->_timestamp = PBReaderReadUint64(reader); } break; case 2 /* interfaceType */: { self->_has.interfaceType = YES; self->_interfaceType = PBReaderReadInt32(reader); } break; case 3 /* flags */: { self->_has.flags = YES; self->_flags = PBReaderReadUint32(reader); } break; case 4 /* advisoryCount */: { self->_has.advisoryCount = YES; self->_advisoryCount = PBReaderReadUint32(reader); } break; default: if (!PBReaderSkipValueWithTag(reader, tag, aType)) return NO; break; } } return !PBReaderHasError(reader);}
- (BOOL)readFrom:(PBDataReader *)reader{ return AWDIPMonitorInterfaceAdvisoryReportReadFrom(self, reader);}- (void)writeTo:(PBDataWriter *)writer{ /* timestamp */ { if (self->_has.timestamp) { PBDataWriterWriteUint64Field(writer, self->_timestamp, 1); } } /* interfaceType */ { if (self->_has.interfaceType) { PBDataWriterWriteInt32Field(writer, self->_interfaceType, 2); } } /* flags */ { if (self->_has.flags) { PBDataWriterWriteUint32Field(writer, self->_flags, 3); } } /* advisoryCount */ { if (self->_has.advisoryCount) { PBDataWriterWriteUint32Field(writer, self->_advisoryCount, 4); } }}
- (void)copyTo:(AWDIPMonitorInterfaceAdvisoryReport *)other{ if (self->_has.timestamp) { other->_timestamp = _timestamp; other->_has.timestamp = YES; } if (self->_has.interfaceType) { other->_interfaceType = _interfaceType; other->_has.interfaceType = YES; } if (self->_has.flags) { other->_flags = _flags; other->_has.flags = YES; } if (self->_has.advisoryCount) { other->_advisoryCount = _advisoryCount; other->_has.advisoryCount = YES; }}
- (id)copyWithZone:(NSZone *)zone{ AWDIPMonitorInterfaceAdvisoryReport *copy = [[[self class] allocWithZone:zone] init]; if (self->_has.timestamp) { copy->_timestamp = _timestamp; copy->_has.timestamp = YES; } if (self->_has.interfaceType) { copy->_interfaceType = _interfaceType; copy->_has.interfaceType = YES; } if (self->_has.flags) { copy->_flags = _flags; copy->_has.flags = YES; } if (self->_has.advisoryCount) { copy->_advisoryCount = _advisoryCount; copy->_has.advisoryCount = YES; } return copy;}
- (BOOL)isEqual:(id)object{ AWDIPMonitorInterfaceAdvisoryReport *other = (AWDIPMonitorInterfaceAdvisoryReport *)object; return [other isMemberOfClass:[self class]] && ((self->_has.timestamp && other->_has.timestamp && self->_timestamp == other->_timestamp) || (!self->_has.timestamp && !other->_has.timestamp)) && ((self->_has.interfaceType && other->_has.interfaceType && self->_interfaceType == other->_interfaceType) || (!self->_has.interfaceType && !other->_has.interfaceType)) && ((self->_has.flags && other->_has.flags && self->_flags == other->_flags) || (!self->_has.flags && !other->_has.flags)) && ((self->_has.advisoryCount && other->_has.advisoryCount && self->_advisoryCount == other->_advisoryCount) || (!self->_has.advisoryCount && !other->_has.advisoryCount)) ;}
- (NSUInteger)hash{ return 0 ^ (self->_has.timestamp ? PBHashInt((NSUInteger)self->_timestamp) : 0) ^ (self->_has.interfaceType ? PBHashInt((NSUInteger)self->_interfaceType) : 0) ^ (self->_has.flags ? PBHashInt((NSUInteger)self->_flags) : 0) ^ (self->_has.advisoryCount ? PBHashInt((NSUInteger)self->_advisoryCount) : 0) ;}
- (void)mergeFrom:(AWDIPMonitorInterfaceAdvisoryReport *)other{ if (other->_has.timestamp) { self->_timestamp = other->_timestamp; self->_has.timestamp = YES; } if (other->_has.interfaceType) { self->_interfaceType = other->_interfaceType; self->_has.interfaceType = YES; } if (other->_has.flags) { self->_flags = other->_flags; self->_has.flags = YES; } if (other->_has.advisoryCount) { self->_advisoryCount = other->_advisoryCount; self->_has.advisoryCount = YES; }}
@end