Ejemplo n.º 1
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 200: /* ContactSearch.P_CONTACT_SEARCH_STATUS */
                cache[0] = hasValue; // if no value - invalidate cache
                if (hasValue)
                {
                    cache_contact_search_status = (SktContactSearch.STATUS)value;
                    if (skypeRef.logging) skypeRef.Log("ContactSearch.P_CONTACT_SEARCH_STATUS = " + cache_contact_search_status.ToString());
                }
                else if (skypeRef.logging) skypeRef.Log("ContactSearch.P_CONTACT_SEARCH_STATUS - update without value");
                skypeRef.events.FireOnContactSearchContactSearchStatus(this, cache_contact_search_status);
                break;

            default:
                skypeRef.Error(String.Format("Invalid ContactSearch class property ID ({0})received from socket.", propId)); break;
            }
        }
Ejemplo n.º 2
0
 internal void FetchContactSearchStatusFromRuntime()
 {
     if (skypeRef.logging) skypeRef.Log("Fetching P_CONTACT_SEARCH_STATUS from runtime");
     skypeRef.transport.SubmitPropertyRequest(1, 200, this.OID);
     if (skypeRef.transport.PropResponseWasOk(200))
     {
     cache_contact_search_status = (SktContactSearch.STATUS)skypeRef.decoder.DecodeUint();
     cache[0] = true;
     }
     skypeRef.transport.ResumeSocketReaderFromPropRequest();
 }
Ejemplo n.º 3
0
 public OnContactSearchContactSearchStatusArgs(SktContactSearch sender, SktContactSearch.STATUS newValue)
 {
     this.sender = sender;  value = newValue;
 }