public com.avos.avoscloud.Messages.ConvCommand buildPartial() { com.avos.avoscloud.Messages.ConvCommand result = new com.avos.avoscloud.Messages.ConvCommand(this); int from_bitField0_ = bitField0_; int from_bitField1_ = bitField1_;
dataSize += computeStringSizeNoTag(m_.getRaw(i)); size += 1 * getMList().size(); dataSize += computeStringSizeNoTag(cids_.getRaw(i)); size += 2 * getCidsList().size(); .computeMessageSize(26, getInfo()); dataSize += computeStringSizeNoTag(tempConvIds_.getRaw(i)); size += 2 * getTempConvIdsList().size(); dataSize += computeStringSizeNoTag(allowedPids_.getRaw(i)); size += 2 * getAllowedPidsList().size(); .computeMessageSize(100, getResults()); .computeMessageSize(101, getWhere()); .computeMessageSize(103, getAttr());
void onConversationCreated(int requestId, Messages.ConvCommand convCommand) { String createdAt = convCommand.getCdate(); String cid = convCommand.getCid(); int tempTTL = convCommand.hasTempConvTTL()? convCommand.getTempConvTTL(): 0; // they are not necessary for create-callback(isTemp, isTransient), except for tempTTL. Bundle bundle = new Bundle(); bundle.putString(Conversation.callbackCreatedAt, createdAt); bundle.putString(Conversation.callbackConversationKey, cid); bundle.putInt(Conversation.callbackTemporaryTTL, tempTTL); BroadcastUtil.sendIMLocalBroadcast(session.getSelfPeerId(), conversationId, requestId, bundle, AVIMOperation.CONVERSATION_CREATION); }
public Builder mergeFrom(com.avos.avoscloud.Messages.ConvCommand other) { if (other == com.avos.avoscloud.Messages.ConvCommand.getDefaultInstance()) return this; if (!other.m_.isEmpty()) { if (m_.isEmpty()) { if (other.hasTransient()) { setTransient(other.getTransient()); if (other.hasUnique()) { setUnique(other.getUnique()); if (other.hasCid()) { bitField0_ |= 0x00000008; cid_ = other.cid_; onChanged(); if (other.hasCdate()) { bitField0_ |= 0x00000010; cdate_ = other.cdate_; onChanged(); if (other.hasInitBy()) { bitField0_ |= 0x00000020; initBy_ = other.initBy_; onChanged(); if (other.hasSort()) { bitField0_ |= 0x00000040; sort_ = other.sort_; onChanged();
if (hasConvMessage()) { result = result && getConvMessage() .equals(other.getConvMessage());
result = result && getMList() .equals(other.getMList()); result = result && (hasTransient() == other.hasTransient()); if (hasTransient()) { result = result && (getTransient() == other.getTransient()); result = result && (hasUnique() == other.hasUnique()); if (hasUnique()) { result = result && (getUnique() == other.getUnique()); result = result && (hasCid() == other.hasCid()); if (hasCid()) { result = result && getCid() .equals(other.getCid()); result = result && (hasCdate() == other.hasCdate()); if (hasCdate()) { result = result && getCdate() .equals(other.getCdate()); result = result && (hasInitBy() == other.hasInitBy()); if (hasInitBy()) { result = result && getInitBy() .equals(other.getInitBy()); result = result && (hasSort() == other.hasSort()); if (hasSort()) {
hash = (19 * hash) + getDescriptor().hashCode(); if (getMCount() > 0) { hash = (37 * hash) + M_FIELD_NUMBER; hash = (53 * hash) + getMList().hashCode(); if (hasTransient()) { hash = (37 * hash) + TRANSIENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getTransient()); if (hasUnique()) { hash = (37 * hash) + UNIQUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getUnique()); if (hasCid()) { hash = (37 * hash) + CID_FIELD_NUMBER; hash = (53 * hash) + getCid().hashCode(); if (hasCdate()) { hash = (37 * hash) + CDATE_FIELD_NUMBER; hash = (53 * hash) + getCdate().hashCode(); if (hasInitBy()) { hash = (37 * hash) + INITBY_FIELD_NUMBER; hash = (53 * hash) + getInitBy().hashCode(); if (hasSort()) { hash = (37 * hash) + SORT_FIELD_NUMBER;
output.writeMessage(26, getInfo()); output.writeMessage(100, getResults()); output.writeMessage(101, getWhere()); output.writeMessage(103, getAttr());
Operation op = session.conversationOperationCache.poll(requestKey); if (null != op && op.operation == AVIMOperation.CONVERSATION_QUERY.getCode()) { String result = convCommand.getResults().getData(); Bundle bundle = new Bundle(); bundle.putString(Conversation.callbackData, result); Operation op = session.conversationOperationCache.poll(requestKey); if (null != op && op.operation == AVIMOperation.CONVERSATION_MUTED_MEMBER_QUERY.getCode()) { List<String> result = convCommand.getMList(); // result stored in m field. String[] resultMembers = new String[null == result? 0 : result.size()]; if (null != result) { conversationId = op.conversationId; } else { conversationId = convCommand.getCid(); session.conversationOperationCache.poll(requestId); conversationId = convCommand.getCid(); if (convCommand.hasTempConv() && convCommand.getTempConv()) { convType = Conversation.CONV_TYPE_TEMPORARY; } else if (convCommand.hasTransient() && convCommand.getTransient()) { convType = Conversation.CONV_TYPE_TRANSIENT;
if (isInitialized == 0) return false; for (int i = 0; i < getFailedPidsCount(); i++) { if (!getFailedPids(i).isInitialized()) { memoizedIsInitialized = 0; return false; if (hasResults()) { if (!getResults().isInitialized()) { memoizedIsInitialized = 0; return false; if (hasWhere()) { if (!getWhere().isInitialized()) { memoizedIsInitialized = 0; return false; if (hasAttr()) { if (!getAttr().isInitialized()) { memoizedIsInitialized = 0; return false;
void onInfoChangedNotify(Messages.ConvCommand convCommand) { final AVIMConversationEventHandler handler = AVIMMessageManagerHelper.getConversationEventHandler(); if (null != handler) { AVIMClient client = AVIMClient.getInstance(session.getSelfPeerId()); final AVIMConversation conversation = parseConversation(client, convCommand); final String operator = convCommand.getInitBy(); Messages.JsonObjectMessage attrMsg = convCommand.getAttr(); JSONObject operand = null; if (null == attrMsg || null == attrMsg.getData() || attrMsg.getData().trim().length() < 1) { // attached data is empty conversation.setMustFetch(); } else { // diff data is pushed, but deleted attr is ignored. operand = JSON.parseObject(attrMsg.getData()); AVIMConversation.mergeConversationFromJsonObject(conversation, operand); } // Notice: SDK doesn't refresh conversation data automatically. handler.processEvent(Conversation.STATUS_ON_INFO_CHANGED, operator, operand, conversation); } } void onKickedFromConversation(final String invitedBy) {
void onResponse4MemberMute(AVIMOperation imop, String operation, int requestId, Messages.ConvCommand convCommand) { if (null == convCommand) { return; } List<String> allowedList = convCommand.getAllowedPidsList(); List<Messages.ErrorCommand> errorCommandList = convCommand.getFailedPidsList(); Bundle bundle = genBundleFromPartiallyResult(allowedList, errorCommandList); BroadcastUtil.sendIMLocalBroadcast(session.getSelfPeerId(), conversationId, requestId, bundle, imop); }
/** * <code>optional string cdate = 5;</code> */ public Builder clearCdate() { bitField0_ = (bitField0_ & ~0x00000010); cdate_ = getDefaultInstance().getCdate(); onChanged(); return this; } /**
/** * <code>optional string cid = 4;</code> */ public Builder clearCid() { bitField0_ = (bitField0_ & ~0x00000008); cid_ = getDefaultInstance().getCid(); onChanged(); return this; } /**