# IRsSysCore Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | SendCommandLine (LPCWSTR szCommand)
HRESULT | SendCommand ([in] IRsNode *pCmdNode)
HRESULT | RunCommand ([in] IRsNode *pCmdNode)
HRESULT | InitializeScriptDriver ([in] RtScriptDrv scriptDrv)
HRESULT | GetScriptDriver ([in] RtScriptDrv scriptDrv,[out, retval] IRsScriptDriver **ppScriptDriver)
HRESULT | CloseScriptDriver ([in] RtScriptDrv scriptDrv)
HRESULT | AddPackageNamedItems ([in] IRsUnknownPackage *pPackage)
HRESULT | CreateNodeScriptDriver ([in] RtScriptDrv scriptDrv,[out, retval] IRsScriptDriver **ppScriptDriver)
HRESULT | GetNodeScriptDriver ([in] RtScriptDrv scriptDrv,[out, retval] IRsScriptDriver **ppScriptDriver)
HRESULT | CloseNodeScriptDriver ([in] RtScriptDrv scriptDrv)
HRESULT | ParseCommand (LPCWSTR szCmd)
HRESULT | ParseScriptFile ([in] LPCWSTR szFile)
HRESULT | ExecuteCommand ([in] IRsCommand *pCommand)
HRESULT | Initialize (void)
HRESULT | Run (void)
HRESULT | Terminate (void)
HRESULT | GetToolMng ([in] IRsSysToolManager **ppToolMng)
HRESULT | GetCommandMng ([out, retval] IRsCommandMng **ppMng)
HRESULT | GetHistory ([out, retval] IRsHistory **ppHistory)
HRESULT | SetCachingMode ([in] RtCachingMode eMode,[in] RtBool bRebuild)
HRESULT | GetCachingMode ([out] RtCachingMode *peMode)
HRESULT | FlushCommands (void)
HRESULT | GetActivityMng ([out, retval] IRsActivityMng **ppActivityMng)
HRESULT | PostMasterThreadMessage ([in] UINT MsgIN,[in] WPARAM wParam,[in] LPARAM lParam)
HRESULT | GetMasterThreadId ([out, retval] DWORD *pdwId)

## Detailed Description

System core for executing scripts and commands. Commands are put into queue and wait for their executions. Commands can be processed in either Master thread or Interface thread (specify CMDFLAG_INTERFACE in command descriptor)

## Member Function Documentation

HRESULT IRsSysCore::SendCommandLine | ( | LPCWSTR | szCommand | ) |

Sends script command line for processing and returns (asynchronous).

HRESULT IRsSysCore::SendCommand | ( | [in] IRsNode * | pCmdNode | ) |

Sends command for processing and returns (asynchronous).

HRESULT IRsSysCore::RunCommand | ( | [in] IRsNode * | pCmdNode | ) |

Executes the command (synchronous).

HRESULT IRsSysCore::InitializeScriptDriver | ( | [in] RtScriptDrv | scriptDrv | ) |

Parameters:

  | scriptDrv | [in] .

HRESULT IRsSysCore::GetScriptDriver | ( | [in] RtScriptDrv | scriptDrv,
|  | [out, retval] IRsScriptDriver ** | ppScriptDriver |
| ) |  |  |

Parameters:

  | scriptDrv | [in] .

Returns:
  ppScriptDriver [out,retval] .

HRESULT IRsSysCore::CloseScriptDriver | ( | [in] RtScriptDrv | scriptDrv | ) |

Parameters:

  | scriptDrv | [in] .

HRESULT IRsSysCore::AddPackageNamedItems | ( | [in] IRsUnknownPackage * | pPackage | ) |

Parameters:

  | pPackage | [in] .

HRESULT IRsSysCore::CreateNodeScriptDriver | ( | [in] RtScriptDrv | scriptDrv,
|  | [out, retval] IRsScriptDriver ** | ppScriptDriver |
| ) |  |  |

Create script driver from specified language ID.

Parameters:

  | scriptDrv | [in] .

Returns:
  ppScriptDriver [out,retval] .

HRESULT IRsSysCore::GetNodeScriptDriver | ( | [in] RtScriptDrv | scriptDrv,
|  | [out, retval] IRsScriptDriver ** | ppScriptDriver |
| ) |  |  |

Create script driver from specified language ID.

Parameters:

  | scriptDrv | [in] .

Returns:
  ppScriptDriver [out,retval] .

HRESULT IRsSysCore::CloseNodeScriptDriver | ( | [in] RtScriptDrv | scriptDrv | ) |

Close script driver with specified ID.

Parameters:

  | scriptDrv | [in] .

HRESULT IRsSysCore::ParseCommand | ( | LPCWSTR | szCmd | ) |

Internal processing of commands. Parses command from script.

HRESULT IRsSysCore::ParseScriptFile | ( | [in] LPCWSTR | szFile | ) |

Parses commands from script file.

Parameters:

  | szFile | [in] .

HRESULT IRsSysCore::ExecuteCommand | ( | [in] IRsCommand * | pCommand | ) |

Executes command - do not call directly, call RunCommand)

Parameters:

  | pCommand | [in] .

HRESULT IRsSysCore::Initialize | ( | void |  | ) |

Initializes system core.

HRESULT IRsSysCore::Run | ( | void |  | ) |

Starts up system core.

HRESULT IRsSysCore::Terminate | ( | void |  | ) |

Shutdown system core.

HRESULT IRsSysCore::GetToolMng | ( | [in] IRsSysToolManager ** | ppToolMng | ) |

Returns system tool manager.

Parameters:

  | ppToolMng | [in] .

HRESULT IRsSysCore::GetCommandMng | ( | [out, retval] IRsCommandMng ** | ppMng | ) |

Returns command manager.

Returns:
  ppMng [out,retval] .

HRESULT IRsSysCore::GetHistory | ( | [out, retval] IRsHistory ** | ppHistory | ) |

Returns command history.

Returns:
  ppHistory [out,retval] .

HRESULT IRsSysCore::SetCachingMode | ( | [in] RtCachingMode | eMode,
|  | [in] RtBool | bRebuild |
| ) |  |  |

Sets caching mode.

Parameters:

  | eMode | [in] .
  | bRebuild | [in] .

HRESULT IRsSysCore::GetCachingMode | ( | [out] RtCachingMode * | peMode | ) |

Gets caching mode.

Parameters:

  | peMode | [out] .

HRESULT IRsSysCore::FlushCommands | ( | void |  | ) |

Executes all queued commands.

HRESULT IRsSysCore::GetActivityMng | ( | [out, retval] IRsActivityMng ** | ppActivityMng | ) |

Gets activity manager.

Returns:
  ppActivityMng [out,retval] .

HRESULT IRsSysCore::PostMasterThreadMessage | ( | [in] UINT | MsgIN,
|  | [in] WPARAM | wParam,
|  | [in] LPARAM | lParam |
| ) |  |  |

Posts message to master thread.

Parameters:

  | MsgIN | [in] .
  | wParam | [in] .
  | lParam | [in] .

HRESULT IRsSysCore::GetMasterThreadId | ( | [out, retval] DWORD * | pdwId | ) |

Returns identifier of master thread.

Returns:
  pdwId [out,retval] .