Changeset 45415 in vbox for trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.h
- Timestamp:
- Apr 8, 2013 9:40:42 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84843
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.h
r45109 r45415 169 169 /** 170 170 * Structure for a guest session thread to 171 * observe the forked session instance. 171 * observe/control the forked session instance from 172 * the VBoxService main executable. 172 173 */ 173 174 typedef struct VBOXSERVICECTRLSESSIONTHREAD … … 243 244 typedef struct VBOXSERVICECTRLSESSION 244 245 { 246 /* The session's startup information. */ 245 247 VBOXSERVICECTRLSESSIONSTARTUPINFO 246 248 StartupInfo; 247 /** List of active guest control threads (VBOXSERVICECTRLTHREAD). */248 RTLISTANCHOR lst ControlThreadsActive;249 /** List of inactive guest control threads (VBOXSERVICECTRLTHREAD). */249 /** List of active guest process threads (VBOXSERVICECTRLPROCESS). */ 250 RTLISTANCHOR lstProcessesActive; 251 /** List of inactive guest process threads (VBOXSERVICECTRLPROCESS). */ 250 252 /** @todo Still needed? */ 251 RTLISTANCHOR lst ControlThreadsInactive;253 RTLISTANCHOR lstProcessesInactive; 252 254 /** List of guest control files (VBOXSERVICECTRLFILE). */ 253 255 RTLISTANCHOR lstFiles; 254 /** Critical section for protecting the guest process 255 * threading list. */ 256 RTCRITSECT csControlThreads; 256 /** The session's critical section. */ 257 RTCRITSECT CritSect; 257 258 /** Session flags. */ 258 259 uint32_t uFlags; … … 330 331 /** Critical section for thread-safe use. */ 331 332 RTCRITSECT CritSect; 332 /** @todo Document me! */ 333 /** Process startup information. */ 334 VBOXSERVICECTRLPROCSTARTUPINFO 335 StartupInfo; 336 /** The process' PID assigned by the guest OS. */ 333 337 uint32_t uPID; 334 char *pszCmd;335 uint32_t uFlags;336 char **papszArgs;337 uint32_t uNumArgs;338 char **papszEnv;339 uint32_t uNumEnvVars;340 /** Name of specified user account to run the341 * guest process under. */342 char *pszUser;343 /** Password of specified user account. */344 char *pszPassword;345 /** Overall time limit (in ms) that the guest process346 * is allowed to run. 0 for indefinite time. */347 uint32_t uTimeLimitMS;348 338 /** Pointer to the current IPC request being 349 * processed. */ 339 * processed. We only support one request at a 340 * time at the moment. 341 ** @todo Implemenet a request queue. */ 350 342 PVBOXSERVICECTRLREQUEST pRequest; 351 343 /** StdIn pipe for addressing writes to the … … 374 366 375 367 /* Guest session thread handling. */ 376 extern int GstCntlSessionThread Open(PRTLISTANCHOR pList, const PVBOXSERVICECTRLSESSIONSTARTUPINFO pSessionStartupInfo, PVBOXSERVICECTRLSESSIONTHREAD *ppSessionThread);377 extern int GstCntlSessionThread Close(PVBOXSERVICECTRLSESSIONTHREAD pSession, uint32_t uFlags);378 extern int GstCntlSessionThread CloseAll(PRTLISTANCHOR pList, uint32_t uFlags);368 extern int GstCntlSessionThreadCreate(PRTLISTANCHOR pList, const PVBOXSERVICECTRLSESSIONSTARTUPINFO pSessionStartupInfo, PVBOXSERVICECTRLSESSIONTHREAD *ppSessionThread); 369 extern int GstCntlSessionThreadDestroy(PVBOXSERVICECTRLSESSIONTHREAD pSession, uint32_t uFlags); 370 extern int GstCntlSessionThreadDestroyAll(PRTLISTANCHOR pList, uint32_t uFlags); 379 371 extern int GstCntlSessionThreadTerminate(PVBOXSERVICECTRLSESSIONTHREAD pSession); 380 372 extern RTEXITCODE VBoxServiceControlSessionForkInit(int argc, char **argv); … … 392 384 extern int GstCntlProcessPerform(PVBOXSERVICECTRLPROCESS pProcess, PVBOXSERVICECTRLREQUEST pRequest); 393 385 extern int GstCntlProcessStart(const PVBOXSERVICECTRLSESSION pSession, const PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo, uint32_t uContext); 394 extern int GstCntlProcessStop( const PVBOXSERVICECTRLPROCESS pThread);395 extern void GstCntlProcessRelease(const PVBOXSERVICECTRLPROCESS p Thread);396 extern int GstCntlProcessWait(const PVBOXSERVICECTRLPROCESS p Thread, RTMSINTERVAL msTimeout, int *prc);397 extern int GstCntlProcessFree(PVBOXSERVICECTRLPROCESS p Thread);386 extern int GstCntlProcessStop(PVBOXSERVICECTRLPROCESS pProcess); 387 extern void GstCntlProcessRelease(const PVBOXSERVICECTRLPROCESS pProcess); 388 extern int GstCntlProcessWait(const PVBOXSERVICECTRLPROCESS pProcess, RTMSINTERVAL msTimeout, int *pRc); 389 extern int GstCntlProcessFree(PVBOXSERVICECTRLPROCESS pProcess); 398 390 /* Process request handling. */ 399 391 extern int GstCntlProcessRequestAlloc(PVBOXSERVICECTRLREQUEST *ppReq, VBOXSERVICECTRLREQUESTTYPE enmType);
Note:
See TracChangeset
for help on using the changeset viewer.