Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: installer/src/installer-lib/session.h

Issue 5219280069066752: Issue #1186 - Change names that appear in the custom action (Closed)
Patch Set: Created Jan. 4, 2015, 7 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * \file session.h The "install session" is the context for all custom installati on behavior. 2 * \file session.h The "install session" is the context for all custom installati on behavior.
3 */ 3 */
4 4
5 #ifndef SESSION_H 5 #ifndef SESSION_H
6 #define SESSION_H 6 #define SESSION_H
7 7
8 #include "property.h" 8 #include "property.h"
9 #include "record.h" 9 #include "record.h"
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 class Session { 71 class Session {
72 public: 72 public:
73 /** 73 /**
74 * Destructor. 74 * Destructor.
75 */ 75 */
76 ~Session() ; 76 ~Session() ;
77 77
78 /** 78 /**
79 * Write a message to the installation log, regular string version. 79 * Write a message to the installation log, regular string version.
80 */ 80 */
81 void log( std::string message ) ; 81 void Log( std::string message ) ;
82 82
83 /** 83 /**
84 * Write a message to the installation log, wide string version. 84 * Write a message to the installation log, wide string version.
85 */ 85 */
86 void log( std::wstring message ) ; 86 void Log( std::wstring message ) ;
87 87
88 /** 88 /**
89 * Write a message to the installation log without raising an exception. 89 * Write a message to the installation log without raising an exception.
90 * 90 *
91 * Use this function only in the three circumstances when an exception cannot b e caught by an entry point catch-all. 91 * Use this function only in the three circumstances when an exception cannot b e caught by an entry point catch-all.
92 * First and second, there's the constructor and destructor of a Session instan ce. 92 * First and second, there's the constructor and destructor of a Session instan ce.
93 * These log entry into and exit from the custom action, respectively. 93 * These log entry into and exit from the custom action, respectively.
94 * Third, there's the top level catch-blocks of the CA. 94 * Third, there's the top level catch-blocks of the CA.
95 * The scope of the Session object cannot be within the try-block in order for it to be in scope for the catch-block. 95 * The scope of the Session object cannot be within the try-block in order for it to be in scope for the catch-block.
96 * The session must be in scope in the catch-block to allow logging error messa ges. 96 * The session must be in scope in the catch-block to allow logging error messa ges.
97 * In all other cases, use the exception mechanism. 97 * In all other cases, use the exception mechanism.
98 */ 98 */
99 void log_noexcept( std::string message ) ; 99 void LogNoexcept( std::string message ) ;
100 100
101 /** 101 /**
102 * Write to a MessageBox dialog. 102 * Write to a MessageBox dialog.
103 */ 103 */
104 int write_message( Message & ) ; 104 int WriteMessage( Message & ) ;
105 105
106 protected: 106 protected:
107 /** 107 /**
108 * Ordinary constructor is protected; public constructors are all in subclasses . 108 * Ordinary constructor is protected; public constructors are all in subclasses .
109 * The MSI system uses a single handle type for all types of sessions. This han dle is here in this base class. 109 * The MSI system uses a single handle type for all types of sessions. This han dle is here in this base class.
110 * 110 *
111 * \param[in] handle 111 * \param[in] handle
112 * Handle for the Windows Installer session provided as an argument to a cus tom action. 112 * Handle for the Windows Installer session provided as an argument to a cus tom action.
113 * \param[in] name 113 * \param[in] name
114 * The name of the custom action, used for logging. 114 * The name of the custom action, used for logging.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 */ 159 */
160 Session & operator=( const Session & ) ; 160 Session & operator=( const Session & ) ;
161 161
162 /** 162 /**
163 * The Property class requires access to the session handle. 163 * The Property class requires access to the session handle.
164 */ 164 */
165 friend Property::Property( Session & session, std::wstring name ) ; 165 friend Property::Property( Session & session, std::wstring name ) ;
166 }; 166 };
167 167
168 //------------------------------------------------------------------------------ ----------- 168 //------------------------------------------------------------------------------ -----------
169 // Immediate_Session 169 // ImmediateSession
170 //------------------------------------------------------------------------------ ----------- 170 //------------------------------------------------------------------------------ -----------
171 /** 171 /**
172 * Session for immediate custom actions. 172 * Session for immediate custom actions.
173 * 173 *
174 * Access to the installer database is by passing a reference to a class of this subtype to a Database constructor. 174 * Access to the installer database is by passing a reference to a class of this subtype to a Database constructor.
175 */ 175 */
176 class Immediate_Session : public Session 176 class ImmediateSession : public Session
177 { 177 {
178 public: 178 public:
179 /** 179 /**
180 * Ordinary constructor. 180 * Ordinary constructor.
181 * 181 *
182 * \param[in] handle 182 * \param[in] handle
183 * Handle for the Windows Installer session provided as an argument to a cus tom action. 183 * Handle for the Windows Installer session provided as an argument to a cus tom action.
184 * \param[in] name 184 * \param[in] name
185 * The name of the custom action, used for logging. 185 * The name of the custom action, used for logging.
186 * 186 *
187 * **noexcept** declaration to be added for C++11. 187 * **noexcept** declaration to be added for C++11.
188 */ 188 */
189 Immediate_Session( MSIHANDLE handle, std::string name ) ; 189 ImmediateSession( MSIHANDLE handle, std::string name ) ;
190 190
191 private: 191 private:
192 /* 192 /*
193 * Allow helper function for Installation_Database constructor to have access t o the handle. 193 * Allow helper function for Installation_Database constructor to have access t o the handle.
194 */ 194 */
195 friend msi_handle get_active_database( Immediate_Session & session ) ; 195 friend msi_handle get_active_database( ImmediateSession & session ) ;
196 }; 196 };
197 197
198 198
199 //------------------------------------------------------------------------------ ----------- 199 //------------------------------------------------------------------------------ -----------
200 // Deferred_Session 200 // Deferred_Session
201 //------------------------------------------------------------------------------ ----------- 201 //------------------------------------------------------------------------------ -----------
202 /** 202 /**
203 * Session for deferred custom actions. 203 * Session for deferred custom actions.
204 * 204 *
205 * There's much less context information easily available from a deferred custom action. 205 * There's much less context information easily available from a deferred custom action.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 /** 245 /**
246 * The session for a rollback custom action. NOT IMPLEMENTED. 246 * The session for a rollback custom action. NOT IMPLEMENTED.
247 * 247 *
248 * \sa MSDN "Rollback Custom Actions" http://msdn.microsoft.com/en-us/library/win dows/desktop/aa371369%28v=vs.85%29.aspx 248 * \sa MSDN "Rollback Custom Actions" http://msdn.microsoft.com/en-us/library/win dows/desktop/aa371369%28v=vs.85%29.aspx
249 */ 249 */
250 class Rollback_Session 250 class Rollback_Session
251 { 251 {
252 }; 252 };
253 253
254 #endif 254 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld