// ----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
// ----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
// ----------------------------------------------------------------------------------

namespace Microsoft.Samples.WindowsAzureMmc.Model
{
    using System;
    using System.Collections.ObjectModel;
    using System.Management.Automation.Runspaces;
    using Microsoft.Samples.WindowsAzureMmc.Model.Storage;

    public delegate void ProgressEventHandler(string message);

    public interface IAzurePSHost
    {
        event ProgressEventHandler OnProgress;
        
        RunspaceState State { get; set; }

        // Blobs
        Collection<AzureBlobContainer> RetrieveBlobContainers();

        AzureBlobContainer RetrieveBlobContainer(string containerName);

        void CreateBlobContainer(string containerName, bool isPrivate);

        void UploadBlob(string containerName, string blobName, string fileName);

        AzureBlobContainer UploadContainer(string localPath, string containerName, bool isPrivate);

        void DownloadContainer(string containerName, string path);

        Collection<AzureBlob> RetrieveBlobs(string containerName, string blobName);

        void DeleteBlobContainer(string containerName);

        void DeleteBlob(string blobName);

        // Queues
        Collection<AzureQueue> RetrieveQueues();

        AzureQueue CreateQueue(string queueName);

        AzureQueue RetrieveQueue(string queueName);

        void DeleteQueue(string queueName);

        void PurgeQueue(string queueName);

        Collection<AzureMessage> PeekMessages(string queueName, int maxMessages, bool getContent);

        bool CreateMessage(string queueName, string message);
    }
}