update protobufs to sync group color

pull/1/head
Michael Kirk 7 years ago
parent f1b1307542
commit 553a94286f

@ -324,4 +324,5 @@ message GroupDetails {
optional Avatar avatar = 4; optional Avatar avatar = 4;
optional bool active = 5 [default = true]; optional bool active = 5 [default = true];
optional uint32 expireTimer = 6; optional uint32 expireTimer = 6;
optional string color = 7;
} }

@ -2840,15 +2840,18 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
#define GroupDetails_avatar @"avatar" #define GroupDetails_avatar @"avatar"
#define GroupDetails_active @"active" #define GroupDetails_active @"active"
#define GroupDetails_expireTimer @"expireTimer" #define GroupDetails_expireTimer @"expireTimer"
#define GroupDetails_color @"color"
@interface OWSSignalServiceProtosGroupDetails : PBGeneratedMessage<GeneratedMessageProtocol> { @interface OWSSignalServiceProtosGroupDetails : PBGeneratedMessage<GeneratedMessageProtocol> {
@private @private
BOOL hasActive_:1; BOOL hasActive_:1;
BOOL hasName_:1; BOOL hasName_:1;
BOOL hasColor_:1;
BOOL hasAvatar_:1; BOOL hasAvatar_:1;
BOOL hasId_:1; BOOL hasId_:1;
BOOL hasExpireTimer_:1; BOOL hasExpireTimer_:1;
BOOL active_:1; BOOL active_:1;
NSString* name; NSString* name;
NSString* color;
OWSSignalServiceProtosGroupDetailsAvatar* avatar; OWSSignalServiceProtosGroupDetailsAvatar* avatar;
NSData* id; NSData* id;
UInt32 expireTimer; UInt32 expireTimer;
@ -2859,12 +2862,14 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (BOOL) hasAvatar; - (BOOL) hasAvatar;
- (BOOL) hasActive; - (BOOL) hasActive;
- (BOOL) hasExpireTimer; - (BOOL) hasExpireTimer;
- (BOOL) hasColor;
@property (readonly, strong) NSData* id; @property (readonly, strong) NSData* id;
@property (readonly, strong) NSString* name; @property (readonly, strong) NSString* name;
@property (readonly, strong) NSArray * members; @property (readonly, strong) NSArray * members;
@property (readonly, strong) OWSSignalServiceProtosGroupDetailsAvatar* avatar; @property (readonly, strong) OWSSignalServiceProtosGroupDetailsAvatar* avatar;
- (BOOL) active; - (BOOL) active;
@property (readonly) UInt32 expireTimer; @property (readonly) UInt32 expireTimer;
@property (readonly, strong) NSString* color;
- (NSString*)membersAtIndex:(NSUInteger)index; - (NSString*)membersAtIndex:(NSUInteger)index;
+ (instancetype) defaultInstance; + (instancetype) defaultInstance;
@ -2994,6 +2999,11 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (UInt32) expireTimer; - (UInt32) expireTimer;
- (OWSSignalServiceProtosGroupDetailsBuilder*) setExpireTimer:(UInt32) value; - (OWSSignalServiceProtosGroupDetailsBuilder*) setExpireTimer:(UInt32) value;
- (OWSSignalServiceProtosGroupDetailsBuilder*) clearExpireTimer; - (OWSSignalServiceProtosGroupDetailsBuilder*) clearExpireTimer;
- (BOOL) hasColor;
- (NSString*) color;
- (OWSSignalServiceProtosGroupDetailsBuilder*) setColor:(NSString*) value;
- (OWSSignalServiceProtosGroupDetailsBuilder*) clearColor;
@end @end

@ -12439,6 +12439,7 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
@property (strong) OWSSignalServiceProtosGroupDetailsAvatar* avatar; @property (strong) OWSSignalServiceProtosGroupDetailsAvatar* avatar;
@property BOOL active; @property BOOL active;
@property UInt32 expireTimer; @property UInt32 expireTimer;
@property (strong) NSString* color;
@end @end
@implementation OWSSignalServiceProtosGroupDetails @implementation OWSSignalServiceProtosGroupDetails
@ -12485,6 +12486,13 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
hasExpireTimer_ = !!_value_; hasExpireTimer_ = !!_value_;
} }
@synthesize expireTimer; @synthesize expireTimer;
- (BOOL) hasColor {
return !!hasColor_;
}
- (void) setHasColor:(BOOL) _value_ {
hasColor_ = !!_value_;
}
@synthesize color;
- (instancetype) init { - (instancetype) init {
if ((self = [super init])) { if ((self = [super init])) {
self.id = [NSData data]; self.id = [NSData data];
@ -12492,6 +12500,7 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
self.avatar = [OWSSignalServiceProtosGroupDetailsAvatar defaultInstance]; self.avatar = [OWSSignalServiceProtosGroupDetailsAvatar defaultInstance];
self.active = YES; self.active = YES;
self.expireTimer = 0; self.expireTimer = 0;
self.color = @"";
} }
return self; return self;
} }
@ -12535,6 +12544,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasExpireTimer) { if (self.hasExpireTimer) {
[output writeUInt32:6 value:self.expireTimer]; [output writeUInt32:6 value:self.expireTimer];
} }
if (self.hasColor) {
[output writeString:7 value:self.color];
}
[self.unknownFields writeToCodedOutputStream:output]; [self.unknownFields writeToCodedOutputStream:output];
} }
- (SInt32) serializedSize { - (SInt32) serializedSize {
@ -12568,6 +12580,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasExpireTimer) { if (self.hasExpireTimer) {
size_ += computeUInt32Size(6, self.expireTimer); size_ += computeUInt32Size(6, self.expireTimer);
} }
if (self.hasColor) {
size_ += computeStringSize(7, self.color);
}
size_ += self.unknownFields.serializedSize; size_ += self.unknownFields.serializedSize;
memoizedSerializedSize = size_; memoizedSerializedSize = size_;
return size_; return size_;
@ -12624,6 +12639,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasExpireTimer) { if (self.hasExpireTimer) {
[output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]]; [output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]];
} }
if (self.hasColor) {
[output appendFormat:@"%@%@: %@\n", indent, @"color", self.color];
}
[self.unknownFields writeDescriptionTo:output withIndent:indent]; [self.unknownFields writeDescriptionTo:output withIndent:indent];
} }
- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - (void) storeInDictionary:(NSMutableDictionary *)dictionary {
@ -12645,6 +12663,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasExpireTimer) { if (self.hasExpireTimer) {
[dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"]; [dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"];
} }
if (self.hasColor) {
[dictionary setObject: self.color forKey: @"color"];
}
[self.unknownFields storeInDictionary:dictionary]; [self.unknownFields storeInDictionary:dictionary];
} }
- (BOOL) isEqual:(id)other { - (BOOL) isEqual:(id)other {
@ -12667,6 +12688,8 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
(!self.hasActive || self.active == otherMessage.active) && (!self.hasActive || self.active == otherMessage.active) &&
self.hasExpireTimer == otherMessage.hasExpireTimer && self.hasExpireTimer == otherMessage.hasExpireTimer &&
(!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) && (!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) &&
self.hasColor == otherMessage.hasColor &&
(!self.hasColor || [self.color isEqual:otherMessage.color]) &&
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
} }
- (NSUInteger) hash { - (NSUInteger) hash {
@ -12689,6 +12712,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasExpireTimer) { if (self.hasExpireTimer) {
hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash]; hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash];
} }
if (self.hasColor) {
hashCode = hashCode * 31 + [self.color hash];
}
hashCode = hashCode * 31 + [self.unknownFields hash]; hashCode = hashCode * 31 + [self.unknownFields hash];
return hashCode; return hashCode;
} }
@ -13009,6 +13035,9 @@ static OWSSignalServiceProtosGroupDetailsAvatar* defaultOWSSignalServiceProtosGr
if (other.hasExpireTimer) { if (other.hasExpireTimer) {
[self setExpireTimer:other.expireTimer]; [self setExpireTimer:other.expireTimer];
} }
if (other.hasColor) {
[self setColor:other.color];
}
[self mergeUnknownFields:other.unknownFields]; [self mergeUnknownFields:other.unknownFields];
return self; return self;
} }
@ -13059,6 +13088,10 @@ static OWSSignalServiceProtosGroupDetailsAvatar* defaultOWSSignalServiceProtosGr
[self setExpireTimer:[input readUInt32]]; [self setExpireTimer:[input readUInt32]];
break; break;
} }
case 58: {
[self setColor:[input readString]];
break;
}
} }
} }
} }
@ -13177,6 +13210,22 @@ static OWSSignalServiceProtosGroupDetailsAvatar* defaultOWSSignalServiceProtosGr
resultGroupDetails.expireTimer = 0; resultGroupDetails.expireTimer = 0;
return self; return self;
} }
- (BOOL) hasColor {
return resultGroupDetails.hasColor;
}
- (NSString*) color {
return resultGroupDetails.color;
}
- (OWSSignalServiceProtosGroupDetailsBuilder*) setColor:(NSString*) value {
resultGroupDetails.hasColor = YES;
resultGroupDetails.color = value;
return self;
}
- (OWSSignalServiceProtosGroupDetailsBuilder*) clearColor {
resultGroupDetails.hasColor = NO;
resultGroupDetails.color = @"";
return self;
}
@end @end

Loading…
Cancel
Save