Ejemplo n.º 1
0
 public OnMessageAuthorDisplaynameArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 2
0
 internal void FireOnMessageParticipantCount(SktMessage sender, uint value)
 {
     if (OnMessageParticipantCount == null) return; // Event not assigned
     OnMessageParticipantCountArgs args = new OnMessageParticipantCountArgs(sender, value);
     if (gui == null) { FireCallbackInSeparateThread(args, OnMessageParticipantCountInNewThread); return; } // No gui firing in separate thread
     gui.BeginInvoke(OnMessageParticipantCount, new object[] { sender, args }); // Syncing to GUI thread
 }
Ejemplo n.º 3
0
 internal void FireOnMessageType(SktMessage sender, SktMessage.TYPE value)
 {
     if (OnMessageType == null) return; // Event not assigned
     OnMessageTypeArgs args = new OnMessageTypeArgs(sender, value);
     if (gui == null) { FireCallbackInSeparateThread(args, OnMessageTypeInNewThread); return; } // No gui firing in separate thread
     gui.BeginInvoke(OnMessageType, new object[] { sender, args }); // Syncing to GUI thread
 }
Ejemplo n.º 4
0
 /**  Returns recent messages. The messages are returned in two lists - new messages (unconsumed) and recent
   message history (context messages). The context message list contains messages that are already above
   the consumption horizon but are fairly recent, making it likely that displaying them in UI would be good
   default behaviour.
 @param [out] contextMessages Already consumed messages, provided for context
 @param [out] unconsumedMessages Unconsumed messages
 @param [in] requireTimestamp - If set to a non-zero value, includes messages no earlier than this timestamp, if not, includes messages
   from the last 24 hours only
  */
 public void GetLastMessages(
 out SktMessage.List contextMessages,
 out SktMessage.List unconsumedMessages,
 DateTime      requireTimestamp)
 {
     if (skypeRef.logging) skypeRef.Log("Executing Conversation.GetLastMessages");
     uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 39, OID);
     skypeRef.encoder.AddTimeStampParam(1, requireTimestamp);
     contextMessages = new SktMessage.List(); // We always guarantee non-null list is returned
     unconsumedMessages = new SktMessage.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.GetLastMessages failed.");
         argNr = (char)skypeRef.transport.ReadByte();
         switch (argNr)
         {
             case 1:
                 contextMessages = (SktMessage.List)skypeRef.decoder.DecodeObjectList(9);
                 break;
             case 2:
                 unconsumedMessages = (SktMessage.List)skypeRef.decoder.DecodeObjectList(9);
                 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.GetLastMessages", argNr));
                 break;
         }
     }
     } while (marker != 'z');
     skypeRef.transport.ResumeSocketReaderFromMethod();
 }
Ejemplo n.º 5
0
 internal void FetchInboxMessageIdFromRuntime()
 {
     if (skypeRef.logging) skypeRef.Log("Fetching P_INBOX_MESSAGE_ID from runtime");
     skypeRef.transport.SubmitPropertyRequest(18, 973, this.OID);
     if (skypeRef.transport.PropResponseWasOk(973))
     {
     cache_inbox_message_id = (SktMessage)skypeRef.decoder.DecodeObject(9); // SktMessage class ID = 9
     cache[11] = true;
     }
     skypeRef.transport.ResumeSocketReaderFromPropRequest();
 }
Ejemplo n.º 6
0
 public void Add(SktMessage item)
 {
     base.Add((SktMessage)item);
 }
