### ms-tsts_SessEnvRpc.idl
"""
RPC definitions for the following interfaces:
- SessEnvPublicRpc (v1.0): 1257B580-CE2F-4109-82D6-A9459D0BF6BC
This file is auto-generated by midl-to-scapy, do not modify.
"""

from enum import IntEnum
import uuid


from scapy.layers.dcerpc import (
    NDRPacket,
    DceRpcOp,
    NDRConfVarStrNullField,
    NDRConfVarStrNullFieldUtf16,
    NDRInt3264EnumField,
    NDRIntField,
    register_dcerpc_interface,
)


class SHADOW_CONTROL_REQUEST(IntEnum):
    SHADOW_CONTROL_REQUEST_VIEW = 0
    SHADOW_CONTROL_REQUEST_TAKECONTROL = 1
    SHADOW_CONTROL_REQUEST_Count = 2


class SHADOW_PERMISSION_REQUEST(IntEnum):
    SHADOW_PERMISSION_REQUEST_SILENT = 0
    SHADOW_PERMISSION_REQUEST_REQUESTPERMISSION = 1
    SHADOW_PERMISSION_REQUEST_Count = 2


class SHADOW_REQUEST_RESPONSE(IntEnum):
    SHADOW_REQUEST_RESPONSE_ALLOW = 0
    SHADOW_REQUEST_RESPONSE_DECLINE = 1
    SHADOW_REQUEST_RESPONSE_POLICY_PERMISSION_REQUIRED = 2
    SHADOW_REQUEST_RESPONSE_POLICY_DISABLED = 3
    SHADOW_REQUEST_RESPONSE_POLICY_VIEW_ONLY = 4
    SHADOW_REQUEST_RESPONSE_POLICY_VIEW_ONLY_PERMISSION_REQUIRED = 5
    SHADOW_REQUEST_RESPONSE_SESSION_ALREADY_CONTROLLED = 6


class RpcShadow2_Request(NDRPacket):
    fields_desc = [
        NDRIntField("TargetSessionId", 0),
        NDRInt3264EnumField("eRequestControl", 0, SHADOW_CONTROL_REQUEST),
        NDRInt3264EnumField("eRequestPermission", 0, SHADOW_PERMISSION_REQUEST),
        NDRIntField("cchInvitation", 0),
    ]


class RpcShadow2_Response(NDRPacket):
    fields_desc = [
        NDRInt3264EnumField("pePermission", 0, SHADOW_REQUEST_RESPONSE),
        NDRConfVarStrNullFieldUtf16("pszInvitation", ""),
        NDRIntField("status", 0),
    ]


SESSENVPUBLICRPC_OPNUMS = {0: DceRpcOp(RpcShadow2_Request, RpcShadow2_Response)}
register_dcerpc_interface(
    name="SessEnvPublicRpc",
    uuid=uuid.UUID("1257B580-CE2F-4109-82D6-A9459D0BF6BC"),
    version="1.0",
    opnums=SESSENVPUBLICRPC_OPNUMS,
)
