/**
 * FreeRDP: A Remote Desktop Protocol Implementation
 * Smart Card Structure Packing
 *
 * Copyright 2025 Armin Novak <armin.novak@thincast.com>
 * Copyright 2025 Thincast Technologies GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <winpr/wlog.h>
#include <freerdp/api.h>
#include <freerdp/channels/scard.h>

FREERDP_LOCAL void smartcard_trace_long_return_int(wLog* log, const Long_Return* ret,
                                                   const char* name);

#define smartcard_reader_state_return_is_valid(x, val) \
	smartcard_reader_state_return_is_valid_ex((x), (val), __FILE__, __LINE__, __func__)
FREERDP_LOCAL BOOL smartcard_reader_state_return_is_valid_ex(size_t pos,
                                                             const ReaderState_Return* val,
                                                             const char* file, size_t line,
                                                             const char* fkt);
