//
// 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.System.Power.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        typedef struct DateTime DateTime;

        typedef struct TimeSpan TimeSpan;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace System
    {
        namespace Power
        {
            typedef enum BatteryStatus BatteryStatus;
        }
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace Power
        {
            apicontract PowerGridApiContract;

            interface IBattery;

            interface IBatteryReport;

            interface IBatteryStatics;

            interface IPowerGridData;

            interface IPowerGridForecast;

            interface IPowerGridForecastStatics;

            runtimeclass Battery;

            runtimeclass BatteryReport;

            runtimeclass PowerGridData;

            runtimeclass PowerGridForecast;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Devices
    {
        namespace Power
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Devices.Power.PowerGridData*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Devices.Power.PowerGridData*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Power.PowerGridData*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.Power.Battery*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Devices.Power.Battery*, IInspectable*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Devices
    {
        namespace Power
        {
            [contractversion(1.0)]
            apicontract PowerGridApiContract
            {
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.Power.Battery)]
            [uuid(BC894FC6-0072-47C8-8B5D-614AAA7A437E)]
            interface IBattery : IInspectable
            {
                [propget] HRESULT DeviceId([out] [retval] HSTRING* value);
                HRESULT GetReport([out] [retval] Windows.Devices.Power.BatteryReport** result);
                [eventadd] HRESULT ReportUpdated([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Power.Battery*, IInspectable*>* handler, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT ReportUpdated([in] EventRegistrationToken token);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.Power.BatteryReport)]
            [uuid(C9858C3A-4E13-420A-A8D0-24F18F395401)]
            interface IBatteryReport : IInspectable
            {
                [propget] HRESULT ChargeRateInMilliwatts([out] [retval] Windows.Foundation.IReference<INT32>** value);
                [propget] HRESULT DesignCapacityInMilliwattHours([out] [retval] Windows.Foundation.IReference<INT32>** value);
                [propget] HRESULT FullChargeCapacityInMilliwattHours([out] [retval] Windows.Foundation.IReference<INT32>** value);
                [propget] HRESULT RemainingCapacityInMilliwattHours([out] [retval] Windows.Foundation.IReference<INT32>** value);
                [propget] HRESULT Status([out] [retval] Windows.System.Power.BatteryStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.Power.Battery)]
            [uuid(79CD72B6-9E5E-4452-BEA6-DFCD541E597F)]
            interface IBatteryStatics : IInspectable
            {
                [propget] HRESULT AggregateBattery([out] [retval] Windows.Devices.Power.Battery** result);
                HRESULT FromIdAsync([in] HSTRING deviceId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Power.Battery*>** result);
                HRESULT GetDeviceSelector([out] [retval] HSTRING* result);
            }

            [contract(Windows.Devices.Power.PowerGridApiContract, 1.0)]
            [exclusiveto(Windows.Devices.Power.PowerGridData)]
            [uuid(C360FB17-FC92-5F6E-999D-16A4CF9D6C40)]
            interface IPowerGridData : IInspectable
            {
                [propget] HRESULT Severity([out] [retval] DOUBLE* value);
                [propget] HRESULT IsLowUserExperienceImpact([out] [retval] boolean* value);
            }

            [contract(Windows.Devices.Power.PowerGridApiContract, 1.0)]
            [exclusiveto(Windows.Devices.Power.PowerGridForecast)]
            [uuid(077E4DE9-ED60-58BB-A850-003C6A138685)]
            interface IPowerGridForecast : IInspectable
            {
                [propget] HRESULT StartTime([out] [retval] Windows.Foundation.DateTime* value);
                [propget] HRESULT BlockDuration([out] [retval] Windows.Foundation.TimeSpan* value);
                [propget] HRESULT Forecast([out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Power.PowerGridData*>** value);
            }

            [contract(Windows.Devices.Power.PowerGridApiContract, 1.0)]
            [exclusiveto(Windows.Devices.Power.PowerGridForecast)]
            [uuid(5B78C806-2E4E-5BCC-BB34-CB81C60F9E12)]
            interface IPowerGridForecastStatics : IInspectable
            {
                HRESULT GetForecast([out] [retval] Windows.Devices.Power.PowerGridForecast** result);
                [eventadd] HRESULT ForecastUpdated([in] Windows.Foundation.EventHandler<IInspectable*>* handler, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT ForecastUpdated([in] EventRegistrationToken token);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.Power.IBatteryStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass Battery
            {
                [default] interface Windows.Devices.Power.IBattery;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass BatteryReport
            {
                [default] interface Windows.Devices.Power.IBatteryReport;
            }

            [contract(Windows.Devices.Power.PowerGridApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass PowerGridData
            {
                [default] interface Windows.Devices.Power.IPowerGridData;
            }

            [contract(Windows.Devices.Power.PowerGridApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.Power.IPowerGridForecastStatics, Windows.Devices.Power.PowerGridApiContract, 1.0)]
            [threading(both)]
            runtimeclass PowerGridForecast
            {
                [default] interface Windows.Devices.Power.IPowerGridForecast;
            }
        }
    }
}
