//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0021
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.idl";
import "Windows.Foundation.idl";
import "Windows.ApplicationModel.idl";
import "Windows.System.idl";
import "Windows.System.RemoteSystems.idl";

// Forward Declare
namespace Windows
{
    namespace ApplicationModel
    {
        runtimeclass AppInfo;
    }
}
namespace Windows
{
    namespace Foundation
    {
        namespace Collections
        {
            runtimeclass ValueSet;
        }
    }
}
namespace Windows
{
    namespace Foundation
    {
        interface IClosable;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace System
    {
        namespace RemoteSystems
        {
            runtimeclass RemoteSystemConnectionRequest;
        }
    }
}
namespace Windows
{
    namespace System
    {
        runtimeclass User;
    }
}
namespace Windows
{
    namespace ApplicationModel
    {
        namespace AppService
        {
            typedef enum AppServiceClosedStatus AppServiceClosedStatus;

            typedef enum AppServiceConnectionStatus AppServiceConnectionStatus;

            typedef enum AppServiceResponseStatus AppServiceResponseStatus;

            typedef enum StatelessAppServiceResponseStatus StatelessAppServiceResponseStatus;

            interface IAppServiceCatalogStatics;

            interface IAppServiceClosedEventArgs;

            interface IAppServiceConnection;

            interface IAppServiceConnection2;

            interface IAppServiceConnectionStatics;

            interface IAppServiceDeferral;

            interface IAppServiceRequest;

            interface IAppServiceRequestReceivedEventArgs;

            interface IAppServiceResponse;

            interface IAppServiceTriggerDetails;

            interface IAppServiceTriggerDetails2;

            interface IAppServiceTriggerDetails3;

            interface IAppServiceTriggerDetails4;

            interface IStatelessAppServiceResponse;

            runtimeclass AppServiceCatalog;

            runtimeclass AppServiceClosedEventArgs;

            runtimeclass AppServiceConnection;

            runtimeclass AppServiceDeferral;

            runtimeclass AppServiceRequest;

            runtimeclass AppServiceRequestReceivedEventArgs;

            runtimeclass AppServiceResponse;

            runtimeclass AppServiceTriggerDetails;

