/// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     ecapa          = im.GetExtension <EntityCapabilities>();
     siFileTransfer = im.GetExtension <SIFileTransfer>();
     sdisco         = im.GetExtension <ServiceDiscovery>();
     serverIpCheck  = im.GetExtension <ServerIpCheck>();
 }
示例#2
0
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     streamInitiation = im.GetExtension <StreamInitiation>();
     // Register the 'file-transfer' profile.
     streamInitiation.RegisterProfile(
         "http://jabber.org/protocol/si/profile/file-transfer",
         OnStreamInitiationRequest
         );
     ecapa = im.GetExtension <EntityCapabilities>();
     // Sign up for the 'BytesTransferred' and 'TransferAborted' events of each
     // data-stream extension that we support.
     foreach (var type in supportedMethods)
     {
         var ext = im.GetExtension(type);
         if (ext == null || !(ext is IDataStream))
         {
             throw new XmppException("Invalid data-stream type: " + type);
         }
         IDataStream dataStream = ext as IDataStream;
         dataStream.BytesTransferred += OnBytesTransferred;
         dataStream.TransferAborted  += OnTransferAborted;
     }
 }
示例#3
0
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     ecapa = im.GetExtension <EntityCapabilities>();
 }
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     ecapa = im.GetExtension <EntityCapabilities>();
     bob   = im.GetExtension <BitsOfBinary>();
 }
示例#5
0
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     siFileTransfer = im.GetExtension <SIFileTransfer>();
     ecapa          = im.GetExtension <EntityCapabilities>();
 }