use of com.vodafone360.people.datatypes.PushChatConversationEvent in project 360-Engine-for-Android by 360.
the class HessianDecoder method parsePushPayload.
private void parsePushPayload(RpgPushMessage msg, List<BaseDataType> list) {
// convert push msg type string to PushMsgType
PushMessageTypes type = msg.mType;
EngineId engineId = EngineId.UNDEFINED;
if (type != null) {
switch(type) {
case CHAT_MESSAGE:
LogUtils.logV("Parse incomming chat_message");
engineId = EngineId.PRESENCE_ENGINE;
list.add(new PushChatMessageEvent(msg, engineId));
return;
case AVAILABILITY_STATE_CHANGE:
LogUtils.logV("Parse availability state change:");
engineId = EngineId.PRESENCE_ENGINE;
list.add(PushAvailabilityEvent.createPushEvent(msg, engineId));
return;
case START_CONVERSATION:
LogUtils.logV("Parse new conversation event:");
engineId = EngineId.PRESENCE_ENGINE;
list.add(new PushChatConversationEvent(msg, engineId));
return;
case CLOSED_CONVERSATION:
LogUtils.logV("Parse closed conversation event:");
engineId = EngineId.PRESENCE_ENGINE;
list.add(new PushClosedConversationEvent(msg, engineId));
return;
case CONVERSATION_END:
break;
// API events create push message type
case PROFILE_CHANGE:
engineId = EngineId.SYNCME_ENGINE;
break;
case CONTACTS_CHANGE:
engineId = EngineId.CONTACT_SYNC_ENGINE;
break;
case TIMELINE_ACTIVITY_CHANGE:
case STATUS_ACTIVITY_CHANGE:
engineId = EngineId.ACTIVITIES_ENGINE;
break;
case FRIENDSHIP_REQUEST_RECEIVED:
break;
case IDENTITY_CHANGE:
engineId = EngineId.IDENTITIES_ENGINE;
break;
case IDENTITY_NETWORK_CHANGE:
engineId = EngineId.IDENTITIES_ENGINE;
break;
case SYSTEM_NOTIFICATION:
LogUtils.logE("SYSTEM_NOTIFICATION push msg:" + msg.mHash);
list.add(SystemNotification.createFromHashtable(msg.mHash, engineId));
return;
default:
}
list.add(PushEvent.createPushEvent(msg, engineId));
}
}
Aggregations