public Abstract_PhoneReference CreateNewPhoneReference(Abstract_Phone phoneObject)
 {
     Abstract_PhoneReference phoneRecord = new Abstract_PhoneReference(phoneObject.id);
     Connection connectionString = new Connection(phoneObject);
     phoneRecord.connection = connectionString;
     PhoneList.Add(phoneRecord);
     return phoneRecord;
 }
        public Abstract_PhoneReference CreateNewPhoneReference(Abstract_Phone phoneObject)
        {
            Abstract_PhoneReference phoneRecord = new Abstract_PhoneReference(phoneObject.id);
            Connection connectionString         = new Connection(phoneObject);

            phoneRecord.connection = connectionString;
            PhoneList.Add(phoneRecord);
            return(phoneRecord);
        }
 public string GetCurrentSubscriptionList(Server server, Abstract_Phone phone)
 {
     Abstract_PhoneReference PhoneReference = server.GetPhoneReference(phone.id);
     if (PhoneReference != null)
     {
         return PhoneReference.subsciptions.GetSubscriptions();
     }
     else
     {
         return "This phone is not currently subscribed to this server.";
     }
 }
 public string GetAllSubscribedContent(Server server, Abstract_Phone phone)
 {
     Abstract_PhoneReference PhoneReference = server.GetPhoneReference(phone.id);
     if (PhoneReference != null)
     {
         return server.GetAllSubscribedContent(PhoneReference);
     }
     else
     {
         return "This phone is not currently subscribed to this server.";
     }
 }
        public string GetCurrentSubscriptionList(Server server, Abstract_Phone phone)
        {
            Abstract_PhoneReference PhoneReference = server.GetPhoneReference(phone.id);

            if (PhoneReference != null)
            {
                return(PhoneReference.subsciptions.GetSubscriptions());
            }
            else
            {
                return("This phone is not currently subscribed to this server.");
            }
        }
        public string GetAllSubscribedContent(Server server, Abstract_Phone phone)
        {
            Abstract_PhoneReference PhoneReference = server.GetPhoneReference(phone.id);

            if (PhoneReference != null)
            {
                return(server.GetAllSubscribedContent(PhoneReference));
            }
            else
            {
                return("This phone is not currently subscribed to this server.");
            }
        }
 public void SubscribePhoneToServer(Server server, Abstract_Phone phone, string NewsFeedName)
 {
     Abstract_NewsFeed NewsFeed = server.GetNewsFeed(NewsFeedName);
     if (NewsFeed != null)
     {
         Abstract_PhoneReference PhoneReference = server.GetPhoneReference(phone.id);
         if (PhoneReference == null)
         {
             PhoneReference = server.CreateNewPhoneReference(phone);
         }
         server.SubscribePhoneToFeed(PhoneReference, NewsFeed);
     }
     else
     {
         phone.Notification("A " + NewsFeedName + " newsfeed does not exist.");
     }
 }
        public void SubscribePhoneToServer(Server server, Abstract_Phone phone, string NewsFeedName)
        {
            Abstract_NewsFeed NewsFeed = server.GetNewsFeed(NewsFeedName);

            if (NewsFeed != null)
            {
                Abstract_PhoneReference PhoneReference = server.GetPhoneReference(phone.id);
                if (PhoneReference == null)
                {
                    PhoneReference = server.CreateNewPhoneReference(phone);
                }
                server.SubscribePhoneToFeed(PhoneReference, NewsFeed);
            }
            else
            {
                phone.Notification("A " + NewsFeedName + " newsfeed does not exist.");
            }
        }
 public Connection(Abstract_Phone phone)
 {
     this.phone = phone;
 }
 public Connection(Abstract_Phone phone)
 {
     this.phone = phone;
 }