public OnConversationUnconsumedSuppressedMessagesArgs(SktConversation sender, uint newValue) { this.sender = sender; value = newValue; }
internal void FireOnConversationPasswordhint(SktConversation sender, String value) { if (OnConversationPasswordhint == null) return; // Event not assigned OnConversationPasswordhintArgs args = new OnConversationPasswordhintArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationPasswordhintInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationPasswordhint, new object[] { sender, args }); // Syncing to GUI thread }
internal void FireOnConversationUnconsumedSuppressedMessages(SktConversation sender, uint value) { if (OnConversationUnconsumedSuppressedMessages == null) return; // Event not assigned OnConversationUnconsumedSuppressedMessagesArgs args = new OnConversationUnconsumedSuppressedMessagesArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationUnconsumedSuppressedMessagesInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationUnconsumedSuppressedMessages, new object[] { sender, args }); // Syncing to GUI thread }
internal void FireOnConversationMetaPicture(SktConversation sender, byte[] value) { if (OnConversationMetaPicture == null) return; // Event not assigned OnConversationMetaPictureArgs args = new OnConversationMetaPictureArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationMetaPictureInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationMetaPicture, new object[] { sender, args }); // Syncing to GUI thread }
internal void FireOnConversationOptAdminOnlyActivities(SktConversation sender, SktConversation.ALLOWED_ACTIVITY value) { if (OnConversationOptAdminOnlyActivities == null) return; // Event not assigned OnConversationOptAdminOnlyActivitiesArgs args = new OnConversationOptAdminOnlyActivitiesArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationOptAdminOnlyActivitiesInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationOptAdminOnlyActivities, new object[] { sender, args }); // Syncing to GUI thread }
/** When the socket reader receives a property update from runtime, it decodes object ID * property ID and the new value of the property. It then calls this method of * the target object, to update the new value in property cache. After updating the cache, * this method then fires appropriate event in skype.events to notify the UI of what has happened. * DispatchPropertyUpdate is executed in the socket reader thread. */ internal override void DispatchPropertyUpdate(uint propId, object value, bool hasValue) { switch (propId) { case 972: /* Conversation.P_IDENTITY */ cache[0] = hasValue; // if no value - invalidate cache if (hasValue) { cache_identity = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_IDENTITY = " + cache_identity.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_IDENTITY - update without value"); skypeRef.events.FireOnConversationIdentity(this, cache_identity); break; case 902: /* Conversation.P_TYPE */ cache[1] = hasValue; // if no value - invalidate cache if (hasValue) { cache_type = (SktConversation.TYPE)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_TYPE = " + cache_type.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_TYPE - update without value"); skypeRef.events.FireOnConversationType(this, cache_type); break; case 918: /* Conversation.P_LIVE_HOST */ cache[2] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_host = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_LIVE_HOST = " + cache_live_host.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_LIVE_HOST - update without value"); skypeRef.events.FireOnConversationLiveHost(this, cache_live_host); break; case 974: /* Conversation.P_LIVE_START_TIMESTAMP */ cache[3] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_start_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_LIVE_START_TIMESTAMP = " + cache_live_start_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_LIVE_START_TIMESTAMP - update without value"); skypeRef.events.FireOnConversationLiveStartTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_live_start_timestamp)); break; case 996: /* Conversation.P_LIVE_IS_MUTED */ cache[4] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_is_muted = (Boolean)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_LIVE_IS_MUTED = " + cache_live_is_muted.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_LIVE_IS_MUTED - update without value"); skypeRef.events.FireOnConversationLiveIsMuted(this, cache_live_is_muted); break; case 920: /* Conversation.P_ALERT_STRING */ cache[5] = hasValue; // if no value - invalidate cache if (hasValue) { cache_alert_string = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_ALERT_STRING = " + cache_alert_string.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_ALERT_STRING - update without value"); skypeRef.events.FireOnConversationAlertString(this, cache_alert_string); break; case 921: /* Conversation.P_IS_BOOKMARKED */ cache[6] = hasValue; // if no value - invalidate cache if (hasValue) { cache_is_bookmarked = (Boolean)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_IS_BOOKMARKED = " + cache_is_bookmarked.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_IS_BOOKMARKED - update without value"); skypeRef.events.FireOnConversationIsBookmarked(this, cache_is_bookmarked); break; case 925: /* Conversation.P_GIVEN_DISPLAYNAME */ cache[7] = hasValue; // if no value - invalidate cache if (hasValue) { cache_given_displayname = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_GIVEN_DISPLAYNAME = " + cache_given_displayname.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_GIVEN_DISPLAYNAME - update without value"); skypeRef.events.FireOnConversationGivenDisplayname(this, cache_given_displayname); break; case 924: /* Conversation.P_DISPLAYNAME */ cache[8] = hasValue; // if no value - invalidate cache if (hasValue) { cache_displayname = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_DISPLAYNAME = " + cache_displayname.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_DISPLAYNAME - update without value"); skypeRef.events.FireOnConversationDisplayname(this, cache_displayname); break; case 927: /* Conversation.P_LOCAL_LIVESTATUS */ cache[9] = hasValue; // if no value - invalidate cache if (hasValue) { cache_local_livestatus = (SktConversation.LOCAL_LIVESTATUS)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_LOCAL_LIVESTATUS = " + cache_local_livestatus.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_LOCAL_LIVESTATUS - update without value"); skypeRef.events.FireOnConversationLocalLivestatus(this, cache_local_livestatus); break; case 928: /* Conversation.P_INBOX_TIMESTAMP */ cache[10] = hasValue; // if no value - invalidate cache if (hasValue) { cache_inbox_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_INBOX_TIMESTAMP = " + cache_inbox_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_INBOX_TIMESTAMP - update without value"); skypeRef.events.FireOnConversationInboxTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_inbox_timestamp)); break; case 973: /* Conversation.P_INBOX_MESSAGE_ID */ cache[11] = hasValue; // if no value - invalidate cache if (hasValue) { cache_inbox_message_id = (SktMessage)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_INBOX_MESSAGE_ID = " + cache_inbox_message_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_INBOX_MESSAGE_ID - update without value"); skypeRef.events.FireOnConversationInboxMessageId(this, cache_inbox_message_id); break; case 975: /* Conversation.P_UNCONSUMED_SUPPRESSED_MESSAGES */ cache[12] = hasValue; // if no value - invalidate cache if (hasValue) { cache_unconsumed_suppressed_messages = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_SUPPRESSED_MESSAGES = " + cache_unconsumed_suppressed_messages.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_SUPPRESSED_MESSAGES - update without value"); skypeRef.events.FireOnConversationUnconsumedSuppressedMessages(this, cache_unconsumed_suppressed_messages); break; case 976: /* Conversation.P_UNCONSUMED_NORMAL_MESSAGES */ cache[13] = hasValue; // if no value - invalidate cache if (hasValue) { cache_unconsumed_normal_messages = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_NORMAL_MESSAGES = " + cache_unconsumed_normal_messages.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_NORMAL_MESSAGES - update without value"); skypeRef.events.FireOnConversationUnconsumedNormalMessages(this, cache_unconsumed_normal_messages); break; case 977: /* Conversation.P_UNCONSUMED_ELEVATED_MESSAGES */ cache[14] = hasValue; // if no value - invalidate cache if (hasValue) { cache_unconsumed_elevated_messages = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_ELEVATED_MESSAGES = " + cache_unconsumed_elevated_messages.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_ELEVATED_MESSAGES - update without value"); skypeRef.events.FireOnConversationUnconsumedElevatedMessages(this, cache_unconsumed_elevated_messages); break; case 970: /* Conversation.P_UNCONSUMED_MESSAGES_VOICE */ cache[15] = hasValue; // if no value - invalidate cache if (hasValue) { cache_unconsumed_messages_voice = (Boolean)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_MESSAGES_VOICE = " + cache_unconsumed_messages_voice.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_UNCONSUMED_MESSAGES_VOICE - update without value"); skypeRef.events.FireOnConversationUnconsumedMessagesVoice(this, cache_unconsumed_messages_voice); break; case 971: /* Conversation.P_ACTIVE_VM_ID */ cache[16] = hasValue; // if no value - invalidate cache if (hasValue) { cache_active_vm_id = (SktVoicemail)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_ACTIVE_VM_ID = " + cache_active_vm_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_ACTIVE_VM_ID - update without value"); skypeRef.events.FireOnConversationActiveVmId(this, cache_active_vm_id); break; case 979: /* Conversation.P_CONSUMPTION_HORIZON */ cache[17] = hasValue; // if no value - invalidate cache if (hasValue) { cache_consumption_horizon = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_CONSUMPTION_HORIZON = " + cache_consumption_horizon.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_CONSUMPTION_HORIZON - update without value"); skypeRef.events.FireOnConversationConsumptionHorizon(this, skypeRef.UnixTimestampToDateTime(cache_consumption_horizon)); break; case 981: /* Conversation.P_LAST_ACTIVITY_TIMESTAMP */ cache[18] = hasValue; // if no value - invalidate cache if (hasValue) { cache_last_activity_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_LAST_ACTIVITY_TIMESTAMP = " + cache_last_activity_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_LAST_ACTIVITY_TIMESTAMP - update without value"); skypeRef.events.FireOnConversationLastActivityTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_last_activity_timestamp)); break; case 915: /* Conversation.P_SPAWNED_FROM_CONVO_ID */ cache[19] = hasValue; // if no value - invalidate cache if (hasValue) { cache_spawned_from_convo_id = (SktConversation)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_SPAWNED_FROM_CONVO_ID = " + cache_spawned_from_convo_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_SPAWNED_FROM_CONVO_ID - update without value"); skypeRef.events.FireOnConversationSpawnedFromConvoId(this, cache_spawned_from_convo_id); break; case 903: /* Conversation.P_CREATOR */ cache[20] = hasValue; // if no value - invalidate cache if (hasValue) { cache_creator = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_CREATOR = " + cache_creator.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_CREATOR - update without value"); skypeRef.events.FireOnConversationCreator(this, cache_creator); break; case 904: /* Conversation.P_CREATION_TIMESTAMP */ cache[21] = hasValue; // if no value - invalidate cache if (hasValue) { cache_creation_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_CREATION_TIMESTAMP = " + cache_creation_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_CREATION_TIMESTAMP - update without value"); skypeRef.events.FireOnConversationCreationTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_creation_timestamp)); break; case 919: /* Conversation.P_MY_STATUS */ cache[22] = hasValue; // if no value - invalidate cache if (hasValue) { cache_my_status = (SktConversation.MY_STATUS)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_MY_STATUS = " + cache_my_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_MY_STATUS - update without value"); skypeRef.events.FireOnConversationMyStatus(this, cache_my_status); break; case 922: /* Conversation.P_OPT_JOINING_ENABLED */ cache[23] = hasValue; // if no value - invalidate cache if (hasValue) { cache_opt_joining_enabled = (Boolean)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_JOINING_ENABLED = " + cache_opt_joining_enabled.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_JOINING_ENABLED - update without value"); skypeRef.events.FireOnConversationOptJoiningEnabled(this, cache_opt_joining_enabled); break; case 906: /* Conversation.P_OPT_ENTRY_LEVEL_RANK */ cache[24] = hasValue; // if no value - invalidate cache if (hasValue) { cache_opt_entry_level_rank = (SktParticipant.RANK)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_ENTRY_LEVEL_RANK = " + cache_opt_entry_level_rank.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_ENTRY_LEVEL_RANK - update without value"); skypeRef.events.FireOnConversationOptEntryLevelRank(this, cache_opt_entry_level_rank); break; case 907: /* Conversation.P_OPT_DISCLOSE_HISTORY */ cache[25] = hasValue; // if no value - invalidate cache if (hasValue) { cache_opt_disclose_history = (Boolean)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_DISCLOSE_HISTORY = " + cache_opt_disclose_history.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_DISCLOSE_HISTORY - update without value"); skypeRef.events.FireOnConversationOptDiscloseHistory(this, cache_opt_disclose_history); break; case 909: /* Conversation.P_OPT_ADMIN_ONLY_ACTIVITIES */ cache[26] = hasValue; // if no value - invalidate cache if (hasValue) { cache_opt_admin_only_activities = (SktConversation.ALLOWED_ACTIVITY)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_ADMIN_ONLY_ACTIVITIES = " + cache_opt_admin_only_activities.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_OPT_ADMIN_ONLY_ACTIVITIES - update without value"); skypeRef.events.FireOnConversationOptAdminOnlyActivities(this, cache_opt_admin_only_activities); break; case 980: /* Conversation.P_PASSWORDHINT */ cache[27] = hasValue; // if no value - invalidate cache if (hasValue) { cache_passwordhint = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_PASSWORDHINT = " + cache_passwordhint.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_PASSWORDHINT - update without value"); skypeRef.events.FireOnConversationPasswordhint(this, cache_passwordhint); break; case 910: /* Conversation.P_META_NAME */ cache[28] = hasValue; // if no value - invalidate cache if (hasValue) { cache_meta_name = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_META_NAME = " + cache_meta_name.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_META_NAME - update without value"); skypeRef.events.FireOnConversationMetaName(this, cache_meta_name); break; case 911: /* Conversation.P_META_TOPIC */ cache[29] = hasValue; // if no value - invalidate cache if (hasValue) { cache_meta_topic = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_META_TOPIC = " + cache_meta_topic.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_META_TOPIC - update without value"); skypeRef.events.FireOnConversationMetaTopic(this, cache_meta_topic); break; case 913: /* Conversation.P_META_GUIDELINES */ cache[30] = hasValue; // if no value - invalidate cache if (hasValue) { cache_meta_guidelines = (String)value; if (skypeRef.logging) skypeRef.Log("Conversation.P_META_GUIDELINES = " + cache_meta_guidelines.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_META_GUIDELINES - update without value"); skypeRef.events.FireOnConversationMetaGuidelines(this, cache_meta_guidelines); break; case 914: /* Conversation.P_META_PICTURE */ cache[31] = hasValue; // if no value - invalidate cache if (hasValue) { cache_meta_picture = (byte[])value; if (skypeRef.logging) skypeRef.Log("Conversation.P_META_PICTURE = binary size " + cache_meta_picture.Length.ToString()); } else if (skypeRef.logging) skypeRef.Log("Conversation.P_META_PICTURE - update without value"); skypeRef.events.FireOnConversationMetaPicture(this, cache_meta_picture); break; default: skypeRef.Error(String.Format("Invalid Conversation class property ID ({0})received from socket.", propId)); break; } }
public void Add(SktConversation item) { base.Add((SktConversation)item); }
/** When the socket reader receives a property update from runtime, it decodes object ID * property ID and the new value of the property. It then calls this method of * the target object, to update the new value in property cache. After updating the cache, * this method then fires appropriate event in skype.events to notify the UI of what has happened. * DispatchPropertyUpdate is executed in the socket reader thread. */ internal override void DispatchPropertyUpdate(uint propId, object value, bool hasValue) { switch (propId) { case 960: /* Message.P_CONVO_ID */ cache[0] = hasValue; // if no value - invalidate cache if (hasValue) { cache_convo_id = (SktConversation)value; if (skypeRef.logging) skypeRef.Log("Message.P_CONVO_ID = " + cache_convo_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_CONVO_ID - update without value"); skypeRef.events.FireOnMessageConvoId(this, cache_convo_id); break; case 120: /* Message.P_CONVO_GUID */ cache[1] = hasValue; // if no value - invalidate cache if (hasValue) { cache_convo_guid = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_CONVO_GUID = " + cache_convo_guid.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_CONVO_GUID - update without value"); skypeRef.events.FireOnMessageConvoGuid(this, cache_convo_guid); break; case 122: /* Message.P_AUTHOR */ cache[2] = hasValue; // if no value - invalidate cache if (hasValue) { cache_author = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_AUTHOR = " + cache_author.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_AUTHOR - update without value"); skypeRef.events.FireOnMessageAuthor(this, cache_author); break; case 123: /* Message.P_AUTHOR_DISPLAYNAME */ cache[3] = hasValue; // if no value - invalidate cache if (hasValue) { cache_author_displayname = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_AUTHOR_DISPLAYNAME = " + cache_author_displayname.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_AUTHOR_DISPLAYNAME - update without value"); skypeRef.events.FireOnMessageAuthorDisplayname(this, cache_author_displayname); break; case 792: /* Message.P_GUID */ cache[4] = hasValue; // if no value - invalidate cache if (hasValue) { cache_guid = (byte[])value; if (skypeRef.logging) skypeRef.Log("Message.P_GUID = binary size " + cache_guid.Length.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_GUID - update without value"); skypeRef.events.FireOnMessageGuid(this, cache_guid); break; case 790: /* Message.P_ORIGINALLY_MEANT_FOR */ cache[5] = hasValue; // if no value - invalidate cache if (hasValue) { cache_originally_meant_for = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_ORIGINALLY_MEANT_FOR = " + cache_originally_meant_for.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_ORIGINALLY_MEANT_FOR - update without value"); skypeRef.events.FireOnMessageOriginallyMeantFor(this, cache_originally_meant_for); break; case 121: /* Message.P_TIMESTAMP */ cache[6] = hasValue; // if no value - invalidate cache if (hasValue) { cache_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Message.P_TIMESTAMP = " + cache_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_TIMESTAMP - update without value"); skypeRef.events.FireOnMessageTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_timestamp)); break; case 961: /* Message.P_TYPE */ cache[7] = hasValue; // if no value - invalidate cache if (hasValue) { cache_type = (SktMessage.TYPE)value; if (skypeRef.logging) skypeRef.Log("Message.P_TYPE = " + cache_type.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_TYPE - update without value"); skypeRef.events.FireOnMessageType(this, cache_type); break; case 962: /* Message.P_SENDING_STATUS */ cache[8] = hasValue; // if no value - invalidate cache if (hasValue) { cache_sending_status = (SktMessage.SENDING_STATUS)value; if (skypeRef.logging) skypeRef.Log("Message.P_SENDING_STATUS = " + cache_sending_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_SENDING_STATUS - update without value"); skypeRef.events.FireOnMessageSendingStatus(this, cache_sending_status); break; case 968: /* Message.P_CONSUMPTION_STATUS */ cache[9] = hasValue; // if no value - invalidate cache if (hasValue) { cache_consumption_status = (SktMessage.CONSUMPTION_STATUS)value; if (skypeRef.logging) skypeRef.Log("Message.P_CONSUMPTION_STATUS = " + cache_consumption_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_CONSUMPTION_STATUS - update without value"); skypeRef.events.FireOnMessageConsumptionStatus(this, cache_consumption_status); break; case 222: /* Message.P_EDITED_BY */ cache[10] = hasValue; // if no value - invalidate cache if (hasValue) { cache_edited_by = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_EDITED_BY = " + cache_edited_by.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_EDITED_BY - update without value"); skypeRef.events.FireOnMessageEditedBy(this, cache_edited_by); break; case 223: /* Message.P_EDIT_TIMESTAMP */ cache[11] = hasValue; // if no value - invalidate cache if (hasValue) { cache_edit_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Message.P_EDIT_TIMESTAMP = " + cache_edit_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_EDIT_TIMESTAMP - update without value"); skypeRef.events.FireOnMessageEditTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_edit_timestamp)); break; case 963: /* Message.P_PARAM_KEY */ cache[12] = hasValue; // if no value - invalidate cache if (hasValue) { cache_param_key = (uint)value; if (skypeRef.logging) skypeRef.Log("Message.P_PARAM_KEY = " + cache_param_key.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_PARAM_KEY - update without value"); skypeRef.events.FireOnMessageParamKey(this, cache_param_key); break; case 964: /* Message.P_PARAM_VALUE */ cache[13] = hasValue; // if no value - invalidate cache if (hasValue) { cache_param_value = (uint)value; if (skypeRef.logging) skypeRef.Log("Message.P_PARAM_VALUE = " + cache_param_value.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_PARAM_VALUE - update without value"); skypeRef.events.FireOnMessageParamValue(this, cache_param_value); break; case 127: /* Message.P_BODY_XML */ cache[14] = hasValue; // if no value - invalidate cache if (hasValue) { cache_body_xml = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_BODY_XML = " + cache_body_xml.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_BODY_XML - update without value"); skypeRef.events.FireOnMessageBodyXml(this, cache_body_xml); break; case 125: /* Message.P_IDENTITIES */ cache[15] = hasValue; // if no value - invalidate cache if (hasValue) { cache_identities = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_IDENTITIES = " + cache_identities.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_IDENTITIES - update without value"); skypeRef.events.FireOnMessageIdentities(this, cache_identities); break; case 966: /* Message.P_REASON */ cache[16] = hasValue; // if no value - invalidate cache if (hasValue) { cache_reason = (String)value; if (skypeRef.logging) skypeRef.Log("Message.P_REASON = " + cache_reason.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_REASON - update without value"); skypeRef.events.FireOnMessageReason(this, cache_reason); break; case 126: /* Message.P_LEAVEREASON */ cache[17] = hasValue; // if no value - invalidate cache if (hasValue) { cache_leavereason = (SktSkype.LEAVE_REASON)value; if (skypeRef.logging) skypeRef.Log("Message.P_LEAVEREASON = " + cache_leavereason.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_LEAVEREASON - update without value"); skypeRef.events.FireOnMessageLeavereason(this, cache_leavereason); break; case 982: /* Message.P_PARTICIPANT_COUNT */ cache[18] = hasValue; // if no value - invalidate cache if (hasValue) { cache_participant_count = (uint)value; if (skypeRef.logging) skypeRef.Log("Message.P_PARTICIPANT_COUNT = " + cache_participant_count.ToString()); } else if (skypeRef.logging) skypeRef.Log("Message.P_PARTICIPANT_COUNT - update without value"); skypeRef.events.FireOnMessageParticipantCount(this, cache_participant_count); break; default: skypeRef.Error(String.Format("Invalid Message class property ID ({0})received from socket.", propId)); break; } }
/** When the socket reader receives a property update from runtime, it decodes object ID * property ID and the new value of the property. It then calls this method of * the target object, to update the new value in property cache. After updating the cache, * this method then fires appropriate event in skype.events to notify the UI of what has happened. * DispatchPropertyUpdate is executed in the socket reader thread. */ internal override void DispatchPropertyUpdate(uint propId, object value, bool hasValue) { switch (propId) { case 930: /* Participant.P_CONVO_ID */ cache[0] = hasValue; // if no value - invalidate cache if (hasValue) { cache_convo_id = (SktConversation)value; if (skypeRef.logging) skypeRef.Log("Participant.P_CONVO_ID = " + cache_convo_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_CONVO_ID - update without value"); skypeRef.events.FireOnParticipantConvoId(this, cache_convo_id); break; case 931: /* Participant.P_IDENTITY */ cache[1] = hasValue; // if no value - invalidate cache if (hasValue) { cache_identity = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_IDENTITY = " + cache_identity.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_IDENTITY - update without value"); skypeRef.events.FireOnParticipantIdentity(this, cache_identity); break; case 932: /* Participant.P_RANK */ cache[2] = hasValue; // if no value - invalidate cache if (hasValue) { cache_rank = (SktParticipant.RANK)value; if (skypeRef.logging) skypeRef.Log("Participant.P_RANK = " + cache_rank.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_RANK - update without value"); skypeRef.events.FireOnParticipantRank(this, cache_rank); break; case 933: /* Participant.P_REQUESTED_RANK */ cache[3] = hasValue; // if no value - invalidate cache if (hasValue) { cache_requested_rank = (SktParticipant.RANK)value; if (skypeRef.logging) skypeRef.Log("Participant.P_REQUESTED_RANK = " + cache_requested_rank.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_REQUESTED_RANK - update without value"); skypeRef.events.FireOnParticipantRequestedRank(this, cache_requested_rank); break; case 934: /* Participant.P_TEXT_STATUS */ cache[4] = hasValue; // if no value - invalidate cache if (hasValue) { cache_text_status = (SktParticipant.TEXT_STATUS)value; if (skypeRef.logging) skypeRef.Log("Participant.P_TEXT_STATUS = " + cache_text_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_TEXT_STATUS - update without value"); skypeRef.events.FireOnParticipantTextStatus(this, cache_text_status); break; case 935: /* Participant.P_VOICE_STATUS */ cache[5] = hasValue; // if no value - invalidate cache if (hasValue) { cache_voice_status = (SktParticipant.VOICE_STATUS)value; if (skypeRef.logging) skypeRef.Log("Participant.P_VOICE_STATUS = " + cache_voice_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_VOICE_STATUS - update without value"); skypeRef.events.FireOnParticipantVoiceStatus(this, cache_voice_status); break; case 936: /* Participant.P_VIDEO_STATUS */ cache[6] = hasValue; // if no value - invalidate cache if (hasValue) { cache_video_status = (SktParticipant.VIDEO_STATUS)value; if (skypeRef.logging) skypeRef.Log("Participant.P_VIDEO_STATUS = " + cache_video_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_VIDEO_STATUS - update without value"); skypeRef.events.FireOnParticipantVideoStatus(this, cache_video_status); break; case 943: /* Participant.P_LIVE_IDENTITY */ cache[7] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_identity = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_IDENTITY = " + cache_live_identity.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_IDENTITY - update without value"); skypeRef.events.FireOnParticipantLiveIdentity(this, cache_live_identity); break; case 938: /* Participant.P_LIVE_PRICE_FOR_ME */ cache[8] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_price_for_me = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_PRICE_FOR_ME = " + cache_live_price_for_me.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_PRICE_FOR_ME - update without value"); skypeRef.events.FireOnParticipantLivePriceForMe(this, cache_live_price_for_me); break; case 948: /* Participant.P_LIVE_FWD_IDENTITIES */ cache[9] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_fwd_identities = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_FWD_IDENTITIES = " + cache_live_fwd_identities.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_FWD_IDENTITIES - update without value"); skypeRef.events.FireOnParticipantLiveFwdIdentities(this, cache_live_fwd_identities); break; case 939: /* Participant.P_LIVE_START_TIMESTAMP */ cache[10] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_start_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_START_TIMESTAMP = " + cache_live_start_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_START_TIMESTAMP - update without value"); skypeRef.events.FireOnParticipantLiveStartTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_live_start_timestamp)); break; case 941: /* Participant.P_SOUND_LEVEL */ cache[11] = hasValue; // if no value - invalidate cache if (hasValue) { cache_sound_level = (uint)value; if (skypeRef.logging) skypeRef.Log("Participant.P_SOUND_LEVEL = " + cache_sound_level.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_SOUND_LEVEL - update without value"); skypeRef.events.FireOnParticipantSoundLevel(this, cache_sound_level); break; case 942: /* Participant.P_DEBUGINFO */ cache[12] = hasValue; // if no value - invalidate cache if (hasValue) { cache_debuginfo = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_DEBUGINFO = " + cache_debuginfo.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_DEBUGINFO - update without value"); skypeRef.events.FireOnParticipantDebuginfo(this, cache_debuginfo); break; case 947: /* Participant.P_LAST_VOICE_ERROR */ cache[13] = hasValue; // if no value - invalidate cache if (hasValue) { cache_last_voice_error = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LAST_VOICE_ERROR = " + cache_last_voice_error.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LAST_VOICE_ERROR - update without value"); skypeRef.events.FireOnParticipantLastVoiceError(this, cache_last_voice_error); break; case 949: /* Participant.P_QUALITY_PROBLEMS */ cache[14] = hasValue; // if no value - invalidate cache if (hasValue) { cache_quality_problems = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_QUALITY_PROBLEMS = " + cache_quality_problems.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_QUALITY_PROBLEMS - update without value"); skypeRef.events.FireOnParticipantQualityProblems(this, cache_quality_problems); break; case 950: /* Participant.P_LIVE_TYPE */ cache[15] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_type = (SktSkype.IDENTITYTYPE)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_TYPE = " + cache_live_type.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_TYPE - update without value"); skypeRef.events.FireOnParticipantLiveType(this, cache_live_type); break; case 951: /* Participant.P_LIVE_COUNTRY */ cache[16] = hasValue; // if no value - invalidate cache if (hasValue) { cache_live_country = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_COUNTRY = " + cache_live_country.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LIVE_COUNTRY - update without value"); skypeRef.events.FireOnParticipantLiveCountry(this, cache_live_country); break; case 952: /* Participant.P_TRANSFERRED_BY */ cache[17] = hasValue; // if no value - invalidate cache if (hasValue) { cache_transferred_by = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_TRANSFERRED_BY = " + cache_transferred_by.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_TRANSFERRED_BY - update without value"); skypeRef.events.FireOnParticipantTransferredBy(this, cache_transferred_by); break; case 953: /* Participant.P_TRANSFERRED_TO */ cache[18] = hasValue; // if no value - invalidate cache if (hasValue) { cache_transferred_to = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_TRANSFERRED_TO = " + cache_transferred_to.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_TRANSFERRED_TO - update without value"); skypeRef.events.FireOnParticipantTransferredTo(this, cache_transferred_to); break; case 954: /* Participant.P_ADDER */ cache[19] = hasValue; // if no value - invalidate cache if (hasValue) { cache_adder = (String)value; if (skypeRef.logging) skypeRef.Log("Participant.P_ADDER = " + cache_adder.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_ADDER - update without value"); skypeRef.events.FireOnParticipantAdder(this, cache_adder); break; case 955: /* Participant.P_LAST_LEAVEREASON */ cache[20] = hasValue; // if no value - invalidate cache if (hasValue) { cache_last_leavereason = (SktSkype.LEAVE_REASON)value; if (skypeRef.logging) skypeRef.Log("Participant.P_LAST_LEAVEREASON = " + cache_last_leavereason.ToString()); } else if (skypeRef.logging) skypeRef.Log("Participant.P_LAST_LEAVEREASON - update without value"); skypeRef.events.FireOnParticipantLastLeavereason(this, cache_last_leavereason); break; default: skypeRef.Error(String.Format("Invalid Participant class property ID ({0})received from socket.", propId)); break; } }
public OnVideoConvoIdArgs(SktVideo sender, SktConversation newValue) { this.sender = sender; value = newValue; }
public OnVoicemailConvoIdArgs(SktVoicemail sender, SktConversation newValue) { this.sender = sender; value = newValue; }
public OnTransferConvoIdArgs(SktTransfer sender, SktConversation newValue) { this.sender = sender; value = newValue; }
public OnParticipantConvoIdArgs(SktParticipant sender, SktConversation newValue) { this.sender = sender; value = newValue; }
public OnMessageConvoIdArgs(SktMessage sender, SktConversation newValue) { this.sender = sender; value = newValue; }
/** Merges two live conversations. For example, if the user already has a live conversation up - let's call it conversation A. Then a new incoming call occurs - another conversation obtains LOCAL_LIVESTATUS == SktConversation.RINGING_FOR_ME, let's call it conversation B. The user wishes to pick up the new incoming call and add it to the existing one. For this you can first call B->JoinLiveSession and then merge two calls with A->Assimilate(B, A). The second argument will return the merged conversation. Note that there are actually three conversation objects involved: A (before merge), B and C (after the merge). Normally it would make sense to have the first conversation (A) as the second argument, so that it gets overwritten with the assimilation result. @returns conversation Returns a 3rd live conversation, result of merging two existing ones. @param [in] otherConversation - The new conversation to be merged with the one already in live state. */ public SktConversation Assimilate(SktConversation otherConversation) { if (skypeRef.logging) skypeRef.Log("Executing Conversation.Assimilate"); uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 9, OID); skypeRef.encoder.AddObjectParam(1, otherConversation); skypeRef.transport.SubmitMethodRequest (RequestId); Dictionary<uint, uint> tagMap = new Dictionary<uint, uint> { {1, 1} }; object[] args = new object[1]; args[0] = null; skypeRef.decoder.DecodeMethodResponseArguments(1, ref args, new uint[1]{18}, ref tagMap, "SktConversation.Assimilate"); return (SktConversation)args[0]; }
/** Returns a list of Conversation objects by SktConversation.LIST_TYPE filter. @returns conversations List of conversations matching the filter. @param [in] type - Filter. Default value is SktConversation.LIST_TYPE.ALL_CONVERSATIONS */ public SktConversation.List GetConversationList(SktConversation.LIST_TYPE type=SktConversation.LIST_TYPE.ALL_CONVERSATIONS) { if (skypeRef.logging) skypeRef.Log("Executing Skype.GetConversationList"); uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 18, OID); skypeRef.encoder.AddEnumParam(1, (uint)type); SktConversation.List conversations = new SktConversation.List(); // We always guarantee non-null list is returned skypeRef.transport.SubmitMethodRequest (RequestId); int argNr, marker; do { marker = (char)skypeRef.transport.ReadByte(); if (marker != 'z') { if (marker == 'N') skypeRef.Error("SktSkype.GetConversationList failed."); argNr = (char)skypeRef.transport.ReadByte(); switch (argNr) { case 1: conversations = (SktConversation.List)skypeRef.decoder.DecodeObjectList(18); break; case 'z': marker = argNr; break; // exiting the arg loop if the method failed default: skypeRef.Error(String.Format("Got unexpected response argument {0} from runtime in SktSkype.GetConversationList", argNr)); break; } } } while (marker != 'z'); skypeRef.transport.ResumeSocketReaderFromMethod(); return conversations; }
/** Retrieves the list of this conversation's current participants, which you can optionally request to be filtered. If no Participants pass the filter, an empty list will be returned (the method itself still returns true). @returns participants List of conversation Participant objects that passed the filter. @param [in] filter - SktConversation.PARTICIPANTFILTER - defaults to SktConversation.ALL Default value is SktConversation.PARTICIPANTFILTER.ALL */ public SktParticipant.List GetParticipants(SktConversation.PARTICIPANTFILTER filter=SktConversation.PARTICIPANTFILTER.ALL) { if (skypeRef.logging) skypeRef.Log("Executing Conversation.GetParticipants"); uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 38, OID); skypeRef.encoder.AddEnumParam(1, (uint)filter); SktParticipant.List participants = new SktParticipant.List(); // We always guarantee non-null list is returned skypeRef.transport.SubmitMethodRequest (RequestId); int argNr, marker; do { marker = (char)skypeRef.transport.ReadByte(); if (marker != 'z') { if (marker == 'N') skypeRef.Error("SktConversation.GetParticipants failed."); argNr = (char)skypeRef.transport.ReadByte(); switch (argNr) { case 1: participants = (SktParticipant.List)skypeRef.decoder.DecodeObjectList(19); break; case 'z': marker = argNr; break; // exiting the arg loop if the method failed default: skypeRef.Error(String.Format("Got unexpected response argument {0} from runtime in SktConversation.GetParticipants", argNr)); break; } } } while (marker != 'z'); skypeRef.transport.ResumeSocketReaderFromMethod(); return participants; }
/** When the socket reader receives a property update from runtime, it decodes object ID * property ID and the new value of the property. It then calls this method of * the target object, to update the new value in property cache. After updating the cache, * this method then fires appropriate event in skype.events to notify the UI of what has happened. * DispatchPropertyUpdate is executed in the socket reader thread. */ internal override void DispatchPropertyUpdate(uint propId, object value, bool hasValue) { switch (propId) { case 80: /* Transfer.P_TYPE */ cache[0] = hasValue; // if no value - invalidate cache if (hasValue) { cache_type = (SktTransfer.TYPE)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_TYPE = " + cache_type.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_TYPE - update without value"); skypeRef.events.FireOnTransferType(this, cache_type); break; case 81: /* Transfer.P_PARTNER_HANDLE */ cache[1] = hasValue; // if no value - invalidate cache if (hasValue) { cache_partner_handle = (String)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_PARTNER_HANDLE = " + cache_partner_handle.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_PARTNER_HANDLE - update without value"); skypeRef.events.FireOnTransferPartnerHandle(this, cache_partner_handle); break; case 82: /* Transfer.P_PARTNER_DISPNAME */ cache[2] = hasValue; // if no value - invalidate cache if (hasValue) { cache_partner_dispname = (String)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_PARTNER_DISPNAME = " + cache_partner_dispname.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_PARTNER_DISPNAME - update without value"); skypeRef.events.FireOnTransferPartnerDispname(this, cache_partner_dispname); break; case 83: /* Transfer.P_STATUS */ cache[3] = hasValue; // if no value - invalidate cache if (hasValue) { cache_status = (SktTransfer.STATUS)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_STATUS = " + cache_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_STATUS - update without value"); skypeRef.events.FireOnTransferStatus(this, cache_status); break; case 84: /* Transfer.P_FAILUREREASON */ cache[4] = hasValue; // if no value - invalidate cache if (hasValue) { cache_failurereason = (SktTransfer.FAILUREREASON)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_FAILUREREASON = " + cache_failurereason.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_FAILUREREASON - update without value"); skypeRef.events.FireOnTransferFailurereason(this, cache_failurereason); break; case 85: /* Transfer.P_STARTTIME */ cache[5] = hasValue; // if no value - invalidate cache if (hasValue) { cache_starttime = (uint)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_STARTTIME = " + cache_starttime.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_STARTTIME - update without value"); skypeRef.events.FireOnTransferStarttime(this, skypeRef.UnixTimestampToDateTime(cache_starttime)); break; case 86: /* Transfer.P_FINISHTIME */ cache[6] = hasValue; // if no value - invalidate cache if (hasValue) { cache_finishtime = (uint)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_FINISHTIME = " + cache_finishtime.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_FINISHTIME - update without value"); skypeRef.events.FireOnTransferFinishtime(this, skypeRef.UnixTimestampToDateTime(cache_finishtime)); break; case 87: /* Transfer.P_FILEPATH */ cache[7] = hasValue; // if no value - invalidate cache if (hasValue) { cache_filepath = (String)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_FILEPATH = " + cache_filepath.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_FILEPATH - update without value"); skypeRef.events.FireOnTransferFilepath(this, cache_filepath); break; case 88: /* Transfer.P_FILENAME */ cache[8] = hasValue; // if no value - invalidate cache if (hasValue) { cache_filename = (String)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_FILENAME = " + cache_filename.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_FILENAME - update without value"); skypeRef.events.FireOnTransferFilename(this, cache_filename); break; case 89: /* Transfer.P_FILESIZE */ cache[9] = hasValue; // if no value - invalidate cache if (hasValue) { cache_filesize = (String)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_FILESIZE = " + cache_filesize.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_FILESIZE - update without value"); skypeRef.events.FireOnTransferFilesize(this, cache_filesize); break; case 90: /* Transfer.P_BYTESTRANSFERRED */ cache[10] = hasValue; // if no value - invalidate cache if (hasValue) { cache_bytestransferred = (String)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_BYTESTRANSFERRED = " + cache_bytestransferred.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_BYTESTRANSFERRED - update without value"); skypeRef.events.FireOnTransferBytestransferred(this, cache_bytestransferred); break; case 91: /* Transfer.P_BYTESPERSECOND */ cache[11] = hasValue; // if no value - invalidate cache if (hasValue) { cache_bytespersecond = (uint)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_BYTESPERSECOND = " + cache_bytespersecond.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_BYTESPERSECOND - update without value"); skypeRef.events.FireOnTransferBytespersecond(this, cache_bytespersecond); break; case 92: /* Transfer.P_CHATMSG_GUID */ cache[12] = hasValue; // if no value - invalidate cache if (hasValue) { cache_chatmsg_guid = (byte[])value; if (skypeRef.logging) skypeRef.Log("Transfer.P_CHATMSG_GUID = binary size " + cache_chatmsg_guid.Length.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_CHATMSG_GUID - update without value"); skypeRef.events.FireOnTransferChatmsgGuid(this, cache_chatmsg_guid); break; case 93: /* Transfer.P_CHATMSG_INDEX */ cache[13] = hasValue; // if no value - invalidate cache if (hasValue) { cache_chatmsg_index = (uint)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_CHATMSG_INDEX = " + cache_chatmsg_index.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_CHATMSG_INDEX - update without value"); skypeRef.events.FireOnTransferChatmsgIndex(this, cache_chatmsg_index); break; case 98: /* Transfer.P_CONVO_ID */ cache[14] = hasValue; // if no value - invalidate cache if (hasValue) { cache_convo_id = (SktConversation)value; if (skypeRef.logging) skypeRef.Log("Transfer.P_CONVO_ID = " + cache_convo_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Transfer.P_CONVO_ID - update without value"); skypeRef.events.FireOnTransferConvoId(this, cache_convo_id); break; default: skypeRef.Error(String.Format("Invalid Transfer class property ID ({0})received from socket.", propId)); break; } }
internal void FetchSpawnedFromConvoIdFromRuntime() { if (skypeRef.logging) skypeRef.Log("Fetching P_SPAWNED_FROM_CONVO_ID from runtime"); skypeRef.transport.SubmitPropertyRequest(18, 915, this.OID); if (skypeRef.transport.PropResponseWasOk(915)) { cache_spawned_from_convo_id = (SktConversation)skypeRef.decoder.DecodeObject(18); // SktConversation class ID = 18 cache[19] = true; } skypeRef.transport.ResumeSocketReaderFromPropRequest(); }
/** When the socket reader receives a property update from runtime, it decodes object ID * property ID and the new value of the property. It then calls this method of * the target object, to update the new value in property cache. After updating the cache, * this method then fires appropriate event in skype.events to notify the UI of what has happened. * DispatchPropertyUpdate is executed in the socket reader thread. */ internal override void DispatchPropertyUpdate(uint propId, object value, bool hasValue) { switch (propId) { case 130: /* Video.P_STATUS */ cache[0] = hasValue; // if no value - invalidate cache if (hasValue) { cache_status = (SktVideo.STATUS)value; if (skypeRef.logging) skypeRef.Log("Video.P_STATUS = " + cache_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Video.P_STATUS - update without value"); skypeRef.events.FireOnVideoStatus(this, cache_status); break; case 131: /* Video.P_ERROR */ cache[1] = hasValue; // if no value - invalidate cache if (hasValue) { cache_error = (String)value; if (skypeRef.logging) skypeRef.Log("Video.P_ERROR = " + cache_error.ToString()); } else if (skypeRef.logging) skypeRef.Log("Video.P_ERROR - update without value"); skypeRef.events.FireOnVideoError(this, cache_error); break; case 132: /* Video.P_DEBUGINFO */ cache[2] = hasValue; // if no value - invalidate cache if (hasValue) { cache_debuginfo = (String)value; if (skypeRef.logging) skypeRef.Log("Video.P_DEBUGINFO = " + cache_debuginfo.ToString()); } else if (skypeRef.logging) skypeRef.Log("Video.P_DEBUGINFO - update without value"); skypeRef.events.FireOnVideoDebuginfo(this, cache_debuginfo); break; case 133: /* Video.P_DIMENSIONS */ cache[3] = hasValue; // if no value - invalidate cache if (hasValue) { cache_dimensions = (String)value; if (skypeRef.logging) skypeRef.Log("Video.P_DIMENSIONS = " + cache_dimensions.ToString()); } else if (skypeRef.logging) skypeRef.Log("Video.P_DIMENSIONS - update without value"); skypeRef.events.FireOnVideoDimensions(this, cache_dimensions); break; case 134: /* Video.P_MEDIA_TYPE */ cache[4] = hasValue; // if no value - invalidate cache if (hasValue) { cache_media_type = (SktVideo.MEDIATYPE)value; if (skypeRef.logging) skypeRef.Log("Video.P_MEDIA_TYPE = " + cache_media_type.ToString()); } else if (skypeRef.logging) skypeRef.Log("Video.P_MEDIA_TYPE - update without value"); skypeRef.events.FireOnVideoMediaType(this, cache_media_type); break; case 1104: /* Video.P_CONVO_ID */ cache[5] = hasValue; // if no value - invalidate cache if (hasValue) { cache_convo_id = null; if (skypeRef.logging) skypeRef.Log("A bugged convo_id update. ignoring it."); } else if (skypeRef.logging) skypeRef.Log("Video.P_CONVO_ID - update without value"); skypeRef.events.FireOnVideoConvoId(this, cache_convo_id); break; case 1105: /* Video.P_DEVICE_PATH */ cache[6] = hasValue; // if no value - invalidate cache if (hasValue) { cache_device_path = (String)value; if (skypeRef.logging) skypeRef.Log("Video.P_DEVICE_PATH = " + cache_device_path.ToString()); } else if (skypeRef.logging) skypeRef.Log("Video.P_DEVICE_PATH - update without value"); skypeRef.events.FireOnVideoDevicePath(this, cache_device_path); break; default: skypeRef.Error(String.Format("Invalid Video class property ID ({0})received from socket.", propId)); break; } }
internal void FireOnConversationLiveStartTimestamp(SktConversation sender, DateTime value) { if (OnConversationLiveStartTimestamp == null) return; // Event not assigned OnConversationLiveStartTimestampArgs args = new OnConversationLiveStartTimestampArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationLiveStartTimestampInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationLiveStartTimestamp, new object[] { sender, args }); // Syncing to GUI thread }
/** When the socket reader receives a property update from runtime, it decodes object ID * property ID and the new value of the property. It then calls this method of * the target object, to update the new value in property cache. After updating the cache, * this method then fires appropriate event in skype.events to notify the UI of what has happened. * DispatchPropertyUpdate is executed in the socket reader thread. */ internal override void DispatchPropertyUpdate(uint propId, object value, bool hasValue) { switch (propId) { case 100: /* Voicemail.P_TYPE */ cache[0] = hasValue; // if no value - invalidate cache if (hasValue) { cache_type = (SktVoicemail.TYPE)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_TYPE = " + cache_type.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_TYPE - update without value"); skypeRef.events.FireOnVoicemailType(this, cache_type); break; case 101: /* Voicemail.P_PARTNER_HANDLE */ cache[1] = hasValue; // if no value - invalidate cache if (hasValue) { cache_partner_handle = (String)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_PARTNER_HANDLE = " + cache_partner_handle.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_PARTNER_HANDLE - update without value"); skypeRef.events.FireOnVoicemailPartnerHandle(this, cache_partner_handle); break; case 102: /* Voicemail.P_PARTNER_DISPNAME */ cache[2] = hasValue; // if no value - invalidate cache if (hasValue) { cache_partner_dispname = (String)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_PARTNER_DISPNAME = " + cache_partner_dispname.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_PARTNER_DISPNAME - update without value"); skypeRef.events.FireOnVoicemailPartnerDispname(this, cache_partner_dispname); break; case 103: /* Voicemail.P_STATUS */ cache[3] = hasValue; // if no value - invalidate cache if (hasValue) { cache_status = (SktVoicemail.STATUS)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_STATUS = " + cache_status.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_STATUS - update without value"); skypeRef.events.FireOnVoicemailStatus(this, cache_status); break; case 104: /* Voicemail.P_FAILUREREASON */ cache[4] = hasValue; // if no value - invalidate cache if (hasValue) { cache_failurereason = (SktVoicemail.FAILUREREASON)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_FAILUREREASON = " + cache_failurereason.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_FAILUREREASON - update without value"); skypeRef.events.FireOnVoicemailFailurereason(this, cache_failurereason); break; case 105: /* Voicemail.P_SUBJECT */ cache[5] = hasValue; // if no value - invalidate cache if (hasValue) { cache_subject = (String)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_SUBJECT = " + cache_subject.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_SUBJECT - update without value"); skypeRef.events.FireOnVoicemailSubject(this, cache_subject); break; case 106: /* Voicemail.P_TIMESTAMP */ cache[6] = hasValue; // if no value - invalidate cache if (hasValue) { cache_timestamp = (uint)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_TIMESTAMP = " + cache_timestamp.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_TIMESTAMP - update without value"); skypeRef.events.FireOnVoicemailTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_timestamp)); break; case 107: /* Voicemail.P_DURATION */ cache[7] = hasValue; // if no value - invalidate cache if (hasValue) { cache_duration = (uint)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_DURATION = " + cache_duration.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_DURATION - update without value"); skypeRef.events.FireOnVoicemailDuration(this, cache_duration); break; case 108: /* Voicemail.P_ALLOWED_DURATION */ cache[8] = hasValue; // if no value - invalidate cache if (hasValue) { cache_allowed_duration = (uint)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_ALLOWED_DURATION = " + cache_allowed_duration.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_ALLOWED_DURATION - update without value"); skypeRef.events.FireOnVoicemailAllowedDuration(this, cache_allowed_duration); break; case 109: /* Voicemail.P_PLAYBACK_PROGRESS */ cache[9] = hasValue; // if no value - invalidate cache if (hasValue) { cache_playback_progress = (uint)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_PLAYBACK_PROGRESS = " + cache_playback_progress.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_PLAYBACK_PROGRESS - update without value"); skypeRef.events.FireOnVoicemailPlaybackProgress(this, cache_playback_progress); break; case 830: /* Voicemail.P_CONVO_ID */ cache[10] = hasValue; // if no value - invalidate cache if (hasValue) { cache_convo_id = (SktConversation)value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_CONVO_ID = " + cache_convo_id.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_CONVO_ID - update without value"); skypeRef.events.FireOnVoicemailConvoId(this, cache_convo_id); break; case 831: /* Voicemail.P_CHATMSG_GUID */ cache[11] = hasValue; // if no value - invalidate cache if (hasValue) { cache_chatmsg_guid = (byte[])value; if (skypeRef.logging) skypeRef.Log("Voicemail.P_CHATMSG_GUID = binary size " + cache_chatmsg_guid.Length.ToString()); } else if (skypeRef.logging) skypeRef.Log("Voicemail.P_CHATMSG_GUID - update without value"); skypeRef.events.FireOnVoicemailChatmsgGuid(this, cache_chatmsg_guid); break; default: skypeRef.Error(String.Format("Invalid Voicemail class property ID ({0})received from socket.", propId)); break; } }
internal void FireOnConversationMyStatus(SktConversation sender, SktConversation.MY_STATUS value) { if (OnConversationMyStatus == null) return; // Event not assigned OnConversationMyStatusArgs args = new OnConversationMyStatusArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationMyStatusInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationMyStatus, new object[] { sender, args }); // Syncing to GUI thread }
internal void FetchConvoIdFromRuntime() { if (skypeRef.logging) skypeRef.Log("Fetching P_CONVO_ID from runtime"); skypeRef.transport.SubmitPropertyRequest(7, 830, this.OID); if (skypeRef.transport.PropResponseWasOk(830)) { cache_convo_id = (SktConversation)skypeRef.decoder.DecodeObject(18); // SktConversation class ID = 18 cache[10] = true; } skypeRef.transport.ResumeSocketReaderFromPropRequest(); }
internal void FireOnConversationOptJoiningEnabled(SktConversation sender, Boolean value) { if (OnConversationOptJoiningEnabled == null) return; // Event not assigned OnConversationOptJoiningEnabledArgs args = new OnConversationOptJoiningEnabledArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnConversationOptJoiningEnabledInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnConversationOptJoiningEnabled, new object[] { sender, args }); // Syncing to GUI thread }
/** Checks if the current user can add given conversation to the ContactGroup. Returns false for most of the hardwired contact groups for example. @returns result Returns true if Conversation can be added to this ContactGroup. @param [in] conversation - Conversation to be checked. Default value is null */ public Boolean CanAddConversation(SktConversation conversation=null) { if (skypeRef.logging) skypeRef.Log("Executing ContactGroup.CanAddConversation"); uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 4, OID); skypeRef.encoder.AddObjectParam(1, conversation); skypeRef.transport.SubmitMethodRequest (RequestId); Dictionary<uint, uint> tagMap = new Dictionary<uint, uint> { {1, 1} }; object[] args = new object[1]; args[0] = false; skypeRef.decoder.DecodeMethodResponseArguments(1, ref args, new uint[1]{0}, ref tagMap, "SktContactGroup.CanAddConversation"); return (Boolean)args[0]; }
internal void FireOnConversationSpawnConference(SktConversation sender, OnConversationSpawnConferenceArgs e) { if (OnConversationSpawnConference == null) return; // No event assigned if (gui == null) { FireCallbackInSeparateThread(e, OnConversationSpawnConferenceInNewThread); return; } gui.BeginInvoke(OnConversationSpawnConference, new object[] { sender, e }); // Synchronizing to gui thread }
/** Removes given conversation from the ContactGroup. @param [in] conversation */ public void RemoveConversation(SktConversation conversation) { if (skypeRef.logging) skypeRef.Log("Executing ContactGroup.RemoveConversation"); uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 7, OID); skypeRef.encoder.AddObjectParam(1, conversation); skypeRef.transport.SubmitMethodRequest (RequestId); skypeRef.decoder.DecodeMethodResponseWithNoArguments("SktContactGroup.RemoveConversation"); }
internal void FireOnParticipantConvoId(SktParticipant sender, SktConversation value) { if (OnParticipantConvoId == null) return; // Event not assigned OnParticipantConvoIdArgs args = new OnParticipantConvoIdArgs(sender, value); if (gui == null) { FireCallbackInSeparateThread(args, OnParticipantConvoIdInNewThread); return; } // No gui firing in separate thread gui.BeginInvoke(OnParticipantConvoId, new object[] { sender, args }); // Syncing to GUI thread }
public OnConversationUnconsumedMessagesVoiceArgs(SktConversation sender, Boolean newValue) { this.sender = sender; value = newValue; }