#ifndef __SharedConsts_h__
#define __SharedConsts_h__ 1
#include <mach/message.h>
#include "PrivateTypes.h"
typedef struct {
unsigned int msgt_name : 8,
msgt_size : 8,
msgt_number : 12,
msgt_inline : 1,
msgt_longform : 1,
msgt_deallocate : 1,
msgt_unused : 1;
} mach_msg_type_t;
typedef struct sObject
{
uInt32 type;
uInt32 count;
uInt32 offset;
uInt32 used;
uInt32 length;
} sObject;
typedef struct sComData
{
mach_msg_header_t head;
mach_msg_type_t type;
uInt32 fDataSize;
uInt32 fDataLength;
uInt32 fMsgID;
uInt32 fPID;
uInt32 fPort;
uInt32 fIPAddress;
sObject obj[ 10 ];
char data[ 1 ];
} sComData;
const uInt32 kMsgBlockSize = 1024 * 4; const uInt32 kObjSize = sizeof( sObject ) * 10; const uInt32 kIPCMsgLen = kMsgBlockSize;
typedef struct sIPCMsg
{
mach_msg_header_t fHeader;
uInt32 fMsgType;
uInt32 fCount;
uInt32 fOf;
uInt32 fMsgID;
uInt32 fPID;
uInt32 fPort;
sObject obj[ 10 ];
char fData[ kIPCMsgLen ];
mach_msg_security_trailer_t fTail; } sIPCMsg;
typedef enum {
kResult = 4460,
ktDirRef = 4461,
ktNodeRef = 4462,
ktRecRef = 4463,
ktAttrListRef = 4464,
ktAttrValueListRef = 4465,
ktDataBuff = 4466,
ktDataList = 4467,
ktDirPattMatch = 4468,
kAttrPattMatch = 4469,
kAttrMatch = 4470,
kMatchRecCount = 4471,
kNodeNamePatt = 4472,
ktAccessControlEntry = 4473,
ktAttrEntry = 4474,
ktAttrValueEntry = 4475,
kOpenRecBool = 4476,
kAttrInfoOnly = 4477,
kRecFlags = 4478,
kAttrFlags = 4479,
kRecEntryIndex = 4480,
kAttrInfoIndex = 4481,
kAttrValueIndex = 4482,
kAttrValueID = 4483,
kOutBuffLen = 4484,
kAuthStepDataLen = 4485,
kAuthOnlyBool = 4486,
kDirNodeName = 4487,
kAuthMethod = 4488,
kNodeInfoTypeList = 4489,
kRecNameList = 4490,
kRecTypeList = 4491,
kAttrTypeList = 4492,
kRecTypeBuff = 4493,
kRecNameBuff = 4494,
kAttrType = 4495,
kAttrTypeBuff = 4496,
kAttrValueBuff = 4497,
kNewAttrBuff = 4498,
kFirstAttrBuff = 4499,
kAttrBuff = 4501,
kAuthStepBuff = 4502,
kAuthResponseBuff = 4503,
kAttrTypeRequestList = 4504,
kCustomRequestCode = 4505,
kPluginName = 4506,
kNodeCount = 4507,
kNodeIndex = 4508,
kAttrInfoCount = 4509,
kAttrRecEntryCount = 4510,
ktRecordEntry = 4511,
kAuthStepDataResponse = 4512,
kContextData = 4513,
ktPidRef = 4514,
ktGenericRef = 4515,
kNodeChangeToken = 4516,
ktEffectiveUID = 4517,
ktUID = 4518,
kEnd = 0xFFFFFFFF
} eValueType;
enum eDSServerCalls {
kOpenDirService = 1,
kCloseDirService,
kGetDirNodeName,
kGetDirNodeCount,
kGetDirNodeChangeToken,
kGetDirNodeList,
kFindDirNodes,
kVerifyDirRefNum,
kCheckUserNameAndPassword,
kAddChildPIDToReference,
kOpenDirServiceProxy,
kDSServerCallsEnd
};
enum eDSPluginCalls {
kDSPlugInCallsBegin = 128,
kReleaseContinueData,
kOpenDirNode,
kCloseDirNode,
kGetDirNodeInfo,
kGetRecordList,
kGetRecordEntry,
kGetAttributeEntry,
kGetAttributeValue,
kOpenRecord,
kGetRecordReferenceInfo,
kGetRecordAttributeInfo,
kGetRecordAttributeValueByID,
kGetRecordAttributeValueByIndex,
kFlushRecord,
kCloseRecord,
kSetRecordName,
kSetRecordType,
kDeleteRecord,
kCreateRecord,
kCreateRecordAndOpen,
kAddAttribute,
kRemoveAttribute,
kAddAttributeValue,
kRemoveAttributeValue,
kSetAttributeValue,
kDoDirNodeAuth,
kDoAttributeValueSearch,
kDoAttributeValueSearchWithData,
kDoPlugInCustomCall,
kCloseAttributeList,
kCloseAttributeValueList,
kHandleNetworkTransition,
kServerRunLoop,
kDSPlugInCallsEnd
};
#endif // __SharedConsts_h__