# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
"""
This file contains the exact signatures for all functions in module
PySide6.QtNetworkAuth, except for defaults which are replaced by "...".
"""

# mypy: disable-error-code="override, overload-overlap"
# Module `PySide6.QtNetworkAuth`

import PySide6.QtNetworkAuth
import PySide6.QtCore

import enum
import typing
from PySide6.QtCore import Signal
from shiboken6 import Shiboken


class QAbstractOAuth(PySide6.QtCore.QObject):

    authorizationUrlChanged  : typing.ClassVar[Signal] = ... # authorizationUrlChanged(QUrl)
    authorizeWithBrowser     : typing.ClassVar[Signal] = ... # authorizeWithBrowser(QUrl)
    clientIdentifierChanged  : typing.ClassVar[Signal] = ... # clientIdentifierChanged(QString)
    contentTypeChanged       : typing.ClassVar[Signal] = ... # contentTypeChanged(ContentType)
    extraTokensChanged       : typing.ClassVar[Signal] = ... # extraTokensChanged(QVariantMap)
    finished                 : typing.ClassVar[Signal] = ... # finished(QNetworkReply*)
    granted                  : typing.ClassVar[Signal] = ... # granted()
    replyDataReceived        : typing.ClassVar[Signal] = ... # replyDataReceived(QByteArray)
    requestFailed            : typing.ClassVar[Signal] = ... # requestFailed(Error)
    statusChanged            : typing.ClassVar[Signal] = ... # statusChanged(Status)
    tokenChanged             : typing.ClassVar[Signal] = ... # tokenChanged(QString)

    class ContentType(enum.Enum):

        WwwFormUrlEncoded         = 0x0
        Json                      = 0x1

    class Error(enum.Enum):

        NoError                   = 0x0
        NetworkError              = 0x1
        ServerError               = 0x2
        OAuthTokenNotFoundError   = 0x3
        OAuthTokenSecretNotFoundError = 0x4
        OAuthCallbackNotVerified  = 0x5
        ClientError               = 0x6
        ExpiredError              = 0x7

    class Stage(enum.Enum):

        RequestingTemporaryCredentials = 0x0
        RequestingAuthorization   = 0x1
        RequestingAccessToken     = 0x2
        RefreshingAccessToken     = 0x3

    class Status(enum.Enum):

        NotAuthenticated          = 0x0
        TemporaryCredentialsReceived = 0x1
        Granted                   = 0x2
        RefreshingToken           = 0x3


class QAbstractOAuth2(PySide6.QtNetworkAuth.QAbstractOAuth):

    accessTokenAboutToExpire : typing.ClassVar[Signal] = ... # accessTokenAboutToExpire()
    authorizationCallbackReceived: typing.ClassVar[Signal] = ... # authorizationCallbackReceived(QVariantMap)
    autoRefreshChanged       : typing.ClassVar[Signal] = ... # autoRefreshChanged(bool)
    clientIdentifierSharedKeyChanged: typing.ClassVar[Signal] = ... # clientIdentifierSharedKeyChanged(QString)
    error                    : typing.ClassVar[Signal] = ... # error(QString,QString,QUrl)
    expirationAtChanged      : typing.ClassVar[Signal] = ... # expirationAtChanged(QDateTime)
    grantedScopeTokensChanged: typing.ClassVar[Signal] = ... # grantedScopeTokensChanged(QSet<QByteArray>)
    idTokenChanged           : typing.ClassVar[Signal] = ... # idTokenChanged(QString)
    nonceChanged             : typing.ClassVar[Signal] = ... # nonceChanged(QString)
    nonceModeChanged         : typing.ClassVar[Signal] = ... # nonceModeChanged(NonceMode)
    refreshLeadTimeChanged   : typing.ClassVar[Signal] = ... # refreshLeadTimeChanged(std::chrono::seconds)
    refreshTokenChanged      : typing.ClassVar[Signal] = ... # refreshTokenChanged(QString)
    requestedScopeTokensChanged: typing.ClassVar[Signal] = ... # requestedScopeTokensChanged(QSet<QByteArray>)
    responseTypeChanged      : typing.ClassVar[Signal] = ... # responseTypeChanged(QString)
    scopeChanged             : typing.ClassVar[Signal] = ... # scopeChanged(QString)
    serverReportedErrorOccurred: typing.ClassVar[Signal] = ... # serverReportedErrorOccurred(QString,QString,QUrl)
    sslConfigurationChanged  : typing.ClassVar[Signal] = ... # sslConfigurationChanged(QSslConfiguration)
    stateChanged             : typing.ClassVar[Signal] = ... # stateChanged(QString)
    tokenUrlChanged          : typing.ClassVar[Signal] = ... # tokenUrlChanged(QUrl)
    userAgentChanged         : typing.ClassVar[Signal] = ... # userAgentChanged(QString)

    class NonceMode(enum.Enum):

        Automatic                 = 0x0
        Enabled                   = 0x1
        Disabled                  = 0x2


