//
// 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.UI.UIAutomation.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        interface IAsyncAction;
    }
}
namespace Windows
{
    namespace UI
    {
        namespace UIAutomation
        {
            runtimeclass AutomationConnectionBoundObject;

            runtimeclass AutomationElement;

            runtimeclass AutomationTextRange;

            apicontract UIAutomationContract;
        }
    }
}
namespace Windows
{
    namespace UI
    {
        namespace UIAutomation
        {
            namespace Core
            {
                typedef enum AutomationRemoteOperationStatus AutomationRemoteOperationStatus;

                typedef struct AutomationAnnotationTypeRegistration AutomationAnnotationTypeRegistration;

                typedef struct AutomationRemoteOperationOperandId AutomationRemoteOperationOperandId;

                interface IAutomationRemoteOperationResult;

                interface ICoreAutomationConnectionBoundObjectProvider;

                interface ICoreAutomationRegistrarStatics;

                interface ICoreAutomationRemoteOperation;

                interface ICoreAutomationRemoteOperation2;

                interface ICoreAutomationRemoteOperationContext;

                interface ICoreAutomationRemoteOperationExtensionProvider;

                interface IRemoteAutomationClientSession;

                interface IRemoteAutomationClientSessionFactory;

                interface IRemoteAutomationConnectionRequestedEventArgs;

                interface IRemoteAutomationDisconnectedEventArgs;

                interface IRemoteAutomationServerStatics;

                interface IRemoteAutomationWindow;

                runtimeclass AutomationRemoteOperationResult;

                runtimeclass CoreAutomationRegistrar;

                runtimeclass CoreAutomationRemoteOperation;

                runtimeclass CoreAutomationRemoteOperationContext;

                runtimeclass RemoteAutomationClientSession;

                runtimeclass RemoteAutomationConnectionRequestedEventArgs;

                runtimeclass RemoteAutomationDisconnectedEventArgs;

                runtimeclass RemoteAutomationServer;

