internal void FireOnContactGroupChangeConversation(SktContactGroup sender, OnContactGroupChangeConversationArgs e)
 {
     if (OnContactGroupChangeConversation == null) return; // No event assigned
     if (gui == null) { FireCallbackInSeparateThread(e, OnContactGroupChangeConversationInNewThread); return; }
     gui.BeginInvoke(OnContactGroupChangeConversation, new object[] { sender, e }); // Synchronizing to gui thread
 }
 internal void FireOnContactGroupType(SktContactGroup sender, SktContactGroup.TYPE value)
 {
     if (OnContactGroupType == null) return; // Event not assigned
     OnContactGroupTypeArgs args = new OnContactGroupTypeArgs(sender, value);
     if (gui == null) { FireCallbackInSeparateThread(args, OnContactGroupTypeInNewThread); return; } // No gui firing in separate thread
     gui.BeginInvoke(OnContactGroupType, new object[] { sender, args }); // Syncing to GUI thread
 }
 public void Add(SktContactGroup item)
 {
     base.Add((SktContactGroup)item);
 }
 /**  Checks if the conversation is a member of the given ContactGroup
 @returns result True if this conversation is a member of the ContactGroup specified by the group argument contains the conversation
 @param [in] group - ContactGroup
  */
 public Boolean IsMemberOf(SktContactGroup group)
 {
     if (skypeRef.logging) skypeRef.Log("Executing Conversation.IsMemberOf");
     uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 37, OID);
     skypeRef.encoder.AddObjectParam(1, group);
     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, "SktConversation.IsMemberOf");
     return (Boolean)args[0];
 }
 public OnContactGroupTypeArgs(SktContactGroup sender, SktContactGroup.TYPE newValue)
 {
     this.sender = sender;  value = newValue;
 }
 /**  Takes TYPE argument (TYPE comes from ContactGroup class) and returns reference to the corresponding hardwired
   contact group. For example (C++): Sktskype->GetHardwiredContactGroup(ContactGroup.ONLINE_BUDDIES, GroupRef)
   would return the list of all contacts that are currently online.
 @returns contactGroup
 @param [in] type
  */
 public SktContactGroup GetHardwiredContactGroup(SktContactGroup.TYPE type)
 {
     if (skypeRef.logging) skypeRef.Log("Executing Skype.GetHardwiredContactGroup");
     uint RequestId = skypeRef.encoder.AddMethodHeader(ClassId, 1, OID);
     skypeRef.encoder.AddEnumParam(1, (uint)type);
     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]{10}, ref tagMap, "SktSkype.GetHardwiredContactGroup");
     return (SktContactGroup)args[0];
 }
 public OnContactGroupGivenDisplaynameArgs(SktContactGroup sender, String newValue)
 {
     this.sender = sender;  value = newValue;
 }
 public OnContactGroupNrofcontactsOnlineArgs(SktContactGroup sender, uint newValue)
 {
     this.sender = sender;  value = newValue;
 }
 public OnContactGroupCustomGroupIdArgs(SktContactGroup sender, uint newValue)
 {
     this.sender = sender;  value = newValue;
 }
 internal void ProcessOnContactGroupChangeConversation(SktContactGroup sender)
 {
     if (skypeRef.logging) skypeRef.Log("Processing event OnContactGroupChangeConversation");
     OnContactGroupChangeConversationArgs args = new OnContactGroupChangeConversationArgs();
     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;
         default:
             if (marker != 122) skypeRef.Error(String.Format("Invalid event argument tag {0} in OnContactGroupChangeConversation", marker));
             break;
     }
     } while (marker != 'z');
     skypeRef.transport.ResumeSocketReaderFromEvent();
     args.senderobj = sender;
     FireOnContactGroupChangeConversation(sender, args);
 }
示例#11
0
 public void OnContactGroupChange(SktContactGroup sender, SktEvents.OnContactGroupChangeArgs e)
 {
     if (sender.P_TYPE == SktContactGroup.TYPE.SKYPE_BUDDIES) UpdateContactCombo();
 }
示例#12
0
        // Here we keep our contactList up-to-date, in case contacts get added or removed to the
        // ALL_BUDDIES list. Not going to happen in this tutorial but in a real application, it will.
        public void OnContactGroupChange(SktContactGroup sender, SktEvents.OnContactGroupChangeArgs e)
        {
            if (sender.P_TYPE != SktContactGroup.TYPE.ALL_BUDDIES) return;
            if (e.contact == null) return; // It can be null sometimes.

            // if it was already in, a change means it was removed
            if (contactList.Contains(sender))
            {
                contactList.Remove(sender);
                contactListBox.Items.Remove(sender);
            }
            else // if it wasn't already in, it must have been added
            {
                contactList.Add(sender);
                contactListBox.Items.Add(sender);
            };
        }
示例#13
0
        public void OnContactGroupChange(SktContactGroup sender, SktEvents.OnContactGroupChangeArgs e)
        {
            // Our contact list has changed
            if (sender.P_TYPE == SktContactGroup.TYPE.ALL_KNOWN_CONTACTS) UpdateContactListBox();

            // List of unauthorized contacts has changed. This could be a new auth request!
            if (sender.P_TYPE == SktContactGroup.TYPE.CONTACTS_WAITING_MY_AUTHORIZATION)
            {
                // maybe it changed because someone got authorized, and was removed from this list?
                if (!e.contact.IsMemberOfHardwiredGroup(SktContactGroup.TYPE.ALL_BUDDIES)) IncomingAuthRequest(e.contact);
            }
        }