Exemplo n.º 1
0
        /// <summary>
        /// The public constructor.
        /// </summary>
        /// <param name="handleParticipant">The unique handle of the other participant in the communication session.</param>
        /// <param name="type">The type of the communication sesison.</param>
        /// <param name="surfaceComm">An interface to a communication service provider.</param>
        /// <param name="kryptonite">An interface to a Kryptonite module.</param>
        /// <param name="bottom">An interface to a Bottom module.</param>
        public Session(string handleParticipant, TSession type, ISurfaceCommunicationSpecific surfaceComm, IKryptoniteExternalCommunicationSpecific kryptonite, IBottomExternalCommunicationSpecific bottom)
        {
            this._handleParticipant = handleParticipant;
            this.kryptonite = kryptonite;
            this.bottom = bottom;
            this.surfaceComm = surfaceComm;
            this.type = type;

            //set-up send message call-backs
            bottom.sendMessage = this.sendBottomMessage;
            kryptonite.sendMessage = this.sendKryptoniteMessage;

            this._deployBtm2Btm = false;
            this._deployKrypt2Krypt = false;
            this._encrypted = false;

            //set-up surface message received call-back
            surfaceComm.surfaceSpecificMessageHandler = this.surfaceMessageReceived;
        }
Exemplo n.º 2
0
 /// <summary>
 /// The public constructor.
 /// </summary>
 /// <param name="handleParticipant">The unique handle of the other participant.</param>
 /// <param name="id">The ID of the call.</param>
 /// <param name="surfaceComm">An interface to a communication service provider.</param>
 /// <param name="cryptoProvider">An interface to a Kryptonite module.</param>
 /// <param name="trafficManipulator">An interface to a Bottom module.</param>
 public CallSession(string handleParticipant, int id, ISurfaceCommunicationSpecific surfaceComm, IKryptoniteExternalCommunicationSpecific cryptoProvider, IBottomExternalCommunicationSpecific trafficManipulator)
     : base(handleParticipant, TSession.call, surfaceComm, cryptoProvider, trafficManipulator)
 {
     this._id = id;
 }