using System;
using System.Collections.Generic;
using System.Text;

namespace EA.FileTalkMessages
{
	/// <summary>
	/// </summary>
	public class FileTalkMessage
	{
		/// <summary>
		/// The target name of the FileTalkServer
		/// </summary>
		public const string sFileTalkServerID = "Service.FileTalk";

		/// <summary>
		/// The prefix that is used on a message's channel if a client (like the FileTalkServer) is interested in FileTalk messages
		/// </summary>
		public const string sFileTalkChannelPrefix = "FileTalk";

		/// <summary>
		/// The prefix that is used on a message's channel if a client (like a FileTalk client) is interested in FileTalk Transaction messages
		/// </summary>
		public const string sFileTalkTransactionChannelPrefix = "FileTalk.Transaction";

		/// <summary>
		/// When clients configure the FileTalkServer, they will send their messages on this channel
		/// </summary>
		public const string sFileTalkConfigChannel = "FileTalk.Config";

		/// <summary>
		/// All the message IDs that can be used in the first key of a GameTalkMessage
		/// to and from the FileTalkServer
		/// </summary>
		public enum MessageID
		{
			FileInfoRequest,
			FileInfoResponse,
			GetFileRequest,
			GetFileResponse,
			SendFileRequest,
			SendFileResponse,
			FileNotificationRequest,
			FileNotificationResponse,
			SetClientFileRoot,
			RemoveClientFileRoot,
			InitMessage,
			SetTentativeFileRoot,
			AcceptTentativeFileRoot,
		}

		/// <summary>
		/// Using the same values as Microsoft (bit position of meta-data in bit field)
		/// </summary>
		public enum NotifyFilterFlags
		{
			FileName = 1,
			DirectoryName = 2,
			Attributes = 4,
			Size = 8,
			LastWrite = 16,
			LastAccess = 32,
			CreationTime = 64,
			Security = 256,
		};

		/// <summary>
		/// List of possible event handlers that can be registered with the FileTalkServer
		/// The INVALID entry exists for initializing the EventHandler member
		/// EventHandler is singular because FileNotificationTransaction contains an 
		/// EventHandler member not an EventHandlers member
		/// </summary>
		public enum EventHandler
		{
			INVALID = 0,
			Changed = 1,
			Created = 2,
			Deleted = 4,
			Renamed = 8
		};

		/// <summary>
		/// Used to determine bit position of meta-data in bit field FileInfo::mFileFlags
		/// </summary>
		public enum FileFlags
		{
			IsDirectory = 1,
			ReadOnly = 2,
			Blah = 4,
			Blah2 = 8,
		};
	}
}
