/*
 * ContextManager.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 Eagle._Attributes;
using Eagle._Components.Public;

namespace Eagle._Interfaces.Private
{
    //
    // NOTE: This interface is currently private; however, it may be "promoted"
    //       to public at some point.
    //
    [ObjectId("740b2349-fc1c-45f7-9549-9e96f20e8221")]
    internal interface IContextManager
    {
        int GetInterpreterContextCount();

        bool FreeEngineContext();
        bool FreeEngineContext(ref Result error);

        IEngineContext GetEngineContext(bool create);
        IEngineContext GetEngineContext(bool create, ref Result error);

        int GetEngineContextCount();
        int PurgeEngineContexts(bool nonPrimary);

        bool FreeInteractiveContext();
        bool FreeInteractiveContext(ref Result error);

        IInteractiveContext GetInteractiveContext(bool create);
        IInteractiveContext GetInteractiveContext(bool create, ref Result error);

        int GetInteractiveContextCount();
        int PurgeInteractiveContexts(bool nonPrimary);

        bool FreeTestContext();
        bool FreeTestContext(ref Result error);

        ITestContext GetTestContext(bool create);
        ITestContext GetTestContext(bool create, ref Result error);

        int GetTestContextCount();
        int PurgeTestContexts(bool nonPrimary);

        bool FreeVariableContext();
        bool FreeVariableContext(ref Result error);

        IVariableContext GetVariableContext(bool create);
        IVariableContext GetVariableContext(bool create, ref Result error);

        int GetVariableContextCount();
        int PurgeVariableContexts(bool nonPrimary);

        void Free(bool global);
    }
}
