using System.Collections.Generic;
using System.Threading.Tasks;
using Shuttle.Api.AfterEffectsDTO.Items;
using Shuttle.Api.AfterEffectsDTO.Render;
using Shuttle.Api.AfterEffectsDTO.UpdatedData;
using Shuttle.Api.CommunicationDTO;
namespace Shuttle.Api.ClientAPI
{
///
/// Client API, called from Orbit.
///
// WARNING: The return type of methods must be void or Task.
// WANRING: Methods cannot have more than 7 parameters.
public interface IAfterEffectsClient : IShuttleClient
{
#region TaskRequests
///
/// Requests AfterEffects to purge its cache.
///
Task RequestPurgeCache(string requestToken);
///
/// Requests AfterEffects to save the current project.
///
Task RequestSave(string requestToken);
///
/// Requests AfterEffects to save the current project to the given file path.
///
Task RequestSaveTo(string requestToken, string filepath);
///
/// Requests AfterEffects to open the given .aep project file.
///
Task RequestOpenProject(string requestToken, string projectFilePath);
///
/// Requests AfterEffects to show (or hide) the Render window.
///
Task RequestShowRenderWindow(string requestToken, bool show);
///
/// Requests AfterEffects to begin an undo group with the given name.
///
Task RequestBeginUndoGroup(string requestToken, string undoGroupName);
///
/// Requests AfterEffects to end the latest undo group. Not having called before may cause some issues.
///
Task RequestEndUndoGroup(string requestToken);
#endregion TaskRequests
#region ItemRequests
// -- GET --
///
/// Requests AfterEffects to send back the name of the currently opened file.
///
Task RequestProjectFile(string requestToken);
///
/// Requests AfterEffects to send back all selected items in the Project Panel.
///
Task RequestSelectedItemsInProjectPanel(string requestToken);
///
/// Requests AfterEffects to send back all items in the current project.
///
Task RequestAllItems(string requestToken);
///
/// Requests AfterEffects to send back the Render Queue.
///
Task RequestRenderQueue(string requestToken);
///
/// Requests AfterEffects to send back the item in the Render Queue at the given index. First item is at index 1.
///
Task RequestRenderQueueItem(string requestToken, int renderQueueItemIndex);
///
/// Requests AfterEffects to send back a full corresponding to the given item identifier.
///
Task RequestFolderItem(string requestToken, int folderId);
///
/// Requests AfterEffects to send back a full corresponding to the given item identifier.
///
Task RequestCompItem(string requestToken, int compId);
///
/// Requests AfterEffects to send back a full corresponding to the given item identifier.
///
Task RequestFootageItem(string requestToken, int footageId);
// -- CREATE --
///
/// Requests AfterEffects to create a new folder witht the given name under the given folder.
///
Task RequestFolderCreation(string requestToken, string folderName, int parentFolderId);
///
/// Requests AfterEffects to create a new composition witht the given name and the given settings under the given folder.
///
Task RequestCompCreation(string requestToken, string compName, CompSettings compSettings, int parentFolderId);
///
/// Requests AfterEffects to import a file (footage) into the given folder.
///
Task RequestImportFile(string requestToken, string footageFilePath, int parentFolderId);
///
/// Requests AfterEffects to add the given composition to the RenderQueue (thus creating a new RenderQueueItem)
///
Task RequestAddToRenderQueue(string requestToken, int compId);
///
/// Requests AfterEffects to add a new empty layer in the given composition.
///
Task RequestAddNullLayer(string requestToken, int compId, string layerName);
///
/// Requests AfterEffects to add the given item as a new layer in the given composition.
///
Task RequestAddLayer(string requestToken, int compId, int sourceItemId);
// -- UPDATE --
///
/// Requests AfterEffects to update the given folder.
///
Task RequestUpdateFolderItem(string requestToken, int folderId, FolderItemUpdatableData folderItemData);
///
/// Requests AfterEffects to update the given composition.
///
Task RequestUpdateCompItem(string requestToken, int compId, CompItemUpdatableData compItemData);
///
/// Requests AfterEffects to copy all layers from the given source comp to the given target comp.
///
Task RequestCopyLayers(string requestToken, int sourceCompId, int targetCompId);
///
/// Requests AfterEffects to remove the given layers in the given composition.
///
Task RequestRemoveLayers(string requestToken, int compId, ICollection layerNames);
///
/// Requests AfterEffects to update the given footage.
///
Task RequestUpdateFootageItem(string requestToken, int footageId, FootageItemUpdatableData footageItemData);
///
/// Requests AfterEffects to change the source of the given footage to the specified file.
///
Task RequestReplaceFootageSource(string requestToken, int footageId, string sourceFilePath);
///
/// Requests AfterEffects to change the source of the given footage to a sequence of files (typically images).
///
Task RequestReplaceFootageSourceWithSequence(string requestToken, int footageId, string firstSourceFilePath, bool forceAlphabetical);
///
/// Requests AfterEffects to update the given RenderQueueItem.
///
Task RequestUpdateRenderQueueItem(string requestToken, int renderQueueItemId, RenderQueueItem dataToUpdate);
///
/// Requests AfterEffects to configure the given RenderQueueItem.
///
Task RequestConfigureRenderQueueItem(string requestToken, int renderQueueItemIndex, string settingsTemplateName, string outputModuleTemplateName, string outputFilePath);
///
/// Requests AfterEffects to update the layer at the given index in the given comp.
///
Task RequestUpdateLayer(string requestToken, int compId, int layerIndex, LayerUpdatableData layerData);
///
/// Requests AfterEffects to set the given folder as parent of the given item.
///
Task RequestSetParentFolder(string requestToken, int itemId, int parentFolderId);
///
/// Requests AfterEffects to set the given name to the given item.
///
Task RequestRenameItem(string requestToken, int itemId, string newName);
// DELETE
///
/// Requests AfterEffects to remove the given item from the project.
///
Task RequestRemoveItem(string requestToken, int itemId);
#endregion ItemRequests
}
}