Defined in file: hzDissemino.h
Derivative of: hzHttpSession
Generic user session. These apply wherever it is necessary to tie a browser instance to user data. A user session is created when a registered user logs into thier existing account or begins the process of user registration, however these are not the only cases that lead to a user session. For example, a shopping cart requires a session to add items to the cart but it is not generally necessary to be an already registered customer prior to and even after checkout. Under the Dissemino regime, there is a direct 1:1 relationship between user sessions and cookies. Cookies are only ever issued upon creation of a session and are the key to locate the session on the server. User sessions are invoked under the direction of the configs. If an <xformHdl> tag has an "ops" attribute set as "cookies", the applicable form handler will issue a cookie and thus a session - unless these have already been issued by an earlier form submission. Not all forms invoke user sessions. The 'contact-us' form for example, would not need to invoke a session if all it does is accept comments or enquiries from anyone without email or SMS verification. If however, email or SMS verification codes are required to complete the submission, a cookie will be issued and a session created. Since sessions and cookies are 1:1 the session must either hold or refer to ALL data applicable to the user. In the case of customers and contacts this can be simple. Every user will have a subscriber id and this alone will link to everything held on the user in the user repository. However there are circumstances where sessions will hold much more complex data. To this end, there are session values and the current object. Session values are standalone variables for any purpose, implemented as a name-value map. These can be set by 'setvar' instructions in form handlers and subsequently accessed by s-class percent entities. The current object if it applies, points to an instance of hdsObject and so can be an object of any class.
Constructors/Detructors
| hdsInfo* | hdsInfo | (void) | |
| NULL-TYPE | hdsInfo | (void) | |
| void | ~hdsInfo | (void) | |
| NULL-TYPE | ~hdsInfo | (void) |
Public Methods:
| hzEcode | ObjectAssert | (hzString& objKey)hdbClass* pClass, | Assert (create if not found), the required hdbObject |
| hzEcode | ObjectClose | (hzString& objKey) | Remove the hdbObject from the user session |
| hdbObject* | ObjectSelect | (hzString& objKey) | Return a pointer to an already asserted hdbObject instance Pointer to the hdbObject if it has been asserted. Null otherwise. |
Member Variables:
| uint32_t | m_Access | Controls what the user will see (pages and parts of pages) | |
| uint16_t | m_CurrClass | Current class (within repos) | |
| uint32_t | m_CurrObj | The current record in view | |
| uint16_t | m_CurrRepos | Current repository if any | |
| hzList<hdbObject*> | m_Objects | List of open objects | |
| uint16_t | m_Resv | Reserved | |
| hzMapS<hzString,hzAtom> | m_Sessvals | Session values | |
| uint32_t | m_SubId | Unique subscriber ID (object id) of user in the subscriber cache | |
| uint32_t | m_UserId | Unique ID (object id) of user (for lookup in the cache) | |
| uint16_t | m_UserRepos | User repository id | |
| hzString | m_Username | Username as per subscriber repository | |
| void* | m_pMisc | Application specific | |
| hdbObject* | m_pObj | Current object | |
| hdsNavtree* | m_pTree | User nav tree |