001/*
002 * Syncany, www.syncany.org
003 * Copyright (C) 2011-2016 Philipp C. Heckel <philipp.heckel@gmail.com> 
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU General Public License as published by
007 * the Free Software Foundation, either version 3 of the License, or
008 * (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018package org.syncany.config.to;
019
020import org.simpleframework.xml.Element;
021import org.simpleframework.xml.Root;
022
023/**
024 * This class is the access object to the XML file written by the daemon in the client folder.
025 * It is used in the CLI to get access to the port information and a user-password
026 * pair that can be used to authenticate with the REST-server.
027 * 
028 * <p>It uses the Simple framework for XML serialization, and its corresponding
029 * annotation-based configuration.
030 *
031 * @see <a href="http://simple.sourceforge.net/">Simple framework</a>
032 * @author Pim Otte
033 */
034@Root(name = "port", strict = false)
035public class PortTO {
036        @Element(name = "port", required = true)
037        private int port;
038
039        @Element(name = "user", required = true)
040        private UserTO user;
041
042        public int getPort() {
043                return port;
044        }
045
046        public void setPort(int port) {
047                this.port = port;
048        }
049
050        public UserTO getUser() {
051                return user;
052        }
053
054        public void setUser(UserTO user) {
055                this.user = user;
056        }
057}