InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISession Class Referenceabstract

#include <ISession.h>

Inheritance diagram for ISession:
IPMUnknown

Public Types

enum  SessionStateType { kUnknown, kStartingUp, kRunning, kShuttingDown }
 
typedef enum
ISession::SessionStateType 
SessionStateType
 

Public Member Functions

virtual IActiveContextGetActiveContext ()=0
 
virtual IChangeManagerGetChangeManager ()=0
 
virtual IEventConverterGetEventConverter ()=0
 
virtual IApplicationQueryApplication ()=0
 
virtual IWorkspaceQueryWorkspace ()=0
 
virtual IPMUnknownQueryWorkspace (PMIID faceID)=0
 
virtual ICommandProcessorQueryCommandProcessor ()=0
 
virtual IAutomationManager * QueryAutomationMangager ()=0
 
virtual
IUserActionPersonalityManager * 
QueryUserActionPersonalityMangager ()=0
 
virtual IINXManagerQueryINXManager ()=0
 
virtual SessionStateType GetState ()=0
 
For internal use only
virtual bool16 PurgeMemory (int32 level)=0
 
virtual const GlobalTimeGetStartupTime ()=0
 
virtual const bool16 IsStartupWithoutSavedData (void)=0
 
virtual bool16 Init (IDataBase *workSpaceDB=nil, const GlobalTime *const pStartupTime=nil)=0
 
virtual void Cleanup ()=0
 
virtual IStartupScreen * GetStartupScreen () const =0
 
virtual ICommandProcessorSetProxyCommandProcessor (ICommandProcessor *proxy)=0
 
virtual IDocumentListQueryDocumentList () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

ISession is the main interface off the root object in the hierarchy (instance of kSessionBoss). It contains global state information. The session is handed to every plug-in in its IPlugIn::Load function. Each execution context (thread) has only one session object which is accessible via GetExecutionContextSession()or by calling GetSession() on IExecutionContext.

Supplies plugins with references to key objects, such as:

See Also
kSessionBoss
kActiveContextBoss
IActiveContext
kWorkspaceBoss
IWorkspace
kAppBoss
IApplication
kCommandProcessorBoss
ICommandProcessor

Member Typedef Documentation

The state of the session: starting up, running, shutting down.

Member Enumeration Documentation

The state of the session: starting up, running, shutting down.

Member Function Documentation

virtual IActiveContext* ISession::GetActiveContext ()
pure virtual

Return the active context object. You shouldn't need to call this function, since the active context is now passed into every method that needs it. But there may be some edge cases we missed, so if you need the active document, active tool, active window, etc., and find no other way to get it, this is left available.

Returns
IActiveContext* the global active context
virtual IChangeManager* ISession::GetChangeManager ()
pure virtual

Return the global change manager used in broadcasting messages. Normally you do not need to call this; it is called for you by CSubject.

Returns
IChangeManager* the global change manager
virtual IEventConverter* ISession::GetEventConverter ()
pure virtual

Return an instance of a global event converter to convert system events to IEvents. You should not need to call this directly.

Returns
IEventConverter* the global event converter
virtual SessionStateType ISession::GetState ()
pure virtual

Return the current state of the session.

Returns
SessionStateType session status
virtual IApplication* ISession::QueryApplication ()
pure virtual

Return a reference to the global application. The application object is a singleton that contains the list of open documents, windows, panels, tools, etc. Also version number and name info for the application. Returns nil if the application is in the process of shutting down.

Returns
IApplication* the global application
virtual IAutomationManager* ISession::QueryAutomationMangager ()
pure virtual

Return a reference to the global automation manager

Returns
IAutomationManager* the global automation manager boss
virtual ICommandProcessor* ISession::QueryCommandProcessor ()
pure virtual

Return a reference to the global command processor. Normally this is called for you by CmdUtils.

Returns
ICommandProcessor* the global command processor
virtual IDocumentList* ISession::QueryDocumentList () const
pure virtual

Returns a reference to the list of open documents.

virtual IINXManager* ISession::QueryINXManager ()
pure virtual

Return a reference to the global INX manager

Returns
IINXManager* the global INX manager boss
virtual IUserActionPersonalityManager* ISession::QueryUserActionPersonalityMangager ()
pure virtual

Return a reference to the global user action personality manager

Returns
IUserActionPersonalityManager* the global user action personality manager boss
virtual IWorkspace* ISession::QueryWorkspace ()
pure virtual

Return a reference to the global workspace. The workspace contains application preference data. Returns nil if called very early in startup, or late in shutdown. For instance, plug-in load functions, or early initializers will return nil. Left here for compatibility with previous releases.

Returns
IWorkspace* the global workspace
virtual IPMUnknown* ISession::QueryWorkspace (PMIID faceID)
pure virtual

Return a reference to the global workspace, with a particular interface requested. The workspace contains application preference data. Returns nil if called very early in startup, or late in shutdown. For instance, plug-in load functions, or early initializers will return nil.

Parameters
faceIDwhich interface to return
Returns
IWorkspace* the global workspace