                runtimeclass RemoteAutomationWindow;
            }
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace UI
    {
        namespace UIAutomation
        {
            namespace Core
            {
                declare
                {
                    interface Windows.Foundation.IAsyncOperation<Windows.UI.UIAutomation.Core.RemoteAutomationWindow*>;

                    interface Windows.Foundation.TypedEventHandler<Windows.UI.UIAutomation.Core.RemoteAutomationClientSession*, Windows.UI.UIAutomation.Core.RemoteAutomationConnectionRequestedEventArgs*>;

                    interface Windows.Foundation.TypedEventHandler<Windows.UI.UIAutomation.Core.RemoteAutomationClientSession*, Windows.UI.UIAutomation.Core.RemoteAutomationDisconnectedEventArgs*>;
                }
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace UI
    {
        namespace UIAutomation
        {
            namespace Core
            {
                [contract(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                enum AutomationRemoteOperationStatus
                {
                    Success                  = 0,
                    MalformedBytecode        = 1,
                    InstructionLimitExceeded = 2,
                    UnhandledException       = 3,
                    ExecutionFailure         = 4
                };

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                struct AutomationAnnotationTypeRegistration
                {
                    INT32 LocalId;
                };

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                struct AutomationRemoteOperationOperandId
                {
                    INT32 Value;
                };

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.AutomationRemoteOperationResult)]
                [uuid(E0F80C42-4A67-5534-BF5A-09E8A99B36B1)]
                interface IAutomationRemoteOperationResult : IInspectable
                {
                    [propget] HRESULT Status([out] [retval] Windows.UI.UIAutomation.Core.AutomationRemoteOperationStatus* value);
                    [propget] HRESULT ExtendedError([out] [retval] HRESULT* value);
                    [propget] HRESULT ErrorLocation([out] [retval] INT32* value);
                    HRESULT HasOperand([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId operandId, [out] [retval] boolean* result);
                    HRESULT GetOperand([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId operandId, [out] [retval] IInspectable** result);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [uuid(0620BB64-9616-5593-BE3A-EB8E6DAEB3FA)]
                interface ICoreAutomationConnectionBoundObjectProvider : IInspectable
                {
                    [propget] HRESULT IsComThreadingRequired([out] [retval] boolean* value);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.CoreAutomationRegistrar)]
                [uuid(3E50129B-D6DC-5680-B580-FFFF78300304)]
                interface ICoreAutomationRegistrarStatics : IInspectable
                {
                    HRESULT RegisterAnnotationType([in] GUID guid, [out] [retval] Windows.UI.UIAutomation.Core.AutomationAnnotationTypeRegistration* result);
                    HRESULT UnregisterAnnotationType([in] Windows.UI.UIAutomation.Core.AutomationAnnotationTypeRegistration registration);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.CoreAutomationRemoteOperation)]
                [uuid(3AC656F4-E2BC-5C6E-B8E7-B224FB74B060)]
                interface ICoreAutomationRemoteOperation : IInspectable
                {
                    HRESULT IsOpcodeSupported([in] UINT32 opcode, [out] [retval] boolean* result);
                    HRESULT ImportElement([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId operandId, [in] Windows.UI.UIAutomation.AutomationElement* element);
                    HRESULT ImportTextRange([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId operandId, [in] Windows.UI.UIAutomation.AutomationTextRange* textRange);
                    HRESULT AddToResults([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId operandId);
                    HRESULT Execute([in] UINT32 __bytecodeBufferSize, [in] [size_is(__bytecodeBufferSize)] BYTE* bytecodeBuffer, [out] [retval] Windows.UI.UIAutomation.Core.AutomationRemoteOperationResult** result);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.CoreAutomationRemoteOperation)]
                [uuid(EEFAF86F-E953-5099-8CE9-DCA813482BA0)]
                interface ICoreAutomationRemoteOperation2 : IInspectable
                {
                    HRESULT ImportConnectionBoundObject([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId operandId, [in] Windows.UI.UIAutomation.AutomationConnectionBoundObject* connectionBoundObject);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.CoreAutomationRemoteOperationContext)]
                [uuid(B9AF9CBB-3D3E-5918-A16B-7861626A3AEB)]
                interface ICoreAutomationRemoteOperationContext : IInspectable
                {
                    HRESULT GetOperand([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId id, [out] [retval] IInspectable** result);
                    [overload("SetOperand")] HRESULT SetOperand([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId id, [in] IInspectable* operand);
                    [overload("SetOperand")] HRESULT SetOperand2([in] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId id, [in] IInspectable* operand, [in] GUID operandInterfaceId);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [uuid(88F53E67-DC69-553B-A0AA-70477E724DA8)]
                interface ICoreAutomationRemoteOperationExtensionProvider : IInspectable
                {
                    HRESULT CallExtension([in] GUID extensionId, [in] Windows.UI.UIAutomation.Core.CoreAutomationRemoteOperationContext* context, [in] UINT32 __operandIdsSize, [in] [size_is(__operandIdsSize)] Windows.UI.UIAutomation.Core.AutomationRemoteOperationOperandId* operandIds);
                    HRESULT IsExtensionSupported([in] GUID extensionId, [out] [retval] boolean* result);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.RemoteAutomationClientSession)]
                [uuid(5C8A091D-94CC-5B33-AFDB-678CDED2BD54)]
                interface IRemoteAutomationClientSession : IInspectable
                {
                    HRESULT Start();
                    HRESULT Stop();
                    HRESULT CreateWindowAsync([in] UINT64 remoteWindowId, [in] UINT32 remoteProcessId, [in] IInspectable* parentAutomationElement, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.UI.UIAutomation.Core.RemoteAutomationWindow*>** operation);
                    [propget] HRESULT SessionId([out] [retval] GUID* value);
                    [eventadd] HRESULT ConnectionRequested([in] Windows.Foundation.TypedEventHandler<Windows.UI.UIAutomation.Core.RemoteAutomationClientSession*, Windows.UI.UIAutomation.Core.RemoteAutomationConnectionRequestedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                    [eventremove] HRESULT ConnectionRequested([in] EventRegistrationToken token);
                    [eventadd] HRESULT Disconnected([in] Windows.Foundation.TypedEventHandler<Windows.UI.UIAutomation.Core.RemoteAutomationClientSession*, Windows.UI.UIAutomation.Core.RemoteAutomationDisconnectedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                    [eventremove] HRESULT Disconnected([in] EventRegistrationToken token);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.RemoteAutomationClientSession)]
                [uuid(F250263D-6057-5373-A5A5-ED7265FE0376)]
                interface IRemoteAutomationClientSessionFactory : IInspectable
                {
                    HRESULT CreateInstance([in] HSTRING name, [out] [retval] Windows.UI.UIAutomation.Core.RemoteAutomationClientSession** value);
                    HRESULT CreateInstance2([in] HSTRING name, [in] GUID sessionId, [out] [retval] Windows.UI.UIAutomation.Core.RemoteAutomationClientSession** value);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.RemoteAutomationConnectionRequestedEventArgs)]
                [uuid(EA3319A8-E3A8-5DC6-ADF8-044E46B14AF5)]
                interface IRemoteAutomationConnectionRequestedEventArgs : IInspectable
                {
                    [propget] HRESULT LocalPipeName([out] [retval] HSTRING* value);
                    [propget] HRESULT RemoteProcessId([out] [retval] UINT32* value);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.RemoteAutomationDisconnectedEventArgs)]
                [uuid(BBB33A3D-5D90-5C38-9EB2-DD9DCC1B2E3F)]
                interface IRemoteAutomationDisconnectedEventArgs : IInspectable
                {
                    [propget] HRESULT LocalPipeName([out] [retval] HSTRING* value);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.RemoteAutomationServer)]
                [uuid(E6E8945E-0C11-5028-9AE3-C2771288B6B7)]
                interface IRemoteAutomationServerStatics : IInspectable
                {
                    HRESULT ReportSession([in] GUID sessionId);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [exclusiveto(Windows.UI.UIAutomation.Core.RemoteAutomationWindow)]
                [uuid(7C607689-496D-512A-9BD5-C050CFAF1428)]
                interface IRemoteAutomationWindow : IInspectable
                {
                    [propget] HRESULT AutomationProvider([out] [retval] IInspectable** value);
                    HRESULT UnregisterAsync([out] [retval] Windows.Foundation.IAsyncAction** operation);
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                [marshaling_behavior(agile)]
                runtimeclass AutomationRemoteOperationResult
                {
                    [default] interface Windows.UI.UIAutomation.Core.IAutomationRemoteOperationResult;
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                [static(Windows.UI.UIAutomation.Core.ICoreAutomationRegistrarStatics, Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [threading(both)]
                runtimeclass CoreAutomationRegistrar
                {
                }

                [activatable(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                [contract(Windows.UI.UIAutomation.UIAutomationContract, 1.0)]
                [marshaling_behavior(agile)]
                [threading(both)]
                runtimeclass CoreAutomationRemoteOperation
                {
                    [default] interface Windows.UI.UIAutomation.Core.ICoreAutomationRemoteOperation;
                    [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)] interface Windows.UI.UIAutomation.Core.ICoreAutomationRemoteOperation2;
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                runtimeclass CoreAutomationRemoteOperationContext
                {
                    [default] interface Windows.UI.UIAutomation.Core.ICoreAutomationRemoteOperationContext;
                }

                [activatable(Windows.UI.UIAutomation.Core.IRemoteAutomationClientSessionFactory, Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                [threading(both)]
                runtimeclass RemoteAutomationClientSession
                {
                    [default] interface Windows.UI.UIAutomation.Core.IRemoteAutomationClientSession;
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                runtimeclass RemoteAutomationConnectionRequestedEventArgs
                {
                    [default] interface Windows.UI.UIAutomation.Core.IRemoteAutomationConnectionRequestedEventArgs;
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                runtimeclass RemoteAutomationDisconnectedEventArgs
                {
                    [default] interface Windows.UI.UIAutomation.Core.IRemoteAutomationDisconnectedEventArgs;
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                [static(Windows.UI.UIAutomation.Core.IRemoteAutomationServerStatics, Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [threading(both)]
                runtimeclass RemoteAutomationServer
                {
                }

                [contract(Windows.UI.UIAutomation.UIAutomationContract, 2.0)]
                [marshaling_behavior(agile)]
                runtimeclass RemoteAutomationWindow
                {
                    [default] interface Windows.UI.UIAutomation.Core.IRemoteAutomationWindow;
                }
            }
        }
    }
}
