diff --git a/MQTTDemo/IMLib/IMClient/IMService.h b/MQTTDemo/IMLib/IMClient/IMService.h index 1e9962bb..62c3633d 100644 --- a/MQTTDemo/IMLib/IMClient/IMService.h +++ b/MQTTDemo/IMLib/IMClient/IMService.h @@ -29,44 +29,49 @@ - (BOOL)deleteMessage:(long)messageId; -- (GroupInfo *)getGroupInfo:(NSString *)groupId line:(int)line refresh:(BOOL)refresh; +- (GroupInfo *)getGroupInfo:(NSString *)groupId refresh:(BOOL)refresh; - (UserInfo *)getUserInfo:(NSString *)userId refresh:(BOOL)refresh; - (void)registerMessageContent:(Class)contentClass; - (MessageContent *)messageContentFromPayload:(MessagePayload *)payload; - (void)createGroup:(NSString *)groupId - line:(int)line name:(NSString *)groupName portrait:(NSString *)groupPortrait members:(NSArray *)groupMembers + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)(NSString *groupId))successBlock error:(void(^)(int error_code))errorBlock; - (void)addMembers:(NSArray *)members toGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock; - (void)kickoffMembers:(NSArray *)members fromGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock; - (void)quitGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock; - (void)dismissGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock; - (void)modifyGroupInfo:(GroupInfo *)groupInfo + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock; @@ -84,6 +89,7 @@ - (void)transferGroup:(NSString *)groupId to:(NSString *)newOwner + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock; diff --git a/MQTTDemo/IMLib/IMClient/IMService.mm b/MQTTDemo/IMLib/IMClient/IMService.mm index c620b5b9..c61281bf 100644 --- a/MQTTDemo/IMLib/IMClient/IMService.mm +++ b/MQTTDemo/IMLib/IMClient/IMService.mm @@ -376,10 +376,10 @@ - (void)setConversation:(Conversation *)conversation top:(BOOL)top { mars::stn::MessageDB::Instance()->updateConversationIsTop(conversation.type, [conversation.target UTF8String], conversation.line, top); } - (void)createGroup:(NSString *)groupId - line:(int)line name:(NSString *)groupName portrait:(NSString *)groupPortrait members:(NSArray *)groupMembers + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)(NSString *groupId))successBlock error:(void(^)(int error_code))errorBlock { @@ -391,11 +391,17 @@ - (void)createGroup:(NSString *)groupId MessagePayload *payload = [notifyContent encode]; mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::createGroup(groupId == nil ? "" : [groupId UTF8String], groupName == nil ? "" : [groupName UTF8String], groupPortrait == nil ? "" : [groupPortrait UTF8String], memberList, tmsg, new IMCreateGroupCallback(successBlock, errorBlock)); + + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + mars::stn::createGroup(groupId == nil ? "" : [groupId UTF8String], groupName == nil ? "" : [groupName UTF8String], groupPortrait == nil ? "" : [groupPortrait UTF8String], memberList, lines, tmsg, new IMCreateGroupCallback(successBlock, errorBlock)); } - (void)addMembers:(NSArray *)members toGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock { @@ -407,11 +413,18 @@ - (void)addMembers:(NSArray *)members MessagePayload *payload = [notifyContent encode]; mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::addMembers([groupId UTF8String], memberList, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); + + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + + mars::stn::addMembers([groupId UTF8String], memberList, lines, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); } - (void)kickoffMembers:(NSArray *)members fromGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock { @@ -423,10 +436,17 @@ - (void)kickoffMembers:(NSArray *)members MessagePayload *payload = [notifyContent encode]; mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::kickoffMembers([groupId UTF8String], memberList, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); + + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + + mars::stn::kickoffMembers([groupId UTF8String], memberList, lines, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); } - (void)quitGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock { @@ -434,10 +454,17 @@ - (void)quitGroup:(NSString *)groupId MessagePayload *payload = [notifyContent encode]; mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::quitGroup([groupId UTF8String], tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); + + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + + mars::stn::quitGroup([groupId UTF8String], lines, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); } - (void)dismissGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock { @@ -445,10 +472,17 @@ - (void)dismissGroup:(NSString *)groupId MessagePayload *payload = [notifyContent encode]; mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::dismissGroup([groupId UTF8String], tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); + + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + + mars::stn::dismissGroup([groupId UTF8String], lines, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); } - (void)modifyGroupInfo:(GroupInfo *)groupInfo + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock { @@ -470,7 +504,13 @@ - (void)modifyGroupInfo:(GroupInfo *)groupInfo MessagePayload *payload = [notifyContent encode]; mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::modifyGroupInfo([groupInfo.target UTF8String], tInfo, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); + + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + + mars::stn::modifyGroupInfo([groupInfo.target UTF8String], tInfo, lines, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); } - (void)getGroupInfo:(NSArray *)groupIds success:(void(^)(NSArray *))successBlock error:(void(^)(int error_code))errorBlock { @@ -495,6 +535,7 @@ - (void)getMyGroups:(void(^)(NSArray *))successBlock - (void)transferGroup:(NSString *)groupId to:(NSString *)newOwner + notifyLines:(NSArray *)notifyLines notifyContent:(MessageContent *)notifyContent success:(void(^)())successBlock error:(void(^)(int error_code))errorBlock { @@ -502,7 +543,12 @@ - (void)transferGroup:(NSString *)groupId mars::stn::TMessage tmsg; fillTMessage(tmsg, nil, payload); - mars::stn::transferGroup([groupId UTF8String], [newOwner UTF8String], tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); + std::list lines; + for (NSNumber *number in notifyLines) { + lines.push_back([number intValue]); + } + + mars::stn::transferGroup([groupId UTF8String], [newOwner UTF8String], lines, tmsg, new IMGeneralGroupOperationCallback(successBlock, errorBlock)); } - (MessageContent *)messageContentFromPayload:(MessagePayload *)payload { @@ -526,13 +572,12 @@ - (BOOL)deleteMessage:(long)messageId { return mars::stn::MessageDB::Instance()->DeleteMessage(messageId); } -- (GroupInfo *)getGroupInfo:(NSString *)groupId line:(int)line refresh:(BOOL)refresh { - mars::stn::TGroupInfo tgi = mars::stn::MessageDB::Instance()->GetGroupInfo([groupId UTF8String], line, refresh); +- (GroupInfo *)getGroupInfo:(NSString *)groupId refresh:(BOOL)refresh { + mars::stn::TGroupInfo tgi = mars::stn::MessageDB::Instance()->GetGroupInfo([groupId UTF8String], refresh); if (!tgi.target.empty()) { GroupInfo *groupInfo = [[GroupInfo alloc] init]; groupInfo.type = (GroupType)tgi.type; groupInfo.target = [NSString stringWithUTF8String:tgi.target.c_str()]; - groupInfo.line = tgi.line; groupInfo.name = [NSString stringWithUTF8String:tgi.name.c_str()]; groupInfo.extra = [NSData dataWithBytes:tgi.extra.c_str() length:tgi.extra.length()]; groupInfo.portrait = [NSString stringWithUTF8String:tgi.portrait.c_str()]; diff --git a/MQTTDemo/IMLib/MQTTClient/GroupInfo.h b/MQTTDemo/IMLib/MQTTClient/GroupInfo.h index ad1070b6..869d520e 100644 --- a/MQTTDemo/IMLib/MQTTClient/GroupInfo.h +++ b/MQTTDemo/IMLib/MQTTClient/GroupInfo.h @@ -20,7 +20,6 @@ typedef enum : NSUInteger { @interface GroupInfo : NSObject @property (nonatomic, assign)GroupType type; @property (nonatomic, strong)NSString *target; -@property (nonatomic, assign)int line; @property (nonatomic, strong)NSString *name; @property (nonatomic, strong)NSString *portrait; @property (nonatomic, strong)NSString *owner; diff --git a/MQTTDemo/IMLib/mars.framework/Headers/stn/MessageDB.hpp b/MQTTDemo/IMLib/mars.framework/Headers/stn/MessageDB.hpp index 75b09e5c..fa6f6ef0 100644 --- a/MQTTDemo/IMLib/mars.framework/Headers/stn/MessageDB.hpp +++ b/MQTTDemo/IMLib/mars.framework/Headers/stn/MessageDB.hpp @@ -59,7 +59,7 @@ namespace mars { bool FailSendingMessages(); - TGroupInfo GetGroupInfo(const std::string &groupId, int line, bool refresh); + TGroupInfo GetGroupInfo(const std::string &groupId, bool refresh); long InsertGroupInfo(const TGroupInfo &groupInfo); TUserInfo getUserInfo(const std::string &userId, bool refresh); diff --git a/MQTTDemo/IMLib/mars.framework/Headers/stn/stn.h b/MQTTDemo/IMLib/mars.framework/Headers/stn/stn.h index b2a6aa8f..5ea79377 100644 --- a/MQTTDemo/IMLib/mars.framework/Headers/stn/stn.h +++ b/MQTTDemo/IMLib/mars.framework/Headers/stn/stn.h @@ -74,9 +74,8 @@ struct TaskProfile; struct DnsProfile; class TGroupInfo { public: - TGroupInfo() : type(0), line(0) {} + TGroupInfo() : target(""), type(0) {} std::string target; - int line; std::string name; std::string portrait; std::string owner; @@ -541,25 +540,25 @@ extern void (*ReportDnsProfile)(const DnsProfile& _dns_profile); extern int (*sendMessage)(TMessage &tmsg, SendMessageCallback *callback); -extern void (*createGroup)(const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, TMessage &tmsg, CreateGroupCallback *callback); + extern void (*createGroup)(const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, const std::list ¬ifyLines, TMessage &tmsg, CreateGroupCallback *callback); -extern void (*addMembers)(const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*addMembers)(const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); -extern void (*kickoffMembers)(const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*kickoffMembers)(const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); -extern void (*quitGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*quitGroup)(const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); -extern void (*dismissGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*dismissGroup)(const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); extern void (*getGroupInfo)(const std::list> &groupIdList, GetGroupInfoCallback *callback); -extern void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); extern void (*getGroupMembers)(const std::string &groupId, GetGroupMembersCallback *callback); extern void (*getMyGroups)(GetMyGroupsCallback *callback); -extern void (*transferGroup)(const std::string &groupId, const std::string &newOwner, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*transferGroup)(const std::string &groupId, const std::string &newOwner, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); extern void (*getUserInfo)(const std::list> &userReqList, GetUserInfoCallback *callback); diff --git a/MQTTDemo/MQTTDemo/ConversationTableViewCell.m b/MQTTDemo/MQTTDemo/ConversationTableViewCell.m index cbd638f6..fcfb7c8d 100644 --- a/MQTTDemo/MQTTDemo/ConversationTableViewCell.m +++ b/MQTTDemo/MQTTDemo/ConversationTableViewCell.m @@ -46,7 +46,7 @@ - (void)setInfo:(ConversationInfo *)info { self.targetView.text = [NSString stringWithFormat:@"user<%@>", info.conversation.target]; } } else if (info.conversation.type == Group_Type) { - GroupInfo *groupInfo = [[IMService sharedIMService] getGroupInfo:info.conversation.target line:info.conversation.line refresh:NO]; + GroupInfo *groupInfo = [[IMService sharedIMService] getGroupInfo:info.conversation.target refresh:NO]; if(groupInfo.name.length > 0) { self.targetView.text = groupInfo.name; } else { diff --git a/MQTTDemo/MQTTDemo/CreateGroupViewController.m b/MQTTDemo/MQTTDemo/CreateGroupViewController.m index 89d28f2d..77eef0ff 100644 --- a/MQTTDemo/MQTTDemo/CreateGroupViewController.m +++ b/MQTTDemo/MQTTDemo/CreateGroupViewController.m @@ -59,7 +59,7 @@ - (IBAction)onDone:(id)sender { notifyContent.creator = [NetworkService sharedInstance].userId; notifyContent.groupName = self.nameField.text; - [[IMService sharedIMService] createGroup:nil line:0 name:self.nameField.text portrait:nil members:membes notifyContent:notifyContent success:^(NSString *groupId) { + [[IMService sharedIMService] createGroup:nil name:self.nameField.text portrait:nil members:membes notifyLines:@[@(0)] notifyContent:notifyContent success:^(NSString *groupId) { NSLog(@"create group success"); } error:^(int error_code) { NSLog(@"create group failure"); diff --git a/MQTTDemo/MQTTDemo/GroupTableViewController.m b/MQTTDemo/MQTTDemo/GroupTableViewController.m index be3d7071..dc36a944 100644 --- a/MQTTDemo/MQTTDemo/GroupTableViewController.m +++ b/MQTTDemo/MQTTDemo/GroupTableViewController.m @@ -112,7 +112,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd AddGroupeMemberNotificationContent *content = [[AddGroupeMemberNotificationContent alloc] init]; content.invitor = [NetworkService sharedInstance].userId; content.invitees = memberIds; - [[IMService sharedIMService] addMembers:memberIds toGroup:groupId notifyContent:content success:^{ + [[IMService sharedIMService] addMembers:memberIds toGroup:groupId notifyLines:@[@(0)] notifyContent:content success:^{ [ws refreshList]; } error:^(int error_code) { @@ -132,7 +132,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd KickoffGroupMemberNotificaionContent *content = [[KickoffGroupMemberNotificaionContent alloc] init]; content.operateUser = [NetworkService sharedInstance].userId; content.kickedMembers = memberIds; - [[IMService sharedIMService] kickoffMembers:memberIds fromGroup:groupId notifyContent:content success:^{ + [[IMService sharedIMService] kickoffMembers:memberIds fromGroup:groupId notifyLines:@[@(0)] notifyContent:content success:^{ [ws refreshList]; } error:^(int error_code) { @@ -155,7 +155,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd TransferGroupOwnerNotificationContent *content = [[TransferGroupOwnerNotificationContent alloc] init]; content.operateUser = [NetworkService sharedInstance].userId; content.owner = memberIds[0]; - [[IMService sharedIMService] transferGroup:groupId to:memberIds[0] notifyContent:content success:^{ + [[IMService sharedIMService] transferGroup:groupId to:memberIds[0] notifyLines:@[@(0)] notifyContent:content success:^{ [ws refreshList]; } error:^(int error_code) { @@ -172,7 +172,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd QuitGroupNotificationContent *content = [[QuitGroupNotificationContent alloc] init]; content.quitMember = [NetworkService sharedInstance].userId; //Todo: add animination here - [[IMService sharedIMService] quitGroup:groupId notifyContent:content success:^{ + [[IMService sharedIMService] quitGroup:groupId notifyLines:@[@(0)] notifyContent:content success:^{ dispatch_async(dispatch_get_main_queue(), ^{ [ws refreshList]; }); @@ -187,7 +187,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd content.operateUser = [NetworkService sharedInstance].userId; //Todo: add animination here - [[IMService sharedIMService] dismissGroup:groupId notifyContent:content success:^{ + [[IMService sharedIMService] dismissGroup:groupId notifyLines:@[@(0)] notifyContent:content success:^{ dispatch_async(dispatch_get_main_queue(), ^{ [ws refreshList]; }); diff --git a/mars/stn/mqtt/DB.cpp b/mars/stn/mqtt/DB.cpp index 1391d75c..2077dcf6 100644 --- a/mars/stn/mqtt/DB.cpp +++ b/mars/stn/mqtt/DB.cpp @@ -287,7 +287,6 @@ namespace mars { std::list groupDefList = { WCDB::ColumnDef(Column("_id"), ColumnType::Integer32).makePrimary(OrderTerm::NotSet, true), WCDB::ColumnDef(Column("_uid"), ColumnType::Text).makeNotNull(), - WCDB::ColumnDef(Column("_line"), ColumnType::Integer32), WCDB::ColumnDef(Column("_name"), ColumnType::Text), WCDB::ColumnDef(Column("_portrait"), ColumnType::Text), WCDB::ColumnDef(Column("_owner"), ColumnType::Text), @@ -303,7 +302,6 @@ namespace mars { std::list groupMemberDefList = { WCDB::ColumnDef(Column("_id"), ColumnType::Integer32).makePrimary(OrderTerm::NotSet, true), WCDB::ColumnDef(Column("_gid"), ColumnType::Text).makeNotNull(), - WCDB::ColumnDef(Column("_line"), ColumnType::Integer32), WCDB::ColumnDef(Column("_mid"), ColumnType::Text).makeNotNull(), WCDB::ColumnDef(Column("_type"), ColumnType::Text), WCDB::ColumnDef(Column("_update_dt"), ColumnType::Integer64).makeDefault(0) diff --git a/mars/stn/mqtt/MessageDB.cpp b/mars/stn/mqtt/MessageDB.cpp index aa99654e..1f8d778a 100644 --- a/mars/stn/mqtt/MessageDB.cpp +++ b/mars/stn/mqtt/MessageDB.cpp @@ -632,7 +632,7 @@ namespace mars { virtual ~TGetGroupInfoCallback() {} }; - TGroupInfo MessageDB::GetGroupInfo(const std::string &groupId, int line, bool refresh) { + TGroupInfo MessageDB::GetGroupInfo(const std::string &groupId, bool refresh) { DB *db = DB::Instance(); WCDB::Error error; TGroupInfo gi; @@ -641,11 +641,10 @@ namespace mars { } - WCDB::Expr where = (WCDB::Expr(WCDB::Column("_uid")) == groupId) && (WCDB::Expr(WCDB::Column("_line")) == line); + WCDB::Expr where = (WCDB::Expr(WCDB::Column("_uid")) == groupId); WCDB::RecyclableStatement statementHandle = db->GetSelectStatement("group", {"_name", "_portrait", "_owner", "_type", "_extra", "_update_dt"}, error, &where); gi.target = groupId; - gi.line = line; if (statementHandle->step()) { gi.name = db->getStringValue(statementHandle, 0); @@ -673,16 +672,15 @@ namespace mars { } - WCDB::RecyclableStatement statementHandle = db->GetInsertStatement("group", {"_uid", "_line", "_name", "_portrait", "_owner", "_type", "_extra", "_update_dt"}, true); + WCDB::RecyclableStatement statementHandle = db->GetInsertStatement("group", {"_uid", "_name", "_portrait", "_owner", "_type", "_extra", "_update_dt"}, true); db->Bind(statementHandle, groupInfo.target, 1); - db->Bind(statementHandle, groupInfo.line, 2); - db->Bind(statementHandle, groupInfo.name, 3); - db->Bind(statementHandle, groupInfo.portrait, 4); - - db->Bind(statementHandle, groupInfo.owner, 5); - db->Bind(statementHandle, groupInfo.type, 6); - db->Bind(statementHandle, groupInfo.extra, 7); - db->Bind(statementHandle, groupInfo.updateDt, 8); + db->Bind(statementHandle, groupInfo.name, 2); + db->Bind(statementHandle, groupInfo.portrait, 3); + + db->Bind(statementHandle, groupInfo.owner, 4); + db->Bind(statementHandle, groupInfo.type, 5); + db->Bind(statementHandle, groupInfo.extra, 6); + db->Bind(statementHandle, groupInfo.updateDt, 7); long ret = 0; db->ExecuteInsert(statementHandle, &ret); return ret; diff --git a/mars/stn/mqtt/MessageDB.hpp b/mars/stn/mqtt/MessageDB.hpp index 75b09e5c..fa6f6ef0 100644 --- a/mars/stn/mqtt/MessageDB.hpp +++ b/mars/stn/mqtt/MessageDB.hpp @@ -59,7 +59,7 @@ namespace mars { bool FailSendingMessages(); - TGroupInfo GetGroupInfo(const std::string &groupId, int line, bool refresh); + TGroupInfo GetGroupInfo(const std::string &groupId, bool refresh); long InsertGroupInfo(const TGroupInfo &groupInfo); TUserInfo getUserInfo(const std::string &userId, bool refresh); diff --git a/mars/stn/mqtt/Proto/add_group_member_request.pb.cc b/mars/stn/mqtt/Proto/add_group_member_request.pb.cc index a389447c..112a03b3 100644 --- a/mars/stn/mqtt/Proto/add_group_member_request.pb.cc +++ b/mars/stn/mqtt/Proto/add_group_member_request.pb.cc @@ -52,8 +52,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddGroupMemberRequest, group_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddGroupMemberRequest, line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddGroupMemberRequest, added_member_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddGroupMemberRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddGroupMemberRequest, notify_content_), }; @@ -112,16 +112,16 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n\036add_group_member_request.proto\022\010mars.s" - "tn\032\025message_content.proto\032\013group.proto\"\226" + "tn\032\025message_content.proto\032\013group.proto\"\231" "\001\n\025AddGroupMemberRequest\022\020\n\010group_id\030\001 \001" - "(\t\022\014\n\004line\030\002 \001(\005\022+\n\014added_member\030\003 \003(\0132\025" - ".mars.stn.GroupMember\0220\n\016notify_content\030" - "\004 \001(\0132\030.mars.stn.MessageContentB7\n\024win.l" - "iyufan.im.protoB\037AddGroupMemberRequestOu" - "terClassb\006proto3" + "(\t\022+\n\014added_member\030\002 \003(\0132\025.mars.stn.Grou" + "pMember\022\017\n\007to_line\030\003 \003(\005\0220\n\016notify_conte" + "nt\030\004 \001(\0132\030.mars.stn.MessageContentB7\n\024wi" + "n.liyufan.im.protoB\037AddGroupMemberReques" + "tOuterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 296); + descriptor, 299); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "add_group_member_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_message_5fcontent_2eproto::AddDescriptors(); @@ -147,8 +147,8 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int AddGroupMemberRequest::kGroupIdFieldNumber; -const int AddGroupMemberRequest::kLineFieldNumber; const int AddGroupMemberRequest::kAddedMemberFieldNumber; +const int AddGroupMemberRequest::kToLineFieldNumber; const int AddGroupMemberRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -164,6 +164,7 @@ AddGroupMemberRequest::AddGroupMemberRequest(const AddGroupMemberRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), added_member_(from.added_member_), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -175,14 +176,12 @@ AddGroupMemberRequest::AddGroupMemberRequest(const AddGroupMemberRequest& from) } else { notify_content_ = NULL; } - line_ = from.line_; // @@protoc_insertion_point(copy_constructor:mars.stn.AddGroupMemberRequest) } void AddGroupMemberRequest::SharedCtor() { group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(¬ify_content_, 0, reinterpret_cast(&line_) - - reinterpret_cast(¬ify_content_) + sizeof(line_)); + notify_content_ = NULL; _cached_size_ = 0; } @@ -224,12 +223,12 @@ AddGroupMemberRequest* AddGroupMemberRequest::New(::google::protobuf::Arena* are void AddGroupMemberRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.AddGroupMemberRequest) added_member_.Clear(); + to_line_.Clear(); group_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && notify_content_ != NULL) { delete notify_content_; } notify_content_ = NULL; - line_ = 0; } bool AddGroupMemberRequest::MergePartialFromCodedStream( @@ -258,26 +257,30 @@ bool AddGroupMemberRequest::MergePartialFromCodedStream( break; } - // int32 line = 2; + // repeated .mars.stn.GroupMember added_member = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); + static_cast< ::google::protobuf::uint8>(18u)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_added_member())); } else { goto handle_unusual; } break; } - // repeated .mars.stn.GroupMember added_member = 3; + // repeated int32 to_line = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_added_member())); + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 26u, input, this->mutable_to_line()))); } else { goto handle_unusual; } @@ -333,15 +336,20 @@ void AddGroupMemberRequest::SerializeWithCachedSizes( 1, this->group_id(), output); } - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); - } - - // repeated .mars.stn.GroupMember added_member = 3; + // repeated .mars.stn.GroupMember added_member = 2; for (unsigned int i = 0, n = this->added_member_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->added_member(i), output); + 2, this->added_member(i), output); + } + + // repeated int32 to_line = 3; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); } // .mars.stn.MessageContent notify_content = 4; @@ -370,16 +378,23 @@ ::google::protobuf::uint8* AddGroupMemberRequest::InternalSerializeWithCachedSiz 1, this->group_id(), target); } - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); - } - - // repeated .mars.stn.GroupMember added_member = 3; + // repeated .mars.stn.GroupMember added_member = 2; for (unsigned int i = 0, n = this->added_member_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 3, this->added_member(i), deterministic, target); + 2, this->added_member(i), deterministic, target); + } + + // repeated int32 to_line = 3; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 3, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); } // .mars.stn.MessageContent notify_content = 4; @@ -397,7 +412,7 @@ size_t AddGroupMemberRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.AddGroupMemberRequest) size_t total_size = 0; - // repeated .mars.stn.GroupMember added_member = 3; + // repeated .mars.stn.GroupMember added_member = 2; { unsigned int count = this->added_member_size(); total_size += 1UL * count; @@ -408,6 +423,21 @@ size_t AddGroupMemberRequest::ByteSizeLong() const { } } + // repeated int32 to_line = 3; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // string group_id = 1; if (this->group_id().size() > 0) { total_size += 1 + @@ -422,13 +452,6 @@ size_t AddGroupMemberRequest::ByteSizeLong() const { *this->notify_content_); } - // int32 line = 2; - if (this->line() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); - } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -459,6 +482,7 @@ void AddGroupMemberRequest::MergeFrom(const AddGroupMemberRequest& from) { (void) cached_has_bits; added_member_.MergeFrom(from.added_member_); + to_line_.MergeFrom(from.to_line_); if (from.group_id().size() > 0) { group_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_id_); @@ -466,9 +490,6 @@ void AddGroupMemberRequest::MergeFrom(const AddGroupMemberRequest& from) { if (from.has_notify_content()) { mutable_notify_content()->::mars::stn::MessageContent::MergeFrom(from.notify_content()); } - if (from.line() != 0) { - set_line(from.line()); - } } void AddGroupMemberRequest::CopyFrom(const ::google::protobuf::Message& from) { @@ -495,9 +516,9 @@ void AddGroupMemberRequest::Swap(AddGroupMemberRequest* other) { } void AddGroupMemberRequest::InternalSwap(AddGroupMemberRequest* other) { added_member_.InternalSwap(&other->added_member_); + to_line_.InternalSwap(&other->to_line_); group_id_.Swap(&other->group_id_); std::swap(notify_content_, other->notify_content_); - std::swap(line_, other->line_); std::swap(_cached_size_, other->_cached_size_); } @@ -562,21 +583,7 @@ void AddGroupMemberRequest::set_allocated_group_id(::std::string* group_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.AddGroupMemberRequest.group_id) } -// int32 line = 2; -void AddGroupMemberRequest::clear_line() { - line_ = 0; -} -::google::protobuf::int32 AddGroupMemberRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.AddGroupMemberRequest.line) - return line_; -} -void AddGroupMemberRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.AddGroupMemberRequest.line) -} - -// repeated .mars.stn.GroupMember added_member = 3; +// repeated .mars.stn.GroupMember added_member = 2; int AddGroupMemberRequest::added_member_size() const { return added_member_.size(); } @@ -606,6 +613,36 @@ AddGroupMemberRequest::added_member() const { return added_member_; } +// repeated int32 to_line = 3; +int AddGroupMemberRequest::to_line_size() const { + return to_line_.size(); +} +void AddGroupMemberRequest::clear_to_line() { + to_line_.Clear(); +} +::google::protobuf::int32 AddGroupMemberRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.AddGroupMemberRequest.to_line) + return to_line_.Get(index); +} +void AddGroupMemberRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.AddGroupMemberRequest.to_line) +} +void AddGroupMemberRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.AddGroupMemberRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +AddGroupMemberRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.AddGroupMemberRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +AddGroupMemberRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.AddGroupMemberRequest.to_line) + return &to_line_; +} + // .mars.stn.MessageContent notify_content = 4; bool AddGroupMemberRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; diff --git a/mars/stn/mqtt/Proto/add_group_member_request.pb.h b/mars/stn/mqtt/Proto/add_group_member_request.pb.h index 9cbfa1ba..d4a379be 100644 --- a/mars/stn/mqtt/Proto/add_group_member_request.pb.h +++ b/mars/stn/mqtt/Proto/add_group_member_request.pb.h @@ -46,12 +46,6 @@ extern GroupInfoDefaultTypeInternal _GroupInfo_default_instance_; class GroupMember; class GroupMemberDefaultTypeInternal; extern GroupMemberDefaultTypeInternal _GroupMember_default_instance_; -class GroupTarget; -class GroupTargetDefaultTypeInternal; -extern GroupTargetDefaultTypeInternal _GroupTarget_default_instance_; -class GroupTargetListBuf; -class GroupTargetListBufDefaultTypeInternal; -extern GroupTargetListBufDefaultTypeInternal _GroupTargetListBuf_default_instance_; class MessageContent; class MessageContentDefaultTypeInternal; extern MessageContentDefaultTypeInternal _MessageContent_default_instance_; @@ -141,10 +135,10 @@ class AddGroupMemberRequest : public ::google::protobuf::Message /* @@protoc_ins // accessors ------------------------------------------------------- - // repeated .mars.stn.GroupMember added_member = 3; + // repeated .mars.stn.GroupMember added_member = 2; int added_member_size() const; void clear_added_member(); - static const int kAddedMemberFieldNumber = 3; + static const int kAddedMemberFieldNumber = 2; const ::mars::stn::GroupMember& added_member(int index) const; ::mars::stn::GroupMember* mutable_added_member(int index); ::mars::stn::GroupMember* add_added_member(); @@ -153,6 +147,18 @@ class AddGroupMemberRequest : public ::google::protobuf::Message /* @@protoc_ins const ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupMember >& added_member() const; + // repeated int32 to_line = 3; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 3; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // string group_id = 1; void clear_group_id(); static const int kGroupIdFieldNumber = 1; @@ -176,20 +182,15 @@ class AddGroupMemberRequest : public ::google::protobuf::Message /* @@protoc_ins ::mars::stn::MessageContent* release_notify_content(); void set_allocated_notify_content(::mars::stn::MessageContent* notify_content); - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:mars.stn.AddGroupMemberRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupMember > added_member_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::google::protobuf::internal::ArenaStringPtr group_id_; ::mars::stn::MessageContent* notify_content_; - ::google::protobuf::int32 line_; mutable int _cached_size_; friend struct protobuf_add_5fgroup_5fmember_5frequest_2eproto::TableStruct; }; @@ -254,21 +255,7 @@ inline void AddGroupMemberRequest::set_allocated_group_id(::std::string* group_i // @@protoc_insertion_point(field_set_allocated:mars.stn.AddGroupMemberRequest.group_id) } -// int32 line = 2; -inline void AddGroupMemberRequest::clear_line() { - line_ = 0; -} -inline ::google::protobuf::int32 AddGroupMemberRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.AddGroupMemberRequest.line) - return line_; -} -inline void AddGroupMemberRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.AddGroupMemberRequest.line) -} - -// repeated .mars.stn.GroupMember added_member = 3; +// repeated .mars.stn.GroupMember added_member = 2; inline int AddGroupMemberRequest::added_member_size() const { return added_member_.size(); } @@ -298,6 +285,36 @@ AddGroupMemberRequest::added_member() const { return added_member_; } +// repeated int32 to_line = 3; +inline int AddGroupMemberRequest::to_line_size() const { + return to_line_.size(); +} +inline void AddGroupMemberRequest::clear_to_line() { + to_line_.Clear(); +} +inline ::google::protobuf::int32 AddGroupMemberRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.AddGroupMemberRequest.to_line) + return to_line_.Get(index); +} +inline void AddGroupMemberRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.AddGroupMemberRequest.to_line) +} +inline void AddGroupMemberRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.AddGroupMemberRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +AddGroupMemberRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.AddGroupMemberRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +AddGroupMemberRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.AddGroupMemberRequest.to_line) + return &to_line_; +} + // .mars.stn.MessageContent notify_content = 4; inline bool AddGroupMemberRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; diff --git a/mars/stn/mqtt/Proto/add_group_member_request.proto b/mars/stn/mqtt/Proto/add_group_member_request.proto index 55abb46e..bd2edd8c 100644 --- a/mars/stn/mqtt/Proto/add_group_member_request.proto +++ b/mars/stn/mqtt/Proto/add_group_member_request.proto @@ -12,7 +12,7 @@ import "group.proto"; message AddGroupMemberRequest { string group_id = 1; - int32 line = 2; - repeated GroupMember added_member = 3; + repeated GroupMember added_member = 2; + repeated int32 to_line = 3; MessageContent notify_content = 4; } diff --git a/mars/stn/mqtt/Proto/create_group_request.pb.cc b/mars/stn/mqtt/Proto/create_group_request.pb.cc index e8b7e986..3a55003e 100644 --- a/mars/stn/mqtt/Proto/create_group_request.pb.cc +++ b/mars/stn/mqtt/Proto/create_group_request.pb.cc @@ -52,6 +52,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CreateGroupRequest, group_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CreateGroupRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CreateGroupRequest, notify_content_), }; @@ -112,14 +113,15 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n\032create_group_request.proto\022\010mars.stn\032\013" - "group.proto\032\025message_content.proto\"f\n\022Cr" + "group.proto\032\025message_content.proto\"w\n\022Cr" "eateGroupRequest\022\036\n\005group\030\001 \001(\0132\017.mars.s" - "tn.Group\0220\n\016notify_content\030\002 \001(\0132\030.mars." - "stn.MessageContentB4\n\024win.liyufan.im.pro" - "toB\034CreateGroupRequestOuterClassb\006proto3" + "tn.Group\022\017\n\007to_line\030\002 \003(\005\0220\n\016notify_cont" + "ent\030\003 \001(\0132\030.mars.stn.MessageContentB4\n\024w" + "in.liyufan.im.protoB\034CreateGroupRequestO" + "uterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 240); + descriptor, 257); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "create_group_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_group_2eproto::AddDescriptors(); @@ -145,6 +147,7 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CreateGroupRequest::kGroupFieldNumber; +const int CreateGroupRequest::kToLineFieldNumber; const int CreateGroupRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -159,6 +162,7 @@ CreateGroupRequest::CreateGroupRequest() CreateGroupRequest::CreateGroupRequest(const CreateGroupRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_group()) { @@ -219,6 +223,7 @@ CreateGroupRequest* CreateGroupRequest::New(::google::protobuf::Arena* arena) co void CreateGroupRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.CreateGroupRequest) + to_line_.Clear(); if (GetArenaNoVirtual() == NULL && group_ != NULL) { delete group_; } @@ -251,10 +256,28 @@ bool CreateGroupRequest::MergePartialFromCodedStream( break; } - // .mars.stn.MessageContent notify_content = 2; + // repeated int32 to_line = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 18u, input, this->mutable_to_line()))); + } else { + goto handle_unusual; + } + break; + } + + // .mars.stn.MessageContent notify_content = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_notify_content())); } else { @@ -296,10 +319,20 @@ void CreateGroupRequest::SerializeWithCachedSizes( 1, *this->group_, output); } - // .mars.stn.MessageContent notify_content = 2; + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); + } + + // .mars.stn.MessageContent notify_content = 3; if (this->has_notify_content()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, *this->notify_content_, output); + 3, *this->notify_content_, output); } // @@protoc_insertion_point(serialize_end:mars.stn.CreateGroupRequest) @@ -318,11 +351,23 @@ ::google::protobuf::uint8* CreateGroupRequest::InternalSerializeWithCachedSizesT 1, *this->group_, deterministic, target); } - // .mars.stn.MessageContent notify_content = 2; + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); + } + + // .mars.stn.MessageContent notify_content = 3; if (this->has_notify_content()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, *this->notify_content_, deterministic, target); + 3, *this->notify_content_, deterministic, target); } // @@protoc_insertion_point(serialize_to_array_end:mars.stn.CreateGroupRequest) @@ -333,6 +378,21 @@ size_t CreateGroupRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.CreateGroupRequest) size_t total_size = 0; + // repeated int32 to_line = 2; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // .mars.stn.Group group = 1; if (this->has_group()) { total_size += 1 + @@ -340,7 +400,7 @@ size_t CreateGroupRequest::ByteSizeLong() const { *this->group_); } - // .mars.stn.MessageContent notify_content = 2; + // .mars.stn.MessageContent notify_content = 3; if (this->has_notify_content()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( @@ -376,6 +436,7 @@ void CreateGroupRequest::MergeFrom(const CreateGroupRequest& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + to_line_.MergeFrom(from.to_line_); if (from.has_group()) { mutable_group()->::mars::stn::Group::MergeFrom(from.group()); } @@ -407,6 +468,7 @@ void CreateGroupRequest::Swap(CreateGroupRequest* other) { InternalSwap(other); } void CreateGroupRequest::InternalSwap(CreateGroupRequest* other) { + to_line_.InternalSwap(&other->to_line_); std::swap(group_, other->group_); std::swap(notify_content_, other->notify_content_); std::swap(_cached_size_, other->_cached_size_); @@ -459,7 +521,37 @@ void CreateGroupRequest::set_allocated_group(::mars::stn::Group* group) { // @@protoc_insertion_point(field_set_allocated:mars.stn.CreateGroupRequest.group) } -// .mars.stn.MessageContent notify_content = 2; +// repeated int32 to_line = 2; +int CreateGroupRequest::to_line_size() const { + return to_line_.size(); +} +void CreateGroupRequest::clear_to_line() { + to_line_.Clear(); +} +::google::protobuf::int32 CreateGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.CreateGroupRequest.to_line) + return to_line_.Get(index); +} +void CreateGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.CreateGroupRequest.to_line) +} +void CreateGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.CreateGroupRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +CreateGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.CreateGroupRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +CreateGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.CreateGroupRequest.to_line) + return &to_line_; +} + +// .mars.stn.MessageContent notify_content = 3; bool CreateGroupRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; } diff --git a/mars/stn/mqtt/Proto/create_group_request.pb.h b/mars/stn/mqtt/Proto/create_group_request.pb.h index ffeba931..ab7db84f 100644 --- a/mars/stn/mqtt/Proto/create_group_request.pb.h +++ b/mars/stn/mqtt/Proto/create_group_request.pb.h @@ -46,12 +46,6 @@ extern GroupInfoDefaultTypeInternal _GroupInfo_default_instance_; class GroupMember; class GroupMemberDefaultTypeInternal; extern GroupMemberDefaultTypeInternal _GroupMember_default_instance_; -class GroupTarget; -class GroupTargetDefaultTypeInternal; -extern GroupTargetDefaultTypeInternal _GroupTarget_default_instance_; -class GroupTargetListBuf; -class GroupTargetListBufDefaultTypeInternal; -extern GroupTargetListBufDefaultTypeInternal _GroupTargetListBuf_default_instance_; class MessageContent; class MessageContentDefaultTypeInternal; extern MessageContentDefaultTypeInternal _MessageContent_default_instance_; @@ -141,6 +135,18 @@ class CreateGroupRequest : public ::google::protobuf::Message /* @@protoc_insert // accessors ------------------------------------------------------- + // repeated int32 to_line = 2; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 2; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // .mars.stn.Group group = 1; bool has_group() const; void clear_group(); @@ -150,10 +156,10 @@ class CreateGroupRequest : public ::google::protobuf::Message /* @@protoc_insert ::mars::stn::Group* release_group(); void set_allocated_group(::mars::stn::Group* group); - // .mars.stn.MessageContent notify_content = 2; + // .mars.stn.MessageContent notify_content = 3; bool has_notify_content() const; void clear_notify_content(); - static const int kNotifyContentFieldNumber = 2; + static const int kNotifyContentFieldNumber = 3; const ::mars::stn::MessageContent& notify_content() const; ::mars::stn::MessageContent* mutable_notify_content(); ::mars::stn::MessageContent* release_notify_content(); @@ -163,6 +169,8 @@ class CreateGroupRequest : public ::google::protobuf::Message /* @@protoc_insert private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::mars::stn::Group* group_; ::mars::stn::MessageContent* notify_content_; mutable int _cached_size_; @@ -215,7 +223,37 @@ inline void CreateGroupRequest::set_allocated_group(::mars::stn::Group* group) { // @@protoc_insertion_point(field_set_allocated:mars.stn.CreateGroupRequest.group) } -// .mars.stn.MessageContent notify_content = 2; +// repeated int32 to_line = 2; +inline int CreateGroupRequest::to_line_size() const { + return to_line_.size(); +} +inline void CreateGroupRequest::clear_to_line() { + to_line_.Clear(); +} +inline ::google::protobuf::int32 CreateGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.CreateGroupRequest.to_line) + return to_line_.Get(index); +} +inline void CreateGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.CreateGroupRequest.to_line) +} +inline void CreateGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.CreateGroupRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +CreateGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.CreateGroupRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +CreateGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.CreateGroupRequest.to_line) + return &to_line_; +} + +// .mars.stn.MessageContent notify_content = 3; inline bool CreateGroupRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; } diff --git a/mars/stn/mqtt/Proto/create_group_request.proto b/mars/stn/mqtt/Proto/create_group_request.proto index 12d71678..a16931b1 100644 --- a/mars/stn/mqtt/Proto/create_group_request.proto +++ b/mars/stn/mqtt/Proto/create_group_request.proto @@ -12,5 +12,6 @@ import "message_content.proto"; message CreateGroupRequest { Group group = 1; - MessageContent notify_content = 2; + repeated int32 to_line = 2; + MessageContent notify_content = 3; } diff --git a/mars/stn/mqtt/Proto/dismiss_group_request.pb.cc b/mars/stn/mqtt/Proto/dismiss_group_request.pb.cc index 32105fbe..a4c757ce 100644 --- a/mars/stn/mqtt/Proto/dismiss_group_request.pb.cc +++ b/mars/stn/mqtt/Proto/dismiss_group_request.pb.cc @@ -52,7 +52,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DismissGroupRequest, group_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DismissGroupRequest, line_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DismissGroupRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DismissGroupRequest, notify_content_), }; @@ -110,14 +110,14 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n\033dismiss_group_request.proto\022\010mars.stn\032" - "\025message_content.proto\"g\n\023DismissGroupRe" - "quest\022\020\n\010group_id\030\001 \001(\t\022\014\n\004line\030\002 \001(\005\0220\n" - "\016notify_content\030\003 \001(\0132\030.mars.stn.Message" - "ContentB5\n\024win.liyufan.im.protoB\035Dismiss" - "GroupRequestOuterClassb\006proto3" + "\025message_content.proto\"j\n\023DismissGroupRe" + "quest\022\020\n\010group_id\030\001 \001(\t\022\017\n\007to_line\030\002 \003(\005" + "\0220\n\016notify_content\030\003 \001(\0132\030.mars.stn.Mess" + "ageContentB5\n\024win.liyufan.im.protoB\035Dism" + "issGroupRequestOuterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 230); + descriptor, 233); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "dismiss_group_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_message_5fcontent_2eproto::AddDescriptors(); @@ -142,7 +142,7 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int DismissGroupRequest::kGroupIdFieldNumber; -const int DismissGroupRequest::kLineFieldNumber; +const int DismissGroupRequest::kToLineFieldNumber; const int DismissGroupRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -157,6 +157,7 @@ DismissGroupRequest::DismissGroupRequest() DismissGroupRequest::DismissGroupRequest(const DismissGroupRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -168,14 +169,12 @@ DismissGroupRequest::DismissGroupRequest(const DismissGroupRequest& from) } else { notify_content_ = NULL; } - line_ = from.line_; // @@protoc_insertion_point(copy_constructor:mars.stn.DismissGroupRequest) } void DismissGroupRequest::SharedCtor() { group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(¬ify_content_, 0, reinterpret_cast(&line_) - - reinterpret_cast(¬ify_content_) + sizeof(line_)); + notify_content_ = NULL; _cached_size_ = 0; } @@ -216,12 +215,12 @@ DismissGroupRequest* DismissGroupRequest::New(::google::protobuf::Arena* arena) void DismissGroupRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.DismissGroupRequest) + to_line_.Clear(); group_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && notify_content_ != NULL) { delete notify_content_; } notify_content_ = NULL; - line_ = 0; } bool DismissGroupRequest::MergePartialFromCodedStream( @@ -250,14 +249,18 @@ bool DismissGroupRequest::MergePartialFromCodedStream( break; } - // int32 line = 2; + // repeated int32 to_line = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + static_cast< ::google::protobuf::uint8>(18u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); + 1, 18u, input, this->mutable_to_line()))); } else { goto handle_unusual; } @@ -313,9 +316,14 @@ void DismissGroupRequest::SerializeWithCachedSizes( 1, this->group_id(), output); } - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); } // .mars.stn.MessageContent notify_content = 3; @@ -344,9 +352,16 @@ ::google::protobuf::uint8* DismissGroupRequest::InternalSerializeWithCachedSizes 1, this->group_id(), target); } - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); } // .mars.stn.MessageContent notify_content = 3; @@ -364,6 +379,21 @@ size_t DismissGroupRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.DismissGroupRequest) size_t total_size = 0; + // repeated int32 to_line = 2; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // string group_id = 1; if (this->group_id().size() > 0) { total_size += 1 + @@ -378,13 +408,6 @@ size_t DismissGroupRequest::ByteSizeLong() const { *this->notify_content_); } - // int32 line = 2; - if (this->line() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); - } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -414,6 +437,7 @@ void DismissGroupRequest::MergeFrom(const DismissGroupRequest& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + to_line_.MergeFrom(from.to_line_); if (from.group_id().size() > 0) { group_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_id_); @@ -421,9 +445,6 @@ void DismissGroupRequest::MergeFrom(const DismissGroupRequest& from) { if (from.has_notify_content()) { mutable_notify_content()->::mars::stn::MessageContent::MergeFrom(from.notify_content()); } - if (from.line() != 0) { - set_line(from.line()); - } } void DismissGroupRequest::CopyFrom(const ::google::protobuf::Message& from) { @@ -449,9 +470,9 @@ void DismissGroupRequest::Swap(DismissGroupRequest* other) { InternalSwap(other); } void DismissGroupRequest::InternalSwap(DismissGroupRequest* other) { + to_line_.InternalSwap(&other->to_line_); group_id_.Swap(&other->group_id_); std::swap(notify_content_, other->notify_content_); - std::swap(line_, other->line_); std::swap(_cached_size_, other->_cached_size_); } @@ -516,18 +537,34 @@ void DismissGroupRequest::set_allocated_group_id(::std::string* group_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.DismissGroupRequest.group_id) } -// int32 line = 2; -void DismissGroupRequest::clear_line() { - line_ = 0; +// repeated int32 to_line = 2; +int DismissGroupRequest::to_line_size() const { + return to_line_.size(); } -::google::protobuf::int32 DismissGroupRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.DismissGroupRequest.line) - return line_; +void DismissGroupRequest::clear_to_line() { + to_line_.Clear(); } -void DismissGroupRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.DismissGroupRequest.line) +::google::protobuf::int32 DismissGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.DismissGroupRequest.to_line) + return to_line_.Get(index); +} +void DismissGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.DismissGroupRequest.to_line) +} +void DismissGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.DismissGroupRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +DismissGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.DismissGroupRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +DismissGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.DismissGroupRequest.to_line) + return &to_line_; } // .mars.stn.MessageContent notify_content = 3; diff --git a/mars/stn/mqtt/Proto/dismiss_group_request.pb.h b/mars/stn/mqtt/Proto/dismiss_group_request.pb.h index 2da6931a..c92a1f76 100644 --- a/mars/stn/mqtt/Proto/dismiss_group_request.pb.h +++ b/mars/stn/mqtt/Proto/dismiss_group_request.pb.h @@ -125,6 +125,18 @@ class DismissGroupRequest : public ::google::protobuf::Message /* @@protoc_inser // accessors ------------------------------------------------------- + // repeated int32 to_line = 2; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 2; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // string group_id = 1; void clear_group_id(); static const int kGroupIdFieldNumber = 1; @@ -148,19 +160,14 @@ class DismissGroupRequest : public ::google::protobuf::Message /* @@protoc_inser ::mars::stn::MessageContent* release_notify_content(); void set_allocated_notify_content(::mars::stn::MessageContent* notify_content); - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:mars.stn.DismissGroupRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::google::protobuf::internal::ArenaStringPtr group_id_; ::mars::stn::MessageContent* notify_content_; - ::google::protobuf::int32 line_; mutable int _cached_size_; friend struct protobuf_dismiss_5fgroup_5frequest_2eproto::TableStruct; }; @@ -225,18 +232,34 @@ inline void DismissGroupRequest::set_allocated_group_id(::std::string* group_id) // @@protoc_insertion_point(field_set_allocated:mars.stn.DismissGroupRequest.group_id) } -// int32 line = 2; -inline void DismissGroupRequest::clear_line() { - line_ = 0; +// repeated int32 to_line = 2; +inline int DismissGroupRequest::to_line_size() const { + return to_line_.size(); } -inline ::google::protobuf::int32 DismissGroupRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.DismissGroupRequest.line) - return line_; +inline void DismissGroupRequest::clear_to_line() { + to_line_.Clear(); } -inline void DismissGroupRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.DismissGroupRequest.line) +inline ::google::protobuf::int32 DismissGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.DismissGroupRequest.to_line) + return to_line_.Get(index); +} +inline void DismissGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.DismissGroupRequest.to_line) +} +inline void DismissGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.DismissGroupRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +DismissGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.DismissGroupRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +DismissGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.DismissGroupRequest.to_line) + return &to_line_; } // .mars.stn.MessageContent notify_content = 3; diff --git a/mars/stn/mqtt/Proto/dismiss_group_request.proto b/mars/stn/mqtt/Proto/dismiss_group_request.proto index 05fadda0..5830a398 100644 --- a/mars/stn/mqtt/Proto/dismiss_group_request.proto +++ b/mars/stn/mqtt/Proto/dismiss_group_request.proto @@ -11,6 +11,6 @@ import "message_content.proto"; message DismissGroupRequest { string group_id = 1; - int32 line = 2; + repeated int32 to_line = 2; MessageContent notify_content = 3; } diff --git a/mars/stn/mqtt/Proto/group.pb.cc b/mars/stn/mqtt/Proto/group.pb.cc index 964cc243..46af7a4b 100644 --- a/mars/stn/mqtt/Proto/group.pb.cc +++ b/mars/stn/mqtt/Proto/group.pb.cc @@ -19,10 +19,6 @@ namespace mars { namespace stn { -class GroupTargetDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { -} _GroupTarget_default_instance_; -class GroupTargetListBufDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { -} _GroupTargetListBuf_default_instance_; class GroupInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { } _GroupInfo_default_instance_; class GroupMemberDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { @@ -35,7 +31,7 @@ namespace protobuf_group_2eproto { namespace { -::google::protobuf::Metadata file_level_metadata[5]; +::google::protobuf::Metadata file_level_metadata[3]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace @@ -54,31 +50,15 @@ PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const { NULL, NULL, 0, -1, -1, false }, { NULL, NULL, 0, -1, -1, false }, { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, }; const ::google::protobuf::uint32 TableStruct::offsets[] = { - ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupTarget, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupTarget, target_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupTarget, line_), - ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupTargetListBuf, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupTargetListBuf, target_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupInfo, target_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupInfo, line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupInfo, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupInfo, portrait_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GroupInfo, owner_), @@ -104,16 +84,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { }; static const ::google::protobuf::internal::MigrationSchema schemas[] = { - { 0, -1, sizeof(GroupTarget)}, - { 7, -1, sizeof(GroupTargetListBuf)}, - { 13, -1, sizeof(GroupInfo)}, - { 26, -1, sizeof(GroupMember)}, - { 35, -1, sizeof(Group)}, + { 0, -1, sizeof(GroupInfo)}, + { 12, -1, sizeof(GroupMember)}, + { 21, -1, sizeof(Group)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&_GroupTarget_default_instance_), - reinterpret_cast(&_GroupTargetListBuf_default_instance_), reinterpret_cast(&_GroupInfo_default_instance_), reinterpret_cast(&_GroupMember_default_instance_), reinterpret_cast(&_Group_default_instance_), @@ -137,30 +113,24 @@ void protobuf_AssignDescriptorsOnce() { void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3); } } // namespace void TableStruct::Shutdown() { - _GroupTarget_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; - _GroupTargetListBuf_default_instance_.Shutdown(); - delete file_level_metadata[1].reflection; _GroupInfo_default_instance_.Shutdown(); - delete file_level_metadata[2].reflection; + delete file_level_metadata[0].reflection; _GroupMember_default_instance_.Shutdown(); - delete file_level_metadata[3].reflection; + delete file_level_metadata[1].reflection; _Group_default_instance_.Shutdown(); - delete file_level_metadata[4].reflection; + delete file_level_metadata[2].reflection; } void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _GroupTarget_default_instance_.DefaultConstruct(); - _GroupTargetListBuf_default_instance_.DefaultConstruct(); _GroupInfo_default_instance_.DefaultConstruct(); _GroupMember_default_instance_.DefaultConstruct(); _Group_default_instance_.DefaultConstruct(); @@ -175,24 +145,21 @@ void InitDefaults() { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { - "\n\013group.proto\022\010mars.stn\".\n\013GroupTarget\022\021" - "\n\ttarget_id\030\001 \001(\t\022\014\n\004line\030\002 \001(\005\";\n\022Group" - "TargetListBuf\022%\n\006target\030\001 \003(\0132\025.mars.stn" - ".GroupTarget\"\240\001\n\tGroupInfo\022\021\n\ttarget_id\030" - "\001 \001(\t\022\014\n\004line\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\020\n\010por" - "trait\030\004 \001(\t\022\r\n\005owner\030\005 \001(\t\022!\n\004type\030\006 \001(\016" - "2\023.mars.stn.GroupType\022\r\n\005extra\030\007 \001(\t\022\021\n\t" - "update_dt\030\010 \001(\003\"P\n\013GroupMember\022\021\n\tmember" - "_id\030\001 \001(\t\022\r\n\005alias\030\002 \001(\t\022\014\n\004type\030\003 \001(\005\022\021" - "\n\tupdate_dt\030\004 \001(\003\"X\n\005Group\022\'\n\ngroup_info" - "\030\001 \001(\0132\023.mars.stn.GroupInfo\022&\n\007members\030\002" - " \003(\0132\025.mars.stn.GroupMember*O\n\tGroupType" - "\022\024\n\020GroupType_Normal\020\000\022\022\n\016GroupType_Free" - "\020\001\022\030\n\024GroupType_Restricted\020\002B\'\n\024win.liyu" - "fan.im.protoB\017GroupOuterClassb\006proto3" + "\n\013group.proto\022\010mars.stn\"\222\001\n\tGroupInfo\022\021\n" + "\ttarget_id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\020\n\010portra" + "it\030\003 \001(\t\022\r\n\005owner\030\004 \001(\t\022!\n\004type\030\005 \001(\0162\023." + "mars.stn.GroupType\022\r\n\005extra\030\006 \001(\t\022\021\n\tupd" + "ate_dt\030\007 \001(\003\"P\n\013GroupMember\022\021\n\tmember_id" + "\030\001 \001(\t\022\r\n\005alias\030\002 \001(\t\022\014\n\004type\030\003 \001(\005\022\021\n\tu" + "pdate_dt\030\004 \001(\003\"X\n\005Group\022\'\n\ngroup_info\030\001 " + "\001(\0132\023.mars.stn.GroupInfo\022&\n\007members\030\002 \003(" + "\0132\025.mars.stn.GroupMember*O\n\tGroupType\022\024\n" + "\020GroupType_Normal\020\000\022\022\n\016GroupType_Free\020\001\022" + "\030\n\024GroupType_Restricted\020\002B\'\n\024win.liyufan" + ".im.protoB\017GroupOuterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 597); + descriptor, 474); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "group.proto", &protobuf_RegisterTypes); ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); @@ -227,607 +194,10 @@ bool GroupType_IsValid(int value) { } -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int GroupTarget::kTargetIdFieldNumber; -const int GroupTarget::kLineFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -GroupTarget::GroupTarget() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - protobuf_group_2eproto::InitDefaults(); - } - SharedCtor(); - // @@protoc_insertion_point(constructor:mars.stn.GroupTarget) -} -GroupTarget::GroupTarget(const GroupTarget& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL), - _cached_size_(0) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - target_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.target_id().size() > 0) { - target_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target_id_); - } - line_ = from.line_; - // @@protoc_insertion_point(copy_constructor:mars.stn.GroupTarget) -} - -void GroupTarget::SharedCtor() { - target_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - line_ = 0; - _cached_size_ = 0; -} - -GroupTarget::~GroupTarget() { - // @@protoc_insertion_point(destructor:mars.stn.GroupTarget) - SharedDtor(); -} - -void GroupTarget::SharedDtor() { - target_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -void GroupTarget::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* GroupTarget::descriptor() { - protobuf_group_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_group_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; -} - -const GroupTarget& GroupTarget::default_instance() { - protobuf_group_2eproto::InitDefaults(); - return *internal_default_instance(); -} - -GroupTarget* GroupTarget::New(::google::protobuf::Arena* arena) const { - GroupTarget* n = new GroupTarget; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void GroupTarget::Clear() { -// @@protoc_insertion_point(message_clear_start:mars.stn.GroupTarget) - target_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - line_ = 0; -} - -bool GroupTarget::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:mars.stn.GroupTarget) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string target_id = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_target_id())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->target_id().data(), this->target_id().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "mars.stn.GroupTarget.target_id")); - } else { - goto handle_unusual; - } - break; - } - - // int32 line = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:mars.stn.GroupTarget) - return true; -failure: - // @@protoc_insertion_point(parse_failure:mars.stn.GroupTarget) - return false; -#undef DO_ -} - -void GroupTarget::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:mars.stn.GroupTarget) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string target_id = 1; - if (this->target_id().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->target_id().data(), this->target_id().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "mars.stn.GroupTarget.target_id"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->target_id(), output); - } - - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); - } - - // @@protoc_insertion_point(serialize_end:mars.stn.GroupTarget) -} - -::google::protobuf::uint8* GroupTarget::InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:mars.stn.GroupTarget) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string target_id = 1; - if (this->target_id().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->target_id().data(), this->target_id().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "mars.stn.GroupTarget.target_id"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->target_id(), target); - } - - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:mars.stn.GroupTarget) - return target; -} - -size_t GroupTarget::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:mars.stn.GroupTarget) - size_t total_size = 0; - - // string target_id = 1; - if (this->target_id().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->target_id()); - } - - // int32 line = 2; - if (this->line() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); - } - - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void GroupTarget::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:mars.stn.GroupTarget) - GOOGLE_DCHECK_NE(&from, this); - const GroupTarget* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:mars.stn.GroupTarget) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:mars.stn.GroupTarget) - MergeFrom(*source); - } -} - -void GroupTarget::MergeFrom(const GroupTarget& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:mars.stn.GroupTarget) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.target_id().size() > 0) { - - target_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target_id_); - } - if (from.line() != 0) { - set_line(from.line()); - } -} - -void GroupTarget::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:mars.stn.GroupTarget) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GroupTarget::CopyFrom(const GroupTarget& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:mars.stn.GroupTarget) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GroupTarget::IsInitialized() const { - return true; -} - -void GroupTarget::Swap(GroupTarget* other) { - if (other == this) return; - InternalSwap(other); -} -void GroupTarget::InternalSwap(GroupTarget* other) { - target_id_.Swap(&other->target_id_); - std::swap(line_, other->line_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata GroupTarget::GetMetadata() const { - protobuf_group_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_group_2eproto::file_level_metadata[kIndexInFileMessages]; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// GroupTarget - -// string target_id = 1; -void GroupTarget::clear_target_id() { - target_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& GroupTarget::target_id() const { - // @@protoc_insertion_point(field_get:mars.stn.GroupTarget.target_id) - return target_id_.GetNoArena(); -} -void GroupTarget::set_target_id(const ::std::string& value) { - - target_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:mars.stn.GroupTarget.target_id) -} -#if LANG_CXX11 -void GroupTarget::set_target_id(::std::string&& value) { - - target_id_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:mars.stn.GroupTarget.target_id) -} -#endif -void GroupTarget::set_target_id(const char* value) { - GOOGLE_DCHECK(value != NULL); - - target_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:mars.stn.GroupTarget.target_id) -} -void GroupTarget::set_target_id(const char* value, size_t size) { - - target_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:mars.stn.GroupTarget.target_id) -} -::std::string* GroupTarget::mutable_target_id() { - - // @@protoc_insertion_point(field_mutable:mars.stn.GroupTarget.target_id) - return target_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -::std::string* GroupTarget::release_target_id() { - // @@protoc_insertion_point(field_release:mars.stn.GroupTarget.target_id) - - return target_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void GroupTarget::set_allocated_target_id(::std::string* target_id) { - if (target_id != NULL) { - - } else { - - } - target_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), target_id); - // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupTarget.target_id) -} - -// int32 line = 2; -void GroupTarget::clear_line() { - line_ = 0; -} -::google::protobuf::int32 GroupTarget::line() const { - // @@protoc_insertion_point(field_get:mars.stn.GroupTarget.line) - return line_; -} -void GroupTarget::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.GroupTarget.line) -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int GroupTargetListBuf::kTargetFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -GroupTargetListBuf::GroupTargetListBuf() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - protobuf_group_2eproto::InitDefaults(); - } - SharedCtor(); - // @@protoc_insertion_point(constructor:mars.stn.GroupTargetListBuf) -} -GroupTargetListBuf::GroupTargetListBuf(const GroupTargetListBuf& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL), - target_(from.target_), - _cached_size_(0) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:mars.stn.GroupTargetListBuf) -} - -void GroupTargetListBuf::SharedCtor() { - _cached_size_ = 0; -} - -GroupTargetListBuf::~GroupTargetListBuf() { - // @@protoc_insertion_point(destructor:mars.stn.GroupTargetListBuf) - SharedDtor(); -} - -void GroupTargetListBuf::SharedDtor() { -} - -void GroupTargetListBuf::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* GroupTargetListBuf::descriptor() { - protobuf_group_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_group_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; -} - -const GroupTargetListBuf& GroupTargetListBuf::default_instance() { - protobuf_group_2eproto::InitDefaults(); - return *internal_default_instance(); -} - -GroupTargetListBuf* GroupTargetListBuf::New(::google::protobuf::Arena* arena) const { - GroupTargetListBuf* n = new GroupTargetListBuf; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void GroupTargetListBuf::Clear() { -// @@protoc_insertion_point(message_clear_start:mars.stn.GroupTargetListBuf) - target_.Clear(); -} - -bool GroupTargetListBuf::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:mars.stn.GroupTargetListBuf) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .mars.stn.GroupTarget target = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_target())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:mars.stn.GroupTargetListBuf) - return true; -failure: - // @@protoc_insertion_point(parse_failure:mars.stn.GroupTargetListBuf) - return false; -#undef DO_ -} - -void GroupTargetListBuf::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:mars.stn.GroupTargetListBuf) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .mars.stn.GroupTarget target = 1; - for (unsigned int i = 0, n = this->target_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->target(i), output); - } - - // @@protoc_insertion_point(serialize_end:mars.stn.GroupTargetListBuf) -} - -::google::protobuf::uint8* GroupTargetListBuf::InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:mars.stn.GroupTargetListBuf) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .mars.stn.GroupTarget target = 1; - for (unsigned int i = 0, n = this->target_size(); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageNoVirtualToArray( - 1, this->target(i), deterministic, target); - } - - // @@protoc_insertion_point(serialize_to_array_end:mars.stn.GroupTargetListBuf) - return target; -} - -size_t GroupTargetListBuf::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:mars.stn.GroupTargetListBuf) - size_t total_size = 0; - - // repeated .mars.stn.GroupTarget target = 1; - { - unsigned int count = this->target_size(); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->target(i)); - } - } - - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void GroupTargetListBuf::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:mars.stn.GroupTargetListBuf) - GOOGLE_DCHECK_NE(&from, this); - const GroupTargetListBuf* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:mars.stn.GroupTargetListBuf) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:mars.stn.GroupTargetListBuf) - MergeFrom(*source); - } -} - -void GroupTargetListBuf::MergeFrom(const GroupTargetListBuf& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:mars.stn.GroupTargetListBuf) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - target_.MergeFrom(from.target_); -} - -void GroupTargetListBuf::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:mars.stn.GroupTargetListBuf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GroupTargetListBuf::CopyFrom(const GroupTargetListBuf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:mars.stn.GroupTargetListBuf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GroupTargetListBuf::IsInitialized() const { - return true; -} - -void GroupTargetListBuf::Swap(GroupTargetListBuf* other) { - if (other == this) return; - InternalSwap(other); -} -void GroupTargetListBuf::InternalSwap(GroupTargetListBuf* other) { - target_.InternalSwap(&other->target_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata GroupTargetListBuf::GetMetadata() const { - protobuf_group_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_group_2eproto::file_level_metadata[kIndexInFileMessages]; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// GroupTargetListBuf - -// repeated .mars.stn.GroupTarget target = 1; -int GroupTargetListBuf::target_size() const { - return target_.size(); -} -void GroupTargetListBuf::clear_target() { - target_.Clear(); -} -const ::mars::stn::GroupTarget& GroupTargetListBuf::target(int index) const { - // @@protoc_insertion_point(field_get:mars.stn.GroupTargetListBuf.target) - return target_.Get(index); -} -::mars::stn::GroupTarget* GroupTargetListBuf::mutable_target(int index) { - // @@protoc_insertion_point(field_mutable:mars.stn.GroupTargetListBuf.target) - return target_.Mutable(index); -} -::mars::stn::GroupTarget* GroupTargetListBuf::add_target() { - // @@protoc_insertion_point(field_add:mars.stn.GroupTargetListBuf.target) - return target_.Add(); -} -::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget >* -GroupTargetListBuf::mutable_target() { - // @@protoc_insertion_point(field_mutable_list:mars.stn.GroupTargetListBuf.target) - return &target_; -} -const ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget >& -GroupTargetListBuf::target() const { - // @@protoc_insertion_point(field_list:mars.stn.GroupTargetListBuf.target) - return target_; -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int GroupInfo::kTargetIdFieldNumber; -const int GroupInfo::kLineFieldNumber; const int GroupInfo::kNameFieldNumber; const int GroupInfo::kPortraitFieldNumber; const int GroupInfo::kOwnerFieldNumber; @@ -869,9 +239,9 @@ GroupInfo::GroupInfo(const GroupInfo& from) if (from.extra().size() > 0) { extra_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extra_); } - ::memcpy(&line_, &from.line_, - reinterpret_cast(&update_dt_) - - reinterpret_cast(&line_) + sizeof(update_dt_)); + ::memcpy(&update_dt_, &from.update_dt_, + reinterpret_cast(&type_) - + reinterpret_cast(&update_dt_) + sizeof(type_)); // @@protoc_insertion_point(copy_constructor:mars.stn.GroupInfo) } @@ -881,8 +251,8 @@ void GroupInfo::SharedCtor() { portrait_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); owner_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); extra_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&line_, 0, reinterpret_cast(&update_dt_) - - reinterpret_cast(&line_) + sizeof(update_dt_)); + ::memset(&update_dt_, 0, reinterpret_cast(&type_) - + reinterpret_cast(&update_dt_) + sizeof(type_)); _cached_size_ = 0; } @@ -929,8 +299,8 @@ void GroupInfo::Clear() { portrait_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); owner_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); extra_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&line_, 0, reinterpret_cast(&update_dt_) - - reinterpret_cast(&line_) + sizeof(update_dt_)); + ::memset(&update_dt_, 0, reinterpret_cast(&type_) - + reinterpret_cast(&update_dt_) + sizeof(type_)); } bool GroupInfo::MergePartialFromCodedStream( @@ -959,24 +329,10 @@ bool GroupInfo::MergePartialFromCodedStream( break; } - // int32 line = 2; + // string name = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); - } else { - goto handle_unusual; - } - break; - } - - // string name = 3; - case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(18u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -989,10 +345,10 @@ bool GroupInfo::MergePartialFromCodedStream( break; } - // string portrait = 4; - case 4: { + // string portrait = 3; + case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u)) { + static_cast< ::google::protobuf::uint8>(26u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_portrait())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1005,10 +361,10 @@ bool GroupInfo::MergePartialFromCodedStream( break; } - // string owner = 5; - case 5: { + // string owner = 4; + case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(42u)) { + static_cast< ::google::protobuf::uint8>(34u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_owner())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1021,10 +377,10 @@ bool GroupInfo::MergePartialFromCodedStream( break; } - // .mars.stn.GroupType type = 6; - case 6: { + // .mars.stn.GroupType type = 5; + case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(48u)) { + static_cast< ::google::protobuf::uint8>(40u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -1036,10 +392,10 @@ bool GroupInfo::MergePartialFromCodedStream( break; } - // string extra = 7; - case 7: { + // string extra = 6; + case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(58u)) { + static_cast< ::google::protobuf::uint8>(50u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_extra())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1052,10 +408,10 @@ bool GroupInfo::MergePartialFromCodedStream( break; } - // int64 update_dt = 8; - case 8: { + // int64 update_dt = 7; + case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(64u)) { + static_cast< ::google::protobuf::uint8>(56u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( @@ -1103,60 +459,55 @@ void GroupInfo::SerializeWithCachedSizes( 1, this->target_id(), output); } - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); - } - - // string name = 3; + // string name = 2; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.GroupInfo.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->name(), output); + 2, this->name(), output); } - // string portrait = 4; + // string portrait = 3; if (this->portrait().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->portrait().data(), this->portrait().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.GroupInfo.portrait"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->portrait(), output); + 3, this->portrait(), output); } - // string owner = 5; + // string owner = 4; if (this->owner().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->owner().data(), this->owner().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.GroupInfo.owner"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 5, this->owner(), output); + 4, this->owner(), output); } - // .mars.stn.GroupType type = 6; + // .mars.stn.GroupType type = 5; if (this->type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( - 6, this->type(), output); + 5, this->type(), output); } - // string extra = 7; + // string extra = 6; if (this->extra().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->extra().data(), this->extra().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.GroupInfo.extra"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 7, this->extra(), output); + 6, this->extra(), output); } - // int64 update_dt = 8; + // int64 update_dt = 7; if (this->update_dt() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->update_dt(), output); + ::google::protobuf::internal::WireFormatLite::WriteInt64(7, this->update_dt(), output); } // @@protoc_insertion_point(serialize_end:mars.stn.GroupInfo) @@ -1179,12 +530,7 @@ ::google::protobuf::uint8* GroupInfo::InternalSerializeWithCachedSizesToArray( 1, this->target_id(), target); } - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); - } - - // string name = 3; + // string name = 2; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), @@ -1192,10 +538,10 @@ ::google::protobuf::uint8* GroupInfo::InternalSerializeWithCachedSizesToArray( "mars.stn.GroupInfo.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->name(), target); + 2, this->name(), target); } - // string portrait = 4; + // string portrait = 3; if (this->portrait().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->portrait().data(), this->portrait().length(), @@ -1203,10 +549,10 @@ ::google::protobuf::uint8* GroupInfo::InternalSerializeWithCachedSizesToArray( "mars.stn.GroupInfo.portrait"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 4, this->portrait(), target); + 3, this->portrait(), target); } - // string owner = 5; + // string owner = 4; if (this->owner().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->owner().data(), this->owner().length(), @@ -1214,16 +560,16 @@ ::google::protobuf::uint8* GroupInfo::InternalSerializeWithCachedSizesToArray( "mars.stn.GroupInfo.owner"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 5, this->owner(), target); + 4, this->owner(), target); } - // .mars.stn.GroupType type = 6; + // .mars.stn.GroupType type = 5; if (this->type() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 6, this->type(), target); + 5, this->type(), target); } - // string extra = 7; + // string extra = 6; if (this->extra().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->extra().data(), this->extra().length(), @@ -1231,12 +577,12 @@ ::google::protobuf::uint8* GroupInfo::InternalSerializeWithCachedSizesToArray( "mars.stn.GroupInfo.extra"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 7, this->extra(), target); + 6, this->extra(), target); } - // int64 update_dt = 8; + // int64 update_dt = 7; if (this->update_dt() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->update_dt(), target); + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(7, this->update_dt(), target); } // @@protoc_insertion_point(serialize_to_array_end:mars.stn.GroupInfo) @@ -1254,54 +600,47 @@ size_t GroupInfo::ByteSizeLong() const { this->target_id()); } - // string name = 3; + // string name = 2; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } - // string portrait = 4; + // string portrait = 3; if (this->portrait().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->portrait()); } - // string owner = 5; + // string owner = 4; if (this->owner().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->owner()); } - // string extra = 7; + // string extra = 6; if (this->extra().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->extra()); } - // int32 line = 2; - if (this->line() != 0) { + // int64 update_dt = 7; + if (this->update_dt() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->update_dt()); } - // .mars.stn.GroupType type = 6; + // .mars.stn.GroupType type = 5; if (this->type() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); } - // int64 update_dt = 8; - if (this->update_dt() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->update_dt()); - } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -1351,15 +690,12 @@ void GroupInfo::MergeFrom(const GroupInfo& from) { extra_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extra_); } - if (from.line() != 0) { - set_line(from.line()); + if (from.update_dt() != 0) { + set_update_dt(from.update_dt()); } if (from.type() != 0) { set_type(from.type()); } - if (from.update_dt() != 0) { - set_update_dt(from.update_dt()); - } } void GroupInfo::CopyFrom(const ::google::protobuf::Message& from) { @@ -1390,9 +726,8 @@ void GroupInfo::InternalSwap(GroupInfo* other) { portrait_.Swap(&other->portrait_); owner_.Swap(&other->owner_); extra_.Swap(&other->extra_); - std::swap(line_, other->line_); - std::swap(type_, other->type_); std::swap(update_dt_, other->update_dt_); + std::swap(type_, other->type_); std::swap(_cached_size_, other->_cached_size_); } @@ -1457,21 +792,7 @@ void GroupInfo::set_allocated_target_id(::std::string* target_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.target_id) } -// int32 line = 2; -void GroupInfo::clear_line() { - line_ = 0; -} -::google::protobuf::int32 GroupInfo::line() const { - // @@protoc_insertion_point(field_get:mars.stn.GroupInfo.line) - return line_; -} -void GroupInfo::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.GroupInfo.line) -} - -// string name = 3; +// string name = 2; void GroupInfo::clear_name() { name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1524,7 +845,7 @@ void GroupInfo::set_allocated_name(::std::string* name) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.name) } -// string portrait = 4; +// string portrait = 3; void GroupInfo::clear_portrait() { portrait_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1577,7 +898,7 @@ void GroupInfo::set_allocated_portrait(::std::string* portrait) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.portrait) } -// string owner = 5; +// string owner = 4; void GroupInfo::clear_owner() { owner_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1630,7 +951,7 @@ void GroupInfo::set_allocated_owner(::std::string* owner) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.owner) } -// .mars.stn.GroupType type = 6; +// .mars.stn.GroupType type = 5; void GroupInfo::clear_type() { type_ = 0; } @@ -1644,7 +965,7 @@ void GroupInfo::set_type(::mars::stn::GroupType value) { // @@protoc_insertion_point(field_set:mars.stn.GroupInfo.type) } -// string extra = 7; +// string extra = 6; void GroupInfo::clear_extra() { extra_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1697,7 +1018,7 @@ void GroupInfo::set_allocated_extra(::std::string* extra) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.extra) } -// int64 update_dt = 8; +// int64 update_dt = 7; void GroupInfo::clear_update_dt() { update_dt_ = GOOGLE_LONGLONG(0); } diff --git a/mars/stn/mqtt/Proto/group.pb.h b/mars/stn/mqtt/Proto/group.pb.h index 7c1f046e..5ef13c96 100644 --- a/mars/stn/mqtt/Proto/group.pb.h +++ b/mars/stn/mqtt/Proto/group.pb.h @@ -42,12 +42,6 @@ extern GroupInfoDefaultTypeInternal _GroupInfo_default_instance_; class GroupMember; class GroupMemberDefaultTypeInternal; extern GroupMemberDefaultTypeInternal _GroupMember_default_instance_; -class GroupTarget; -class GroupTargetDefaultTypeInternal; -extern GroupTargetDefaultTypeInternal _GroupTarget_default_instance_; -class GroupTargetListBuf; -class GroupTargetListBufDefaultTypeInternal; -extern GroupTargetListBufDefaultTypeInternal _GroupTargetListBuf_default_instance_; } // namespace stn } // namespace mars @@ -92,187 +86,6 @@ inline bool GroupType_Parse( } // =================================================================== -class GroupTarget : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mars.stn.GroupTarget) */ { - public: - GroupTarget(); - virtual ~GroupTarget(); - - GroupTarget(const GroupTarget& from); - - inline GroupTarget& operator=(const GroupTarget& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const GroupTarget& default_instance(); - - static inline const GroupTarget* internal_default_instance() { - return reinterpret_cast( - &_GroupTarget_default_instance_); - } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = - 0; - - void Swap(GroupTarget* other); - - // implements Message ---------------------------------------------- - - inline GroupTarget* New() const PROTOBUF_FINAL { return New(NULL); } - - GroupTarget* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; - void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void CopyFrom(const GroupTarget& from); - void MergeFrom(const GroupTarget& from); - void Clear() PROTOBUF_FINAL; - bool IsInitialized() const PROTOBUF_FINAL; - - size_t ByteSizeLong() const PROTOBUF_FINAL; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; - int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const PROTOBUF_FINAL; - void InternalSwap(GroupTarget* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return NULL; - } - inline void* MaybeArenaPtr() const { - return NULL; - } - public: - - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // string target_id = 1; - void clear_target_id(); - static const int kTargetIdFieldNumber = 1; - const ::std::string& target_id() const; - void set_target_id(const ::std::string& value); - #if LANG_CXX11 - void set_target_id(::std::string&& value); - #endif - void set_target_id(const char* value); - void set_target_id(const char* value, size_t size); - ::std::string* mutable_target_id(); - ::std::string* release_target_id(); - void set_allocated_target_id(::std::string* target_id); - - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); - - // @@protoc_insertion_point(class_scope:mars.stn.GroupTarget) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr target_id_; - ::google::protobuf::int32 line_; - mutable int _cached_size_; - friend struct protobuf_group_2eproto::TableStruct; -}; -// ------------------------------------------------------------------- - -class GroupTargetListBuf : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mars.stn.GroupTargetListBuf) */ { - public: - GroupTargetListBuf(); - virtual ~GroupTargetListBuf(); - - GroupTargetListBuf(const GroupTargetListBuf& from); - - inline GroupTargetListBuf& operator=(const GroupTargetListBuf& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const GroupTargetListBuf& default_instance(); - - static inline const GroupTargetListBuf* internal_default_instance() { - return reinterpret_cast( - &_GroupTargetListBuf_default_instance_); - } - static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = - 1; - - void Swap(GroupTargetListBuf* other); - - // implements Message ---------------------------------------------- - - inline GroupTargetListBuf* New() const PROTOBUF_FINAL { return New(NULL); } - - GroupTargetListBuf* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; - void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; - void CopyFrom(const GroupTargetListBuf& from); - void MergeFrom(const GroupTargetListBuf& from); - void Clear() PROTOBUF_FINAL; - bool IsInitialized() const PROTOBUF_FINAL; - - size_t ByteSizeLong() const PROTOBUF_FINAL; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; - int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const PROTOBUF_FINAL; - void InternalSwap(GroupTargetListBuf* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return NULL; - } - inline void* MaybeArenaPtr() const { - return NULL; - } - public: - - ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .mars.stn.GroupTarget target = 1; - int target_size() const; - void clear_target(); - static const int kTargetFieldNumber = 1; - const ::mars::stn::GroupTarget& target(int index) const; - ::mars::stn::GroupTarget* mutable_target(int index); - ::mars::stn::GroupTarget* add_target(); - ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget >* - mutable_target(); - const ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget >& - target() const; - - // @@protoc_insertion_point(class_scope:mars.stn.GroupTargetListBuf) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget > target_; - mutable int _cached_size_; - friend struct protobuf_group_2eproto::TableStruct; -}; -// ------------------------------------------------------------------- - class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mars.stn.GroupInfo) */ { public: GroupInfo(); @@ -293,7 +106,7 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point &_GroupInfo_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = - 2; + 0; void Swap(GroupInfo* other); @@ -351,9 +164,9 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point ::std::string* release_target_id(); void set_allocated_target_id(::std::string* target_id); - // string name = 3; + // string name = 2; void clear_name(); - static const int kNameFieldNumber = 3; + static const int kNameFieldNumber = 2; const ::std::string& name() const; void set_name(const ::std::string& value); #if LANG_CXX11 @@ -365,9 +178,9 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point ::std::string* release_name(); void set_allocated_name(::std::string* name); - // string portrait = 4; + // string portrait = 3; void clear_portrait(); - static const int kPortraitFieldNumber = 4; + static const int kPortraitFieldNumber = 3; const ::std::string& portrait() const; void set_portrait(const ::std::string& value); #if LANG_CXX11 @@ -379,9 +192,9 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point ::std::string* release_portrait(); void set_allocated_portrait(::std::string* portrait); - // string owner = 5; + // string owner = 4; void clear_owner(); - static const int kOwnerFieldNumber = 5; + static const int kOwnerFieldNumber = 4; const ::std::string& owner() const; void set_owner(const ::std::string& value); #if LANG_CXX11 @@ -393,9 +206,9 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point ::std::string* release_owner(); void set_allocated_owner(::std::string* owner); - // string extra = 7; + // string extra = 6; void clear_extra(); - static const int kExtraFieldNumber = 7; + static const int kExtraFieldNumber = 6; const ::std::string& extra() const; void set_extra(const ::std::string& value); #if LANG_CXX11 @@ -407,24 +220,18 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point ::std::string* release_extra(); void set_allocated_extra(::std::string* extra); - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); + // int64 update_dt = 7; + void clear_update_dt(); + static const int kUpdateDtFieldNumber = 7; + ::google::protobuf::int64 update_dt() const; + void set_update_dt(::google::protobuf::int64 value); - // .mars.stn.GroupType type = 6; + // .mars.stn.GroupType type = 5; void clear_type(); - static const int kTypeFieldNumber = 6; + static const int kTypeFieldNumber = 5; ::mars::stn::GroupType type() const; void set_type(::mars::stn::GroupType value); - // int64 update_dt = 8; - void clear_update_dt(); - static const int kUpdateDtFieldNumber = 8; - ::google::protobuf::int64 update_dt() const; - void set_update_dt(::google::protobuf::int64 value); - // @@protoc_insertion_point(class_scope:mars.stn.GroupInfo) private: @@ -434,9 +241,8 @@ class GroupInfo : public ::google::protobuf::Message /* @@protoc_insertion_point ::google::protobuf::internal::ArenaStringPtr portrait_; ::google::protobuf::internal::ArenaStringPtr owner_; ::google::protobuf::internal::ArenaStringPtr extra_; - ::google::protobuf::int32 line_; - int type_; ::google::protobuf::int64 update_dt_; + int type_; mutable int _cached_size_; friend struct protobuf_group_2eproto::TableStruct; }; @@ -462,7 +268,7 @@ class GroupMember : public ::google::protobuf::Message /* @@protoc_insertion_poi &_GroupMember_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = - 3; + 1; void Swap(GroupMember* other); @@ -579,7 +385,7 @@ class Group : public ::google::protobuf::Message /* @@protoc_insertion_point(cla &_Group_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = - 4; + 2; void Swap(Group* other); @@ -659,111 +465,6 @@ class Group : public ::google::protobuf::Message /* @@protoc_insertion_point(cla // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS -// GroupTarget - -// string target_id = 1; -inline void GroupTarget::clear_target_id() { - target_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& GroupTarget::target_id() const { - // @@protoc_insertion_point(field_get:mars.stn.GroupTarget.target_id) - return target_id_.GetNoArena(); -} -inline void GroupTarget::set_target_id(const ::std::string& value) { - - target_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:mars.stn.GroupTarget.target_id) -} -#if LANG_CXX11 -inline void GroupTarget::set_target_id(::std::string&& value) { - - target_id_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:mars.stn.GroupTarget.target_id) -} -#endif -inline void GroupTarget::set_target_id(const char* value) { - GOOGLE_DCHECK(value != NULL); - - target_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:mars.stn.GroupTarget.target_id) -} -inline void GroupTarget::set_target_id(const char* value, size_t size) { - - target_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:mars.stn.GroupTarget.target_id) -} -inline ::std::string* GroupTarget::mutable_target_id() { - - // @@protoc_insertion_point(field_mutable:mars.stn.GroupTarget.target_id) - return target_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* GroupTarget::release_target_id() { - // @@protoc_insertion_point(field_release:mars.stn.GroupTarget.target_id) - - return target_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void GroupTarget::set_allocated_target_id(::std::string* target_id) { - if (target_id != NULL) { - - } else { - - } - target_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), target_id); - // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupTarget.target_id) -} - -// int32 line = 2; -inline void GroupTarget::clear_line() { - line_ = 0; -} -inline ::google::protobuf::int32 GroupTarget::line() const { - // @@protoc_insertion_point(field_get:mars.stn.GroupTarget.line) - return line_; -} -inline void GroupTarget::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.GroupTarget.line) -} - -// ------------------------------------------------------------------- - -// GroupTargetListBuf - -// repeated .mars.stn.GroupTarget target = 1; -inline int GroupTargetListBuf::target_size() const { - return target_.size(); -} -inline void GroupTargetListBuf::clear_target() { - target_.Clear(); -} -inline const ::mars::stn::GroupTarget& GroupTargetListBuf::target(int index) const { - // @@protoc_insertion_point(field_get:mars.stn.GroupTargetListBuf.target) - return target_.Get(index); -} -inline ::mars::stn::GroupTarget* GroupTargetListBuf::mutable_target(int index) { - // @@protoc_insertion_point(field_mutable:mars.stn.GroupTargetListBuf.target) - return target_.Mutable(index); -} -inline ::mars::stn::GroupTarget* GroupTargetListBuf::add_target() { - // @@protoc_insertion_point(field_add:mars.stn.GroupTargetListBuf.target) - return target_.Add(); -} -inline ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget >* -GroupTargetListBuf::mutable_target() { - // @@protoc_insertion_point(field_mutable_list:mars.stn.GroupTargetListBuf.target) - return &target_; -} -inline const ::google::protobuf::RepeatedPtrField< ::mars::stn::GroupTarget >& -GroupTargetListBuf::target() const { - // @@protoc_insertion_point(field_list:mars.stn.GroupTargetListBuf.target) - return target_; -} - -// ------------------------------------------------------------------- - // GroupInfo // string target_id = 1; @@ -819,21 +520,7 @@ inline void GroupInfo::set_allocated_target_id(::std::string* target_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.target_id) } -// int32 line = 2; -inline void GroupInfo::clear_line() { - line_ = 0; -} -inline ::google::protobuf::int32 GroupInfo::line() const { - // @@protoc_insertion_point(field_get:mars.stn.GroupInfo.line) - return line_; -} -inline void GroupInfo::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.GroupInfo.line) -} - -// string name = 3; +// string name = 2; inline void GroupInfo::clear_name() { name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -886,7 +573,7 @@ inline void GroupInfo::set_allocated_name(::std::string* name) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.name) } -// string portrait = 4; +// string portrait = 3; inline void GroupInfo::clear_portrait() { portrait_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -939,7 +626,7 @@ inline void GroupInfo::set_allocated_portrait(::std::string* portrait) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.portrait) } -// string owner = 5; +// string owner = 4; inline void GroupInfo::clear_owner() { owner_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -992,7 +679,7 @@ inline void GroupInfo::set_allocated_owner(::std::string* owner) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.owner) } -// .mars.stn.GroupType type = 6; +// .mars.stn.GroupType type = 5; inline void GroupInfo::clear_type() { type_ = 0; } @@ -1006,7 +693,7 @@ inline void GroupInfo::set_type(::mars::stn::GroupType value) { // @@protoc_insertion_point(field_set:mars.stn.GroupInfo.type) } -// string extra = 7; +// string extra = 6; inline void GroupInfo::clear_extra() { extra_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1059,7 +746,7 @@ inline void GroupInfo::set_allocated_extra(::std::string* extra) { // @@protoc_insertion_point(field_set_allocated:mars.stn.GroupInfo.extra) } -// int64 update_dt = 8; +// int64 update_dt = 7; inline void GroupInfo::clear_update_dt() { update_dt_ = GOOGLE_LONGLONG(0); } @@ -1289,10 +976,6 @@ Group::members() const { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/mars/stn/mqtt/Proto/group.proto b/mars/stn/mqtt/Proto/group.proto index ddd618c3..06f2d196 100644 --- a/mars/stn/mqtt/Proto/group.proto +++ b/mars/stn/mqtt/Proto/group.proto @@ -16,24 +16,14 @@ enum GroupType { GroupType_Restricted = 2; } -message GroupTarget { - string target_id = 1; - int32 line = 2; -} - -message GroupTargetListBuf { -repeated GroupTarget target = 1; -} - message GroupInfo { string target_id = 1; - int32 line = 2; - string name = 3; - string portrait = 4; - string owner = 5; - GroupType type = 6; - string extra = 7; - int64 update_dt = 8; + string name = 2; + string portrait = 3; + string owner = 4; + GroupType type = 5; + string extra = 6; + int64 update_dt = 7; } message GroupMember { diff --git a/mars/stn/mqtt/Proto/modify_group_info_request.pb.cc b/mars/stn/mqtt/Proto/modify_group_info_request.pb.cc index 8663cb1b..e2724159 100644 --- a/mars/stn/mqtt/Proto/modify_group_info_request.pb.cc +++ b/mars/stn/mqtt/Proto/modify_group_info_request.pb.cc @@ -52,6 +52,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModifyGroupInfoRequest, group_info_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModifyGroupInfoRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModifyGroupInfoRequest, notify_content_), }; @@ -113,14 +114,14 @@ void AddDescriptorsImpl() { static const char descriptor[] = { "\n\037modify_group_info_request.proto\022\010mars." "stn\032\013group.proto\032\025message_content.proto\"" - "s\n\026ModifyGroupInfoRequest\022\'\n\ngroup_info\030" - "\001 \001(\0132\023.mars.stn.GroupInfo\0220\n\016notify_con" - "tent\030\002 \001(\0132\030.mars.stn.MessageContentB8\n\024" - "win.liyufan.im.protoB ModifyGroupInfoReq" - "uestOuterClassb\006proto3" + "\204\001\n\026ModifyGroupInfoRequest\022\'\n\ngroup_info" + "\030\001 \001(\0132\023.mars.stn.GroupInfo\022\017\n\007to_line\030\002" + " \003(\005\0220\n\016notify_content\030\003 \001(\0132\030.mars.stn." + "MessageContentB8\n\024win.liyufan.im.protoB " + "ModifyGroupInfoRequestOuterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 262); + descriptor, 280); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "modify_group_info_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_group_2eproto::AddDescriptors(); @@ -146,6 +147,7 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ModifyGroupInfoRequest::kGroupInfoFieldNumber; +const int ModifyGroupInfoRequest::kToLineFieldNumber; const int ModifyGroupInfoRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -160,6 +162,7 @@ ModifyGroupInfoRequest::ModifyGroupInfoRequest() ModifyGroupInfoRequest::ModifyGroupInfoRequest(const ModifyGroupInfoRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_group_info()) { @@ -220,6 +223,7 @@ ModifyGroupInfoRequest* ModifyGroupInfoRequest::New(::google::protobuf::Arena* a void ModifyGroupInfoRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.ModifyGroupInfoRequest) + to_line_.Clear(); if (GetArenaNoVirtual() == NULL && group_info_ != NULL) { delete group_info_; } @@ -252,10 +256,28 @@ bool ModifyGroupInfoRequest::MergePartialFromCodedStream( break; } - // .mars.stn.MessageContent notify_content = 2; + // repeated int32 to_line = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 18u, input, this->mutable_to_line()))); + } else { + goto handle_unusual; + } + break; + } + + // .mars.stn.MessageContent notify_content = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_notify_content())); } else { @@ -297,10 +319,20 @@ void ModifyGroupInfoRequest::SerializeWithCachedSizes( 1, *this->group_info_, output); } - // .mars.stn.MessageContent notify_content = 2; + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); + } + + // .mars.stn.MessageContent notify_content = 3; if (this->has_notify_content()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, *this->notify_content_, output); + 3, *this->notify_content_, output); } // @@protoc_insertion_point(serialize_end:mars.stn.ModifyGroupInfoRequest) @@ -319,11 +351,23 @@ ::google::protobuf::uint8* ModifyGroupInfoRequest::InternalSerializeWithCachedSi 1, *this->group_info_, deterministic, target); } - // .mars.stn.MessageContent notify_content = 2; + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); + } + + // .mars.stn.MessageContent notify_content = 3; if (this->has_notify_content()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, *this->notify_content_, deterministic, target); + 3, *this->notify_content_, deterministic, target); } // @@protoc_insertion_point(serialize_to_array_end:mars.stn.ModifyGroupInfoRequest) @@ -334,6 +378,21 @@ size_t ModifyGroupInfoRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.ModifyGroupInfoRequest) size_t total_size = 0; + // repeated int32 to_line = 2; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // .mars.stn.GroupInfo group_info = 1; if (this->has_group_info()) { total_size += 1 + @@ -341,7 +400,7 @@ size_t ModifyGroupInfoRequest::ByteSizeLong() const { *this->group_info_); } - // .mars.stn.MessageContent notify_content = 2; + // .mars.stn.MessageContent notify_content = 3; if (this->has_notify_content()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( @@ -377,6 +436,7 @@ void ModifyGroupInfoRequest::MergeFrom(const ModifyGroupInfoRequest& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + to_line_.MergeFrom(from.to_line_); if (from.has_group_info()) { mutable_group_info()->::mars::stn::GroupInfo::MergeFrom(from.group_info()); } @@ -408,6 +468,7 @@ void ModifyGroupInfoRequest::Swap(ModifyGroupInfoRequest* other) { InternalSwap(other); } void ModifyGroupInfoRequest::InternalSwap(ModifyGroupInfoRequest* other) { + to_line_.InternalSwap(&other->to_line_); std::swap(group_info_, other->group_info_); std::swap(notify_content_, other->notify_content_); std::swap(_cached_size_, other->_cached_size_); @@ -460,7 +521,37 @@ void ModifyGroupInfoRequest::set_allocated_group_info(::mars::stn::GroupInfo* gr // @@protoc_insertion_point(field_set_allocated:mars.stn.ModifyGroupInfoRequest.group_info) } -// .mars.stn.MessageContent notify_content = 2; +// repeated int32 to_line = 2; +int ModifyGroupInfoRequest::to_line_size() const { + return to_line_.size(); +} +void ModifyGroupInfoRequest::clear_to_line() { + to_line_.Clear(); +} +::google::protobuf::int32 ModifyGroupInfoRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.ModifyGroupInfoRequest.to_line) + return to_line_.Get(index); +} +void ModifyGroupInfoRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.ModifyGroupInfoRequest.to_line) +} +void ModifyGroupInfoRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.ModifyGroupInfoRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +ModifyGroupInfoRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.ModifyGroupInfoRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +ModifyGroupInfoRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.ModifyGroupInfoRequest.to_line) + return &to_line_; +} + +// .mars.stn.MessageContent notify_content = 3; bool ModifyGroupInfoRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; } diff --git a/mars/stn/mqtt/Proto/modify_group_info_request.pb.h b/mars/stn/mqtt/Proto/modify_group_info_request.pb.h index 2b513bdb..1da62c4c 100644 --- a/mars/stn/mqtt/Proto/modify_group_info_request.pb.h +++ b/mars/stn/mqtt/Proto/modify_group_info_request.pb.h @@ -43,12 +43,6 @@ extern GroupInfoDefaultTypeInternal _GroupInfo_default_instance_; class GroupMember; class GroupMemberDefaultTypeInternal; extern GroupMemberDefaultTypeInternal _GroupMember_default_instance_; -class GroupTarget; -class GroupTargetDefaultTypeInternal; -extern GroupTargetDefaultTypeInternal _GroupTarget_default_instance_; -class GroupTargetListBuf; -class GroupTargetListBufDefaultTypeInternal; -extern GroupTargetListBufDefaultTypeInternal _GroupTargetListBuf_default_instance_; class MessageContent; class MessageContentDefaultTypeInternal; extern MessageContentDefaultTypeInternal _MessageContent_default_instance_; @@ -141,6 +135,18 @@ class ModifyGroupInfoRequest : public ::google::protobuf::Message /* @@protoc_in // accessors ------------------------------------------------------- + // repeated int32 to_line = 2; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 2; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // .mars.stn.GroupInfo group_info = 1; bool has_group_info() const; void clear_group_info(); @@ -150,10 +156,10 @@ class ModifyGroupInfoRequest : public ::google::protobuf::Message /* @@protoc_in ::mars::stn::GroupInfo* release_group_info(); void set_allocated_group_info(::mars::stn::GroupInfo* group_info); - // .mars.stn.MessageContent notify_content = 2; + // .mars.stn.MessageContent notify_content = 3; bool has_notify_content() const; void clear_notify_content(); - static const int kNotifyContentFieldNumber = 2; + static const int kNotifyContentFieldNumber = 3; const ::mars::stn::MessageContent& notify_content() const; ::mars::stn::MessageContent* mutable_notify_content(); ::mars::stn::MessageContent* release_notify_content(); @@ -163,6 +169,8 @@ class ModifyGroupInfoRequest : public ::google::protobuf::Message /* @@protoc_in private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::mars::stn::GroupInfo* group_info_; ::mars::stn::MessageContent* notify_content_; mutable int _cached_size_; @@ -215,7 +223,37 @@ inline void ModifyGroupInfoRequest::set_allocated_group_info(::mars::stn::GroupI // @@protoc_insertion_point(field_set_allocated:mars.stn.ModifyGroupInfoRequest.group_info) } -// .mars.stn.MessageContent notify_content = 2; +// repeated int32 to_line = 2; +inline int ModifyGroupInfoRequest::to_line_size() const { + return to_line_.size(); +} +inline void ModifyGroupInfoRequest::clear_to_line() { + to_line_.Clear(); +} +inline ::google::protobuf::int32 ModifyGroupInfoRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.ModifyGroupInfoRequest.to_line) + return to_line_.Get(index); +} +inline void ModifyGroupInfoRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.ModifyGroupInfoRequest.to_line) +} +inline void ModifyGroupInfoRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.ModifyGroupInfoRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +ModifyGroupInfoRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.ModifyGroupInfoRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +ModifyGroupInfoRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.ModifyGroupInfoRequest.to_line) + return &to_line_; +} + +// .mars.stn.MessageContent notify_content = 3; inline bool ModifyGroupInfoRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; } diff --git a/mars/stn/mqtt/Proto/modify_group_info_request.proto b/mars/stn/mqtt/Proto/modify_group_info_request.proto index 44fb526b..7ce77b6b 100644 --- a/mars/stn/mqtt/Proto/modify_group_info_request.proto +++ b/mars/stn/mqtt/Proto/modify_group_info_request.proto @@ -12,5 +12,6 @@ import "message_content.proto"; message ModifyGroupInfoRequest { GroupInfo group_info = 1; - MessageContent notify_content = 2; + repeated int32 to_line = 2; + MessageContent notify_content = 3; } diff --git a/mars/stn/mqtt/Proto/pull_group_info_result.pb.h b/mars/stn/mqtt/Proto/pull_group_info_result.pb.h index bb3945b6..871271c3 100644 --- a/mars/stn/mqtt/Proto/pull_group_info_result.pb.h +++ b/mars/stn/mqtt/Proto/pull_group_info_result.pb.h @@ -42,12 +42,6 @@ extern GroupInfoDefaultTypeInternal _GroupInfo_default_instance_; class GroupMember; class GroupMemberDefaultTypeInternal; extern GroupMemberDefaultTypeInternal _GroupMember_default_instance_; -class GroupTarget; -class GroupTargetDefaultTypeInternal; -extern GroupTargetDefaultTypeInternal _GroupTarget_default_instance_; -class GroupTargetListBuf; -class GroupTargetListBufDefaultTypeInternal; -extern GroupTargetListBufDefaultTypeInternal _GroupTargetListBuf_default_instance_; class PullGroupInfoResult; class PullGroupInfoResultDefaultTypeInternal; extern PullGroupInfoResultDefaultTypeInternal _PullGroupInfoResult_default_instance_; diff --git a/mars/stn/mqtt/Proto/pull_group_member_result.pb.h b/mars/stn/mqtt/Proto/pull_group_member_result.pb.h index 5e6d61e7..df184b1d 100644 --- a/mars/stn/mqtt/Proto/pull_group_member_result.pb.h +++ b/mars/stn/mqtt/Proto/pull_group_member_result.pb.h @@ -42,12 +42,6 @@ extern GroupInfoDefaultTypeInternal _GroupInfo_default_instance_; class GroupMember; class GroupMemberDefaultTypeInternal; extern GroupMemberDefaultTypeInternal _GroupMember_default_instance_; -class GroupTarget; -class GroupTargetDefaultTypeInternal; -extern GroupTargetDefaultTypeInternal _GroupTarget_default_instance_; -class GroupTargetListBuf; -class GroupTargetListBufDefaultTypeInternal; -extern GroupTargetListBufDefaultTypeInternal _GroupTargetListBuf_default_instance_; class PullGroupMemberResult; class PullGroupMemberResultDefaultTypeInternal; extern PullGroupMemberResultDefaultTypeInternal _PullGroupMemberResult_default_instance_; diff --git a/mars/stn/mqtt/Proto/quit_group_request.pb.cc b/mars/stn/mqtt/Proto/quit_group_request.pb.cc index 3bf006e1..b2cf05c6 100644 --- a/mars/stn/mqtt/Proto/quit_group_request.pb.cc +++ b/mars/stn/mqtt/Proto/quit_group_request.pb.cc @@ -52,7 +52,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QuitGroupRequest, group_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QuitGroupRequest, line_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QuitGroupRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QuitGroupRequest, notify_content_), }; @@ -110,14 +110,14 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n\030quit_group_request.proto\022\010mars.stn\032\025me" - "ssage_content.proto\"d\n\020QuitGroupRequest\022" - "\020\n\010group_id\030\001 \001(\t\022\014\n\004line\030\002 \001(\005\0220\n\016notif" - "y_content\030\003 \001(\0132\030.mars.stn.MessageConten" - "tB2\n\024win.liyufan.im.protoB\032QuitGroupRequ" - "estOuterClassb\006proto3" + "ssage_content.proto\"g\n\020QuitGroupRequest\022" + "\020\n\010group_id\030\001 \001(\t\022\017\n\007to_line\030\002 \003(\005\0220\n\016no" + "tify_content\030\003 \001(\0132\030.mars.stn.MessageCon" + "tentB2\n\024win.liyufan.im.protoB\032QuitGroupR" + "equestOuterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 221); + descriptor, 224); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "quit_group_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_message_5fcontent_2eproto::AddDescriptors(); @@ -142,7 +142,7 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int QuitGroupRequest::kGroupIdFieldNumber; -const int QuitGroupRequest::kLineFieldNumber; +const int QuitGroupRequest::kToLineFieldNumber; const int QuitGroupRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -157,6 +157,7 @@ QuitGroupRequest::QuitGroupRequest() QuitGroupRequest::QuitGroupRequest(const QuitGroupRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -168,14 +169,12 @@ QuitGroupRequest::QuitGroupRequest(const QuitGroupRequest& from) } else { notify_content_ = NULL; } - line_ = from.line_; // @@protoc_insertion_point(copy_constructor:mars.stn.QuitGroupRequest) } void QuitGroupRequest::SharedCtor() { group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(¬ify_content_, 0, reinterpret_cast(&line_) - - reinterpret_cast(¬ify_content_) + sizeof(line_)); + notify_content_ = NULL; _cached_size_ = 0; } @@ -216,12 +215,12 @@ QuitGroupRequest* QuitGroupRequest::New(::google::protobuf::Arena* arena) const void QuitGroupRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.QuitGroupRequest) + to_line_.Clear(); group_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && notify_content_ != NULL) { delete notify_content_; } notify_content_ = NULL; - line_ = 0; } bool QuitGroupRequest::MergePartialFromCodedStream( @@ -250,14 +249,18 @@ bool QuitGroupRequest::MergePartialFromCodedStream( break; } - // int32 line = 2; + // repeated int32 to_line = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + static_cast< ::google::protobuf::uint8>(18u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); + 1, 18u, input, this->mutable_to_line()))); } else { goto handle_unusual; } @@ -313,9 +316,14 @@ void QuitGroupRequest::SerializeWithCachedSizes( 1, this->group_id(), output); } - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); } // .mars.stn.MessageContent notify_content = 3; @@ -344,9 +352,16 @@ ::google::protobuf::uint8* QuitGroupRequest::InternalSerializeWithCachedSizesToA 1, this->group_id(), target); } - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); + // repeated int32 to_line = 2; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); } // .mars.stn.MessageContent notify_content = 3; @@ -364,6 +379,21 @@ size_t QuitGroupRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.QuitGroupRequest) size_t total_size = 0; + // repeated int32 to_line = 2; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // string group_id = 1; if (this->group_id().size() > 0) { total_size += 1 + @@ -378,13 +408,6 @@ size_t QuitGroupRequest::ByteSizeLong() const { *this->notify_content_); } - // int32 line = 2; - if (this->line() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); - } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -414,6 +437,7 @@ void QuitGroupRequest::MergeFrom(const QuitGroupRequest& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + to_line_.MergeFrom(from.to_line_); if (from.group_id().size() > 0) { group_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_id_); @@ -421,9 +445,6 @@ void QuitGroupRequest::MergeFrom(const QuitGroupRequest& from) { if (from.has_notify_content()) { mutable_notify_content()->::mars::stn::MessageContent::MergeFrom(from.notify_content()); } - if (from.line() != 0) { - set_line(from.line()); - } } void QuitGroupRequest::CopyFrom(const ::google::protobuf::Message& from) { @@ -449,9 +470,9 @@ void QuitGroupRequest::Swap(QuitGroupRequest* other) { InternalSwap(other); } void QuitGroupRequest::InternalSwap(QuitGroupRequest* other) { + to_line_.InternalSwap(&other->to_line_); group_id_.Swap(&other->group_id_); std::swap(notify_content_, other->notify_content_); - std::swap(line_, other->line_); std::swap(_cached_size_, other->_cached_size_); } @@ -516,18 +537,34 @@ void QuitGroupRequest::set_allocated_group_id(::std::string* group_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.QuitGroupRequest.group_id) } -// int32 line = 2; -void QuitGroupRequest::clear_line() { - line_ = 0; +// repeated int32 to_line = 2; +int QuitGroupRequest::to_line_size() const { + return to_line_.size(); } -::google::protobuf::int32 QuitGroupRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.QuitGroupRequest.line) - return line_; +void QuitGroupRequest::clear_to_line() { + to_line_.Clear(); } -void QuitGroupRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.QuitGroupRequest.line) +::google::protobuf::int32 QuitGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.QuitGroupRequest.to_line) + return to_line_.Get(index); +} +void QuitGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.QuitGroupRequest.to_line) +} +void QuitGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.QuitGroupRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +QuitGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.QuitGroupRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +QuitGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.QuitGroupRequest.to_line) + return &to_line_; } // .mars.stn.MessageContent notify_content = 3; diff --git a/mars/stn/mqtt/Proto/quit_group_request.pb.h b/mars/stn/mqtt/Proto/quit_group_request.pb.h index 8a60cf68..a5292835 100644 --- a/mars/stn/mqtt/Proto/quit_group_request.pb.h +++ b/mars/stn/mqtt/Proto/quit_group_request.pb.h @@ -125,6 +125,18 @@ class QuitGroupRequest : public ::google::protobuf::Message /* @@protoc_insertio // accessors ------------------------------------------------------- + // repeated int32 to_line = 2; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 2; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // string group_id = 1; void clear_group_id(); static const int kGroupIdFieldNumber = 1; @@ -148,19 +160,14 @@ class QuitGroupRequest : public ::google::protobuf::Message /* @@protoc_insertio ::mars::stn::MessageContent* release_notify_content(); void set_allocated_notify_content(::mars::stn::MessageContent* notify_content); - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:mars.stn.QuitGroupRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::google::protobuf::internal::ArenaStringPtr group_id_; ::mars::stn::MessageContent* notify_content_; - ::google::protobuf::int32 line_; mutable int _cached_size_; friend struct protobuf_quit_5fgroup_5frequest_2eproto::TableStruct; }; @@ -225,18 +232,34 @@ inline void QuitGroupRequest::set_allocated_group_id(::std::string* group_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.QuitGroupRequest.group_id) } -// int32 line = 2; -inline void QuitGroupRequest::clear_line() { - line_ = 0; +// repeated int32 to_line = 2; +inline int QuitGroupRequest::to_line_size() const { + return to_line_.size(); } -inline ::google::protobuf::int32 QuitGroupRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.QuitGroupRequest.line) - return line_; +inline void QuitGroupRequest::clear_to_line() { + to_line_.Clear(); } -inline void QuitGroupRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.QuitGroupRequest.line) +inline ::google::protobuf::int32 QuitGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.QuitGroupRequest.to_line) + return to_line_.Get(index); +} +inline void QuitGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.QuitGroupRequest.to_line) +} +inline void QuitGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.QuitGroupRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +QuitGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.QuitGroupRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +QuitGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.QuitGroupRequest.to_line) + return &to_line_; } // .mars.stn.MessageContent notify_content = 3; diff --git a/mars/stn/mqtt/Proto/quit_group_request.proto b/mars/stn/mqtt/Proto/quit_group_request.proto index 6bd0c4b9..c5af1fd9 100644 --- a/mars/stn/mqtt/Proto/quit_group_request.proto +++ b/mars/stn/mqtt/Proto/quit_group_request.proto @@ -11,6 +11,6 @@ import "message_content.proto"; message QuitGroupRequest { string group_id = 1; - int32 line = 2; + repeated int32 to_line = 2; MessageContent notify_content = 3; } diff --git a/mars/stn/mqtt/Proto/remove_group_member_request.pb.cc b/mars/stn/mqtt/Proto/remove_group_member_request.pb.cc index af314041..ce52d7a9 100644 --- a/mars/stn/mqtt/Proto/remove_group_member_request.pb.cc +++ b/mars/stn/mqtt/Proto/remove_group_member_request.pb.cc @@ -52,8 +52,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RemoveGroupMemberRequest, group_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RemoveGroupMemberRequest, line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RemoveGroupMemberRequest, removed_member_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RemoveGroupMemberRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RemoveGroupMemberRequest, notify_content_), }; @@ -111,15 +111,15 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n!remove_group_member_request.proto\022\010mar" - "s.stn\032\025message_content.proto\"\204\001\n\030RemoveG" - "roupMemberRequest\022\020\n\010group_id\030\001 \001(\t\022\014\n\004l" - "ine\030\002 \001(\005\022\026\n\016removed_member\030\003 \003(\t\0220\n\016not" - "ify_content\030\004 \001(\0132\030.mars.stn.MessageCont" - "entB:\n\024win.liyufan.im.protoB\"RemoveGroup" - "MemberRequestOuterClassb\006proto3" + "s.stn\032\025message_content.proto\"\207\001\n\030RemoveG" + "roupMemberRequest\022\020\n\010group_id\030\001 \001(\t\022\026\n\016r" + "emoved_member\030\002 \003(\t\022\017\n\007to_line\030\003 \003(\005\0220\n\016" + "notify_content\030\004 \001(\0132\030.mars.stn.MessageC" + "ontentB:\n\024win.liyufan.im.protoB\"RemoveGr" + "oupMemberRequestOuterClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 271); + descriptor, 274); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "remove_group_member_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_message_5fcontent_2eproto::AddDescriptors(); @@ -144,8 +144,8 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RemoveGroupMemberRequest::kGroupIdFieldNumber; -const int RemoveGroupMemberRequest::kLineFieldNumber; const int RemoveGroupMemberRequest::kRemovedMemberFieldNumber; +const int RemoveGroupMemberRequest::kToLineFieldNumber; const int RemoveGroupMemberRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -161,6 +161,7 @@ RemoveGroupMemberRequest::RemoveGroupMemberRequest(const RemoveGroupMemberReques : ::google::protobuf::Message(), _internal_metadata_(NULL), removed_member_(from.removed_member_), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -172,14 +173,12 @@ RemoveGroupMemberRequest::RemoveGroupMemberRequest(const RemoveGroupMemberReques } else { notify_content_ = NULL; } - line_ = from.line_; // @@protoc_insertion_point(copy_constructor:mars.stn.RemoveGroupMemberRequest) } void RemoveGroupMemberRequest::SharedCtor() { group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(¬ify_content_, 0, reinterpret_cast(&line_) - - reinterpret_cast(¬ify_content_) + sizeof(line_)); + notify_content_ = NULL; _cached_size_ = 0; } @@ -221,12 +220,12 @@ RemoveGroupMemberRequest* RemoveGroupMemberRequest::New(::google::protobuf::Aren void RemoveGroupMemberRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.RemoveGroupMemberRequest) removed_member_.Clear(); + to_line_.Clear(); group_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && notify_content_ != NULL) { delete notify_content_; } notify_content_ = NULL; - line_ = 0; } bool RemoveGroupMemberRequest::MergePartialFromCodedStream( @@ -255,31 +254,35 @@ bool RemoveGroupMemberRequest::MergePartialFromCodedStream( break; } - // int32 line = 2; + // repeated string removed_member = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); + static_cast< ::google::protobuf::uint8>(18u)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_removed_member())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->removed_member(this->removed_member_size() - 1).data(), + this->removed_member(this->removed_member_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "mars.stn.RemoveGroupMemberRequest.removed_member")); } else { goto handle_unusual; } break; } - // repeated string removed_member = 3; + // repeated int32 to_line = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_removed_member())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->removed_member(this->removed_member_size() - 1).data(), - this->removed_member(this->removed_member_size() - 1).length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "mars.stn.RemoveGroupMemberRequest.removed_member")); + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 26u, input, this->mutable_to_line()))); } else { goto handle_unusual; } @@ -335,19 +338,24 @@ void RemoveGroupMemberRequest::SerializeWithCachedSizes( 1, this->group_id(), output); } - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); - } - - // repeated string removed_member = 3; + // repeated string removed_member = 2; for (int i = 0, n = this->removed_member_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->removed_member(i).data(), this->removed_member(i).length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.RemoveGroupMemberRequest.removed_member"); ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->removed_member(i), output); + 2, this->removed_member(i), output); + } + + // repeated int32 to_line = 3; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); } // .mars.stn.MessageContent notify_content = 4; @@ -376,19 +384,26 @@ ::google::protobuf::uint8* RemoveGroupMemberRequest::InternalSerializeWithCached 1, this->group_id(), target); } - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); - } - - // repeated string removed_member = 3; + // repeated string removed_member = 2; for (int i = 0, n = this->removed_member_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->removed_member(i).data(), this->removed_member(i).length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.RemoveGroupMemberRequest.removed_member"); target = ::google::protobuf::internal::WireFormatLite:: - WriteStringToArray(3, this->removed_member(i), target); + WriteStringToArray(2, this->removed_member(i), target); + } + + // repeated int32 to_line = 3; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 3, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); } // .mars.stn.MessageContent notify_content = 4; @@ -406,7 +421,7 @@ size_t RemoveGroupMemberRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.RemoveGroupMemberRequest) size_t total_size = 0; - // repeated string removed_member = 3; + // repeated string removed_member = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->removed_member_size()); for (int i = 0, n = this->removed_member_size(); i < n; i++) { @@ -414,6 +429,21 @@ size_t RemoveGroupMemberRequest::ByteSizeLong() const { this->removed_member(i)); } + // repeated int32 to_line = 3; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // string group_id = 1; if (this->group_id().size() > 0) { total_size += 1 + @@ -428,13 +458,6 @@ size_t RemoveGroupMemberRequest::ByteSizeLong() const { *this->notify_content_); } - // int32 line = 2; - if (this->line() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); - } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -465,6 +488,7 @@ void RemoveGroupMemberRequest::MergeFrom(const RemoveGroupMemberRequest& from) { (void) cached_has_bits; removed_member_.MergeFrom(from.removed_member_); + to_line_.MergeFrom(from.to_line_); if (from.group_id().size() > 0) { group_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_id_); @@ -472,9 +496,6 @@ void RemoveGroupMemberRequest::MergeFrom(const RemoveGroupMemberRequest& from) { if (from.has_notify_content()) { mutable_notify_content()->::mars::stn::MessageContent::MergeFrom(from.notify_content()); } - if (from.line() != 0) { - set_line(from.line()); - } } void RemoveGroupMemberRequest::CopyFrom(const ::google::protobuf::Message& from) { @@ -501,9 +522,9 @@ void RemoveGroupMemberRequest::Swap(RemoveGroupMemberRequest* other) { } void RemoveGroupMemberRequest::InternalSwap(RemoveGroupMemberRequest* other) { removed_member_.InternalSwap(&other->removed_member_); + to_line_.InternalSwap(&other->to_line_); group_id_.Swap(&other->group_id_); std::swap(notify_content_, other->notify_content_); - std::swap(line_, other->line_); std::swap(_cached_size_, other->_cached_size_); } @@ -568,21 +589,7 @@ void RemoveGroupMemberRequest::set_allocated_group_id(::std::string* group_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.RemoveGroupMemberRequest.group_id) } -// int32 line = 2; -void RemoveGroupMemberRequest::clear_line() { - line_ = 0; -} -::google::protobuf::int32 RemoveGroupMemberRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.RemoveGroupMemberRequest.line) - return line_; -} -void RemoveGroupMemberRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.RemoveGroupMemberRequest.line) -} - -// repeated string removed_member = 3; +// repeated string removed_member = 2; int RemoveGroupMemberRequest::removed_member_size() const { return removed_member_.size(); } @@ -651,6 +658,36 @@ RemoveGroupMemberRequest::mutable_removed_member() { return &removed_member_; } +// repeated int32 to_line = 3; +int RemoveGroupMemberRequest::to_line_size() const { + return to_line_.size(); +} +void RemoveGroupMemberRequest::clear_to_line() { + to_line_.Clear(); +} +::google::protobuf::int32 RemoveGroupMemberRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.RemoveGroupMemberRequest.to_line) + return to_line_.Get(index); +} +void RemoveGroupMemberRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.RemoveGroupMemberRequest.to_line) +} +void RemoveGroupMemberRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.RemoveGroupMemberRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +RemoveGroupMemberRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.RemoveGroupMemberRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +RemoveGroupMemberRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.RemoveGroupMemberRequest.to_line) + return &to_line_; +} + // .mars.stn.MessageContent notify_content = 4; bool RemoveGroupMemberRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; diff --git a/mars/stn/mqtt/Proto/remove_group_member_request.pb.h b/mars/stn/mqtt/Proto/remove_group_member_request.pb.h index a3e8674f..ebced304 100644 --- a/mars/stn/mqtt/Proto/remove_group_member_request.pb.h +++ b/mars/stn/mqtt/Proto/remove_group_member_request.pb.h @@ -125,10 +125,10 @@ class RemoveGroupMemberRequest : public ::google::protobuf::Message /* @@protoc_ // accessors ------------------------------------------------------- - // repeated string removed_member = 3; + // repeated string removed_member = 2; int removed_member_size() const; void clear_removed_member(); - static const int kRemovedMemberFieldNumber = 3; + static const int kRemovedMemberFieldNumber = 2; const ::std::string& removed_member(int index) const; ::std::string* mutable_removed_member(int index); void set_removed_member(int index, const ::std::string& value); @@ -147,6 +147,18 @@ class RemoveGroupMemberRequest : public ::google::protobuf::Message /* @@protoc_ const ::google::protobuf::RepeatedPtrField< ::std::string>& removed_member() const; ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_removed_member(); + // repeated int32 to_line = 3; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 3; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // string group_id = 1; void clear_group_id(); static const int kGroupIdFieldNumber = 1; @@ -170,20 +182,15 @@ class RemoveGroupMemberRequest : public ::google::protobuf::Message /* @@protoc_ ::mars::stn::MessageContent* release_notify_content(); void set_allocated_notify_content(::mars::stn::MessageContent* notify_content); - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:mars.stn.RemoveGroupMemberRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::std::string> removed_member_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::google::protobuf::internal::ArenaStringPtr group_id_; ::mars::stn::MessageContent* notify_content_; - ::google::protobuf::int32 line_; mutable int _cached_size_; friend struct protobuf_remove_5fgroup_5fmember_5frequest_2eproto::TableStruct; }; @@ -248,21 +255,7 @@ inline void RemoveGroupMemberRequest::set_allocated_group_id(::std::string* grou // @@protoc_insertion_point(field_set_allocated:mars.stn.RemoveGroupMemberRequest.group_id) } -// int32 line = 2; -inline void RemoveGroupMemberRequest::clear_line() { - line_ = 0; -} -inline ::google::protobuf::int32 RemoveGroupMemberRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.RemoveGroupMemberRequest.line) - return line_; -} -inline void RemoveGroupMemberRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.RemoveGroupMemberRequest.line) -} - -// repeated string removed_member = 3; +// repeated string removed_member = 2; inline int RemoveGroupMemberRequest::removed_member_size() const { return removed_member_.size(); } @@ -331,6 +324,36 @@ RemoveGroupMemberRequest::mutable_removed_member() { return &removed_member_; } +// repeated int32 to_line = 3; +inline int RemoveGroupMemberRequest::to_line_size() const { + return to_line_.size(); +} +inline void RemoveGroupMemberRequest::clear_to_line() { + to_line_.Clear(); +} +inline ::google::protobuf::int32 RemoveGroupMemberRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.RemoveGroupMemberRequest.to_line) + return to_line_.Get(index); +} +inline void RemoveGroupMemberRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.RemoveGroupMemberRequest.to_line) +} +inline void RemoveGroupMemberRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.RemoveGroupMemberRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +RemoveGroupMemberRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.RemoveGroupMemberRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +RemoveGroupMemberRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.RemoveGroupMemberRequest.to_line) + return &to_line_; +} + // .mars.stn.MessageContent notify_content = 4; inline bool RemoveGroupMemberRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; diff --git a/mars/stn/mqtt/Proto/remove_group_member_request.proto b/mars/stn/mqtt/Proto/remove_group_member_request.proto index e64bef1c..2da6b53b 100644 --- a/mars/stn/mqtt/Proto/remove_group_member_request.proto +++ b/mars/stn/mqtt/Proto/remove_group_member_request.proto @@ -11,7 +11,7 @@ import "message_content.proto"; message RemoveGroupMemberRequest { string group_id = 1; - int32 line = 2; - repeated string removed_member = 3; + repeated string removed_member = 2; + repeated int32 to_line = 3; MessageContent notify_content = 4; } diff --git a/mars/stn/mqtt/Proto/transfer_group_request.pb.cc b/mars/stn/mqtt/Proto/transfer_group_request.pb.cc index 5d8d0886..57227ddb 100644 --- a/mars/stn/mqtt/Proto/transfer_group_request.pb.cc +++ b/mars/stn/mqtt/Proto/transfer_group_request.pb.cc @@ -52,8 +52,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransferGroupRequest, group_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransferGroupRequest, line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransferGroupRequest, new_owner_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransferGroupRequest, to_line_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransferGroupRequest, notify_content_), }; @@ -111,15 +111,15 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n\034transfer_group_request.proto\022\010mars.stn" - "\032\025message_content.proto\"{\n\024TransferGroup" - "Request\022\020\n\010group_id\030\001 \001(\t\022\014\n\004line\030\002 \001(\005\022" - "\021\n\tnew_owner\030\003 \001(\t\0220\n\016notify_content\030\004 \001" - "(\0132\030.mars.stn.MessageContentB6\n\024win.liyu" - "fan.im.protoB\036TransferGroupRequestOuterC" - "lassb\006proto3" + "\032\025message_content.proto\"~\n\024TransferGroup" + "Request\022\020\n\010group_id\030\001 \001(\t\022\021\n\tnew_owner\030\002" + " \001(\t\022\017\n\007to_line\030\003 \003(\005\0220\n\016notify_content\030" + "\004 \001(\0132\030.mars.stn.MessageContentB6\n\024win.l" + "iyufan.im.protoB\036TransferGroupRequestOut" + "erClassb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 252); + descriptor, 255); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "transfer_group_request.proto", &protobuf_RegisterTypes); ::mars::stn::protobuf_message_5fcontent_2eproto::AddDescriptors(); @@ -144,8 +144,8 @@ struct StaticDescriptorInitializer { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int TransferGroupRequest::kGroupIdFieldNumber; -const int TransferGroupRequest::kLineFieldNumber; const int TransferGroupRequest::kNewOwnerFieldNumber; +const int TransferGroupRequest::kToLineFieldNumber; const int TransferGroupRequest::kNotifyContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -160,6 +160,7 @@ TransferGroupRequest::TransferGroupRequest() TransferGroupRequest::TransferGroupRequest(const TransferGroupRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), + to_line_(from.to_line_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -175,15 +176,13 @@ TransferGroupRequest::TransferGroupRequest(const TransferGroupRequest& from) } else { notify_content_ = NULL; } - line_ = from.line_; // @@protoc_insertion_point(copy_constructor:mars.stn.TransferGroupRequest) } void TransferGroupRequest::SharedCtor() { group_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); new_owner_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(¬ify_content_, 0, reinterpret_cast(&line_) - - reinterpret_cast(¬ify_content_) + sizeof(line_)); + notify_content_ = NULL; _cached_size_ = 0; } @@ -225,13 +224,13 @@ TransferGroupRequest* TransferGroupRequest::New(::google::protobuf::Arena* arena void TransferGroupRequest::Clear() { // @@protoc_insertion_point(message_clear_start:mars.stn.TransferGroupRequest) + to_line_.Clear(); group_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); new_owner_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && notify_content_ != NULL) { delete notify_content_; } notify_content_ = NULL; - line_ = 0; } bool TransferGroupRequest::MergePartialFromCodedStream( @@ -260,30 +259,34 @@ bool TransferGroupRequest::MergePartialFromCodedStream( break; } - // int32 line = 2; + // string new_owner = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &line_))); + static_cast< ::google::protobuf::uint8>(18u)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_new_owner())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->new_owner().data(), this->new_owner().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "mars.stn.TransferGroupRequest.new_owner")); } else { goto handle_unusual; } break; } - // string new_owner = 3; + // repeated int32 to_line = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_new_owner())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->new_owner().data(), this->new_owner().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "mars.stn.TransferGroupRequest.new_owner")); + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_to_line()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 26u, input, this->mutable_to_line()))); } else { goto handle_unusual; } @@ -339,19 +342,24 @@ void TransferGroupRequest::SerializeWithCachedSizes( 1, this->group_id(), output); } - // int32 line = 2; - if (this->line() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->line(), output); - } - - // string new_owner = 3; + // string new_owner = 2; if (this->new_owner().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->new_owner().data(), this->new_owner().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mars.stn.TransferGroupRequest.new_owner"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->new_owner(), output); + 2, this->new_owner(), output); + } + + // repeated int32 to_line = 3; + if (this->to_line_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_to_line_cached_byte_size_); + } + for (int i = 0, n = this->to_line_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->to_line(i), output); } // .mars.stn.MessageContent notify_content = 4; @@ -380,12 +388,7 @@ ::google::protobuf::uint8* TransferGroupRequest::InternalSerializeWithCachedSize 1, this->group_id(), target); } - // int32 line = 2; - if (this->line() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->line(), target); - } - - // string new_owner = 3; + // string new_owner = 2; if (this->new_owner().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->new_owner().data(), this->new_owner().length(), @@ -393,7 +396,19 @@ ::google::protobuf::uint8* TransferGroupRequest::InternalSerializeWithCachedSize "mars.stn.TransferGroupRequest.new_owner"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->new_owner(), target); + 2, this->new_owner(), target); + } + + // repeated int32 to_line = 3; + if (this->to_line_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 3, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _to_line_cached_byte_size_, target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->to_line_, target); } // .mars.stn.MessageContent notify_content = 4; @@ -411,6 +426,21 @@ size_t TransferGroupRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:mars.stn.TransferGroupRequest) size_t total_size = 0; + // repeated int32 to_line = 3; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->to_line_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _to_line_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + // string group_id = 1; if (this->group_id().size() > 0) { total_size += 1 + @@ -418,7 +448,7 @@ size_t TransferGroupRequest::ByteSizeLong() const { this->group_id()); } - // string new_owner = 3; + // string new_owner = 2; if (this->new_owner().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( @@ -432,13 +462,6 @@ size_t TransferGroupRequest::ByteSizeLong() const { *this->notify_content_); } - // int32 line = 2; - if (this->line() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line()); - } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -468,6 +491,7 @@ void TransferGroupRequest::MergeFrom(const TransferGroupRequest& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + to_line_.MergeFrom(from.to_line_); if (from.group_id().size() > 0) { group_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_id_); @@ -479,9 +503,6 @@ void TransferGroupRequest::MergeFrom(const TransferGroupRequest& from) { if (from.has_notify_content()) { mutable_notify_content()->::mars::stn::MessageContent::MergeFrom(from.notify_content()); } - if (from.line() != 0) { - set_line(from.line()); - } } void TransferGroupRequest::CopyFrom(const ::google::protobuf::Message& from) { @@ -507,10 +528,10 @@ void TransferGroupRequest::Swap(TransferGroupRequest* other) { InternalSwap(other); } void TransferGroupRequest::InternalSwap(TransferGroupRequest* other) { + to_line_.InternalSwap(&other->to_line_); group_id_.Swap(&other->group_id_); new_owner_.Swap(&other->new_owner_); std::swap(notify_content_, other->notify_content_); - std::swap(line_, other->line_); std::swap(_cached_size_, other->_cached_size_); } @@ -575,21 +596,7 @@ void TransferGroupRequest::set_allocated_group_id(::std::string* group_id) { // @@protoc_insertion_point(field_set_allocated:mars.stn.TransferGroupRequest.group_id) } -// int32 line = 2; -void TransferGroupRequest::clear_line() { - line_ = 0; -} -::google::protobuf::int32 TransferGroupRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.TransferGroupRequest.line) - return line_; -} -void TransferGroupRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.TransferGroupRequest.line) -} - -// string new_owner = 3; +// string new_owner = 2; void TransferGroupRequest::clear_new_owner() { new_owner_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -642,6 +649,36 @@ void TransferGroupRequest::set_allocated_new_owner(::std::string* new_owner) { // @@protoc_insertion_point(field_set_allocated:mars.stn.TransferGroupRequest.new_owner) } +// repeated int32 to_line = 3; +int TransferGroupRequest::to_line_size() const { + return to_line_.size(); +} +void TransferGroupRequest::clear_to_line() { + to_line_.Clear(); +} +::google::protobuf::int32 TransferGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.TransferGroupRequest.to_line) + return to_line_.Get(index); +} +void TransferGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.TransferGroupRequest.to_line) +} +void TransferGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.TransferGroupRequest.to_line) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TransferGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.TransferGroupRequest.to_line) + return to_line_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TransferGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.TransferGroupRequest.to_line) + return &to_line_; +} + // .mars.stn.MessageContent notify_content = 4; bool TransferGroupRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; diff --git a/mars/stn/mqtt/Proto/transfer_group_request.pb.h b/mars/stn/mqtt/Proto/transfer_group_request.pb.h index 11318c9d..b61ed8f5 100644 --- a/mars/stn/mqtt/Proto/transfer_group_request.pb.h +++ b/mars/stn/mqtt/Proto/transfer_group_request.pb.h @@ -125,6 +125,18 @@ class TransferGroupRequest : public ::google::protobuf::Message /* @@protoc_inse // accessors ------------------------------------------------------- + // repeated int32 to_line = 3; + int to_line_size() const; + void clear_to_line(); + static const int kToLineFieldNumber = 3; + ::google::protobuf::int32 to_line(int index) const; + void set_to_line(int index, ::google::protobuf::int32 value); + void add_to_line(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + to_line() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_to_line(); + // string group_id = 1; void clear_group_id(); static const int kGroupIdFieldNumber = 1; @@ -139,9 +151,9 @@ class TransferGroupRequest : public ::google::protobuf::Message /* @@protoc_inse ::std::string* release_group_id(); void set_allocated_group_id(::std::string* group_id); - // string new_owner = 3; + // string new_owner = 2; void clear_new_owner(); - static const int kNewOwnerFieldNumber = 3; + static const int kNewOwnerFieldNumber = 2; const ::std::string& new_owner() const; void set_new_owner(const ::std::string& value); #if LANG_CXX11 @@ -162,20 +174,15 @@ class TransferGroupRequest : public ::google::protobuf::Message /* @@protoc_inse ::mars::stn::MessageContent* release_notify_content(); void set_allocated_notify_content(::mars::stn::MessageContent* notify_content); - // int32 line = 2; - void clear_line(); - static const int kLineFieldNumber = 2; - ::google::protobuf::int32 line() const; - void set_line(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:mars.stn.TransferGroupRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > to_line_; + mutable int _to_line_cached_byte_size_; ::google::protobuf::internal::ArenaStringPtr group_id_; ::google::protobuf::internal::ArenaStringPtr new_owner_; ::mars::stn::MessageContent* notify_content_; - ::google::protobuf::int32 line_; mutable int _cached_size_; friend struct protobuf_transfer_5fgroup_5frequest_2eproto::TableStruct; }; @@ -240,21 +247,7 @@ inline void TransferGroupRequest::set_allocated_group_id(::std::string* group_id // @@protoc_insertion_point(field_set_allocated:mars.stn.TransferGroupRequest.group_id) } -// int32 line = 2; -inline void TransferGroupRequest::clear_line() { - line_ = 0; -} -inline ::google::protobuf::int32 TransferGroupRequest::line() const { - // @@protoc_insertion_point(field_get:mars.stn.TransferGroupRequest.line) - return line_; -} -inline void TransferGroupRequest::set_line(::google::protobuf::int32 value) { - - line_ = value; - // @@protoc_insertion_point(field_set:mars.stn.TransferGroupRequest.line) -} - -// string new_owner = 3; +// string new_owner = 2; inline void TransferGroupRequest::clear_new_owner() { new_owner_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -307,6 +300,36 @@ inline void TransferGroupRequest::set_allocated_new_owner(::std::string* new_own // @@protoc_insertion_point(field_set_allocated:mars.stn.TransferGroupRequest.new_owner) } +// repeated int32 to_line = 3; +inline int TransferGroupRequest::to_line_size() const { + return to_line_.size(); +} +inline void TransferGroupRequest::clear_to_line() { + to_line_.Clear(); +} +inline ::google::protobuf::int32 TransferGroupRequest::to_line(int index) const { + // @@protoc_insertion_point(field_get:mars.stn.TransferGroupRequest.to_line) + return to_line_.Get(index); +} +inline void TransferGroupRequest::set_to_line(int index, ::google::protobuf::int32 value) { + to_line_.Set(index, value); + // @@protoc_insertion_point(field_set:mars.stn.TransferGroupRequest.to_line) +} +inline void TransferGroupRequest::add_to_line(::google::protobuf::int32 value) { + to_line_.Add(value); + // @@protoc_insertion_point(field_add:mars.stn.TransferGroupRequest.to_line) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TransferGroupRequest::to_line() const { + // @@protoc_insertion_point(field_list:mars.stn.TransferGroupRequest.to_line) + return to_line_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TransferGroupRequest::mutable_to_line() { + // @@protoc_insertion_point(field_mutable_list:mars.stn.TransferGroupRequest.to_line) + return &to_line_; +} + // .mars.stn.MessageContent notify_content = 4; inline bool TransferGroupRequest::has_notify_content() const { return this != internal_default_instance() && notify_content_ != NULL; diff --git a/mars/stn/mqtt/Proto/transfer_group_request.proto b/mars/stn/mqtt/Proto/transfer_group_request.proto index e8f3a028..b4f91450 100644 --- a/mars/stn/mqtt/Proto/transfer_group_request.proto +++ b/mars/stn/mqtt/Proto/transfer_group_request.proto @@ -11,7 +11,7 @@ import "message_content.proto"; message TransferGroupRequest { string group_id = 1; - int32 line = 2; - string new_owner = 3; + string new_owner = 2; + repeated int32 to_line = 3; MessageContent notify_content = 4; } diff --git a/mars/stn/stn.h b/mars/stn/stn.h index bafcef2d..5ea79377 100644 --- a/mars/stn/stn.h +++ b/mars/stn/stn.h @@ -74,9 +74,8 @@ struct TaskProfile; struct DnsProfile; class TGroupInfo { public: - TGroupInfo() : target(""), line(0), type(0) {} + TGroupInfo() : target(""), type(0) {} std::string target; - int line; std::string name; std::string portrait; std::string owner; @@ -541,25 +540,25 @@ extern void (*ReportDnsProfile)(const DnsProfile& _dns_profile); extern int (*sendMessage)(TMessage &tmsg, SendMessageCallback *callback); -extern void (*createGroup)(const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, TMessage &tmsg, CreateGroupCallback *callback); + extern void (*createGroup)(const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, const std::list ¬ifyLines, TMessage &tmsg, CreateGroupCallback *callback); -extern void (*addMembers)(const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*addMembers)(const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); -extern void (*kickoffMembers)(const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*kickoffMembers)(const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); -extern void (*quitGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*quitGroup)(const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); -extern void (*dismissGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*dismissGroup)(const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); extern void (*getGroupInfo)(const std::list> &groupIdList, GetGroupInfoCallback *callback); -extern void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); extern void (*getGroupMembers)(const std::string &groupId, GetGroupMembersCallback *callback); extern void (*getMyGroups)(GetMyGroupsCallback *callback); -extern void (*transferGroup)(const std::string &groupId, const std::string &newOwner, TMessage &tmsg, GeneralGroupOperationCallback *callback); +extern void (*transferGroup)(const std::string &groupId, const std::string &newOwner, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback); extern void (*getUserInfo)(const std::list> &userReqList, GetUserInfoCallback *callback); diff --git a/mars/stn/stn_logic.cc b/mars/stn/stn_logic.cc index c3c2caa0..9ea30d14 100644 --- a/mars/stn/stn_logic.cc +++ b/mars/stn/stn_logic.cc @@ -581,8 +581,8 @@ int (*sendMessage)(TMessage &tmsg, SendMessageCallback *callback) } }; -void (*createGroup)(const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, TMessage &tmsg, CreateGroupCallback *callback) -= [](const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, TMessage &tmsg, CreateGroupCallback *callback) { +void (*createGroup)(const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, const std::list ¬ifyLines, TMessage &tmsg, CreateGroupCallback *callback) += [](const std::string &groupId, const std::string &groupName, const std::string &groupPortrait, const std::list &groupMembers, const std::list ¬ifyLines, TMessage &tmsg, CreateGroupCallback *callback) { CreateGroupRequest request; request.mutable_group()->mutable_group_info()->set_target_id(groupId); request.mutable_group()->mutable_group_info()->set_portrait(groupPortrait); @@ -595,6 +595,10 @@ void (*createGroup)(const std::string &groupId, const std::string &groupName, co gm->set_type(0); } + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new CreateGroupPublishCallback(callback), createGroupTopic); @@ -617,8 +621,8 @@ void (*createGroup)(const std::string &groupId, const std::string &groupName, co } }; -void (*addMembers)(const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback) -= [](const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback) { +void (*addMembers)(const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) += [](const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) { AddGroupMemberRequest request; request.set_group_id(groupId); request.mutable_added_member()->Reserve((int)members.size()); @@ -628,13 +632,18 @@ void (*addMembers)(const std::string &groupId, const std::list &mem gm->set_member_id(*it); gm->set_type(0); } + + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new GeneralGroupOperationPublishCallback(callback), addGroupMemberTopic); }; -void (*kickoffMembers)(const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback) -= [](const std::string &groupId, const std::list &members, TMessage &tmsg, GeneralGroupOperationCallback *callback) { +void (*kickoffMembers)(const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) += [](const std::string &groupId, const std::list &members, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) { RemoveGroupMemberRequest request; request.set_group_id(groupId); request.mutable_removed_member()->Reserve((int)members.size()); @@ -643,26 +652,38 @@ void (*kickoffMembers)(const std::string &groupId, const std::list request.mutable_removed_member()->AddAllocated(new std::string(*it)); } + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new GeneralGroupOperationPublishCallback(callback), kickoffGroupMemberTopic); }; -void (*quitGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback) -= [](const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback) { +void (*quitGroup)(const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) += [](const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) { QuitGroupRequest request; request.set_group_id(groupId); + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new GeneralGroupOperationPublishCallback(callback), quitGroupTopic); }; -void (*dismissGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback) -= [](const std::string &groupId, TMessage &tmsg, GeneralGroupOperationCallback *callback) { +void (*dismissGroup)(const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) += [](const std::string &groupId, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) { DismissGroupRequest request; request.set_group_id(groupId); + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new GeneralGroupOperationPublishCallback(callback), dismissGroupTopic); @@ -705,19 +726,17 @@ void (*dismissGroup)(const std::string &groupId, TMessage &tmsg, GeneralGroupOpe void (*getGroupInfo)(const std::list> &groupIdList, GetGroupInfoCallback *callback) = [](const std::list> &groupIdList, GetGroupInfoCallback *callback) { - GroupTargetListBuf listBuf; - listBuf.mutable_target()->Reserve((int)groupIdList.size()); + IDListBuf listBuf; + listBuf.mutable_id()->Reserve((int)groupIdList.size()); for (std::list>::const_iterator it = groupIdList.begin(); it != groupIdList.end(); it++) { - GroupTarget *groupTarget = listBuf.mutable_target()->Add(); - groupTarget->set_target_id((*it).first); - groupTarget->set_line(0); + listBuf.mutable_id()->AddAllocated(new std::string((*it).first)); } publishTask(listBuf, new GetGroupInfoPublishCallback(callback), getGroupInfoTopic); }; -void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, TMessage &tmsg, GeneralGroupOperationCallback *callback) -= [](const std::string &groupId, const TGroupInfo &groupInfo, TMessage &tmsg, GeneralGroupOperationCallback *callback) { +void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) += [](const std::string &groupId, const TGroupInfo &groupInfo, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) { ModifyGroupInfoRequest request; request.mutable_group_info()->set_target_id(groupId); @@ -733,6 +752,10 @@ void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, request.mutable_group_info()->set_extra(groupInfo.extra); } + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new GeneralGroupOperationPublishCallback(callback), modifyGroupInfoTopic); @@ -767,9 +790,8 @@ void (*modifyGroupInfo)(const std::string &groupId, const TGroupInfo &groupInfo, }; void (*getGroupMembers)(const std::string &groupId, GetGroupMembersCallback *callback) = [](const std::string &groupId, GetGroupMembersCallback *callback) { - GroupTarget idBuf; - idBuf.set_target_id(groupId); - idBuf.set_line(0); + IDBuf idBuf; + idBuf.set_id(groupId); publishTask(idBuf, new GetGroupMembersPublishCallback(callback), getGroupMemberTopic); }; @@ -809,12 +831,17 @@ void (*getMyGroups)(GetMyGroupsCallback *callback) publishTask(idBuf, new GetMyGroupsPublishCallback(callback), getMyGroupsTopic); }; - void (*transferGroup)(const std::string &groupId, const std::string &newOwner, TMessage &tmsg, GeneralGroupOperationCallback *callback) - = [](const std::string &groupId, const std::string &newOwner, TMessage &tmsg, GeneralGroupOperationCallback *callback) { + void (*transferGroup)(const std::string &groupId, const std::string &newOwner, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) + = [](const std::string &groupId, const std::string &newOwner, const std::list ¬ifyLines, TMessage &tmsg, GeneralGroupOperationCallback *callback) { TransferGroupRequest request; request.set_group_id(groupId); request.set_new_owner(newOwner); + for(std::list::const_iterator it = notifyLines.begin(); it != notifyLines.end(); it++) { + request.mutable_to_line()->Add(*it); + } + + fillMessageContent(tmsg, request.mutable_notify_content()); publishTask(request, new GeneralGroupOperationPublishCallback(callback), transferGroupTopic);