internal void FireOnSkypeAvailableDeviceListChange(SktSkype sender, OnSkypeAvailableDeviceListChangeArgs e) { if (OnSkypeAvailableDeviceListChange == null) return; // No event assigned if (gui == null) { FireCallbackInSeparateThread(e, OnSkypeAvailableDeviceListChangeInNewThread); return; } gui.BeginInvoke(OnSkypeAvailableDeviceListChange, new object[] { sender, e }); // Synchronizing to gui thread }
internal void ProcessOnSkypeAvailableDeviceListChange(SktSkype sender) { if (skypeRef.logging) skypeRef.Log("Processing event OnSkypeAvailableDeviceListChange"); OnSkypeAvailableDeviceListChangeArgs args = new OnSkypeAvailableDeviceListChangeArgs(); int marker = 0; int typeTag = 0; do { typeTag = skypeRef.transport.ReadByte(); if (typeTag == 122) break; marker = skypeRef.transport.ReadByte(); switch (marker) { default: if (marker != 122) skypeRef.Error(String.Format("Invalid event argument tag {0} in OnSkypeAvailableDeviceListChange", marker)); break; } } while (marker != 'z'); skypeRef.transport.ResumeSocketReaderFromEvent(); args.senderobj = sender; FireOnSkypeAvailableDeviceListChange(sender, args); }