/*
 * Vars.cs --
 *
 * Copyright (c) 2007-2012 by Joe Mistachkin.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: $
 */

using System;
using Eagle._Attributes;
using Eagle._Constants;

namespace Eagle._Components.Private
{
    [ObjectId("e8dd6520-63db-4d7a-9ab3-f3bbe0f00d82")]
    internal static class Vars
    {
        #region For Shell Support Use Only
#if SHELL
        //
        // NOTE: Used for the "about" banner.
        //
        public static readonly string PackageDescription =
            "A Tcl {0} compatible interpreter for the Common Language Runtime.";

        //
        // NOTE: Also used for the "about" banner.
        //
        public static readonly string OfficialDescription =
            "This is an official release.";

        public static readonly string UnofficialDescription =
            "This is an unofficial release.";

        //
        // NOTE: Used for the "about" banner.  These phrases are hard-coded
        //       because the wording is a bit different in English when using
        //       the words "trusted" and "untrusted".
        //
        public static readonly string TrustedDescription =
            "This is a trusted release.";

        public static readonly string UntrustedDescription =
            "This is an untrusted release.";
#endif
        #endregion

        ///////////////////////////////////////////////////////////////////////

        #region For Shell & Version Support
        //
        // NOTE: This is used to show the release as "trusted".  It should
        //       only be used if the primary assembly file has been signed
        //       with an Authenticode (X.509) certificate and the certificate
        //       is trusted on this machine.
        //
        public static readonly string TrustedValue = "trusted";

        ///////////////////////////////////////////////////////////////////////

        //
        // NOTE: This is used to mark the release as "genuine"...  :P~
        //
        public static readonly string GenuineValue = "genuine";

        ///////////////////////////////////////////////////////////////////////

        //
        // NOTE: This is used to mark builds as official or unofficial
        //       releases.
        //
        public static readonly string OfficialValue = RuntimeOps.IsOfficial() ?
            "official" : "unofficial";
        #endregion

        ///////////////////////////////////////////////////////////////////////

        //
        // NOTE: Used to set the variables in the platform array(s).
        //
        public static readonly string PackageName = GlobalState.GetPackageName();

        //
        // NOTE: Used by the "safe" interpreter path scrubber.
        //
        public static readonly string BaseDirectory = "{BaseDirectory}";

        //
        // NOTE: Used by the unit testing functionality.
        //
        public static readonly string Tests = PackageName.ToLower() + "_tests"; // Eagle only.
        public static readonly string TestFile = "test_file"; // Eagle only.

        //
        // NOTE: Used by the file name resolution subsystem (PathOps).
        //
        public static readonly string Paths = PackageName.ToLower() + "_paths"; // Eagle only.

        //
        // NOTE: Used by [object] to represent a null object.
        //
        public static readonly string Null = _String.Null;

        //
        // NOTE: These names are referred to directly from scripts and where applicable
        //       are named identically to their Tcl counterparts, please do not change.
        //
        [ObjectId("f8ff1ea7-dfce-4b34-8bd0-6bb395759605")]
        internal static class Platform
        {
            //
            // NOTE: The name of the script array that contains the
            //       platform specific information.
            //
            public static readonly string Name = PackageName.ToLower() + "_platform";

            //
            // NOTE: Script engine version information.
            //
            public static readonly string Administrator = "administrator";
            public static readonly string Certificate = "certificate";
            public static readonly string UpdateBaseUri = "updateBaseUri";
            public static readonly string UpdatePathAndQueryName = "updatePathAndQuery";
            public static readonly string UpdatePathAndQueryValue = "update.txt?v={0}";
            public static readonly string CompileOptions = "compileOptions";
            public static readonly string CSharpOptionsName = "csharpOptions";
            public static readonly string CSharpOptionsValue = null; /* TODO: Good default? */
            public static readonly string StrongName = "strongName";
            public static readonly string StrongNameTag = "strongNameTag";
            public static readonly string Hash = "hash";
            public static readonly string Engine = "engine"; // COMPAT: What engine are we really using
            public static readonly string Epoch = "epoch";   //         (mirrored from tcl_platform)?
            public static readonly string GlobalAssemblyCache = "globalAssemblyCache";
            public static readonly string MinimumDate = "minimumDate";
            public static readonly string MaximumDate = "maximumDate";
            public static readonly string Culture = "culture";
            public static readonly string FrameworkVersion = "frameworkVersion";
            public static readonly string FrameworkExtraVersion = "frameworkExtraVersion";
            public static readonly string ObjectIds = "objectIds";
            public static readonly string OsName = "os";
            public static readonly string Wow64 = "wow64";

#if CAS_POLICY
            public static readonly string PermissionSet = "permissionSet";
#endif

            public static readonly string RuntimeName = "runtime";
            public static readonly string ImageRuntimeVersion = "imageRuntimeVersion";
            public static readonly string TargetFramework = "targetFramework";
            public static readonly string RuntimeVersion = "runtimeVersion";
            public static readonly string RuntimeOptions = "runtimeOptions";
            public static readonly string Configuration = "configuration";
            public static readonly string TimeStamp = "timeStamp";
            public static readonly string PatchLevel = "patchLevel";
            public static readonly string Release = "release";
            public static readonly string SourceId = "sourceId";
            public static readonly string SourceTimeStamp = "sourceTimeStamp";
            public static readonly string Tag = "tag";
            public static readonly string Text = "text";
            public static readonly string Uri = "uri";
            public static readonly string PublicKey = "publicKey";
            public static readonly string PublicKeyToken = "publicKeyToken";
            public static readonly string ModuleVersionId = "moduleVersionId";
            public static readonly string Version = "version";
            public static readonly string ShellPatchLevel = "shellPatchLevel";
            public static readonly string ShellVersion = "shellVersion";
            public static readonly string NativeUtility = "nativeUtility";
        }

        ///////////////////////////////////////////////////////////////////////////////////////////////

        [ObjectId("3facc96f-c6ae-495e-813d-3b906382377e")]
        internal static class OptionSet
        {
            public static readonly string Value = "value";
            public static readonly string Options = "options";
            public static readonly string NextIndex = "nextIndex";
            public static readonly string EndIndex = "endIndex";
        }

        ///////////////////////////////////////////////////////////////////////////////////////////////

        [ObjectId("5bcb3c76-9061-40fc-b728-9cd2b1c052a2")]
        internal static class ResultSet
        {
            public static readonly string Names = "names";
            public static readonly string Count = "count";
            public static readonly string Rows = "rows";

            public static readonly string Prepare = "prepare";
            public static readonly string Execute = "execute";
            public static readonly string Time = "time";
        }
    }
}