class QAbstractOAuthReplyHandler(PySide6.QtCore.QObject):

    callbackDataReceived     : typing.ClassVar[Signal] = ... # callbackDataReceived(QByteArray)
    callbackReceived         : typing.ClassVar[Signal] = ... # callbackReceived(QVariantMap)
    replyDataReceived        : typing.ClassVar[Signal] = ... # replyDataReceived(QByteArray)
    tokenRequestErrorOccurred: typing.ClassVar[Signal] = ... # tokenRequestErrorOccurred(QAbstractOAuth::Error,QString)
    tokensReceived           : typing.ClassVar[Signal] = ... # tokensReceived(QVariantMap)


class QIntList: ...


class QOAuth1(PySide6.QtNetworkAuth.QAbstractOAuth):

    clientSharedSecretChanged: typing.ClassVar[Signal] = ... # clientSharedSecretChanged(QString)
    signatureMethodChanged   : typing.ClassVar[Signal] = ... # signatureMethodChanged(QOAuth1::SignatureMethod)
    temporaryCredentialsUrlChanged: typing.ClassVar[Signal] = ... # temporaryCredentialsUrlChanged(QUrl)
    tokenCredentialsUrlChanged: typing.ClassVar[Signal] = ... # tokenCredentialsUrlChanged(QUrl)
    tokenSecretChanged       : typing.ClassVar[Signal] = ... # tokenSecretChanged(QString)

    class SignatureMethod(enum.Enum):

        Hmac_Sha1                 = 0x0
        Rsa_Sha1                  = 0x1
        PlainText                 = 0x2


class QOAuth1Signature(Shiboken.Object):

    class HttpRequestMethod(enum.Enum):

        Unknown                   = 0x0
        Head                      = 0x1
        Get                       = 0x2
        Put                       = 0x3
        Post                      = 0x4
        Delete                    = 0x5
        Custom                    = 0x6


class QOAuth2AuthorizationCodeFlow(PySide6.QtNetworkAuth.QAbstractOAuth2):

    accessTokenUrlChanged    : typing.ClassVar[Signal] = ... # accessTokenUrlChanged(QUrl)

    class PkceMethod(enum.Enum):

        S256                      = 0x0
        Plain                     = 0x1
        None_                     = 0xff


class QOAuth2DeviceAuthorizationFlow(PySide6.QtNetworkAuth.QAbstractOAuth2):

    authorizeWithUserCode    : typing.ClassVar[Signal] = ... # authorizeWithUserCode(QUrl,QString,QUrl)
    completeVerificationUrlChanged: typing.ClassVar[Signal] = ... # completeVerificationUrlChanged(QUrl)
    pollingChanged           : typing.ClassVar[Signal] = ... # pollingChanged(bool)
    userCodeChanged          : typing.ClassVar[Signal] = ... # userCodeChanged(QString)
    userCodeExpirationAtChanged: typing.ClassVar[Signal] = ... # userCodeExpirationAtChanged(QDateTime)
    verificationUrlChanged   : typing.ClassVar[Signal] = ... # verificationUrlChanged(QUrl)


class QOAuthHttpServerReplyHandler(PySide6.QtNetworkAuth.QOAuthOobReplyHandler): ...


class QOAuthOobReplyHandler(PySide6.QtNetworkAuth.QAbstractOAuthReplyHandler): ...


class QOAuthUriSchemeReplyHandler(PySide6.QtNetworkAuth.QOAuthOobReplyHandler):

    redirectUrlChanged       : typing.ClassVar[Signal] = ... # redirectUrlChanged()


# eof
