1 /*
\r * TicketKeeperMenuStateProcotol.h
\r *
\r * Declarations of types for constants used in the Process-to-Process Communication
\r * protocol used between TicketKeeperLib and TicketKeeper. This should not be used
\r * by others
\r *
\r */
\r \r#ifndef TicketKeeperMenuStateProcotol_h
\r#define TicketKeeperMenuStateProcotol_h
\r\r#if PRAGMA_STRUCT_ALIGN
\r #pragma options align=mac68k
\r#elif PRAGMA_STRUCT_PACKPUSH
\r #pragma pack(push, 2)
\r#elif PRAGMA_STRUCT_PACK
\r #pragma pack(2)
\r#endif
\r\r/* Use these to find the PPC port for TicketKeeper */
\renum {
\r mkPort_Creator = FOUR_CHAR_CODE ('MnuK'),
\r mkPort_Type = FOUR_CHAR_CODE ('appe')
\r};
\r \r/* Use these on PPC blocks sent to TK. The block type determines what command you are sending */
\renum {
\r mkBlock_Creator = FOUR_CHAR_CODE ('MnuK'),
\r mkBlock_Type_MenuState = FOUR_CHAR_CODE ('Menu'),
\r mkBlock_Type_SetDefault = FOUR_CHAR_CODE ('SDef'),
\r mkBlock_Type_Logout = FOUR_CHAR_CODE ('LotP'),
\r mkBlock_Type_LogoutDefault = FOUR_CHAR_CODE ('Lout'),
\r mkBlock_Type_NewLogin = FOUR_CHAR_CODE ('Logn'),
\r mkBlock_Type_Renew = FOUR_CHAR_CODE ('RnwP'),
\r mkBlock_Type_RenewDefault = FOUR_CHAR_CODE ('Renw'),
\r mkBlock_Type_ChangePassword = FOUR_CHAR_CODE ('ChpP'),
\r mkBlock_Type_ChangePasswordDefault = FOUR_CHAR_CODE ('Chps'),
\r mkBlock_Type_MoveFloaterStructureRegion = FOUR_CHAR_CODE ('MFst'),
\r mkBlock_Type_SetDrawPies = FOUR_CHAR_CODE ('pie?'),
\r mkBlock_Type_SetHasCloseBox = FOUR_CHAR_CODE ('cls?'),
\r mkBlock_Type_SetIsVisible = FOUR_CHAR_CODE ('vis?'),
\r mkBlock_Type_SetIsZoomedOut = FOUR_CHAR_CODE ('zum?'),
\r mkBlock_Type_GetIsVisible = FOUR_CHAR_CODE ('?vis'),
\r mkBlock_Type_GetDrawPies = FOUR_CHAR_CODE ('?pie'),
\r mkBlock_Type_GetHasCloseBox = FOUR_CHAR_CODE ('?cls'),
\r mkBlock_Type_GetIsZoomedOut = FOUR_CHAR_CODE ('?zum'),
\r mkBlock_Type_OpenKerberosControlPanel = FOUR_CHAR_CODE ('OKCP')
\r};
\r\r/* Version number for menu state command */
\renum {
\r mkReply_MenuState_CurrentVersion = 2
\r};
\r\r/*
\r * MenuState ('Menu') command returns a blob of data in the following format:
\r * (but you should really use the functions in TickerKeeperLib.h to parse it)
\r *
\r * [4 Bytes] Size of the structure
\r * [4 Bytes] Version of the structure (current = 2)
\r *
\r * [4 Bytes] Last change time for the default cache information
\r * [4 Bytes] Last change time for the cache list information
\r * [4 Bytes] 1 if default cache has valid tickets, 0 otherwise
\r * [4 bytes] Expiration time of the default cache in Mac epoch
\r * [PString] Principal of the default cache
\r * [PString] Display principal of the default cache (quoting removed)
\r * [PString] Short display principal of the default cache (quoting and default realm removed)
\r *
\r * [4 Bytes] Number of caches
\r *
\r * [4 Bytes] 1 if the first cache is default
\r * [4 Bytes] Version of the first cache
\r * [4 Bytes] 1 if the first cache has valid tickets
\r * [4 Bytes] start time of the first cache
\r * [4 Bytes] expiration time of the first cache
\r * [PString] Principal of the 1st cache
\r * [PString] Display principal if the 1st cache (quoting removed)
\r * [PString] Short display principal if the 1st cache (quoting and default realm removed)
\r *
\r * ...
\r *
\r * [4 Bytes] 1 if the last cache is default
\r * [4 Bytes] Version of the last cache
\r * [4 Bytes] 1 if the last cache has valid tickets
\r * [4 Bytes] start time of the last cache
\r * [4 Bytes] expiration time of the last cache
\r * [PString] Principal of the last cache
\r * [PString] Display principal if the nth cache (quoting removed)
\r * [PString] Short display principal if the nth cache (quoting and default realm removed)
\r */
\r\rstruct MenuStateHeader {
\r UInt32 version;
\r UInt32 defaultCacheLastChangeTime;
\r UInt32 cacheListLastChangeTime;
\r UInt32 defaultCacheHasValidTickets;
\r UInt32 defaultCacheExpiration;
\r Str255 defaultCachePrincipal;
\r};
\r\rstruct CacheEntry {
\r UInt32 isDefault;
\r UInt32 version;
\r UInt32 isValid;
\r UInt32 startTime;
\r UInt32 expirationTime;
\r Str255 principal;
\r};
\r\rstruct CacheList {
\r UInt32 numCaches;
\r CacheEntry cacheList;
\r};
\r\r/*
\r * SetDefaultPrincipal, Logout, and Renew commands take a blob of data which contains the
\r * new principal to be made default (version + string format)
\r */
\r \rstruct PrincipalParam {
\r UInt32 version;
\r Str255 principal;
\r};
\r\rstruct MoveFloaterStructureRegionParam {
\r Rect bounds;
\r};
\r\rtypedef PrincipalParam SetDefaultParam;
\rtypedef PrincipalParam LogoutParam;
\rtypedef PrincipalParam RenewParam;
\rtypedef PrincipalParam ChangePasswordParam;
\r\rtypedef Boolean SetDrawPiesParam;
\rtypedef Boolean SetHasCloseBoxParam;
\rtypedef Boolean SetIsVisibleParam;
\rtypedef Boolean SetIsZoomedOutParam;
\r\r#if PRAGMA_STRUCT_ALIGN
\r #pragma options align=reset
\r#elif PRAGMA_STRUCT_PACKPUSH
\r #pragma pack(pop)
\r#elif PRAGMA_STRUCT_PACK
\r #pragma pack()
\r#endif
\r\r#endif /* TicketKeeperMenuStateProcotol_h */