//
// 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";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        interface IStringable;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace Globalization
    {
        namespace PhoneNumberFormatting
        {
            typedef enum PhoneNumberFormat PhoneNumberFormat;

            typedef enum PhoneNumberMatchResult PhoneNumberMatchResult;

            typedef enum PhoneNumberParseResult PhoneNumberParseResult;

            typedef enum PredictedPhoneNumberKind PredictedPhoneNumberKind;

            interface IPhoneNumberFormatter;

            interface IPhoneNumberFormatterStatics;

            interface IPhoneNumberInfo;

            interface IPhoneNumberInfoFactory;

            interface IPhoneNumberInfoStatics;

            runtimeclass PhoneNumberFormatter;

            runtimeclass PhoneNumberInfo;
        }
    }
}

// Generic instantiations

// Type definition
namespace Windows
{
    namespace Globalization
    {
        namespace PhoneNumberFormatting
        {
            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            enum PhoneNumberFormat
            {
                E164          = 0,
                International = 1,
                National      = 2,
                Rfc3966       = 3
            };

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            enum PhoneNumberMatchResult
            {
                NoMatch                             = 0,
                ShortNationalSignificantNumberMatch = 1,
                NationalSignificantNumberMatch      = 2,
                ExactMatch                          = 3
            };

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            enum PhoneNumberParseResult
            {
                Valid              = 0,
                NotANumber         = 1,
                InvalidCountryCode = 2,
                TooShort           = 3,
                TooLong            = 4
            };

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            enum PredictedPhoneNumberKind
            {
                FixedLine              = 0,
                Mobile                 = 1,
                FixedLineOrMobile      = 2,
                TollFree               = 3,
                PremiumRate            = 4,
                SharedCost             = 5,
                Voip                   = 6,
                PersonalNumber         = 7,
                Pager                  = 8,
                UniversalAccountNumber = 9,
                Voicemail              = 10,
                Unknown                = 11
            };

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormatter)]
            [uuid(1556B49E-BAD4-4B4A-900D-4407ADB7C981)]
            interface IPhoneNumberFormatter : IInspectable
            {
                [overload("Format")] HRESULT Format([in] Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo* number, [out] [retval] HSTRING* result);
                [overload("Format")] HRESULT FormatWithOutputFormat([in] Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo* number, [in] Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormat numberFormat, [out] [retval] HSTRING* result);
                HRESULT FormatPartialString([in] HSTRING number, [out] [retval] HSTRING* result);
                HRESULT FormatString([in] HSTRING number, [out] [retval] HSTRING* result);
                HRESULT FormatStringWithLeftToRightMarkers([in] HSTRING number, [out] [retval] HSTRING* result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormatter)]
            [uuid(5CA6F931-84D9-414B-AB4E-A0552C878602)]
            interface IPhoneNumberFormatterStatics : IInspectable
            {
                HRESULT TryCreate([in] HSTRING regionCode, [out] Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormatter** phoneNumber);
                HRESULT GetCountryCodeForRegion([in] HSTRING regionCode, [out] [retval] INT32* result);
                HRESULT GetNationalDirectDialingPrefixForRegion([in] HSTRING regionCode, [in] boolean stripNonDigit, [out] [retval] HSTRING* result);
                HRESULT WrapWithLeftToRightMarkers([in] HSTRING number, [out] [retval] HSTRING* result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo)]
            [uuid(1C7CE4DD-C8B4-4EA3-9AEF-B342E2C5B417)]
            interface IPhoneNumberInfo : IInspectable
            {
                [propget] HRESULT CountryCode([out] [retval] INT32* value);
                [propget] HRESULT PhoneNumber([out] [retval] HSTRING* value);
                HRESULT GetLengthOfGeographicalAreaCode([out] [retval] INT32* result);
                HRESULT GetNationalSignificantNumber([out] [retval] HSTRING* result);
                HRESULT GetLengthOfNationalDestinationCode([out] [retval] INT32* result);
                HRESULT PredictNumberKind([out] [retval] Windows.Globalization.PhoneNumberFormatting.PredictedPhoneNumberKind* result);
                HRESULT GetGeographicRegionCode([out] [retval] HSTRING* result);
                HRESULT CheckNumberMatch([in] Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo* otherNumber, [out] [retval] Windows.Globalization.PhoneNumberFormatting.PhoneNumberMatchResult* result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo)]
            [uuid(8202B964-ADAA-4CFF-8FCF-17E7516A28FF)]
            interface IPhoneNumberInfoFactory : IInspectable
            {
                HRESULT Create([in] HSTRING number, [out] [retval] Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo** result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [exclusiveto(Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo)]
            [uuid(5B3F4F6A-86A9-40E9-8649-6D61161928D4)]
            interface IPhoneNumberInfoStatics : IInspectable
            {
                [overload("TryParse")] HRESULT TryParse([in] HSTRING input, [out] Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo** phoneNumber, [out] [retval] Windows.Globalization.PhoneNumberFormatting.PhoneNumberParseResult* result);
                [overload("TryParse")] HRESULT TryParseWithRegion([in] HSTRING input, [in] HSTRING regionCode, [out] Windows.Globalization.PhoneNumberFormatting.PhoneNumberInfo** phoneNumber, [out] [retval] Windows.Globalization.PhoneNumberFormatting.PhoneNumberParseResult* result);
            }

            [activatable(Windows.Foundation.UniversalApiContract, 3.0)]
            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Globalization.PhoneNumberFormatting.IPhoneNumberFormatterStatics, Windows.Foundation.UniversalApiContract, 3.0)]
            [threading(both)]
            runtimeclass PhoneNumberFormatter
            {
                [default] interface Windows.Globalization.PhoneNumberFormatting.IPhoneNumberFormatter;
            }

            [activatable(Windows.Globalization.PhoneNumberFormatting.IPhoneNumberInfoFactory, Windows.Foundation.UniversalApiContract, 3.0)]
            [contract(Windows.Foundation.UniversalApiContract, 3.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Globalization.PhoneNumberFormatting.IPhoneNumberInfoStatics, Windows.Foundation.UniversalApiContract, 3.0)]
            [threading(both)]
            runtimeclass PhoneNumberInfo
            {
                [default] interface Windows.Globalization.PhoneNumberFormatting.IPhoneNumberInfo;
                interface Windows.Foundation.IStringable;
            }
        }
    }
}
