Example #1
0
        public bool CancelRequest()
        {
            if (CurrentAsk == null)
            {
                return(false);
            }
            CurrentAsk.stopListening();
            CurrentAsk = null;
            RaisePropertyChanged("CurrentAsk");

            //Send request to remove from queue here!

            Payload p = new Payload();

            p.request    = "cancel";
            p.sessionkey = client.SessionKey;
            p.sessionid  = client.SessionID;
            p.path       = path.Concat(new String[] { "audio" }).ToList();
            Random rnd = new Random();

            p.identity = rnd.Next(Int32.MaxValue);
            ResponsePayload r = new ResponsePayload();

            r.message = "Connection: timeout!";
            connector.Send(p);

            return(true);
        }
Example #2
0
 public PingRequest addPing(String tags)
 {
     String[] tagsArr;
     if (tags.Contains(";"))
     {
         tagsArr = tags.Split(';');
     }
     else
     {
         tagsArr = new String[] { tags };
     }
     CurrentAsk = new PingRequest(this, tagsArr);
     RaisePropertyChanged("CurrentAsk");
     return(CurrentAsk);
 }
Example #3
0
 public PingRequest addPing(IList <String> tags)
 {
     CurrentAsk = new PingRequest(this, tags.ToArray());
     RaisePropertyChanged("CurrentAsk");
     return(CurrentAsk);
 }
Example #4
0
 public PingRequest addPing(IList<String> tags)
 {
     CurrentAsk = new PingRequest(this, tags.ToArray());
     RaisePropertyChanged("CurrentAsk");
     return CurrentAsk;
 }
Example #5
0
 public PingRequest addPing(String tags)
 {
     String[] tagsArr;
     if (tags.Contains(";"))
     {
         tagsArr = tags.Split(';');
     }
     else
     {
         tagsArr = new String[] { tags };
     }
     CurrentAsk = new PingRequest(this, tagsArr);
     RaisePropertyChanged("CurrentAsk");
     return CurrentAsk;
 }