예제 #1
0
 internal void FireOnSkypeConversationListChange(SktSkype sender, OnSkypeConversationListChangeArgs e)
 {
     if (OnSkypeConversationListChange == null) return; // No event assigned
     if (gui == null) { FireCallbackInSeparateThread(e, OnSkypeConversationListChangeInNewThread); return; }
     gui.BeginInvoke(OnSkypeConversationListChange, new object[] { sender, e }); // Synchronizing to gui thread
 }
예제 #2
0
 internal void ProcessOnSkypeConversationListChange(SktSkype sender)
 {
     if (skypeRef.logging) skypeRef.Log("Processing event OnSkypeConversationListChange");
     OnSkypeConversationListChangeArgs args = new OnSkypeConversationListChangeArgs();
     int marker = 0;
     int typeTag = 0;
     do
     {
     typeTag = skypeRef.transport.ReadByte();
     if (typeTag == 122) break;
     marker = skypeRef.transport.ReadByte();
     switch (marker)
     {
         case 1:
             args.conversation = (SktConversation)skypeRef.decoder.DecodeObject(18); // SktConversation class ID = 18
             break;
         case 2:
             args.type = (SktConversation.LIST_TYPE)skypeRef.decoder.DecodeUint();
             break;
         case 3:
             args.added = (typeTag == 'T');
             break;
         default:
             if (marker != 122) skypeRef.Error(String.Format("Invalid event argument tag {0} in OnSkypeConversationListChange", marker));
             break;
     }
     } while (marker != 'z');
     skypeRef.transport.ResumeSocketReaderFromEvent();
     args.senderobj = sender;
     FireOnSkypeConversationListChange(sender, args);
 }