singrdk/base/Contracts/Directory.Contracts/NotifyContract.sg

35 lines
858 B
Plaintext
Raw Permalink Normal View History

2008-03-05 09:52:00 -05:00
////////////////////////////////////////////////////////////////////////////////
//
// 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;
}
}