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; }
/// <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); }
/// <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)); }
public static string CheckForUpdateAvailable(string domainID) { ClientUpgrade cu = new ClientUpgrade(domainID); return(cu.CheckForUpdateAvailable()); }
/// <summary> /// Checks for Server Update /// </summary> /// <param name="domainID"></param> public static bool CheckForServerUpdate(string domainID) { ClientUpgrade cu = new ClientUpgrade(domainID); return(cu.CheckForServerUpdate()); }
public static bool CheckForServerUpdate(string domainID) { ClientUpgrade cu = new ClientUpgrade(domainID); return cu.CheckForServerUpdate(); }
public static bool RunUpdate(string domainID, string path) { ClientUpgrade cu = new ClientUpgrade(domainID); return cu.RunUpdate(path); }
public static string CheckForUpdateAvailable(string domainID) { ClientUpgrade cu = new ClientUpgrade(domainID); return cu.CheckForUpdateAvailable(); }