35 lines
858 B
Plaintext
35 lines
858 B
Plaintext
|
////////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// Microsoft Research Singularity
|
||
|
//
|
||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
//
|
||
|
// File: NotifyContract.sg
|
||
|
//
|
||
|
|
||
|
using Microsoft.SingSharp;
|
||
|
using Microsoft.Singularity.Channels;
|
||
|
|
||
|
namespace Microsoft.Singularity.Directory
|
||
|
{
|
||
|
public enum NotifyType
|
||
|
{
|
||
|
Creation,
|
||
|
Deletion,
|
||
|
Modification
|
||
|
}
|
||
|
|
||
|
public contract NotifyContract
|
||
|
{
|
||
|
in message Begin();
|
||
|
|
||
|
in message ChangeNotification(char []! in ExHeap path, NotifyType type);
|
||
|
out message AckChangeNotification();
|
||
|
|
||
|
state Start : Begin? -> Notify;
|
||
|
|
||
|
state Notify : ChangeNotification? -> NotifyAck;
|
||
|
state NotifyAck: AckChangeNotification! -> Notify;
|
||
|
}
|
||
|
}
|