Ejemplo n.º 7
0
        /** 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 190: /* Sms.P_TYPE */
                cache[0] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_type = (SktSms.TYPE)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_TYPE = " + cache_type.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_TYPE - update without value");
                skypeRef.events.FireOnSmsType(this, cache_type);
                break;

            case 1211: /* Sms.P_OUTGOING_REPLY_TYPE */
                cache[1] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_outgoing_reply_type = (SktSms.OUTGOING_REPLY_TYPE)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_OUTGOING_REPLY_TYPE = " + cache_outgoing_reply_type.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_OUTGOING_REPLY_TYPE - update without value");
                skypeRef.events.FireOnSmsOutgoingReplyType(this, cache_outgoing_reply_type);
                break;

            case 191: /* Sms.P_STATUS */
                cache[2] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_status = (SktSms.STATUS)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_STATUS = " + cache_status.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_STATUS - update without value");
                skypeRef.events.FireOnSmsStatus(this, cache_status);
                break;

            case 192: /* Sms.P_FAILUREREASON */
                cache[3] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_failurereason = (SktSms.FAILUREREASON)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_FAILUREREASON = " + cache_failurereason.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_FAILUREREASON - update without value");
                skypeRef.events.FireOnSmsFailurereason(this, cache_failurereason);
                break;

            case 48: /* Sms.P_IS_FAILED_UNSEEN */
                cache[4] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_is_failed_unseen = (Boolean)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_IS_FAILED_UNSEEN = " + cache_is_failed_unseen.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_IS_FAILED_UNSEEN - update without value");
                skypeRef.events.FireOnSmsIsFailedUnseen(this, cache_is_failed_unseen);
                break;

            case 198: /* Sms.P_TIMESTAMP */
                cache[5] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_timestamp = (uint)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_TIMESTAMP = " + cache_timestamp.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_TIMESTAMP - update without value");
                skypeRef.events.FireOnSmsTimestamp(this, skypeRef.UnixTimestampToDateTime(cache_timestamp));
                break;

            case 193: /* Sms.P_PRICE */
                cache[6] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_price = (uint)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_PRICE = " + cache_price.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_PRICE - update without value");
                skypeRef.events.FireOnSmsPrice(this, cache_price);
                break;

            case 49: /* Sms.P_PRICE_PRECISION */
                cache[7] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_price_precision = (uint)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_PRICE_PRECISION = " + cache_price_precision.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_PRICE_PRECISION - update without value");
                skypeRef.events.FireOnSmsPricePrecision(this, cache_price_precision);
                break;

            case 194: /* Sms.P_PRICE_CURRENCY */
                cache[8] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_price_currency = (String)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_PRICE_CURRENCY = " + cache_price_currency.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_PRICE_CURRENCY - update without value");
                skypeRef.events.FireOnSmsPriceCurrency(this, cache_price_currency);
                break;

            case 199: /* Sms.P_REPLY_TO_NUMBER */
                cache[9] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_reply_to_number = (String)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_REPLY_TO_NUMBER = " + cache_reply_to_number.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_REPLY_TO_NUMBER - update without value");
                skypeRef.events.FireOnSmsReplyToNumber(this, cache_reply_to_number);
                break;

            case 195: /* Sms.P_TARGET_NUMBERS */
                cache[10] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_target_numbers = (String)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_TARGET_NUMBERS = " + cache_target_numbers.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_TARGET_NUMBERS - update without value");
                skypeRef.events.FireOnSmsTargetNumbers(this, cache_target_numbers);
                break;

            case 196: /* Sms.P_TARGET_STATUSES */
                cache[11] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_target_statuses = (byte[])value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_TARGET_STATUSES = binary size " + cache_target_statuses.Length.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_TARGET_STATUSES - update without value");
                skypeRef.events.FireOnSmsTargetStatuses(this, cache_target_statuses);
                break;

            case 197: /* Sms.P_BODY */
                cache[12] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_body = (String)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_BODY = " + cache_body.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_BODY - update without value");
                skypeRef.events.FireOnSmsBody(this, cache_body);
                break;

            case 840: /* Sms.P_CHATMSG_ID */
                cache[13] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_chatmsg_id = (SktMessage)value;
                    if (skypeRef.logging) skypeRef.Log("Sms.P_CHATMSG_ID = " + cache_chatmsg_id.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("Sms.P_CHATMSG_ID - update without value");
                skypeRef.events.FireOnSmsChatmsgId(this, cache_chatmsg_id);
                break;

            default:
                skypeRef.Error(String.Format("Invalid Sms class property ID ({0})received from socket.", propId)); break;
            }
        }
