Session Control
Logon: PUBLIC AlpineP2202V2.LogonType ~ {
session ← AlpineV2ServerInternal.CreateSession[service, credentials, gvCredentials];
replyVerifier ← verifier;
session.verifier ← replyVerifier;
};
Logoff: PUBLIC AlpineP2202V2.LogoffType ~ {
AlpineV2ServerInternal.DestroySession[session];
};
Transaction Operations
CreateTransaction: PUBLIC AlpineP2202V2.CreateTransactionType = {
Work:
PROC ~
TRUSTED {
transID ← ATC.TransID[AlpineTransaction.Create[Conversation[session], createLocalWorker]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
CreateWorker: PUBLIC AlpineP2202V2.CreateWorkerType ~ {
Work:
PROC ~
TRUSTED {
AlpineTransaction.CreateWorker[Conversation[session], CTA.TransID[transID], CTA.FileStore[coordinator]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
AssertAlpineWheel: PUBLIC AlpineP2202V2.AssertAlpineWheelType ~ {
Work:
PROC ~
TRUSTED {
AlpineTransaction.AssertAlpineWheel[Conversation[session], CTA.TransID[transID], enable];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
FinishTransaction: PUBLIC AlpineP2202V2.FinishTransactionType ~ {
Work:
PROC ~
TRUSTED {
aoutcome: AlpineEnvironment.Outcome;
anewTrans: AlpineEnvironment.TransID;
[aoutcome, anewTrans] ← AlpineTransaction.Finish[Conversation[session], CTA.TransID[transID], CTA.CommitOrAbort[requestedOutcome], continue];
outcome ← ATC.Outcome[aoutcome];
newTrans ← ATC.TransID[anewTrans];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
File Operations
Open: PUBLIC AlpineP2202V2.OpenType ~ {
Work: PROC = TRUSTED {
aopenFileID: AE.OpenFileID;
afileID: AE.FileID;
[aopenFileID, afileID] ← AlpineFile.Open[Conversation[session], CTA.TransID[transID], CTA.UniversalFile[universalFile], CTA.AccessRights[access], CTA.LockOption[lock], CTA.RecoveryOption[recoveryOption], CTA.ReferencePattern[referencePattern]];
openFileID ← ATC.OpenFileID[aopenFileID];
fileID ← ATC.FileID[afileID];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
Create: PUBLIC AlpineP2202V2.CreateType ~ {
Work: PROC = TRUSTED {
aopenFileID: AE.OpenFileID;
afileID: AE.UniversalFile;
[aopenFileID, afileID] ← AlpineFile.Create[Conversation[session], CTA.TransID[transID], CTA.VolOrVolGroupID[volumeID], CTA.OwnerName[owner], CTA.PageCount[initialSize], CTA.RecoveryOption[recoveryOption], CTA.ReferencePattern[referencePattern]];
openFileID ← ATC.OpenFileID[aopenFileID];
universalFile ← ATC.UniversalFile[afileID];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
Close: PUBLIC AlpineP2202V2.CloseType ~ {
Work: PROC = TRUSTED {
AlpineFile.Close[Conversation[session], CTA.OpenFileID[openFileID]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
Delete: PUBLIC AlpineP2202V2.DeleteType ~ {
Work: PROC = TRUSTED {
AlpineFile.Delete[Conversation[session], CTA.OpenFileID[openFileID]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetUniversalFile: PUBLIC AlpineP2202V2.GetUniversalFileType ~ {
Work: PROC = TRUSTED {
universalFile ← ATC.UniversalFile[AlpineFile.GetUniversalFile[Conversation[session], CTA.OpenFileID[openFileID]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetTransID: PUBLIC AlpineP2202V2.GetTransIDType ~ {
Work: PROC = TRUSTED {
transID ← ATC.TransID[AlpineFile.GetTransID[Conversation[session], CTA.OpenFileID[openFileID]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetAccessRights: PUBLIC AlpineP2202V2.GetAccessRightsType ~ {
Work: PROC = TRUSTED {
access ← ATC.AccessRights[AlpineFile.GetAccessRights[Conversation[session], CTA.OpenFileID[openFileID]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetLockOption: PUBLIC AlpineP2202V2.GetLockOptionType ~ {
Work: PROC = TRUSTED {
lock ← ATC.LockOption[AlpineFile.GetLockOption[Conversation[session], CTA.OpenFileID[openFileID]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
SetLockOption: PUBLIC AlpineP2202V2.SetLockOptionType ~ {
Work: PROC = TRUSTED {
AlpineFile.SetLockOption[Conversation[session], CTA.OpenFileID[openFileID], CTA.LockOption[lock]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetRecoveryOption: PUBLIC AlpineP2202V2.GetRecoveryOptionType ~ {
Work: PROC = TRUSTED {
recoveryOption ← ATC.RecoveryOption[AlpineFile.GetRecoveryOption[Conversation[session], CTA.OpenFileID[openFileID]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetReferencePattern: PUBLIC AlpineP2202V2.GetReferencePatternType ~ {
Work: PROC = TRUSTED {
referencePattern ← ATC.ReferencePattern[AlpineFile.GetReferencePattern[Conversation[session], CTA.OpenFileID[openFileID]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
SetReferencePattern: PUBLIC AlpineP2202V2.SetReferencePatternType ~ {
Work: PROC = TRUSTED {
AlpineFile.SetReferencePattern[Conversation[session], CTA.OpenFileID[openFileID], CTA.ReferencePattern[referencePattern]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
ReadPages: PUBLIC AlpineP2202V2.ReadPagesType = {
[h: CrRPC.Handle, session: AlpineP2202V2.Session, openFileID: AlpineP2202V2.CARD32, pageRun: AlpineEnvironmentP2201V1.PageRun, lock: AlpineEnvironmentP2201V1.LockOption, content: CrRPC.BulkDataSink] RETURNS [replyVerifier: AuthenticationP14V2.SeqWords]
Work: PROC = TRUSTED {
buffer: CountedVM.Handle ← CountedVM.SimpleAllocate[pageRun.count*AlpineEnvironmentP2201V1.wordsPerPage];
Never: CrRPC.BulkDataCheckAbortProc ~ CHECKED {RETURN[FALSE]};
AlpineFile.ReadPages[Conversation[session], CTA.OpenFileID[openFileID], CTA.PageRun[pageRun], DESCRIPTOR[buffer.pointer, buffer.words], CTA.LockOption[lock]];
[] ← content[h, VMStreams.VMIS[buffer.interval], Never];
TRUSTED {CountedVM.Free[buffer]};
};
DoWork[Work];
replyVerifier ← session.verifier;
};
WritePages: PUBLIC AlpineP2202V2.WritePagesType ~ {
Work: PROC = TRUSTED {
buffer: CountedVM.Handle ← CountedVM.SimpleAllocate[pageRun.count*AlpineEnvironmentP2201V1.wordsPerPage];
Never: CrRPC.BulkDataCheckAbortProc ~ CHECKED {RETURN[FALSE]};
[] ← content[h, VMStreams.VMOS[buffer.interval], Never];
AlpineFile.WritePages[Conversation[session], CTA.OpenFileID[openFileID], CTA.PageRun[pageRun], DESCRIPTOR[buffer.pointer, buffer.words], CTA.LockOption[lock]];
TRUSTED {CountedVM.Free[buffer]};
};
DoWork[Work];
replyVerifier ← session.verifier;
};
LockPages: PUBLIC AlpineP2202V2.LockPagesType ~ {
Work: PROC = TRUSTED {
AlpineFile.LockPages[Conversation[session], CTA.OpenFileID[openFileID], CTA.PageRun[pageRun], CTA.LockOption[lock]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
UnlockPages: PUBLIC AlpineP2202V2.UnlockPagesType ~ {
Work: PROC = TRUSTED {
AlpineFile.UnlockPages[Conversation[session], CTA.OpenFileID[openFileID], CTA.PageRun[pageRun]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
ReadProperties: PUBLIC AlpineP2202V2.ReadPropertiesType ~ {
Work: PROC = TRUSTED {
properties ← ATC.Properties[AlpineFile.ReadProperties[Conversation[session], CTA.OpenFileID[openFileID], CTA.PropertySet[desiredProperties], CTA.LockOption[lock]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
WriteProperties: PUBLIC AlpineP2202V2.WritePropertiesType ~ {
Work: PROC = TRUSTED {
AlpineFile.WriteProperties[Conversation[session], CTA.OpenFileID[openFileID], CTA.Properties[properties], CTA.LockOption[lock]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
UnlockVersion: PUBLIC AlpineP2202V2.UnlockVersionType ~ {
Work: PROC = TRUSTED {
AlpineFile.UnlockVersion[Conversation[session], CTA.OpenFileID[openFileID]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
IncrementVersion: PUBLIC AlpineP2202V2.IncrementVersionType ~ {
Work: PROC = TRUSTED {
AlpineFile.IncrementVersion[Conversation[session], CTA.OpenFileID[openFileID], increment];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
GetSize: PUBLIC AlpineP2202V2.GetSizeType ~ {
Work: PROC = TRUSTED {
size ← ATC.PageCount[AlpineFile.GetSize[Conversation[session], CTA.OpenFileID[openFileID], CTA.LockOption[lock]]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
SetSize: PUBLIC AlpineP2202V2.SetSizeType ~ {
Work: PROC = TRUSTED {
AlpineFile.SetSize[Conversation[session], CTA.OpenFileID[openFileID], CTA.PageCount[size], CTA.LockOption[lock]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};
UnlockFile: PUBLIC AlpineP2202V2.UnlockFileType ~ {
Work: PROC = TRUSTED {
AlpineFile.UnlockFile[Conversation[session], CTA.OpenFileID[openFileID]];
};
DoWork[Work];
replyVerifier ← session.verifier;
};