            runtimeclass StatelessAppServiceResponse;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace ApplicationModel
    {
        namespace AppService
        {
            declare
            {
                interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceConnectionStatus>;

                interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceResponse*>;

                interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceResponseStatus>;

                interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.StatelessAppServiceResponse*>;

                interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.AppService.AppServiceConnection*, Windows.ApplicationModel.AppService.AppServiceClosedEventArgs*>;

                interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.AppService.AppServiceConnection*, Windows.ApplicationModel.AppService.AppServiceRequestReceivedEventArgs*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace ApplicationModel
    {
        namespace AppService
        {
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum AppServiceClosedStatus
            {
                Completed              = 0,
                Canceled               = 1,
                ResourceLimitsExceeded = 2,
                Unknown                = 3
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum AppServiceConnectionStatus
            {
                Success                       = 0,
                AppNotInstalled               = 1,
                AppUnavailable                = 2,
                AppServiceUnavailable         = 3,
                Unknown                       = 4,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                RemoteSystemUnavailable       = 5,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                RemoteSystemNotSupportedByApp = 6,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                NotAuthorized                 = 7,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                AuthenticationError           = 8,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                NetworkNotAvailable           = 9,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                DisabledByPolicy              = 10,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                WebServiceUnavailable         = 11
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum AppServiceResponseStatus
            {
                Success                 = 0,
                Failure                 = 1,
                ResourceLimitsExceeded  = 2,
                Unknown                 = 3,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                RemoteSystemUnavailable = 4,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                MessageSizeTooLarge     = 5,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                AppUnavailable          = 6,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                AuthenticationError     = 7,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                NetworkNotAvailable     = 8,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                DisabledByPolicy        = 9,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                WebServiceUnavailable   = 10
            };

            [contract(Windows.Foundation.UniversalApiContract, 8.0)]
            enum StatelessAppServiceResponseStatus
            {
                Success                       = 0,
                AppNotInstalled               = 1,
                AppUnavailable                = 2,
                AppServiceUnavailable         = 3,
                RemoteSystemUnavailable       = 4,
                RemoteSystemNotSupportedByApp = 5,
                NotAuthorized                 = 6,
                ResourceLimitsExceeded        = 7,
                MessageSizeTooLarge           = 8,
                Failure                       = 9,
                Unknown                       = 10,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                AuthenticationError           = 11,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                NetworkNotAvailable           = 12,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                DisabledByPolicy              = 13,
                [contract(Windows.Foundation.UniversalApiContract, 10.0)]
                WebServiceUnavailable         = 14
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceCatalog)]
            [uuid(EF0D2507-D132-4C85-8395-3C31D5A1E941)]
            interface IAppServiceCatalogStatics : IInspectable
            {
                HRESULT FindAppServiceProvidersAsync([in] HSTRING appServiceName, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.AppInfo*>*>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceClosedEventArgs)]
            [uuid(DE6016F6-CB03-4D35-AC8D-CC6303239731)]
            interface IAppServiceClosedEventArgs : IInspectable
            {
                [propget] HRESULT Status([out] [retval] Windows.ApplicationModel.AppService.AppServiceClosedStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceConnection)]
            [uuid(9DD474A2-871F-4D52-89A9-9E090531BD27)]
            interface IAppServiceConnection : IInspectable
            {
                [propget] HRESULT AppServiceName([out] [retval] HSTRING* value);
                [propput] HRESULT AppServiceName([in] HSTRING value);
                [propget] HRESULT PackageFamilyName([out] [retval] HSTRING* value);
                [propput] HRESULT PackageFamilyName([in] HSTRING value);
                HRESULT OpenAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceConnectionStatus>** operation);
                HRESULT SendMessageAsync([in] Windows.Foundation.Collections.ValueSet* message, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceResponse*>** operation);
                [eventadd] HRESULT RequestReceived([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.AppService.AppServiceConnection*, Windows.ApplicationModel.AppService.AppServiceRequestReceivedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT RequestReceived([in] EventRegistrationToken token);
                [eventadd] HRESULT ServiceClosed([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.AppService.AppServiceConnection*, Windows.ApplicationModel.AppService.AppServiceClosedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT ServiceClosed([in] EventRegistrationToken token);
            }

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceConnection)]
            [uuid(8BDFCD5F-2302-4FBD-8061-52511C2F8BF9)]
            interface IAppServiceConnection2 : IInspectable
            {
                HRESULT OpenRemoteAsync([in] Windows.System.RemoteSystems.RemoteSystemConnectionRequest* remoteSystemConnectionRequest, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceConnectionStatus>** operation);
                [propget] HRESULT User([out] [retval] Windows.System.User** value);
                [propput] HRESULT User([in] Windows.System.User* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 8.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceConnection)]
            [uuid(ADC56CE9-D408-5673-8637-827A4B274168)]
            interface IAppServiceConnectionStatics : IInspectable
            {
                HRESULT SendStatelessMessageAsync([in] Windows.ApplicationModel.AppService.AppServiceConnection* connection, [in] Windows.System.RemoteSystems.RemoteSystemConnectionRequest* connectionRequest, [in] Windows.Foundation.Collections.ValueSet* message, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.StatelessAppServiceResponse*>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceDeferral)]
            [uuid(7E1B5322-EAB0-4248-AE04-FDF93838E472)]
            interface IAppServiceDeferral : IInspectable
            {
                HRESULT Complete();
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceRequest)]
            [uuid(20E58D9D-18DE-4B01-80BA-90A76204E3C8)]
            interface IAppServiceRequest : IInspectable
            {
                [propget] HRESULT Message([out] [retval] Windows.Foundation.Collections.ValueSet** value);
                HRESULT SendResponseAsync([in] Windows.Foundation.Collections.ValueSet* message, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.AppService.AppServiceResponseStatus>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceRequestReceivedEventArgs)]
            [uuid(6E122360-FF65-44AE-9E45-857FE4180681)]
            interface IAppServiceRequestReceivedEventArgs : IInspectable
            {
                [propget] HRESULT Request([out] [retval] Windows.ApplicationModel.AppService.AppServiceRequest** value);
                HRESULT GetDeferral([out] [retval] Windows.ApplicationModel.AppService.AppServiceDeferral** result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceResponse)]
            [uuid(8D503CEC-9AA3-4E68-9559-9DE63E372CE4)]
            interface IAppServiceResponse : IInspectable
            {
                [propget] HRESULT Message([out] [retval] Windows.Foundation.Collections.ValueSet** value);
                [propget] HRESULT Status([out] [retval] Windows.ApplicationModel.AppService.AppServiceResponseStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceTriggerDetails)]
            [uuid(88A2DCAC-AD28-41B8-80BB-BDF1B2169E19)]
            interface IAppServiceTriggerDetails : IInspectable
            {
                [propget] HRESULT Name([out] [retval] HSTRING* value);
                [propget] HRESULT CallerPackageFamilyName([out] [retval] HSTRING* value);
                [propget] HRESULT AppServiceConnection([out] [retval] Windows.ApplicationModel.AppService.AppServiceConnection** value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceTriggerDetails)]
            [uuid(E83D54B2-28CC-43F2-B465-C0482E59E2DC)]
            interface IAppServiceTriggerDetails2 : IInspectable
            {
                [propget] HRESULT IsRemoteSystemConnection([out] [retval] boolean* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 5.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceTriggerDetails)]
            [uuid(FBD71E21-7939-4E68-9E3C-7780147AABB6)]
            interface IAppServiceTriggerDetails3 : IInspectable
            {
                HRESULT CheckCallerForCapabilityAsync([in] HSTRING capabilityName, [out] [retval] Windows.Foundation.IAsyncOperation<boolean>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 8.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.AppServiceTriggerDetails)]
            [uuid(1185B180-8861-5E30-AB55-1CF4D08BBF6D)]
            interface IAppServiceTriggerDetails4 : IInspectable
            {
                [propget] HRESULT CallerRemoteConnectionToken([out] [retval] HSTRING* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 8.0)]
            [exclusiveto(Windows.ApplicationModel.AppService.StatelessAppServiceResponse)]
            [uuid(43754AF7-A9EC-52FE-82E7-939B68DC9388)]
            interface IStatelessAppServiceResponse : IInspectable
            {
                [propget] HRESULT Message([out] [retval] Windows.Foundation.Collections.ValueSet** value);
                [propget] HRESULT Status([out] [retval] Windows.ApplicationModel.AppService.StatelessAppServiceResponseStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.ApplicationModel.AppService.IAppServiceCatalogStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass AppServiceCatalog
            {
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass AppServiceClosedEventArgs
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceClosedEventArgs;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.ApplicationModel.AppService.IAppServiceConnectionStatics, Windows.Foundation.UniversalApiContract, 8.0)]
            [threading(both)]
            runtimeclass AppServiceConnection
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceConnection;
                [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.ApplicationModel.AppService.IAppServiceConnection2;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass AppServiceDeferral
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceDeferral;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass AppServiceRequest
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceRequest;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass AppServiceRequestReceivedEventArgs
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceRequestReceivedEventArgs;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass AppServiceResponse
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceResponse;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass AppServiceTriggerDetails
            {
                [default] interface Windows.ApplicationModel.AppService.IAppServiceTriggerDetails;
                [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.ApplicationModel.AppService.IAppServiceTriggerDetails2;
                [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.ApplicationModel.AppService.IAppServiceTriggerDetails3;
                [contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.ApplicationModel.AppService.IAppServiceTriggerDetails4;
            }

            [contract(Windows.Foundation.UniversalApiContract, 8.0)]
            [marshaling_behavior(agile)]
            runtimeclass StatelessAppServiceResponse
            {
                [default] interface Windows.ApplicationModel.AppService.IStatelessAppServiceResponse;
            }
        }
    }
}