Ejemplo n.º 8
0
 public OnMessageGuidArgs(SktMessage sender, byte[] newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 9
0
 public OnMessageIdentitiesArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 10
0
 public OnMessageConvoIdArgs(SktMessage sender, SktConversation newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 11
0
 public OnMessageEditedByArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 12
0
 public OnMessageConvoGuidArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 13
0
 public OnMessageConsumptionStatusArgs(SktMessage sender, SktMessage.CONSUMPTION_STATUS newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 14
0
 public OnMessageBodyXmlArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 15
0
 public OnMessageTypeArgs(SktMessage sender, SktMessage.TYPE newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 16
0
 public OnMessageLeavereasonArgs(SktMessage sender, SktSkype.LEAVE_REASON newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 17
0
 public OnSmsChatmsgIdArgs(SktSms sender, SktMessage newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 18
0
 public OnMessageOriginallyMeantForArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 19
0
 /**  Returns all messages of the given type
 @returns messages
 @param [in] type - Type of messages requested. For POSTED_TEXT or POSTED_EMOTE, returns a list with both types
 @param [in] latestPerConvOnly - Whether to return only the most recent message per conversation
 @param [in] fromTimestampInc - Starting timestamp for reqested range, inclusive
 @param [in] toTimestampExc - Ending timestamp for requested range, exclusive
  */
 public SktMessage.List GetMessageListByType(
 SktMessage.TYPE      type,
 Boolean              latestPerConvOnly,
 DateTime             fromTimestampInc,
 DateTime             toTimestampExc)
 {
     if (skypeRef.logging) skypeRef.Log("Executing Skype.GetMessageListByType");
     uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 136, OID);
     skypeRef.encoder.AddEnumParam(1, (uint)type);
     skypeRef.encoder.AddBoolParam(2, latestPerConvOnly);
     skypeRef.encoder.AddTimeStampParam(3, fromTimestampInc);
     skypeRef.encoder.AddTimeStampParam(4, toTimestampExc);
     SktMessage.List messages = new SktMessage.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.GetMessageListByType failed.");
         argNr = (char)skypeRef.transport.ReadByte();
         switch (argNr)
         {
             case 1:
                 messages = (SktMessage.List)skypeRef.decoder.DecodeObjectList(9);
                 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.GetMessageListByType", argNr));
                 break;
         }
     }
     } while (marker != 'z');
     skypeRef.transport.ResumeSocketReaderFromMethod();
     return messages;
 }
Ejemplo n.º 20
0
 public OnMessageParamValueArgs(SktMessage sender, uint newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 21
0
 internal void FetchChatmsgIdFromRuntime()
 {
     if (skypeRef.logging) skypeRef.Log("Fetching P_CHATMSG_ID from runtime");
     skypeRef.transport.SubmitPropertyRequest(12, 840, this.OID);
     if (skypeRef.transport.PropResponseWasOk(840))
     {
     cache_chatmsg_id = (SktMessage)skypeRef.decoder.DecodeObject(9); // SktMessage class ID = 9
     cache[13] = true;
     }
     skypeRef.transport.ResumeSocketReaderFromPropRequest();
 }
Ejemplo n.º 22
0
 public OnMessageParticipantCountArgs(SktMessage sender, uint newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 23
0
        /** 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;
            }
        }
Ejemplo n.º 24
0
 public OnMessageReasonArgs(SktMessage sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 25
0
 internal void FireOnMessageLeavereason(SktMessage sender, SktSkype.LEAVE_REASON value)
 {
     if (OnMessageLeavereason == null) return; // Event not assigned
     OnMessageLeavereasonArgs args = new OnMessageLeavereasonArgs(sender, value);
     if (gui == null) { FireCallbackInSeparateThread(args, OnMessageLeavereasonInNewThread); return; } // No gui firing in separate thread
     gui.BeginInvoke(OnMessageLeavereason, new object[] { sender, args }); // Syncing to GUI thread
 }
Ejemplo n.º 26
0
 public OnMessageSendingStatusArgs(SktMessage sender, SktMessage.SENDING_STATUS newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 27
0
 internal void FireOnMessageSendingStatus(SktMessage sender, SktMessage.SENDING_STATUS value)
 {
     if (OnMessageSendingStatus == null) return; // Event not assigned
     OnMessageSendingStatusArgs args = new OnMessageSendingStatusArgs(sender, value);
     if (gui == null) { FireCallbackInSeparateThread(args, OnMessageSendingStatusInNewThread); return; } // No gui firing in separate thread
     gui.BeginInvoke(OnMessageSendingStatus, new object[] { sender, args }); // Syncing to GUI thread
 }
Ejemplo n.º 28
0
 public OnMessageTimestampArgs(SktMessage sender, DateTime newValue)
 {
     this.sender = sender;  value = newValue;
 }
Ejemplo n.º 29
0
 internal void FireOnSmsChatmsgId(SktSms sender, SktMessage value)
 {
     if (OnSmsChatmsgId == null) return; // Event not assigned
     OnSmsChatmsgIdArgs args = new OnSmsChatmsgIdArgs(sender, value);
     if (gui == null) { FireCallbackInSeparateThread(args, OnSmsChatmsgIdInNewThread); return; } // No gui firing in separate thread
     gui.BeginInvoke(OnSmsChatmsgId, new object[] { sender, args }); // Syncing to GUI thread
 }
Ejemplo n.º 30
0
 public OnConversationInboxMessageIdArgs(SktConversation sender, SktMessage newValue)
 {
     this.sender = sender;  value = newValue;
 }