Esempio n. 1
0
 /// <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>();
 }
Esempio n. 2
0
 public override void Initialize()
 {
     this.ecapa          = base.im.GetExtension <EntityCapabilities>();
     this.siFileTransfer = base.im.GetExtension <SIFileTransfer>();
     this.sdisco         = base.im.GetExtension <ServiceDiscovery>();
     this.serverIpCheck  = base.im.GetExtension <ServerIpCheck>();
 }
Esempio n. 3
0
 public override void Initialize()
 {
     this.streamInitiation = base.im.GetExtension <StreamInitiation>();
     this.streamInitiation.RegisterProfile("http://jabber.org/protocol/si/profile/file-transfer", new Func <Jid, XmlElement, XmlElement>(this.OnStreamInitiationRequest));
     this.ecapa = base.im.GetExtension <EntityCapabilities>();
     foreach (Type type in supportedMethods)
     {
         XmppExtension extension = base.im.GetExtension(type);
         if (!((extension != null) && (extension is IDataStream)))
         {
             throw new XmppException("Invalid data-stream type: " + type);
         }
         IDataStream stream = extension as IDataStream;
         stream.BytesTransferred += new EventHandler <BytesTransferredEventArgs>(this.OnBytesTransferred);
         stream.TransferAborted  += new EventHandler <TransferAbortedEventArgs>(this.OnTransferAborted);
     }
 }
Esempio n. 4
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;
     }
 }
Esempio n. 5
0
 public override void Initialize()
 {
     this.ecapa = base.im.GetExtension <EntityCapabilities>();
 }
Esempio n. 6
0
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     ecapa = im.GetExtension <EntityCapabilities>();
     bob   = im.GetExtension <BitsOfBinary>();
 }
Esempio n. 7
0
 public override void Initialize()
 {
     this.ecapa = base.im.GetExtension <EntityCapabilities>();
     this.bob   = base.im.GetExtension <BitsOfBinary>();
 }
Esempio n. 8
0
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     siFileTransfer = im.GetExtension <SIFileTransfer>();
     ecapa          = im.GetExtension <EntityCapabilities>();
 }
Esempio n. 9
0
 /// <summary>
 /// Invoked after all extensions have been loaded.
 /// </summary>
 public override void Initialize()
 {
     ecapa = im.GetExtension <EntityCapabilities>();
 }
Esempio n. 10
0
 public override void Initialize()
 {
     this.siFileTransfer = base.im.GetExtension <SIFileTransfer>();
     this.ecapa          = base.im.GetExtension <EntityCapabilities>();
 }