2008-11-17 18:29:00 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2008-03-05 09:52:00 -05:00
|
|
|
//
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
//
|
2008-11-17 18:29:00 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using Microsoft.SingSharp;
|
|
|
|
using Microsoft.Singularity;
|
|
|
|
using Microsoft.Singularity.Directory;
|
|
|
|
using Microsoft.Singularity.Channels;
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
namespace Microsoft.Singularity.FileSystem
|
|
|
|
{
|
2008-03-05 09:52:00 -05:00
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
/// <summary>
|
|
|
|
/// This contract is exported by services that are filesystem controllers.
|
|
|
|
/// </summary>
|
|
|
|
public contract FileSystemControllerContract : ServiceContract
|
|
|
|
{
|
|
|
|
in message Mount(char[]! in ExHeap device, char[]! in ExHeap mountPath);
|
2008-03-05 09:52:00 -05:00
|
|
|
out message AckMount();
|
2008-11-17 18:29:00 -05:00
|
|
|
out message NakMount();
|
2008-03-05 09:52:00 -05:00
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
in message Unmount(char[]! in ExHeap mountPath);
|
2008-03-05 09:52:00 -05:00
|
|
|
out message AckUnmount();
|
2008-11-17 18:29:00 -05:00
|
|
|
out message NakUnmount();
|
|
|
|
|
|
|
|
out message Ok();
|
|
|
|
out message RequestFailed(ErrorCode error);
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
out message Success();
|
|
|
|
|
|
|
|
override state Start : one {
|
|
|
|
Success! -> Ready;
|
|
|
|
}
|
|
|
|
|
|
|
|
state Ready : one {
|
2008-11-17 18:29:00 -05:00
|
|
|
Mount? -> Mounting;
|
|
|
|
Unmount? -> Unmounting;
|
|
|
|
}
|
|
|
|
|
|
|
|
state Mounting : one {
|
|
|
|
Ok! -> Ready;
|
|
|
|
RequestFailed! -> Ready;
|
|
|
|
}
|
|
|
|
|
|
|
|
state Unmounting : one {
|
|
|
|
Ok! -> Ready;
|
|
|
|
RequestFailed! -> Ready;
|
2008-03-05 09:52:00 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|