HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_ServiceTypes.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __PDG_SERVICE_TYPES_H__
10 #define __PDG_SERVICE_TYPES_H__
11 
12 #include <UT/UT_SharedPtr.h>
13 
14 class PDG_Service;
15 
16 /// Type def for registered type objects
18 
19 /// Enumeration of service block cook modes
21 {
22  /// Work items will never cook using the service associated with the
23  /// parent block
24  eNever,
25 
26  /// Work items will cook the parent block's service if it matches the
27  /// service name for the node
28  eMatch,
29 
30  /// Work items will always use the parent block's service
31  eAlways,
32 };
33 
34 /// When service clients should be reset
36 {
37  /// The service client is not reset
38  eNone = 0x0,
39 
40  /// The service client is reset at the start of a work item or block cook
41  eBeforeCook = 0x1,
42 
43  /// The service client is reset at the end of a work item or block cook
44  eAfterCook = 0x2,
45 
46  /// The service is reset at the beginning and end of a cook
47  eBoth = 0x3
48 };
49 
50 /// Service client reset operation, performed each time work items acquire a
51 /// new client.
53 {
54  /// The service client is not reset
55  eNone,
56 
57  /// The service client is sent the "reset" command
58  eReset,
59 
60  /// The service client process is restarted
61  eRestart
62 };
63 
64 /// Enumeration of the different types of service owner
65 enum class PDG_ServiceOwner
66 {
67  /// The service is owned by a scheduler, which means it will be tied to
68  /// the lifetime of the scheduler node(s).
69  eScheduler,
70 
71  /// The service is owned by the session, which means it will be stopped
72  /// only if stopped by the user or Houdini is closed.
73  eSession
74 };
75 
76 /// Enumeration of the different states that a service can be in
77 enum class PDG_ServiceState
78 {
79  // The service is not running
80  eStopped,
81 
82  // The service is in the process of stopping. The service will remain in
83  // this state until the MQ Server and all of the service clients have
84  // been issued a command to shutdown.
85  eStopping,
86 
87  // The service is in the process of starting. The service will remain in
88  // this state until all of the service clients have fully started up.
89  eStarting,
90 
91  // The service is fully running and all clients are available.
92  eRunning,
93 
94  // The service is in an unrecoverable error state
95  eError
96 };
97 
98 /// Enumeration of service log types
100 {
101  /// The service does not do any logging -- stdout is routed to
102  /// /dev/null
103  eNone,
104 
105  /// The service logs to stdout
106  eStdout,
107 
108  /// The service logs to a file on disk
109  eFile
110 };
111 
112 /// Enumeration of possible result values from starting a service
114 {
115  /// An error occured and the service was not started
116  eError,
117 
118  /// The service was successfully started
119  eSuccess,
120 
121  /// The service was already running
122  eRunning,
123 
124  /// The service clients are connecting in the background
126 };
127 
128 #endif /* __PDG_SERVICE_TYPES_H__ */
Only overwrite the attribute if the type matches.
PDG_ServiceResetType
The service logs to stdout.
Never overwrite the attribute.
UT_SharedPtr< PDG_Service > PDG_ServicePtr
Type def for registered type objects.
The service client is reset at the start of a work item or block cook.
The service is reset at the beginning and end of a cook.
The service clients are connecting in the background.
No error was specified, i.e. the ref is valid.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
PDG_ServiceResetWhen
When service clients should be reset.
The service client is reset at the end of a work item or block cook.
The service client process is restarted.
PDG_ServiceLogType
Enumeration of service log types.
PDG_ServiceOwner
Enumeration of the different types of service owner.
PDG_ServiceStartResult
Enumeration of possible result values from starting a service.
No cast error occured (success)
PDG_ServiceState
Enumeration of the different states that a service can be in.
The service client is sent the "reset" command.
The service logs to a file on disk.
PDG_ServiceBlockCookType
Enumeration of service block cook modes.