예제 #1
0
 public static int CheckForMacUpdate(string domainID, string currentVersion, out string serverVersion)
 {
     int retval = -1;
                 string ServerVersion = null;
                 ClientUpgrade cu = new ClientUpgrade(domainID);
                 StatusCodes stat = cu.CheckForMacUpdate(currentVersion, out ServerVersion);
                 switch( stat)
                 {
                         case StatusCodes.Success:
                                         retval = (int)UpgradeResult.Latest;
                                         break;
                         case StatusCodes.UpgradeNeeded:
                                         retval = (int)UpgradeResult.UpgradeNeeded;
                                         break;
                         case StatusCodes.ServerOld:
                                         retval = (int)UpgradeResult.ServerOld;
                    Version ver = new Version(ServerVersion);
                    if (ver.Major == 3 && ver.Minor >= 6)
                        retval = (int)UpgradeResult.Latest;
                                         break;
                         case StatusCodes.OlderVersion:
                                         retval = (int)UpgradeResult.UpgradeAvailable;
                                         break;
                         case StatusCodes.Unknown:
                                         retval = (int)UpgradeResult.Unknown;
                                         break;
                         default:
                                         break;
                 }
                 serverVersion = ServerVersion;
                 return retval;
 }
예제 #2
0
        /// <summary>
        /// Mac: Checks to see if there is a newer client application on the domain server and
        /// prompts the user to upgrade.
        /// </summary>
        /// <param name="domainID">The ID of the domain to check for updates against</param>
        /// <param name="currentVersion">Current version of Mac client</param>
        /// <returns>The version of the update if available. Otherwise null is returned.</returns>
        public static int CheckForMacUpdate(string domainID, string currentVersion, out string serverVersion)
        {
            int retval = -1;

            string        ServerVersion = null;
            ClientUpgrade cu            = new ClientUpgrade(domainID);
            StatusCodes   stat          = cu.CheckForMacUpdate(currentVersion, out ServerVersion);

            switch (stat)
            {
            case StatusCodes.Success:
                retval = (int)UpgradeResult.Latest;
                break;

            case StatusCodes.UpgradeNeeded:
                retval = (int)UpgradeResult.UpgradeNeeded;
                break;

            case StatusCodes.ServerOld:
                retval = (int)UpgradeResult.ServerOld;
                Version ver = new Version(ServerVersion);
                if (ver.Major == 3 && ver.Minor >= 6)
                {
                    retval = (int)UpgradeResult.Latest;
                }
                break;

            case StatusCodes.OlderVersion:
                retval = (int)UpgradeResult.UpgradeAvailable;
                break;

            case StatusCodes.Unknown:
                retval = (int)UpgradeResult.Unknown;
                break;

            default:
                break;
            }

            serverVersion = ServerVersion;
            return(retval);
        }
예제 #3
0
        /// <summary>
        /// Gets the updated client application and runs the installation program.
        /// Note: This call will return before the application is updated.
        /// </summary>
        /// <param name="domainID">The ID of the domain to check for updates against.</param>
        /// <returns>True if the installation program is successfully started. Otherwise false is returned.</returns>
        public static bool RunUpdate(string domainID, string path)
        {
            ClientUpgrade cu = new ClientUpgrade(domainID);

            return(cu.RunUpdate(path));
        }
예제 #4
0
        public static string CheckForUpdateAvailable(string domainID)
        {
            ClientUpgrade cu = new ClientUpgrade(domainID);

            return(cu.CheckForUpdateAvailable());
        }
예제 #5
0
        /// <summary>
        /// Checks for Server Update
        /// </summary>
        /// <param name="domainID"></param>
        public static bool CheckForServerUpdate(string domainID)
        {
            ClientUpgrade cu = new ClientUpgrade(domainID);

            return(cu.CheckForServerUpdate());
        }
예제 #6
0
 public static bool CheckForServerUpdate(string domainID)
 {
     ClientUpgrade cu = new ClientUpgrade(domainID);
        return cu.CheckForServerUpdate();
 }
예제 #7
0
 public static bool RunUpdate(string domainID, string path)
 {
     ClientUpgrade cu = new ClientUpgrade(domainID);
        return cu.RunUpdate(path);
 }
예제 #8
0
 public static string CheckForUpdateAvailable(string domainID)
 {
     ClientUpgrade cu = new ClientUpgrade(domainID);
        return cu.CheckForUpdateAvailable();
 }