示例#1
0
 public void EndCall(ActiveCall call)
 {
     if (call != null)
     {
         var endCallAction = new CXEndCallAction(call.UUID);
         var transaction   = new CXTransaction(endCallAction);
         SendTransactionRequest(transaction);
     }
 }
示例#2
0
 public void PlaceCallOnHold(ActiveCall call)
 {
     if (call != null)
     {
         var holdCallAction = new CXSetHeldCallAction(call.UUID, true);
         var transaction    = new CXTransaction(holdCallAction);
         SendTransactionRequest(transaction);
     }
 }
示例#3
0
 public void AnswerCall(ActiveCall call)
 {
     if (call != null)
     {
         var answerCallAction = new CXAnswerCallAction(call.UUID);
         var transaction      = new CXTransaction(answerCallAction);
         SendTransactionRequest(transaction);
     }
 }
示例#4
0
 public void MuteCall(ActiveCall call, bool mute)
 {
     if (call != null)
     {
         var holdCallAction = new CXSetMutedCallAction(call.UUID, mute);
         var transaction    = new CXTransaction(holdCallAction);
         SendTransactionRequest(transaction);
     }
 }
示例#5
0
 public void RemoveCallFromOnHold(ActiveCall call)
 {
     if (call != null)
     {
         var holdCallAction = new CXSetHeldCallAction(call.UUID, false);
         var transaction    = new CXTransaction(holdCallAction);
         SendTransactionRequest(transaction);
     }
 }
        public void PlaceCallOnHold(ActiveCall call)
        {
            // Build action
            var holdCallAction = new CXSetHeldCallAction(call.UUID, true);

            // Create transaction
            var transaction = new CXTransaction(holdCallAction);

            // Inform system of call request
            SendTransactionRequest(transaction);
        }
        public void EndCall(ActiveCall call)
        {
            // Build action
            var endCallAction = new CXEndCallAction(call.UUID);

            // Create transaction
            var transaction = new CXTransaction(endCallAction);

            // Inform system of call request
            SendTransactionRequest(transaction);
        }
        public void StartCall(string contact)
        {
            // Build call action
            var handle          = new CXHandle(CXHandleType.Generic, contact);
            var startCallAction = new CXStartCallAction(new NSUuid(), handle);

            // Create transaction
            var transaction = new CXTransaction(startCallAction);

            // Inform system of call request
            SendTransactionRequest(transaction);
        }
示例#9
0
        public ActiveCall StartCall(string name, int id)
        {
            var newCall = new ActiveCall(new NSUuid(), name, id, true, null, false);

            Calls.Add(newCall);

            var handle          = new CXHandle(CXHandleType.Generic, name);
            var startCallAction = new CXStartCallAction(newCall.UUID, handle);
            var transaction     = new CXTransaction(startCallAction);

            SendTransactionRequest(transaction);

            return(newCall);
        }
示例#10
0
 private void SendTransactionRequest(CXTransaction transaction)
 {
     CallController.RequestTransaction(transaction, (error) =>
     {
         if (error == null)
         {
             Console.WriteLine("Transaction request sent successfully.");
         }
         else
         {
             Console.WriteLine("Error requesting transaction: {0}", error);
         }
     });
 }
 private void SendTransactionRequest(CXTransaction transaction)
 {
     // Send request to call controller
     CallController.RequestTransaction(transaction, (error) => {
         // Was there an error?
         if (error == null)
         {
             // No, report success
             Console.WriteLine("Transaction request sent successfully.");
         }
         else
         {
             // Yes, report error
             Console.WriteLine("Error requesting transaction: {0}", error);
         }
     });
 }
示例#12
0
        public void StartCall(string contact)
        {
            // Build call action
            var handle = new CXHandle(CXHandleType.Generic, contact);
            //var handle = new CXHandle(CXHandleType.EmailAddress, contact);
            //var handle = new CXHandle(CXHandleType.PhoneNumber, contact);

            var thisCallID = new NSUuid();

            Console.WriteLine("Call instance " + thisCallID + " generated for " + contact);
            var startCallAction = new CXStartCallAction(thisCallID, handle);

            // Create transaction
            var transaction = new CXTransaction(startCallAction);

            // Inform system of call request
            SendTransactionRequest(transaction);
        }
示例#13
0
 public static bool ExecuteTransaction(this ICXProviderDelegate This, CXProvider provider, CXTransaction transaction) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
示例#14
0
 public virtual Task RequestTransactionAsync(CXTransaction transaction) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
示例#15
0
 public virtual void RequestTransaction(CXTransaction transaction, Action <NSError> completion) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
示例#16
0
 public virtual bool ExecuteTransaction(CXProvider provider, CXTransaction transaction) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);