diff --git a/.ci/build-mac-arm64.sh b/.ci/build-mac-arm64.sh deleted file mode 100755 index 49b82737c7..0000000000 --- a/.ci/build-mac-arm64.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh -ex - -# shellcheck disable=SC2086 -export HOMEBREW_NO_AUTO_UPDATE=1 -export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 -export HOMEBREW_NO_ENV_HINTS=1 -export HOMEBREW_NO_INSTALL_CLEANUP=1 - -brew install -f --overwrite --quiet googletest opencv@4 ffmpeg@5 "llvm@$LLVM_COMPILER_VER" glew sdl3 vulkan-headers vulkan-loader -brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative - -brew link -f --quiet "llvm@$LLVM_COMPILER_VER" ffmpeg@5 - -# moltenvk based on commit for 1.4.0 release -export HOMEBREW_DEVELOPER=1 # Prevents blocking of local formulae -wget https://raw.githubusercontent.com/Homebrew/homebrew-core/ea2bec5f1f4384e188d7fc0702ab21a20a2ced08/Formula/m/molten-vk.rb -/opt/homebrew/bin/brew install -f --overwrite --formula --quiet ./molten-vk.rb -export HOMEBREW_DEVELOPER=0 - -export CXX=clang++ -export CC=clang - -export BREW_PATH; -BREW_PATH="$(brew --prefix)" -export BREW_BIN="/opt/homebrew/bin" -export BREW_SBIN="/opt/homebrew/sbin" -export CMAKE_EXTRA_OPTS='-DLLVM_TARGETS_TO_BUILD=arm64' - -export WORKDIR; -WORKDIR="$(pwd)" - -# Setup ccache -if [ ! -d "$CCACHE_DIR" ]; then - mkdir -p "$CCACHE_DIR" -fi - -# Get Qt -if [ ! -d "/tmp/Qt/$QT_VER" ]; then - mkdir -p "/tmp/Qt" - git clone https://github.com/engnr/qt-downloader.git - cd qt-downloader - git checkout f52efee0f18668c6d6de2dec0234b8c4bc54c597 - sed -i '' "s/'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/'qt{0}_{0}{1}{2}'.format(major, minor, patch), 'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/g" qt-downloader - sed -i '' "s/'{}\/{}\/qt{}_{}\/'/'{0}\/{1}\/qt{2}_{3}\/qt{2}_{3}\/'/g" qt-downloader - cd "/tmp/Qt" - pip3 install py7zr requests semantic_version lxml --no-cache --break-system-packages - mkdir -p "$QT_VER/macos" ; ln -s "macos" "$QT_VER/clang_64" - sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" - python3 "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats -o "$QT_VER/clang_64" -fi - -cd "$WORKDIR" -ditto "/tmp/Qt/$QT_VER" "qt-downloader/$QT_VER" - -export Qt6_DIR="$WORKDIR/qt-downloader/$QT_VER/clang_64/lib/cmake/Qt$QT_VER_MAIN" -export SDL3_DIR="$BREW_PATH/opt/sdl3/lib/cmake/SDL3" - -export PATH="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/bin:$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:$BREW_BIN:$BREW_SBIN:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH" -export LDFLAGS="-L$BREW_PATH/lib $BREW_PATH/opt/ffmpeg@5/lib/libavcodec.dylib $BREW_PATH/opt/ffmpeg@5/lib/libavformat.dylib $BREW_PATH/opt/ffmpeg@5/lib/libavutil.dylib $BREW_PATH/opt/ffmpeg@5/lib/libswscale.dylib $BREW_PATH/opt/ffmpeg@5/lib/libswresample.dylib $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++.1.dylib $BREW_PATH/lib/libSDL3.dylib $BREW_PATH/lib/libGLEW.dylib $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/unwind/libunwind.1.dylib -Wl,-rpath,$BREW_PATH/lib" -export CPPFLAGS="-I$BREW_PATH/include -D__MAC_OS_X_VERSION_MIN_REQUIRED=144000" -export CFLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=144000" -export LIBRARY_PATH="$BREW_PATH/lib" -export LD_LIBRARY_PATH="$BREW_PATH/lib" - -export VULKAN_SDK -VULKAN_SDK="$BREW_PATH/opt/molten-vk" -ln -s "$BREW_PATH/opt/vulkan-loader/lib/libvulkan.dylib" "$VULKAN_SDK/lib/libvulkan.dylib" || true - -export LLVM_DIR -LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER" -# exclude ffmpeg, LLVM, opencv, and sdl from submodule update -# shellcheck disable=SC2046 -git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/ffmpeg/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules) - -mkdir build && cd build || exit 1 - -export MACOSX_DEPLOYMENT_TARGET=14.4 - -"$BREW_PATH/bin/cmake" .. \ - -DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \ - -DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \ - -DUSE_SDL=ON \ - -DUSE_DISCORD_RPC=ON \ - -DUSE_VULKAN=ON \ - -DUSE_ALSA=OFF \ - -DUSE_PULSE=OFF \ - -DUSE_AUDIOUNIT=ON \ - -DUSE_SYSTEM_FFMPEG=ON \ - -DLLVM_CCACHE_BUILD=OFF \ - -DLLVM_BUILD_RUNTIME=OFF \ - -DLLVM_BUILD_TOOLS=OFF \ - -DLLVM_INCLUDE_DOCS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_TOOLS=OFF \ - -DLLVM_INCLUDE_UTILS=OFF \ - -DLLVM_USE_PERF=OFF \ - -DLLVM_ENABLE_Z3_SOLVER=OFF \ - -DUSE_NATIVE_INSTRUCTIONS=OFF \ - -DUSE_SYSTEM_MVK=ON \ - -DUSE_SYSTEM_FAUDIO=OFF \ - -DUSE_SYSTEM_SDL=ON \ - -DUSE_SYSTEM_OPENCV=ON \ - "$CMAKE_EXTRA_OPTS" \ - -DLLVM_TARGET_ARCH=arm64 \ - -DCMAKE_OSX_ARCHITECTURES=arm64 \ - -DCMAKE_IGNORE_PATH="$BREW_PATH/lib" \ - -DCMAKE_IGNORE_PREFIX_PATH=/opt/homebrew/opt \ - -DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=144000" \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ - -DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \ - -G Ninja - -"$BREW_PATH/bin/ninja"; build_status=$?; - -cd .. - -# If it compiled succesfully let's deploy. -if [ "$build_status" -eq 0 ]; then - .ci/deploy-mac-arm64.sh -fi diff --git a/.ci/build-mac.sh b/.ci/build-mac.sh index 6328ce05d3..9e16fce4ec 100755 --- a/.ci/build-mac.sh +++ b/.ci/build-mac.sh @@ -1,36 +1,52 @@ #!/bin/sh -ex +# Gather explicit version number and number of commits +COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' rpcs3/rpcs3_version.cpp) +COMM_COUNT=$(git rev-list --count HEAD) +COMM_HASH=$(git rev-parse --short=8 HEAD) + +# AVVER is used for GitHub releases, it is the version number. LVER is used for release naming. +AVVER="${COMM_TAG}-${COMM_COUNT}" +export LVER="${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}" +echo "AVVER=$AVVER" >> .ci/ci-vars.env -# shellcheck disable=SC2086 export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 export HOMEBREW_NO_ENV_HINTS=1 export HOMEBREW_NO_INSTALL_CLEANUP=1 - +brew update brew install -f --overwrite --quiet ccache "llvm@$LLVM_COMPILER_VER" brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER" -# shellcheck disable=SC3009 -arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -arch -x86_64 /usr/local/bin/brew install -f --overwrite --quiet python@3.14 opencv@4 ffmpeg@5 "llvm@$LLVM_COMPILER_VER" glew sdl3 vulkan-headers vulkan-loader -arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative -arch -x86_64 /usr/local/bin/brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER" ffmpeg@5 +if [ "$AARCH64" -eq 1 ]; then + brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk + brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true +else + arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + arch -x86_64 /usr/local/bin/brew install -f --overwrite --quiet python@3.14 opencv@4 "llvm@$LLVM_COMPILER_VER" sdl3 vulkan-headers vulkan-loader molten-vk + arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative protobuf || true +fi -# moltenvk based on commit for 1.4.0 release -export HOMEBREW_DEVELOPER=1 # Prevents blocking of local formulae -wget https://raw.githubusercontent.com/Homebrew/homebrew-core/ea2bec5f1f4384e188d7fc0702ab21a20a2ced08/Formula/m/molten-vk.rb -arch -x86_64 /usr/local/bin/brew install -f --overwrite --formula --quiet ./molten-vk.rb -export HOMEBREW_DEVELOPER=0 export CXX=clang++ export CC=clang -export BREW_X64_PATH; -BREW_X64_PATH="$("/usr/local/bin/brew" --prefix)" -export BREW_BIN="/usr/local/bin" -export BREW_SBIN="/usr/local/sbin" -export CMAKE_EXTRA_OPTS='-DLLVM_TARGETS_TO_BUILD=X86' +export BREW_PATH; +if [ "$AARCH64" -eq 1 ]; then + BREW_PATH="$(brew --prefix)" + export BREW_BIN="/opt/homebrew/bin" + export BREW_SBIN="/opt/homebrew/sbin" +else + BREW_PATH="$("/usr/local/bin/brew" --prefix)" + export BREW_BIN="/usr/local/bin" + export BREW_SBIN="/usr/local/sbin" +fi export WORKDIR; WORKDIR="$(pwd)" +# Setup ccache +if [ ! -d "$CCACHE_DIR" ]; then + mkdir -p "$CCACHE_DIR" +fi + # Get Qt if [ ! -d "/tmp/Qt/$QT_VER" ]; then mkdir -p "/tmp/Qt" @@ -50,68 +66,67 @@ cd "$WORKDIR" ditto "/tmp/Qt/$QT_VER" "qt-downloader/$QT_VER" export Qt6_DIR="$WORKDIR/qt-downloader/$QT_VER/clang_64/lib/cmake/Qt$QT_VER_MAIN" -export SDL3_DIR="$BREW_X64_PATH/opt/sdl3/lib/cmake/SDL3" +export SDL3_DIR="$BREW_PATH/opt/sdl3/lib/cmake/SDL3" -export PATH="/opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/bin:$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:$BREW_BIN:$BREW_SBIN:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH" -# shellcheck disable=SC2155 -export LDFLAGS="-L$BREW_X64_PATH/lib -Wl,-rpath,$BREW_X64_PATH/lib,-L$(brew --prefix llvm)/lib/c++" -export CPPFLAGS="-I$BREW_X64_PATH/include -msse -msse2 -mcx16 -D__MAC_OS_X_VERSION_MIN_REQUIRED=144000" -export CFLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=144000" -export LIBRARY_PATH="$BREW_X64_PATH/opt/llvm@$LLVM_COMPILER_VER/lib:$BREW_X64_PATH/lib" -export LD_LIBRARY_PATH="$BREW_X64_PATH/opt/llvm@$LLVM_COMPILER_VER/lib:$BREW_X64_PATH/lib" +export PATH="/opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH" +export LDFLAGS="-L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++ -L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/unwind -lunwind" export VULKAN_SDK -VULKAN_SDK="$BREW_X64_PATH/opt/molten-vk" -ln -s "$BREW_X64_PATH/opt/vulkan-loader/lib/libvulkan.dylib" "$VULKAN_SDK/lib/libvulkan.dylib" +VULKAN_SDK="$BREW_PATH/opt/molten-vk" +ln -s "$BREW_PATH/opt/vulkan-loader/lib/libvulkan.dylib" "$VULKAN_SDK/lib/libvulkan.dylib" export LLVM_DIR -LLVM_DIR="$BREW_X64_PATH/opt/llvm@$LLVM_COMPILER_VER" -# exclude ffmpeg, LLVM, opencv, and sdl from submodule update +LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER" +# Pull all the submodules except some # shellcheck disable=SC2046 -git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/ffmpeg/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules) +git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules) mkdir build && cd build || exit 1 -export MACOSX_DEPLOYMENT_TARGET=14.4 - -"/opt/homebrew/bin/cmake" .. \ - -DBUILD_RPCS3_TESTS=OFF \ - -DRUN_RPCS3_TESTS=OFF \ +if [ "$AARCH64" -eq 1 ]; then +cmake .. \ + -DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \ + -DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \ + -DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \ + -DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \ + -DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}" \ + -DSTATIC_LINK_LLVM=ON \ -DUSE_SDL=ON \ -DUSE_DISCORD_RPC=ON \ - -DUSE_VULKAN=ON \ - -DUSE_ALSA=OFF \ - -DUSE_PULSE=OFF \ -DUSE_AUDIOUNIT=ON \ - -DUSE_SYSTEM_FFMPEG=ON \ - -DLLVM_CCACHE_BUILD=OFF \ - -DLLVM_BUILD_RUNTIME=OFF \ - -DLLVM_BUILD_TOOLS=OFF \ - -DLLVM_INCLUDE_DOCS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_TOOLS=OFF \ - -DLLVM_INCLUDE_UTILS=OFF \ - -DLLVM_USE_PERF=OFF \ - -DLLVM_ENABLE_Z3_SOLVER=OFF \ + -DUSE_SYSTEM_FFMPEG=OFF \ -DUSE_NATIVE_INSTRUCTIONS=OFF \ + -DUSE_PRECOMPILED_HEADERS=OFF \ -DUSE_SYSTEM_MVK=ON \ - -DUSE_SYSTEM_FAUDIO=OFF \ -DUSE_SYSTEM_SDL=ON \ -DUSE_SYSTEM_OPENCV=ON \ - "$CMAKE_EXTRA_OPTS" \ - -DLLVM_TARGET_ARCH=X86_64 \ + -G Ninja +else +cmake .. \ + -DBUILD_RPCS3_TESTS=OFF \ + -DRUN_RPCS3_TESTS=OFF \ -DCMAKE_OSX_ARCHITECTURES=x86_64 \ -DCMAKE_SYSTEM_PROCESSOR=x86_64 \ -DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinX86_64.cmake \ - -DCMAKE_IGNORE_PATH="$BREW_X64_PATH/lib" \ - -DCMAKE_IGNORE_PREFIX_PATH=/usr/local/opt \ - -DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=144000" \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \ -DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \ + -DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \ + -DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}"\ + -DSTATIC_LINK_LLVM=ON \ + -DUSE_SDL=ON \ + -DUSE_DISCORD_RPC=ON \ + -DUSE_AUDIOUNIT=ON \ + -DUSE_SYSTEM_FFMPEG=OFF \ + -DUSE_NATIVE_INSTRUCTIONS=OFF \ + -DUSE_PRECOMPILED_HEADERS=OFF \ + -DUSE_SYSTEM_MVK=ON \ + -DUSE_SYSTEM_SDL=ON \ + -DUSE_SYSTEM_OPENCV=ON \ -G Ninja +fi -"/opt/homebrew/bin/ninja"; build_status=$?; +ninja; build_status=$?; cd .. diff --git a/.ci/build-windows-clang.sh b/.ci/build-windows-clang.sh index 0880e7f5ed..4f07688ee5 100644 --- a/.ci/build-windows-clang.sh +++ b/.ci/build-windows-clang.sh @@ -2,6 +2,9 @@ git config --global --add safe.directory '*' +CPU_ARCH="${1:-x86_64}" +MSYS2="${2:-clang64}" + # Pull all the submodules except some # Note: Tried to use git submodule status, but it takes over 20 seconds # shellcheck disable=SC2046 @@ -23,7 +26,7 @@ else fi cmake .. \ - -DCMAKE_PREFIX_PATH=/clang64 \ + -DCMAKE_PREFIX_PATH=/"${MSYS2}" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DUSE_NATIVE_INSTRUCTIONS=OFF \ -DUSE_PRECOMPILED_HEADERS=OFF \ @@ -44,8 +47,8 @@ cmake .. \ -DUSE_DISCORD_RPC=ON \ -DOpenGL_GL_PREFERENCE=LEGACY \ -DWITH_LLVM=ON \ - -DLLVM_DIR=/clang64/lib/cmake/llvm \ - -DVulkan_LIBRARY=/clang64/lib/libvulkan-1.dll.a \ + -DLLVM_DIR=/"${MSYS2}"/lib/cmake/llvm \ + -DVulkan_LIBRARY=/"${MSYS2}"/lib/libvulkan-1.dll.a \ -DSTATIC_LINK_LLVM=ON \ -DBUILD_RPCS3_TESTS=OFF \ -DRUN_RPCS3_TESTS=OFF \ @@ -57,5 +60,5 @@ cd .. # If it compiled succesfully let's deploy. if [ "$build_status" -eq 0 ]; then - .ci/deploy-windows-clang.sh "x86_64" + .ci/deploy-windows-clang.sh "${CPU_ARCH}" "${MSYS2}" fi diff --git a/.ci/deploy-mac-arm64.sh b/.ci/deploy-mac-arm64.sh deleted file mode 100755 index 8a27d04676..0000000000 --- a/.ci/deploy-mac-arm64.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -ex - -# shellcheck disable=SC2086 -cd build || exit 1 - -# Gather explicit version number and number of commits -COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp) -COMM_COUNT=$(git rev-list --count HEAD) -COMM_HASH=$(git rev-parse --short=8 HEAD) - -AVVER="${COMM_TAG}-${COMM_COUNT}" - -# AVVER is used for GitHub releases, it is the version number. -echo "AVVER=$AVVER" >> ../.ci/ci-vars.env - -cd bin -mkdir "rpcs3.app/Contents/lib/" || true -mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true -wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-macos-privateapi.tar -tar -xvf MoltenVK-macos-privateapi.tar -cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib" -cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json" -sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json" - -cp "$(realpath /opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib" -cp "$(realpath /opt/homebrew/opt/gcc/lib/gcc/current/libgcc_s.1.1.dylib)" "rpcs3.app/Contents/Frameworks/libgcc_s.1.1.dylib" -cp "$(realpath /opt/homebrew/lib/libsharpyuv.0.dylib)" "rpcs3.app/Contents/lib/libsharpyuv.0.dylib" -cp "$(realpath /opt/homebrew/lib/libintl.8.dylib)" "rpcs3.app/Contents/lib/libintl.8.dylib" - -rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \ -"rpcs3.app/Contents/Frameworks/QtQml.framework" \ -"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \ -"rpcs3.app/Contents/Frameworks/QtQuick.framework" \ -"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \ -"rpcs3.app/Contents/Plugins/platforminputcontexts" \ -"rpcs3.app/Contents/Plugins/virtualkeyboard" \ -"rpcs3.app/Contents/Resources/git" - -../../.ci/optimize-mac.sh rpcs3.app - -# Download translations -mkdir -p "rpcs3.app/Contents/translations" -ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \ - | grep "browser_download_url" \ - | grep "RPCS3-languages.zip" \ - | cut -d '"' -f 4) -if [ -z "$ZIP_URL" ]; then - echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations." -else - echo "Downloading translations from: $ZIP_URL" - curl -L -o translations.zip "$ZIP_URL" || { - echo "Failed to download translations.zip. Continuing without translations." - exit 0 - } - unzip -o translations.zip -d "rpcs3.app/Contents/translations" >/dev/null 2>&1 || \ - echo "Failed to extract translations.zip. Continuing without translations." - rm -f translations.zip -fi - -# Hack -install_name_tool -delete_rpath /opt/homebrew/lib RPCS3.app/Contents/MacOS/rpcs3 || echo "Hack for deleting rpath /opt/homebrew/lib not needed" -install_name_tool -delete_rpath /opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/lib RPCS3.app/Contents/MacOS/rpcs3 || echo "Hack for deleting rpath /opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/lib not needed" - -# Need to do this rename hack due to case insensitive filesystem -mv rpcs3.app RPCS3_.app -mv RPCS3_.app RPCS3.app - -# NOTE: "--deep" is deprecated -codesign --deep -fs - RPCS3.app - -echo "[InternetShortcut]" > Quickstart.url -echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url -echo "IconIndex=0" >> Quickstart.url - -ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos_arm64.7z" -"/opt/homebrew/bin/7z" a -mx9 "$ARCHIVE_FILEPATH" RPCS3.app Quickstart.url -FILESIZE=$(stat -f %z "$ARCHIVE_FILEPATH") -SHA256SUM=$(shasum -a 256 "$ARCHIVE_FILEPATH" | awk '{ print $1 }') - -cd .. -echo "${SHA256SUM};${FILESIZE}B" > "$RELEASE_MESSAGE" -cd bin diff --git a/.ci/deploy-mac.sh b/.ci/deploy-mac.sh index ec71fe0262..819e0725bc 100755 --- a/.ci/deploy-mac.sh +++ b/.ci/deploy-mac.sh @@ -3,18 +3,7 @@ # shellcheck disable=SC2086 cd build || exit 1 -# Gather explicit version number and number of commits -COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp) -COMM_COUNT=$(git rev-list --count HEAD) -COMM_HASH=$(git rev-parse --short=8 HEAD) - -AVVER="${COMM_TAG}-${COMM_COUNT}" - -# AVVER is used for GitHub releases, it is the version number. -echo "AVVER=$AVVER" >> ../.ci/ci-vars.env - cd bin -mkdir "rpcs3.app/Contents/lib/" || true mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-macos-privateapi.tar tar -xvf MoltenVK-macos-privateapi.tar @@ -22,11 +11,8 @@ cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json" sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json" -cp "$(realpath /usr/local/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib" -cp "$(realpath /usr/local/opt/llvm@$LLVM_COMPILER_VER/lib/unwind/libunwind.1.dylib)" "rpcs3.app/Contents/Frameworks/libunwind.1.dylib" -cp "$(realpath /usr/local/opt/gcc/lib/gcc/current/libgcc_s.1.1.dylib)" "rpcs3.app/Contents/Frameworks/libgcc_s.1.1.dylib" -cp "$(realpath /usr/local/lib/libsharpyuv.0.dylib)" "rpcs3.app/Contents/lib/libsharpyuv.0.dylib" -cp "$(realpath /usr/local/lib/libintl.8.dylib)" "rpcs3.app/Contents/lib/libintl.8.dylib" +cp "$(realpath $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib" +cp "$(realpath $BREW_PATH/opt/gcc/lib/gcc/current/libgcc_s.1.1.dylib)" "rpcs3.app/Contents/Frameworks/libgcc_s.1.1.dylib" rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \ "rpcs3.app/Contents/Frameworks/QtQml.framework" \ @@ -35,7 +21,7 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \ "rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \ "rpcs3.app/Contents/Plugins/platforminputcontexts" \ "rpcs3.app/Contents/Plugins/virtualkeyboard" \ -"rpcs3.app/Contents/Resources/git" +"rpcs3.app/Contents/Resources/git" || true ../../.ci/optimize-mac.sh rpcs3.app @@ -58,13 +44,20 @@ else rm -f translations.zip fi +# Copy Qt translations manually +QT_TRANS="$WORKDIR/qt-downloader/$QT_VER/clang_64/translations" +cp $QT_TRANS/qt_*.qm rpcs3.app/Contents/translations +cp $QT_TRANS/qtbase_*.qm rpcs3.app/Contents/translations +cp $QT_TRANS/qtmultimedia_*.qm rpcs3.app/Contents/translations +rm -f rpcs3.app/Contents/translations/qt_help_*.qm || true + # Need to do this rename hack due to case insensitive filesystem mv rpcs3.app RPCS3_.app mv RPCS3_.app RPCS3.app # Hack -install_name_tool -delete_rpath /usr/local/lib RPCS3.app/Contents/MacOS/rpcs3 -#-delete_rpath /usr/local/Cellar/sdl3/3.2.8/lib +install_name_tool -delete_rpath /opt/homebrew/lib RPCS3.app/Contents/MacOS/rpcs3 || true +install_name_tool -delete_rpath /usr/local/lib RPCS3.app/Contents/MacOS/rpcs3 || true # NOTE: "--deep" is deprecated codesign --deep -fs - RPCS3.app @@ -73,8 +66,12 @@ echo "[InternetShortcut]" > Quickstart.url echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url echo "IconIndex=0" >> Quickstart.url -ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos.7z" -"/opt/homebrew/bin/7z" a -mx9 "$ARCHIVE_FILEPATH" RPCS3.app Quickstart.url +if [ "$AARCH64" -eq 1 ]; then + ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos_aarch64.7z" +else + ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos.7z" +fi +7z a -mx9 "$ARCHIVE_FILEPATH" RPCS3.app Quickstart.url FILESIZE=$(stat -f %z "$ARCHIVE_FILEPATH") SHA256SUM=$(shasum -a 256 "$ARCHIVE_FILEPATH" | awk '{ print $1 }') diff --git a/.ci/deploy-windows-clang.sh b/.ci/deploy-windows-clang.sh index c95f82e7b8..07b4866fc4 100644 --- a/.ci/deploy-windows-clang.sh +++ b/.ci/deploy-windows-clang.sh @@ -7,12 +7,13 @@ cd build || exit 1 CPU_ARCH="${1:-x86_64}" +MSYS2="${2:-clang64}" echo "Deploying rpcs3 windows clang $CPU_ARCH" # BUILD_blablabla is CI specific, so we wrap it for portability ARTIFACT_DIR=$(cygpath -u "$BUILD_ARTIFACTSTAGINGDIRECTORY") -MSYS2_CLANG_BIN=$(cygpath -w /clang64/bin) +MSYS2_CLANG_BIN=$(cygpath -w /"${MSYS2}"/bin) MSYS2_USR_BIN=$(cygpath -w /usr/bin) echo "Installing dependencies of: ./bin/rpcs3.exe (MSYS2 dir is '$MSYS2_CLANG_BIN', usr dir is '$MSYS2_USR_BIN')" @@ -22,7 +23,7 @@ cmake -DMSYS2_CLANG_BIN="$MSYS2_CLANG_BIN" -DMSYS2_USR_BIN="$MSYS2_USR_BIN" -Dex mkdir ./bin/config mkdir ./bin/config/input_configs curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt -curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat +curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat # Download translations mkdir -p ./bin/share/qt6/translations @@ -38,7 +39,7 @@ else echo "Failed to download translations.zip. Continuing without translations." exit 0 } - unzip -o translations.zip -d "./bin/share/qt6/translations" >/dev/null 2>&1 || \ + 7z x translations.zip -o"./bin/share/qt6/translations" >/dev/null 2>&1 || \ echo "Failed to extract translations.zip. Continuing without translations." rm -f translations.zip fi @@ -49,7 +50,7 @@ fi # Generate sha256 hashes # Write to file for GitHub releases sha256sum "$BUILD" | awk '{ print $1 }' | tee "$BUILD.sha256" -echo "$(cat "$BUILD.sha256");$(stat -c %s "$BUILD")B" > GitHubReleaseMessage.txt +echo "$(cat "$BUILD.sha256");$(stat -c %s "$BUILD")B" > "$RELEASE_MESSAGE" # Move files to publishing directory mkdir -p "$ARTIFACT_DIR" diff --git a/.ci/setup-llvm.sh b/.ci/setup-llvm.sh index a54901309e..5d06222f04 100644 --- a/.ci/setup-llvm.sh +++ b/.ci/setup-llvm.sh @@ -1,7 +1,7 @@ #!/bin/sh -ex # Resource/dependency URLs -CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.11.2/ccache-4.11.2-windows-x86_64.zip" +CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.12.3/ccache-4.12.3-windows-x86_64.zip" DEP_URLS=" \ $CCACHE_URL" @@ -28,11 +28,23 @@ download_and_verify() correctChecksum="$2" algo="$3" fileName="$4" + path="$DEPS_CACHE_DIR/$fileName" for _ in 1 2 3; do - [ -e "$DEPS_CACHE_DIR/$fileName" ] || curl -fLo "$DEPS_CACHE_DIR/$fileName" "$url" - fileChecksum=$("${algo}sum" "$DEPS_CACHE_DIR/$fileName" | awk '{ print $1 }') - [ "$fileChecksum" = "$correctChecksum" ] && return 0 + # Check if the file exists and the checksum is correct + if [ -e "$path" ]; then + fileChecksum=$("${algo}sum" "$path" | awk '{ print $1 }') + [ "$fileChecksum" = "$correctChecksum" ] && return 0 + fi + + # Otherwise download the file + curl -fLo "$path" "$url" + + # Check again if the file exists and the checksum is correct + if [ -e "$path" ]; then + fileChecksum=$("${algo}sum" "$path" | awk '{ print $1 }') + [ "$fileChecksum" = "$correctChecksum" ] && return 0 + fi done return 1; diff --git a/.ci/setup-windows-ci-vars.sh b/.ci/setup-windows-ci-vars.sh index 11373e0716..369450972c 100644 --- a/.ci/setup-windows-ci-vars.sh +++ b/.ci/setup-windows-ci-vars.sh @@ -13,14 +13,21 @@ COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_ COMM_COUNT=$(git rev-list --count HEAD) COMM_HASH=$(git rev-parse --short=8 HEAD) +# Differentiate Windows builds +if [ "$COMPILER" = 'clang' ];then + BUILD_SUFFIX="win64_${CPU_ARCH}_${COMPILER}" +else + BUILD_SUFFIX="${CPU_ARCH}_${COMPILER}" +fi + # Format the above into filenames if [ -n "$PR_NUMBER" ]; then AVVER="${COMM_TAG}-${COMM_HASH}" - BUILD_RAW="rpcs3-v${AVVER}_${CPU_ARCH}_${COMPILER}" + BUILD_RAW="rpcs3-v${AVVER}_${BUILD_SUFFIX}" BUILD="${BUILD_RAW}.7z" else AVVER="${COMM_TAG}-${COMM_COUNT}" - BUILD_RAW="rpcs3-v${AVVER}-${COMM_HASH}_${CPU_ARCH}_${COMPILER}" + BUILD_RAW="rpcs3-v${AVVER}-${COMM_HASH}_${BUILD_SUFFIX}" BUILD="${BUILD_RAW}.7z" fi diff --git a/.ci/setup-windows.sh b/.ci/setup-windows.sh index f637cec9ad..d8016d8c13 100755 --- a/.ci/setup-windows.sh +++ b/.ci/setup-windows.sh @@ -6,7 +6,7 @@ QT_HOST="http://qt.mirror.constant.com/" QT_URL_VER=$(echo "$QT_VER" | sed "s/\.//g") QT_VER_MSVC_UP=$(echo "${QT_VER_MSVC}" | tr '[:lower:]' '[:upper:]') -QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}/qt.qt${QT_VER_MAIN}.${QT_URL_VER}." +QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}_${QT_VER_MSVC}_64/qt.qt${QT_VER_MAIN}.${QT_URL_VER}." QT_PREFIX_2="win64_${QT_VER_MSVC}_64/${QT_VER}-0-${QT_DATE}" QT_SUFFIX="-Windows-Windows_11_24H2-${QT_VER_MSVC_UP}-Windows-Windows_11_24H2-X86_64.7z" QT_BASE_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtbase${QT_SUFFIX}" @@ -14,9 +14,10 @@ QT_DECL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtdeclarative${QT_SUFFIX}" QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}" QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}" QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}" +QT_TRANSLATIONS_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttranslations${QT_SUFFIX}" LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z" VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1" -CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.11.2/ccache-4.11.2-windows-x86_64.zip" +CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.12.3/ccache-4.12.3-windows-x86_64.zip" DEP_URLS=" \ $QT_BASE_URL \ @@ -24,6 +25,7 @@ DEP_URLS=" \ $QT_TOOL_URL \ $QT_MM_URL \ $QT_SVG_URL \ + $QT_TRANSLATIONS_URL \ $LLVMLIBS_URL \ $VULKAN_SDK_URL\ $CCACHE_URL" @@ -51,11 +53,23 @@ download_and_verify() correctChecksum="$2" algo="$3" fileName="$4" + path="$DEPS_CACHE_DIR/$fileName" for _ in 1 2 3; do - [ -e "$DEPS_CACHE_DIR/$fileName" ] || curl -fLo "$DEPS_CACHE_DIR/$fileName" "$url" - fileChecksum=$("${algo}sum" "$DEPS_CACHE_DIR/$fileName" | awk '{ print $1 }') - [ "$fileChecksum" = "$correctChecksum" ] && return 0 + # Check if the file exists and the checksum is correct + if [ -e "$path" ]; then + fileChecksum=$("${algo}sum" "$path" | awk '{ print $1 }') + [ "$fileChecksum" = "$correctChecksum" ] && return 0 + fi + + # Otherwise download the file + curl -fLo "$path" "$url" + + # Check again if the file exists and the checksum is correct + if [ -e "$path" ]; then + fileChecksum=$("${algo}sum" "$path" | awk '{ print $1 }') + [ "$fileChecksum" = "$correctChecksum" ] && return 0 + fi done return 1; diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index e3e3e76c50..3ed584437a 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -20,7 +20,7 @@ jobs: runs-on: windows-2025 env: COMPILER: msvc - CCACHE_SHA: '1f39f3ad5aae3fe915e99ad1302633bc8f6718e58fa7c0de2b0ba7e080f0f08c' + CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf' CCACHE_BIN_DIR: 'C:\ccache_bin' CCACHE_DIR: 'C:\ccache' CCACHE_INODECACHE: 'true' diff --git a/.github/workflows/rpcs3.yml b/.github/workflows/rpcs3.yml index 1edd6aa9b8..f474643e09 100644 --- a/.github/workflows/rpcs3.yml +++ b/.github/workflows/rpcs3.yml @@ -30,23 +30,23 @@ jobs: matrix: include: - os: ubuntu-24.04 - docker_img: "rpcs3/rpcs3-ci-jammy:1.7" + docker_img: "rpcs3/rpcs3-ci-jammy:1.10" build_sh: "/rpcs3/.ci/build-linux.sh" compiler: clang UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux" - os: ubuntu-24.04 - docker_img: "rpcs3/rpcs3-ci-jammy:1.7" + docker_img: "rpcs3/rpcs3-ci-jammy:1.10" build_sh: "/rpcs3/.ci/build-linux.sh" compiler: gcc - os: ubuntu-24.04-arm - docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.7" + docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.10" build_sh: "/rpcs3/.ci/build-linux-aarch64.sh" compiler: clang UPLOAD_COMMIT_HASH: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1 UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-arm64" - os: ubuntu-24.04-arm - docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.7" + docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.10" build_sh: "/rpcs3/.ci/build-linux-aarch64.sh" compiler: gcc name: RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} @@ -123,23 +123,24 @@ jobs: matrix: include: - name: Intel - build_sh: .ci/build-mac.sh + AARCH64: 0 UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842 UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac - name: Apple Silicon - build_sh: .ci/build-mac-arm64.sh + AARCH64: 1 UPLOAD_COMMIT_HASH: 8e21bdbc40711a3fccd18fbf17b742348b0f4281 UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac-arm64 name: RPCS3 Mac ${{ matrix.name }} runs-on: macos-14 env: CCACHE_DIR: /tmp/ccache_dir - QT_VER: '6.10.1' + QT_VER: '6.11.0' QT_VER_MAIN: '6' LLVM_COMPILER_VER: '21' RELEASE_MESSAGE: ../GitHubReleaseMessage.txt UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }} UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }} + AARCH64: ${{ matrix.AARCH64 }} RUN_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF' steps: - name: Checkout repository @@ -164,7 +165,7 @@ jobs: restore-keys: ${{ runner.os }}-qt-${{ matrix.name }}-${{ env.QT_VER }} - name: Build - run: ${{ matrix.build_sh }} + run: .ci/build-mac.sh - name: Upload artifacts uses: actions/upload-artifact@main @@ -212,13 +213,13 @@ jobs: env: COMPILER: msvc QT_VER_MAIN: '6' - QT_VER: '6.10.1' + QT_VER: '6.11.0' QT_VER_MSVC: 'msvc2022' - QT_DATE: '202511161843' + QT_DATE: '202603180535' LLVM_VER: '19.1.7' VULKAN_VER: '1.3.268.0' VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5' - CCACHE_SHA: '1f39f3ad5aae3fe915e99ad1302633bc8f6718e58fa7c0de2b0ba7e080f0f08c' + CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf' CCACHE_BIN_DIR: 'C:\ccache_bin' CCACHE_DIR: 'C:\ccache' CCACHE_INODECACHE: 'true' @@ -328,16 +329,25 @@ jobs: Windows_Build_Clang: # Only run push event on master branch of main repo, but run all PRs if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master') - name: RPCS3 Windows Clang - runs-on: windows-2025 strategy: + fail-fast: false matrix: include: - msys2: clang64 compiler: clang - arch: win64 + arch: x86_64 + os: windows-2025 + name: X64 + - msys2: clangarm64 + compiler: clang + arch: aarch64 + os: windows-11-arm + name: ARM64 env: CCACHE_DIR: 'C:\ccache' + RELEASE_MESSAGE: ../GitHubReleaseMessage.txt + name: RPCS3 Windows Clang ${{ matrix.arch }} + runs-on: ${{ matrix.os }} steps: - name: Checkout repository uses: actions/checkout@main @@ -351,23 +361,26 @@ jobs: update: true cache: true install: | - mingw-w64-clang-x86_64-clang - mingw-w64-clang-x86_64-ccache - mingw-w64-clang-x86_64-cmake - mingw-w64-clang-x86_64-lld - mingw-w64-clang-x86_64-ninja - mingw-w64-clang-x86_64-llvm - mingw-w64-clang-x86_64-ffmpeg - mingw-w64-clang-x86_64-opencv - mingw-w64-clang-x86_64-glew - mingw-w64-clang-x86_64-vulkan - mingw-w64-clang-x86_64-vulkan-headers - mingw-w64-clang-x86_64-vulkan-loader - mingw-w64-clang-x86_64-gtest - mingw-w64-clang-x86_64-qt6-base - mingw-w64-clang-x86_64-qt6-declarative - mingw-w64-clang-x86_64-qt6-multimedia - mingw-w64-clang-x86_64-qt6-svg + mingw-w64-clang-${{ matrix.arch }}-clang + mingw-w64-clang-${{ matrix.arch }}-ccache + mingw-w64-clang-${{ matrix.arch }}-cmake + mingw-w64-clang-${{ matrix.arch }}-lld + mingw-w64-clang-${{ matrix.arch }}-ninja + mingw-w64-clang-${{ matrix.arch }}-llvm + mingw-w64-clang-${{ matrix.arch }}-ffmpeg + mingw-w64-clang-${{ matrix.arch }}-opencv + mingw-w64-clang-${{ matrix.arch }}-iconv + mingw-w64-clang-${{ matrix.arch }}-glew + mingw-w64-clang-${{ matrix.arch }}-vulkan + mingw-w64-clang-${{ matrix.arch }}-vulkan-headers + mingw-w64-clang-${{ matrix.arch }}-vulkan-loader + mingw-w64-clang-${{ matrix.arch }}-gtest + mingw-w64-clang-${{ matrix.arch }}-qt6-base + mingw-w64-clang-${{ matrix.arch }}-qt6-declarative + mingw-w64-clang-${{ matrix.arch }}-qt6-multimedia + mingw-w64-clang-${{ matrix.arch }}-qt6-svg + mingw-w64-clang-${{ matrix.arch }}-qt6-tools + mingw-w64-clang-${{ matrix.arch }}-qt6-translations base-devel curl git @@ -378,8 +391,8 @@ jobs: id: restore-build-ccache with: path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{ github.run_id }} - restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}- + key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ matrix.arch }}-${{ github.run_id }} + restore-keys: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ matrix.arch }}- - name: Build RPCS3 shell: msys2 {0} @@ -387,7 +400,25 @@ jobs: export CCACHE_DIR=$(cygpath -u "$CCACHE_DIR") echo "CCACHE_DIR=$CCACHE_DIR" .ci/setup-windows-ci-vars.sh ${{ matrix.arch }} ${{ matrix.compiler }} - .ci/build-windows-clang.sh + .ci/build-windows-clang.sh ${{ matrix.arch }} ${{ matrix.msys2 }} + + - name: Deploy master build to GitHub Releases (only aarch64) + if: | + matrix.arch == 'aarch64' && + github.event_name != 'pull_request' && + github.repository == 'RPCS3/rpcs3' && + github.ref == 'refs/heads/master' + env: + RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }} + # We specify it here since this upload is specific to arm64 + UPLOAD_COMMIT_HASH: ee05050fd1d8488148a771b526702656a10dacf0 + UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win-arm64" + run: | + COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp) + COMM_COUNT=$(git rev-list --count HEAD) + COMM_HASH=$(git rev-parse --short=8 HEAD) + export AVVER="${COMM_TAG}-${COMM_COUNT}" + .ci/github-upload.sh - name: Save build Ccache if: github.ref == 'refs/heads/master' @@ -399,7 +430,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@main with: - name: RPCS3 for Windows (${{ runner.arch }}, ${{ matrix.compiler }}) + name: RPCS3 for Windows (${{ matrix.name }}, clang) path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }} compression-level: 0 if-no-files-found: error @@ -413,7 +444,11 @@ jobs: env: CCACHE_DIR: ${{ github.workspace }}/ccache QT_VER_MAIN: '6' - LLVM_COMPILER_VER: '19' + LLVM_COMPILER_VER: '-devel' + CC: 'clang-devel' + CXX: 'clang++-devel' + LLVM_CONFIG: 'llvm-config-devel' + steps: - name: Checkout repository uses: actions/checkout@main @@ -432,8 +467,10 @@ jobs: id: root uses: vmactions/freebsd-vm@v1 with: - envs: 'QT_VER_MAIN LLVM_COMPILER_VER CCACHE_DIR' + envs: 'QT_VER_MAIN LLVM_COMPILER_VER CCACHE_DIR CC CXX LLVM_CONFIG' usesh: true + copyback: false + release: "14.3" run: .ci/install-freebsd.sh && .ci/build-freebsd.sh - name: Save Build Ccache diff --git a/.gitignore b/.gitignore index 4688d5fa52..a3911be3a0 100644 --- a/.gitignore +++ b/.gitignore @@ -69,6 +69,9 @@ CMakeSettings.json *PVS-Studio* PVS/* +# Zed Editor files +.zed/* + # Ignore other system generated files x64/* rpcs3/x64/* diff --git a/.gitmodules b/.gitmodules index 77fae5cf55..4c1c0f0f12 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,10 +52,6 @@ path = 3rdparty/wolfssl/wolfssl url = ../../wolfSSL/wolfssl.git ignore = dirty -[submodule "3rdparty/flatbuffers"] - path = 3rdparty/flatbuffers - url = ../../google/flatbuffers.git - ignore = dirty [submodule "3rdparty/cubeb/cubeb"] path = 3rdparty/cubeb/cubeb url = ../../mozilla/cubeb.git @@ -112,3 +108,7 @@ path = 3rdparty/feralinteractive/feralinteractive url = ../../FeralInteractive/gamemode.git ignore = dirty +[submodule "3rdparty/protobuf/protobuf"] + path = 3rdparty/protobuf/protobuf + url = ../../protocolbuffers/protobuf.git + ignore = dirty diff --git a/3rdparty/7zip/7zip b/3rdparty/7zip/7zip index 5e96a82794..839151eaaa 160000 --- a/3rdparty/7zip/7zip +++ b/3rdparty/7zip/7zip @@ -1 +1 @@ -Subproject commit 5e96a8279489832924056b1fa82f29d5837c9469 +Subproject commit 839151eaaad24771892afaae6bac690e31e58384 diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index a800ba1dd5..b25afb8834 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -25,18 +25,8 @@ add_subdirectory(zstd EXCLUDE_FROM_ALL) # 7zip sdk add_subdirectory(7zip EXCLUDE_FROM_ALL) -add_library(3rdparty_flatbuffers INTERFACE) -if (USE_SYSTEM_FLATBUFFERS) - pkg_check_modules(FLATBUFFERS REQUIRED IMPORTED_TARGET flatbuffers>=2.0.0) - target_link_libraries(3rdparty_flatbuffers INTERFACE PkgConfig::FLATBUFFERS) - set(FBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../rpcs3/Emu/NP/generated/") - execute_process(COMMAND flatc --cpp -o "${FBS_DIR}" "${FBS_DIR}/np2_structs.fbs" RESULT_VARIABLE FBS_CMD_ERROR) - if(FBS_CMD_ERROR AND NOT FBS_CMD_ERROR EQUAL 0) - message(FATAL_ERROR "flatc failed to regenerate flatbuffers headers.") - endif() -else() - target_include_directories(3rdparty_flatbuffers SYSTEM INTERFACE flatbuffers/include) -endif() +# Protobuf +add_subdirectory(protobuf EXCLUDE_FROM_ALL) # libPNG add_subdirectory(libpng EXCLUDE_FROM_ALL) @@ -107,7 +97,7 @@ add_subdirectory(yaml-cpp) # OpenGL -if (NOT ANDROID) +if (NOT ANDROID AND NOT APPLE) find_package(OpenGL REQUIRED OPTIONAL_COMPONENTS EGL) add_library(3rdparty_opengl INTERFACE) @@ -119,8 +109,6 @@ if (NOT ANDROID) else() target_link_libraries(3rdparty_opengl INTERFACE dxgi.lib d2d1.lib dwrite.lib) endif() - elseif(APPLE) - target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU) else() target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU OpenGL::GLX) endif() @@ -335,7 +323,7 @@ endif() # GLEW add_library(3rdparty_glew INTERFACE) -if(NOT MSVC AND NOT ANDROID) +if(NOT MSVC AND NOT ANDROID AND NOT APPLE) find_package(GLEW REQUIRED) target_link_libraries(3rdparty_glew INTERFACE GLEW::GLEW) endif() @@ -374,7 +362,7 @@ endif() add_library(3rdparty::zlib ALIAS 3rdparty_zlib) add_library(3rdparty::zstd ALIAS 3rdparty_zstd) add_library(3rdparty::7zip ALIAS 3rdparty_7zip) -add_library(3rdparty::flatbuffers ALIAS 3rdparty_flatbuffers) +add_library(3rdparty::protobuf ALIAS 3rdparty_protobuf) add_library(3rdparty::pugixml ALIAS pugixml) add_library(3rdparty::glslang ALIAS 3rdparty_glslang) add_library(3rdparty::yaml-cpp ALIAS yaml-cpp) diff --git a/3rdparty/FAudio b/3rdparty/FAudio index 4ea8afea6b..0372329dbb 160000 --- a/3rdparty/FAudio +++ b/3rdparty/FAudio @@ -1 +1 @@ -Subproject commit 4ea8afea6ba857c24e40877f487d000d559b196d +Subproject commit 0372329dbb56e7814d0dea7b6eafa7a613bd8042 diff --git a/3rdparty/GL/glext.h b/3rdparty/GL/glext.h index 276a962a96..16c26be10f 100644 --- a/3rdparty/GL/glext.h +++ b/3rdparty/GL/glext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright 2013-2020 The Khronos Group Inc. +** Copyright 2013-2026 The Khronos Group Inc. ** SPDX-License-Identifier: MIT ** ** This header is generated from the Khronos OpenGL / OpenGL ES XML @@ -32,7 +32,7 @@ extern "C" { #define GLAPI extern #endif -#define GL_GLEXT_VERSION 20250203 +#define GL_GLEXT_VERSION 20260126 #include @@ -7358,6 +7358,47 @@ GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const voi #endif #endif /* GL_EXT_fog_coord */ +#ifndef GL_EXT_fragment_shading_rate +#define GL_EXT_fragment_shading_rate 1 +#define GL_SHADING_RATE_1X1_PIXELS_EXT 0x96A6 +#define GL_SHADING_RATE_1X2_PIXELS_EXT 0x96A7 +#define GL_SHADING_RATE_2X1_PIXELS_EXT 0x96A8 +#define GL_SHADING_RATE_2X2_PIXELS_EXT 0x96A9 +#define GL_SHADING_RATE_1X4_PIXELS_EXT 0x96AA +#define GL_SHADING_RATE_4X1_PIXELS_EXT 0x96AB +#define GL_SHADING_RATE_4X2_PIXELS_EXT 0x96AC +#define GL_SHADING_RATE_2X4_PIXELS_EXT 0x96AD +#define GL_SHADING_RATE_4X4_PIXELS_EXT 0x96AE +#define GL_SHADING_RATE_EXT 0x96D0 +#define GL_SHADING_RATE_ATTACHMENT_EXT 0x96D1 +#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT 0x96D2 +#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT 0x96D3 +#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT 0x96D4 +#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT 0x96D5 +#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT 0x96D6 +#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D7 +#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D8 +#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96D9 +#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96DA +#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT 0x96DB +#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT 0x96DC +#define GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT 0x96DD +#define GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT 0x96DE +#define GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT 0x96DF +#define GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT 0x8F6F +#define GL_FRAGMENT_SHADING_RATE_PRIMITIVE_RATE_WITH_MULTI_VIEWPORT_SUPPORTED_EXT 0x9780 +typedef void (APIENTRYP PFNGLGETFRAGMENTSHADINGRATESEXTPROC) (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates); +typedef void (APIENTRYP PFNGLSHADINGRATEEXTPROC) (GLenum rate); +typedef void (APIENTRYP PFNGLSHADINGRATECOMBINEROPSEXTPROC) (GLenum combinerOp0, GLenum combinerOp1); +typedef void (APIENTRYP PFNGLFRAMEBUFFERSHADINGRATEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetFragmentShadingRatesEXT (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates); +GLAPI void APIENTRY glShadingRateEXT (GLenum rate); +GLAPI void APIENTRY glShadingRateCombinerOpsEXT (GLenum combinerOp0, GLenum combinerOp1); +GLAPI void APIENTRY glFramebufferShadingRateEXT (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight); +#endif +#endif /* GL_EXT_fragment_shading_rate */ + #ifndef GL_EXT_framebuffer_blit #define GL_EXT_framebuffer_blit 1 #define GL_READ_FRAMEBUFFER_EXT 0x8CA8 @@ -7816,6 +7857,86 @@ GLAPI void APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GL #endif #endif /* GL_EXT_memory_object_win32 */ +#ifndef GL_EXT_mesh_shader +#define GL_EXT_mesh_shader 1 +#define GL_MESH_SHADER_EXT 0x9559 +#define GL_TASK_SHADER_EXT 0x955A +#define GL_MAX_MESH_UNIFORM_BLOCKS_EXT 0x8E60 +#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_EXT 0x8E61 +#define GL_MAX_MESH_IMAGE_UNIFORMS_EXT 0x8E62 +#define GL_MAX_MESH_UNIFORM_COMPONENTS_EXT 0x8E63 +#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_EXT 0x8E64 +#define GL_MAX_MESH_ATOMIC_COUNTERS_EXT 0x8E65 +#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_EXT 0x8E66 +#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_EXT 0x8E67 +#define GL_MAX_TASK_UNIFORM_BLOCKS_EXT 0x8E68 +#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_EXT 0x8E69 +#define GL_MAX_TASK_IMAGE_UNIFORMS_EXT 0x8E6A +#define GL_MAX_TASK_UNIFORM_COMPONENTS_EXT 0x8E6B +#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_EXT 0x8E6C +#define GL_MAX_TASK_ATOMIC_COUNTERS_EXT 0x8E6D +#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_EXT 0x8E6E +#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_EXT 0x8E6F +#define GL_MAX_TASK_WORK_GROUP_TOTAL_COUNT_EXT 0x9740 +#define GL_MAX_MESH_WORK_GROUP_TOTAL_COUNT_EXT 0x9741 +#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_EXT 0x9757 +#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_EXT 0x9759 +#define GL_MAX_TASK_PAYLOAD_SIZE_EXT 0x9742 +#define GL_MAX_TASK_SHARED_MEMORY_SIZE_EXT 0x9743 +#define GL_MAX_MESH_SHARED_MEMORY_SIZE_EXT 0x9744 +#define GL_MAX_TASK_PAYLOAD_AND_SHARED_MEMORY_SIZE_EXT 0x9745 +#define GL_MAX_MESH_PAYLOAD_AND_SHARED_MEMORY_SIZE_EXT 0x9746 +#define GL_MAX_MESH_OUTPUT_MEMORY_SIZE_EXT 0x9747 +#define GL_MAX_MESH_PAYLOAD_AND_OUTPUT_MEMORY_SIZE_EXT 0x9748 +#define GL_MAX_MESH_OUTPUT_VERTICES_EXT 0x9538 +#define GL_MAX_MESH_OUTPUT_PRIMITIVES_EXT 0x9756 +#define GL_MAX_MESH_OUTPUT_COMPONENTS_EXT 0x9749 +#define GL_MAX_MESH_OUTPUT_LAYERS_EXT 0x974A +#define GL_MAX_MESH_MULTIVIEW_VIEW_COUNT_EXT 0x9557 +#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_EXT 0x92DF +#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_EXT 0x9543 +#define GL_MAX_PREFERRED_TASK_WORK_GROUP_INVOCATIONS_EXT 0x974B +#define GL_MAX_PREFERRED_MESH_WORK_GROUP_INVOCATIONS_EXT 0x974C +#define GL_MESH_PREFERS_LOCAL_INVOCATION_VERTEX_OUTPUT_EXT 0x974D +#define GL_MESH_PREFERS_LOCAL_INVOCATION_PRIMITIVE_OUTPUT_EXT 0x974E +#define GL_MESH_PREFERS_COMPACT_VERTEX_OUTPUT_EXT 0x974F +#define GL_MESH_PREFERS_COMPACT_PRIMITIVE_OUTPUT_EXT 0x9750 +#define GL_MAX_TASK_WORK_GROUP_COUNT_EXT 0x9751 +#define GL_MAX_MESH_WORK_GROUP_COUNT_EXT 0x9752 +#define GL_MAX_MESH_WORK_GROUP_SIZE_EXT 0x9758 +#define GL_MAX_TASK_WORK_GROUP_SIZE_EXT 0x975A +#define GL_MESH_WORK_GROUP_SIZE_EXT 0x953E +#define GL_TASK_WORK_GROUP_SIZE_EXT 0x953F +#define GL_MESH_VERTICES_OUT_EXT 0x9579 +#define GL_MESH_PRIMITIVES_OUT_EXT 0x957A +#define GL_MESH_OUTPUT_TYPE_EXT 0x957B +#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_EXT 0x959C +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_EXT 0x959D +#define GL_REFERENCED_BY_MESH_SHADER_EXT 0x95A0 +#define GL_REFERENCED_BY_TASK_SHADER_EXT 0x95A1 +#define GL_TASK_SHADER_INVOCATIONS_EXT 0x9753 +#define GL_MESH_SHADER_INVOCATIONS_EXT 0x9754 +#define GL_MESH_PRIMITIVES_GENERATED_EXT 0x9755 +#define GL_MESH_SHADER_BIT_EXT 0x00000040 +#define GL_TASK_SHADER_BIT_EXT 0x00000080 +#define GL_MESH_SUBROUTINE_EXT 0x957C +#define GL_TASK_SUBROUTINE_EXT 0x957D +#define GL_MESH_SUBROUTINE_UNIFORM_EXT 0x957E +#define GL_TASK_SUBROUTINE_UNIFORM_EXT 0x957F +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_EXT 0x959E +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_EXT 0x959F +typedef void (APIENTRYP PFNGLDRAWMESHTASKSEXTPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (APIENTRYP PFNGLDRAWMESHTASKSINDIRECTEXTPROC) (GLintptr indirect); +typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTEXTPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTEXTPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshTasksEXT (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GLAPI void APIENTRY glDrawMeshTasksIndirectEXT (GLintptr indirect); +GLAPI void APIENTRY glMultiDrawMeshTasksIndirectEXT (GLintptr indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawMeshTasksIndirectCountEXT (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_EXT_mesh_shader */ + #ifndef GL_EXT_misc_attribute #define GL_EXT_misc_attribute 1 #endif /* GL_EXT_misc_attribute */ diff --git a/3rdparty/OpenAL/openal-soft b/3rdparty/OpenAL/openal-soft index 0e5e98e4ac..c41d64c6a3 160000 --- a/3rdparty/OpenAL/openal-soft +++ b/3rdparty/OpenAL/openal-soft @@ -1 +1 @@ -Subproject commit 0e5e98e4ac8adae92e4f7653dd6eee17aa9c8791 +Subproject commit c41d64c6a35f6174bf4a27010aeac52a8d3bb2c6 diff --git a/3rdparty/SoundTouch/soundtouch b/3rdparty/SoundTouch/soundtouch index 3982730833..a0fba77b6f 160000 --- a/3rdparty/SoundTouch/soundtouch +++ b/3rdparty/SoundTouch/soundtouch @@ -1 +1 @@ -Subproject commit 3982730833b6daefe77dcfb32b5c282851640c17 +Subproject commit a0fba77b6f9cfbdb71f8bbec58b6ac4e5e3b1097 diff --git a/3rdparty/cubeb/cubeb b/3rdparty/cubeb/cubeb index e495bee4cd..484857522c 160000 --- a/3rdparty/cubeb/cubeb +++ b/3rdparty/cubeb/cubeb @@ -1 +1 @@ -Subproject commit e495bee4cd630c9f99907a764e16edba37a4b564 +Subproject commit 484857522c73318c06f18ba0a3e17525fa98c608 diff --git a/3rdparty/curl/CMakeLists.txt b/3rdparty/curl/CMakeLists.txt index b20763af65..2b725169f9 100644 --- a/3rdparty/curl/CMakeLists.txt +++ b/3rdparty/curl/CMakeLists.txt @@ -18,9 +18,6 @@ else() set(USE_LIBIDN2 OFF CACHE BOOL "Use libidn2 for IDN support") # Disabled because MacOS CI doesn't work otherwise set(CURL_CA_PATH "none" CACHE STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") option(CURL_DISABLE_INSTALL "Disable installation targets" ON) - if(USE_MSVC_STATIC_CRT) - set(CURL_STATIC_CRT ON CACHE BOOL "Use static crt to build curl") - endif() if(WIN32) set(ENABLE_UNICODE ON CACHE BOOL "enable Unicode") endif() diff --git a/3rdparty/curl/curl b/3rdparty/curl/curl index 400fffa90f..8c908d2d0a 160000 --- a/3rdparty/curl/curl +++ b/3rdparty/curl/curl @@ -1 +1 @@ -Subproject commit 400fffa90f30c7a2dc762fa33009d24851bd2016 +Subproject commit 8c908d2d0a6d32abdedda2c52e90bd56ec76c24d diff --git a/3rdparty/curl/libcurl.vcxproj b/3rdparty/curl/libcurl.vcxproj index dae28be346..4db28782a3 100644 --- a/3rdparty/curl/libcurl.vcxproj +++ b/3rdparty/curl/libcurl.vcxproj @@ -79,12 +79,16 @@ + + + + @@ -106,6 +110,7 @@ + @@ -169,14 +174,13 @@ - + - @@ -184,10 +188,8 @@ - - @@ -204,6 +206,7 @@ + @@ -224,13 +227,11 @@ - - @@ -272,6 +273,7 @@ + @@ -280,6 +282,9 @@ + + + @@ -300,9 +305,7 @@ - - @@ -312,6 +315,7 @@ + @@ -352,7 +356,6 @@ - @@ -367,7 +370,7 @@ - + @@ -376,7 +379,6 @@ - @@ -384,7 +386,6 @@ - @@ -405,6 +406,7 @@ + @@ -418,12 +420,10 @@ - - diff --git a/3rdparty/curl/libcurl.vcxproj.filters b/3rdparty/curl/libcurl.vcxproj.filters index 17f760c54b..d38316e767 100644 --- a/3rdparty/curl/libcurl.vcxproj.filters +++ b/3rdparty/curl/libcurl.vcxproj.filters @@ -204,9 +204,6 @@ Source Files - - Source Files - Source Files @@ -222,9 +219,6 @@ Source Files - - Source Files - Source Files @@ -246,18 +240,12 @@ Source Files - - Source Files - Source Files Source Files - - Source Files - Source Files @@ -318,9 +306,6 @@ Source Files - - Source Files - Source Files @@ -333,9 +318,6 @@ Source Files - - Source Files - Source Files @@ -549,6 +531,27 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + @@ -653,9 +656,6 @@ Header Files - - Header Files - Header Files @@ -758,9 +758,6 @@ Header Files - - Header Files - Header Files @@ -791,9 +788,6 @@ Header Files - - Header Files - Header Files @@ -812,9 +806,6 @@ Header Files - - Header Files - Header Files @@ -836,9 +827,6 @@ Header Files - - Header Files - Header Files @@ -887,9 +875,6 @@ Header Files - - Header Files - Header Files @@ -899,9 +884,6 @@ Header Files - - Header Files - Header Files @@ -1103,9 +1085,6 @@ Header Files - - Header Files - Header Files @@ -1121,6 +1100,27 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + diff --git a/3rdparty/ffmpeg b/3rdparty/ffmpeg index ec6367d3ba..ce81114ed9 160000 --- a/3rdparty/ffmpeg +++ b/3rdparty/ffmpeg @@ -1 +1 @@ -Subproject commit ec6367d3ba9d0d57b9d22d4b87da8144acaf428f +Subproject commit ce81114ed99e5510f6cd983f59a1eac9f33bb73c diff --git a/3rdparty/flatbuffers b/3rdparty/flatbuffers deleted file mode 160000 index 1872409707..0000000000 --- a/3rdparty/flatbuffers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 187240970746d00bbd26b0f5873ed54d2477f9f3 diff --git a/3rdparty/libpng/libpng b/3rdparty/libpng/libpng index 49363adcfa..d5515b5b8b 160000 --- a/3rdparty/libpng/libpng +++ b/3rdparty/libpng/libpng @@ -1 +1 @@ -Subproject commit 49363adcfaf098748d7a4c8c624ad8c45a8c3a86 +Subproject commit d5515b5b8be3901aac04e5bd8bd5c89f287bcd33 diff --git a/3rdparty/libsdl-org/SDL b/3rdparty/libsdl-org/SDL index 7f3ae3d574..5848e584a1 160000 --- a/3rdparty/libsdl-org/SDL +++ b/3rdparty/libsdl-org/SDL @@ -1 +1 @@ -Subproject commit 7f3ae3d57459e59943a4ecfefc8f6277ec6bf540 +Subproject commit 5848e584a1b606de26e3dbd1c7e4ecbc34f807a6 diff --git a/3rdparty/libsdl-org/SDL.vcxproj b/3rdparty/libsdl-org/SDL.vcxproj index f0b38ca09f..fd2bcf2f03 100644 --- a/3rdparty/libsdl-org/SDL.vcxproj +++ b/3rdparty/libsdl-org/SDL.vcxproj @@ -23,6 +23,7 @@ + @@ -102,6 +103,7 @@ + @@ -130,6 +132,8 @@ + + @@ -140,7 +144,11 @@ + + + + @@ -156,6 +164,7 @@ + @@ -175,7 +184,6 @@ - @@ -184,20 +192,35 @@ + + + + + + + + + + + + + + + @@ -241,6 +264,7 @@ + @@ -256,13 +280,14 @@ + + - @@ -303,7 +328,6 @@ - @@ -333,7 +357,6 @@ - @@ -393,7 +416,6 @@ - @@ -464,6 +486,7 @@ + @@ -471,12 +494,11 @@ - + - diff --git a/3rdparty/libsdl-org/SDL.vcxproj.filters b/3rdparty/libsdl-org/SDL.vcxproj.filters index 5839899c0d..8b7f293ef3 100644 --- a/3rdparty/libsdl-org/SDL.vcxproj.filters +++ b/3rdparty/libsdl-org/SDL.vcxproj.filters @@ -214,6 +214,9 @@ {000028b2ea36d7190d13777a4dc70000} + + {695ffc61-5497-4227-b415-15e9bdd5b6bf} + @@ -699,9 +702,6 @@ video\yuv2rgb - - video\windows - video\windows @@ -831,9 +831,6 @@ render\software - - render\software - render\software @@ -911,12 +908,6 @@ - - - - - - render\vulkan @@ -950,6 +941,60 @@ + + video\yuv2rgb + + + video\yuv2rgb + + + video\yuv2rgb + + + video\yuv2rgb + + + video\yuv2rgb + + + video\yuv2rgb + + + video + + + video + + + video + + + misc + + + haptic\hidapi + + + haptic\hidapi + + + core + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + API Headers + @@ -1037,9 +1082,6 @@ core - - core\windows - core\windows @@ -1166,9 +1208,6 @@ joystick\dummy - - joystick\gdk - joystick\hidapi @@ -1328,9 +1367,6 @@ video\dummy - - video\windows - video\windows @@ -1343,9 +1379,6 @@ video\windows - - video\windows - video\windows @@ -1508,9 +1541,6 @@ render\software - - render\software - render\software @@ -1535,9 +1565,6 @@ - - - render\vulkan @@ -1579,6 +1606,66 @@ + + video\windows + + + video\yuv2rgb + + + video\yuv2rgb + + + video\yuv2rgb + + + video + + + misc + + + haptic\hidapi + + + haptic\hidapi + + + core\windows + + + core\windows + + + joystick\gdk + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + + + joystick\hidapi + diff --git a/3rdparty/protobuf/CMakeLists.txt b/3rdparty/protobuf/CMakeLists.txt new file mode 100644 index 0000000000..e1f82f146f --- /dev/null +++ b/3rdparty/protobuf/CMakeLists.txt @@ -0,0 +1,29 @@ +add_library(3rdparty_protobuf INTERFACE) +if (USE_SYSTEM_PROTOBUF) + pkg_check_modules(PROTOBUF REQUIRED IMPORTED_TARGET protobuf>=33.0.0) + target_link_libraries(3rdparty_protobuf INTERFACE PkgConfig::PROTOBUF) + set(PROTOBUF_DIR "${CMAKE_SOURCE_DIR}/rpcs3/Emu/NP/generated") + execute_process(COMMAND protoc --cpp_out=${PROTOBUF_DIR} --proto_path=${PROTOBUF_DIR} np2_structs.proto RESULT_VARIABLE PROTOBUF_CMD_ERROR) + if(PROTOBUF_CMD_ERROR AND NOT PROTOBUF_CMD_ERROR EQUAL 0) + message(FATAL_ERROR "protoc failed to regenerate protobuf files.") + endif() +else() + option(protobuf_INSTALL "Install protobuf binaries and files" OFF) + option(protobuf_BUILD_TESTS "Build tests" OFF) + option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF) + option(protobuf_BUILD_EXAMPLES "Build examples" OFF) + option(protobuf_BUILD_PROTOBUF_BINARIES "Build protobuf libraries and protoc compiler" ON) + option(protobuf_BUILD_PROTOC_BINARIES "Build libprotoc and protoc compiler" OFF) + option(protobuf_BUILD_LIBPROTOC "Build libprotoc" OFF) + option(protobuf_BUILD_LIBUPB "Build libupb" OFF) + option(protobuf_ALLOW_CCACHE "Adjust build flags to allow for ccache support." ON) + option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries" OFF) + option(protobuf_FORCE_FETCH_DEPENDENCIES "Force all dependencies to be downloaded from GitHub. Local installations will be ignored." OFF) + option(protobuf_LOCAL_DEPENDENCIES_ONLY "Prevent downloading any dependencies from GitHub. If this option is set, the dependency must be available locally as an installed package." OFF) + option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" OFF) + option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" OFF) + + add_subdirectory(protobuf EXCLUDE_FROM_ALL) + target_include_directories(3rdparty_protobuf SYSTEM INTERFACE protobuf/src) + target_link_libraries(3rdparty_protobuf INTERFACE libprotobuf) +endif() diff --git a/3rdparty/protobuf/protobuf b/3rdparty/protobuf/protobuf new file mode 160000 index 0000000000..edaa823d8b --- /dev/null +++ b/3rdparty/protobuf/protobuf @@ -0,0 +1 @@ +Subproject commit edaa823d8b36a8656d7b2b9241b7d0bfe50af878 diff --git a/3rdparty/protobuf/protobuf_build.vcxproj b/3rdparty/protobuf/protobuf_build.vcxproj new file mode 100644 index 0000000000..83c02058d1 --- /dev/null +++ b/3rdparty/protobuf/protobuf_build.vcxproj @@ -0,0 +1,111 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D} + MakeFileProj + + + + + + Makefile + true + + + Makefile + false + + + + x64 + + + + + + + + + + + call vsdevcmd.bat -arch=amd64 + if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -Dprotobuf_INSTALL=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOBUF_BINARIES=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF -Dprotobuf_BUILD_LIBPROTOC=OFF -Dprotobuf_BUILD_LIBUPB=OFF -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=ON "$(SolutionDir)3rdparty\protobuf\protobuf" + + call vsdevcmd.bat -arch=amd64 + if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -Dprotobuf_INSTALL=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOBUF_BINARIES=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF -Dprotobuf_BUILD_LIBPROTOC=OFF -Dprotobuf_BUILD_LIBUPB=OFF -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF "$(SolutionDir)3rdparty\protobuf\protobuf" + + + echo Cleaning.. + rmdir /s /q "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" + cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + for /F "delims= eol=|" %%f in (' + dir /b ^| findstr /V "[^.]*\build[^.]*\.vcxproj"') do ( + echo Deleting .\%%f + if exist %%f\nul ( + rmdir .\%%f /s /q + ) else ( + del .\%%f /q + ) + ) + + + + + + $(SolutionDir)build\lib\$(Configuration)-$(Platform)\ + $(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\ + + $(CmakeDebugCLI) + ninja + ninja install + + + $(CmakeCleanCLI) + $(CmakeDebugCLI) + ninja + ninja install + + + $(CmakeCleanCLI) + + + + + + $(SolutionDir)build\lib\$(Configuration)-$(Platform)\ + $(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\ + + $(CmakeReleaseCLI) + ninja + ninja install + + + $(CmakeCleanCLI) + $(CmakeReleaseCLI) + ninja + ninja install + + + $(CmakeCleanCLI) + + + + + + + + diff --git a/3rdparty/qt6.cmake b/3rdparty/qt6.cmake index e15e0abdcb..969967fa40 100644 --- a/3rdparty/qt6.cmake +++ b/3rdparty/qt6.cmake @@ -6,15 +6,22 @@ find_package(Qt6 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia M if(WIN32) target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets) else() - set(QT_NO_PRIVATE_MODULE_WARNING ON) - find_package(Qt6 ${QT_MIN_VER} COMPONENTS DBus Gui GuiPrivate) + find_package(Qt6 ${QT_MIN_VER} COMPONENTS DBus Gui) + if(Qt6_VERSION VERSION_GREATER_EQUAL "6.10.0") + set(QT_NO_PRIVATE_MODULE_WARNING ON) + find_package(Qt6 ${QT_MIN_VER} COMPONENTS GuiPrivate) + endif() if(Qt6DBus_FOUND) target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::DBus Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets) target_compile_definitions(3rdparty_qt6 INTERFACE -DHAVE_QTDBUS) else() target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets) endif() - target_link_libraries(3rdparty_qt6 INTERFACE Qt6::GuiPrivate) + if(Qt6_VERSION VERSION_GREATER_EQUAL "6.10.0") + target_link_libraries(3rdparty_qt6 INTERFACE Qt6::GuiPrivate) + else() + target_include_directories(3rdparty_qt6 INTERFACE ${Qt6Gui_PRIVATE_INCLUDE_DIRS}) + endif() endif() if(Qt6Widgets_FOUND) diff --git a/3rdparty/wolfssl/wolfssl b/3rdparty/wolfssl/wolfssl index b077c81eb6..922d04b356 160000 --- a/3rdparty/wolfssl/wolfssl +++ b/3rdparty/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit b077c81eb635392e694ccedbab8b644297ec0285 +Subproject commit 922d04b3568c6428a9fb905ddee3ef5a68db3108 diff --git a/3rdparty/yaml-cpp/yaml-cpp b/3rdparty/yaml-cpp/yaml-cpp index 456c68f452..51a5d623e3 160000 --- a/3rdparty/yaml-cpp/yaml-cpp +++ b/3rdparty/yaml-cpp/yaml-cpp @@ -1 +1 @@ -Subproject commit 456c68f452da09d8ca84b375faa2b1397713eaba +Subproject commit 51a5d623e3fde1f58829a56ba910f1cb33596222 diff --git a/3rdparty/yaml-cpp/yaml-cpp.vcxproj b/3rdparty/yaml-cpp/yaml-cpp.vcxproj index b1b732727c..4d10c90d7e 100644 --- a/3rdparty/yaml-cpp/yaml-cpp.vcxproj +++ b/3rdparty/yaml-cpp/yaml-cpp.vcxproj @@ -76,6 +76,7 @@ + diff --git a/3rdparty/yaml-cpp/yaml-cpp.vcxproj.filters b/3rdparty/yaml-cpp/yaml-cpp.vcxproj.filters index 60c75fa23e..f4b553ad72 100644 --- a/3rdparty/yaml-cpp/yaml-cpp.vcxproj.filters +++ b/3rdparty/yaml-cpp/yaml-cpp.vcxproj.filters @@ -94,5 +94,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt index 55d7353acf..47645d290c 100644 --- a/3rdparty/zlib/CMakeLists.txt +++ b/3rdparty/zlib/CMakeLists.txt @@ -6,7 +6,8 @@ if (USE_SYSTEM_ZLIB) target_link_libraries(3rdparty_zlib INTERFACE ZLIB::ZLIB) target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1) else() - option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" OFF) + option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" OFF) + option(ZLIB_BUILD_SHARED "Enable building zlib shared library" OFF) message(STATUS "RPCS3: Using builtin ZLIB") set(SKIP_INSTALL_ALL ON) add_subdirectory(zlib EXCLUDE_FROM_ALL) diff --git a/3rdparty/zlib/zlib b/3rdparty/zlib/zlib index 51b7f2abda..da607da739 160000 --- a/3rdparty/zlib/zlib +++ b/3rdparty/zlib/zlib @@ -1 +1 @@ -Subproject commit 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf +Subproject commit da607da739fa6047df13e66a2af6b8bec7c2a498 diff --git a/BUILDING.md b/BUILDING.md index 60b7046cb2..c1774908fd 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -20,26 +20,26 @@ The following tools are required to build RPCS3 on Windows 10 or later: with standalone **CMake** tool. - [Python 3.6+](https://www.python.org/downloads/) (add to PATH) -- [Qt 6.10.1](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt) +- [Qt 6.11.0](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt) - [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0. The `sln` solution available only on **Visual Studio** is the preferred building solution. It easily allows to build the **RPCS3** application in `Release` and `Debug` mode. In order to build **RPCS3** with the `sln` solution (with **Visual Studio**), **Qt** libs need to be detected. To detect the libs: -- add and set the `QTDIR` environment variable, e.g. `\6.10.1\msvc2022_64\` +- add and set the `QTDIR` environment variable, e.g. `\6.11.0\msvc2022_64\` - or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022) **NOTE:** If you have issues with the **Visual Studio Qt Plugin**, you may want to uninstall it and install the [Legacy Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.LEGACYQtVisualStudioTools2022) instead. In order to build **RPCS3** with the `CMake` solution (with both **Visual Studio** and standalone **CMake** tool): -- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `\6.10.1\msvc2022_64\` +- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `\6.11.0\msvc2022_64\` ### Linux These are the essentials tools to build RPCS3 on Linux. Some of them can be installed through your favorite package manager: - Clang 17+ or GCC 13+ - [CMake 3.28.0+](https://www.cmake.org/download/) -- [Qt 6.10.1](https://www.qt.io/download-qt-installer) +- [Qt 6.11.0](https://www.qt.io/download-qt-installer) - [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0. - [SDL3](https://github.com/libsdl-org/SDL/releases) (for the FAudio backend) @@ -51,7 +51,7 @@ These are the essentials tools to build RPCS3 on Linux. Some of them can be inst #### Debian & Ubuntu - sudo apt-get install build-essential ninja-build libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl3-3.2 libsdl3-dev libjack-dev libsndio-dev + sudo apt-get install build-essential ninja-build libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl3-dev libjack-dev libsndio-dev libcurl4-openssl-dev qt6-base-dev qt6-base-private-dev qt6-multimedia-dev qt6-svg-dev libxkbcommon-dev Ubuntu is usually horrendously out of date, and some packages need to be downloaded by hand. This part is for Qt, GCC, Vulkan, and CMake @@ -95,7 +95,7 @@ sudo apt-get install cmake #### Fedora - sudo dnf install alsa-lib-devel cmake ninja-build glew glew-devel libatomic libevdev-devel libudev-devel openal-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel llvm-devel + sudo dnf install alsa-lib-devel cmake ninja-build glew glew-devel libatomic libevdev-devel libudev-devel openal-soft-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel llvm-devel libcurl-devel #### OpenSUSE @@ -108,9 +108,10 @@ Clone and initialize the repository ```bash git clone --recurse-submodules https://github.com/RPCS3/rpcs3.git cd rpcs3 +git submodule sync # This is automatically done by `git clone --recurse-submodules`, # but in case you forgot it, you can manually fetch submodules this way: -git submodule update --init +git submodule update --init --recursive ``` ### Windows @@ -122,7 +123,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r ##### Configuring the Qt Plugin (if used) 1) go to `Extensions->Qt VS Tools->Qt Versions` -2) add the path to your Qt installation with compiler e.g. `\6.10.1\msvc2022_64`, version will fill in automatically +2) add the path to your Qt installation with compiler e.g. `\6.11.0\msvc2022_64`, version will fill in automatically 3) go to `Extensions->Qt VS Tools->Options->Legacy Project Format`. (Only available in the **Legacy Qt Plugin**) 4) set `Build: Run pre-build setup` to `true`. (Only available in the **Legacy Qt Plugin**) diff --git a/CMakeLists.txt b/CMakeLists.txt index f459351379..217c40f341 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,12 +13,12 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11) - message(FATAL_ERROR "RPCS3 requires at least gcc-11.") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) + message(FATAL_ERROR "RPCS3 requires at least gcc-13.") endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0) - message(FATAL_ERROR "RPCS3 requires at least clang-12.0.") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0) + message(FATAL_ERROR "RPCS3 requires at least clang-19.0.") endif() endif() @@ -37,12 +37,12 @@ option(USE_LIBEVDEV "libevdev-based joystick support" ON) option(USE_DISCORD_RPC "Discord rich presence integration" OFF) option(USE_VULKAN "Vulkan render backend" ON) option(USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF) -option(USE_SDL "Enables SDL input handler" OFF) +option(USE_SDL "Enables SDL input handler" ON) option(USE_SYSTEM_CUBEB "Prefer system cubeb instead of the builtin one" OFF) option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON) option(USE_SYSTEM_FAUDIO "Prefer system FAudio instead of the builtin one" OFF) option(USE_SYSTEM_FFMPEG "Prefer system ffmpeg instead of the prebuild one" OFF) -option(USE_SYSTEM_FLATBUFFERS "Prefer system flatbuffers instead of the builtin one" OFF) +option(USE_SYSTEM_PROTOBUF "Prefer system protobuf instead of the builtin one" OFF) option(USE_SYSTEM_GLSLANG "Prefer system glslang instead of the builtin one" OFF) option(USE_SYSTEM_HIDAPI "Prefer system hidapi instead of the builtin one" OFF) option(USE_SYSTEM_LIBPNG "Prefer system libpng instead of the builtin one" OFF) @@ -86,50 +86,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT MSVC) endif() if(MSVC) - option(USE_MSVC_STATIC_CRT "Use static MSVC C runtime" OFF) - - # TODO(cjj19970505@live.cn) - # DiscordRPC binary in 3rdparty is compiled /MT - # So theoretically we should enable DiscordRPC in Release and static CRT build - # since we might encounter some rumtime issues when more than one CRT version are presented. - # https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160#what-problems-exist-if-an-application-uses-more-than-one-crt-version - # Add other DiscordRPC binaries(compiled with /MTd, /MD, /MDd) or compile it from source may address this issue. - if(NOT IS_MULTI_CONFIG) - if(NOT(CMAKE_BUILD_TYPE MATCHES "Release" AND USE_MSVC_STATIC_CRT)) - set(USE_DISCORD_RPC OFF CACHE BOOL "Discord RPC is only available in Release and static CRT build." FORCE) - endif() - endif() - - if(USE_MSVC_STATIC_CRT) - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") - else() - # though doc ( https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html ) - # says if that property is not set then CMake uses the default value MultiThreaded$<$:Debug>DLL - # to select a MSVC runtime library. - # But yaml-cpp set /MT(d) if CMAKE_MSVC_RUNTIME_LIBRARY is undefined - # So we have to define it explicitly - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") - endif() - - # TODO(cjj19970505@live.cn) - # offical QT uses dynamic CRT. - # When building our lib with static CRT and debug build type - # and linking with Qt with dynamic CRT and debug build, - # error is encountered in runtime (which is expected). - # But building our lib with static CRT and release build type, - # and linking with Qt with dynamic CRT and release build seems to be working, - # which is the same config with VS solution. - # (though technically it might still have some hidden errors). - # So we allow static CRT in both relase and debug build, but prompt warning in debug build. - # For more info: - # https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160#what-problems-exist-if-an-application-uses-more-than-one-crt-version - # https://wiki.qt.io/Technical_FAQ#Why_does_a_statically_built_Qt_use_the_dynamic_Visual_Studio_runtime_libraries_.3F_Do_I_need_to_deploy_those_with_my_application_.3F - if(USE_MSVC_STATIC_CRT) - if(IS_MULTI_CONFIG OR CMAKE_BUILD_TYPE MATCHES "Debug") - message(AUTHOR_WARNING "Debug build currently can not work with static CRT.") - endif() - endif() - add_compile_options(/MP) + add_compile_options("$<$:/MP>") endif() if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -142,7 +99,7 @@ if(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64") endif() if(MSVC) - add_compile_options(/wd4530 /utf-8) # C++ exception handler used, but unwind semantics are not enabled + add_compile_options("$<$:/wd4530;/utf-8>") # C++ exception handler used, but unwind semantics are not enabled endif() add_subdirectory(3rdparty) @@ -161,10 +118,6 @@ if (NOT FOUND_LTO EQUAL -1) message(FATAL_ERROR "RPCS3 doesn't support building with LTO, use -DDISABLE_LTO=TRUE to force-disable it") endif() -if(NOT WIN32) - add_compile_options(-pthread) -endif() - ## Look for Gamemode if its installed on Linux if(LINUX) ## User chooses whether to Enable GameMode features or not diff --git a/Utilities/Config.cpp b/Utilities/Config.cpp index cee928def7..bd0fe7a8b8 100644 --- a/Utilities/Config.cpp +++ b/Utilities/Config.cpp @@ -362,6 +362,27 @@ std::vector cfg::try_to_enum_list(decltype(&fmt_class_string:: return result; } +size_t cfg::try_to_enum_size(decltype(&fmt_class_string::format) func) +{ + size_t result = 0; + for (u64 i = 0;; i++) + { + std::string var; + func(var, i); + + std::string hex; + fmt_class_string::format(hex, i); + if (var == hex) + { + break; + } + + result++; + } + + return result; +} + void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs) { switch (rhs.get_type()) @@ -416,7 +437,7 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs) out << YAML::BeginMap; for (const auto& np : static_cast(rhs).get_map()) { - if (np.second == logs::level::notice) continue; + if (np.second == logs::level::_default) continue; out << YAML::Key << np.first; out << YAML::Value << fmt::format("%s", np.second); } diff --git a/Utilities/Config.h b/Utilities/Config.h index 35dcddc1a6..4c79cbf31c 100644 --- a/Utilities/Config.h +++ b/Utilities/Config.h @@ -30,6 +30,9 @@ namespace cfg // Internal hack std::vector try_to_enum_list(decltype(&fmt_class_string::format) func); + // Internal hack + size_t try_to_enum_size(decltype(&fmt_class_string::format) func); + // Config tree entry type. enum class type : unsigned { @@ -312,6 +315,11 @@ namespace cfg { return try_to_enum_list(&fmt_class_string::format); } + + size_t size() const + { + return try_to_enum_size(&fmt_class_string::format); + } }; // Signed 32/64-bit integer entry with custom Min/Max range. @@ -385,7 +393,7 @@ namespace cfg void set(const s64& value) { - ensure(value >= Min && value <= Max); + if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max); m_value = static_cast(value); } @@ -476,7 +484,7 @@ namespace cfg void set(const f64& value) { - ensure(value >= Min && value <= Max); + if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max); m_value = static_cast(value); } @@ -563,7 +571,7 @@ namespace cfg void set(const u64& value) { - ensure(value >= Min && value <= Max); + if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max); m_value = static_cast(value); } diff --git a/Utilities/File.cpp b/Utilities/File.cpp index aafcfe3c30..aff4537dea 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -117,6 +117,7 @@ static fs::error to_error(DWORD e) case ERROR_NEGATIVE_SEEK: return fs::error::inval; case ERROR_DIRECTORY: return fs::error::inval; case ERROR_INVALID_NAME: return fs::error::inval; + case ERROR_INVALID_FUNCTION: return fs::error::inval; case ERROR_SHARING_VIOLATION: return fs::error::acces; case ERROR_DIR_NOT_EMPTY: return fs::error::notempty; case ERROR_NOT_READY: return fs::error::noent; @@ -165,6 +166,7 @@ static fs::error to_error(int e) case ENOTEMPTY: return fs::error::notempty; case EROFS: return fs::error::readonly; case EISDIR: return fs::error::isdir; + case ENOTDIR: return fs::error::notdir; case ENOSPC: return fs::error::nospace; case EXDEV: return fs::error::xdev; default: return fs::error::unknown; @@ -398,12 +400,11 @@ namespace fs class windows_file final : public file_base { HANDLE m_handle; - atomic_t m_pos; + atomic_t m_pos {0}; public: windows_file(HANDLE handle) : m_handle(handle) - , m_pos(0) { } @@ -417,10 +418,10 @@ namespace fs stat_t get_stat() override { - FILE_BASIC_INFO basic_info; + FILE_BASIC_INFO basic_info {}; ensure(GetFileInformationByHandleEx(m_handle, FileBasicInfo, &basic_info, sizeof(FILE_BASIC_INFO))); // "file::stat" - stat_t info; + stat_t info {}; info.is_directory = (basic_info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; info.is_writable = (basic_info.FileAttributes & FILE_ATTRIBUTE_READONLY) == 0; info.size = this->size(); @@ -441,7 +442,7 @@ namespace fs bool trunc(u64 length) override { - FILE_END_OF_FILE_INFO _eof; + FILE_END_OF_FILE_INFO _eof {}; _eof.EndOfFile.QuadPart = length; if (!SetFileInformationByHandle(m_handle, FileEndOfFileInfo, &_eof, sizeof(_eof))) @@ -563,6 +564,7 @@ namespace fs u64 size() override { + // NOTE: this can fail if we access a mounted empty drive (e.g. after unmounting an iso). LARGE_INTEGER size; ensure(GetFileSizeEx(m_handle, &size)); // "file::size" @@ -579,12 +581,12 @@ namespace fs file_id id{"windows_file"}; id.data.resize(sizeof(FILE_ID_INFO)); - FILE_ID_INFO info; + FILE_ID_INFO info {}; if (!GetFileInformationByHandleEx(m_handle, FileIdInfo, &info, sizeof(info))) { // Try GetFileInformationByHandle as a fallback - BY_HANDLE_FILE_INFORMATION info2; + BY_HANDLE_FILE_INFORMATION info2{}; ensure(GetFileInformationByHandle(m_handle, &info2)); info = {}; @@ -625,7 +627,7 @@ namespace fs struct ::stat file_info; ensure(::fstat(m_fd, &file_info) == 0); // "file::stat" - stat_t info; + stat_t info {}; info.is_directory = S_ISDIR(file_info.st_mode); info.is_writable = file_info.st_mode & 0200; // HACK: approximation info.size = file_info.st_size; @@ -901,6 +903,22 @@ std::string_view fs::get_parent_dir_view(std::string_view path, u32 parent_level return result; } +std::string fs::get_path_if_dir(const std::string& path) +{ + if (path.empty() || !fs::is_dir(path)) + { + return {}; + } + + // If delimiters are already present at the end of the string then nothing else to do + if (usz sz = path.find_last_of(delim); sz != umax && (sz + 1) == path.size()) + { + return path; + } + + return path + '/'; +} + bool fs::get_stat(const std::string& path, stat_t& info) { // Ensure consistent information on failure @@ -1640,6 +1658,45 @@ fs::file::file(const std::string& path, bs_t mode) return; } + // Check if the handle is actually valid. + // This can fail on empty mounted drives (e.g. with ERROR_NOT_READY or ERROR_INVALID_FUNCTION). + BY_HANDLE_FILE_INFORMATION info{}; + if (!GetFileInformationByHandle(handle, &info)) + { + const DWORD last_error = GetLastError(); + CloseHandle(handle); + + if (last_error == ERROR_INVALID_FUNCTION) + { + g_tls_error = fs::error::isdir; + return; + } + + g_tls_error = to_error(last_error); + return; + } + + if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + CloseHandle(handle); + g_tls_error = fs::error::isdir; + return; + } + + if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) + { + CloseHandle(handle); + g_tls_error = fs::error::acces; + return; + } + + if ((mode & fs::write) && (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) + { + CloseHandle(handle); + g_tls_error = fs::error::readonly; + return; + } + m_file = std::make_unique(handle); #else int flags = O_CLOEXEC; // Ensures all files are closed on execl for auto updater @@ -2579,7 +2636,7 @@ bool fs::pending_file::commit(bool overwrite) while (file_handle != INVALID_HANDLE_VALUE) { // Get file ID (used to check for hardlinks) - BY_HANDLE_FILE_INFORMATION file_info; + BY_HANDLE_FILE_INFORMATION file_info{}; if (!GetFileInformationByHandle(file_handle, &file_info) || file_info.nNumberOfLinks == 1) { @@ -2777,6 +2834,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case fs::error::notempty: return "Not empty"; case fs::error::readonly: return "Read only"; case fs::error::isdir: return "Is a directory"; + case fs::error::notdir: return "Not a directory"; case fs::error::toolong: return "Path too long"; case fs::error::nospace: return "Not enough space on the device"; case fs::error::xdev: return "Device mismatch"; diff --git a/Utilities/File.h b/Utilities/File.h index a5a4c53d75..3d332dd0be 100644 --- a/Utilities/File.h +++ b/Utilities/File.h @@ -66,13 +66,13 @@ namespace fs // File attributes (TODO) struct stat_t { - bool is_directory; - bool is_symlink; - bool is_writable; - u64 size; - s64 atime; - s64 mtime; - s64 ctime; + bool is_directory = false; + bool is_symlink = false; + bool is_writable = false; + u64 size = 0; + s64 atime = 0; + s64 mtime = 0; + s64 ctime = 0; using enable_bitcopy = std::true_type; @@ -155,7 +155,7 @@ namespace fs // Virtual device struct device_base { - const std::string fs_prefix; + std::string fs_prefix; device_base(); virtual ~device_base(); @@ -195,6 +195,9 @@ namespace fs return std::string{get_parent_dir_view(path, parent_level)}; } + // Return "path" plus an ending delimiter (if missing) if "path" is an existing directory. Otherwise, an empty string + std::string get_path_if_dir(const std::string& path); + // Get file information bool get_stat(const std::string& path, stat_t& info); @@ -254,6 +257,8 @@ namespace fs // Open file with specified mode explicit file(const std::string& path, bs_t mode = ::fs::read); + file(std::unique_ptr&& ptr) : m_file(std::move(ptr)) {} + static file from_native_handle(native_handle handle); // Open memory for read @@ -678,6 +683,7 @@ namespace fs notempty, readonly, isdir, + notdir, toolong, nospace, xdev, diff --git a/Utilities/JIT.h b/Utilities/JIT.h index 6dfa9e7cd0..86fc72ed55 100644 --- a/Utilities/JIT.h +++ b/Utilities/JIT.h @@ -493,6 +493,10 @@ inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime* return reinterpret_cast(uptr(result)); } +#if defined(__INTELLISENSE__) && !defined(LLVM_AVAILABLE) +#define LLVM_AVAILABLE +#endif + #ifdef LLVM_AVAILABLE namespace llvm diff --git a/Utilities/JITASM.cpp b/Utilities/JITASM.cpp index acb5f40b04..90c09bb0bf 100644 --- a/Utilities/JITASM.cpp +++ b/Utilities/JITASM.cpp @@ -14,6 +14,10 @@ #define CAN_OVERCOMMIT #endif +#if defined(__APPLE__) +#include +#endif + LOG_CHANNEL(jit_log, "JIT"); void jit_announce(uptr func, usz size, std::string_view name) diff --git a/Utilities/JITLLVM.cpp b/Utilities/JITLLVM.cpp index 166ee7cec2..34e1572185 100644 --- a/Utilities/JITLLVM.cpp +++ b/Utilities/JITLLVM.cpp @@ -688,6 +688,30 @@ jit_compiler::jit_compiler(const std::unordered_map& _link, co mem = std::make_unique(std::move(symbols_cement)); } + std::vector attributes; + +#if defined(ARCH_ARM64) + if (utils::has_sha3()) + attributes.push_back("+sha3"); + else + attributes.push_back("-sha3"); + + if (utils::has_dotprod()) + attributes.push_back("+dotprod"); + else + attributes.push_back("-dotprod"); + + if (utils::has_sve()) + attributes.push_back("+sve"); + else + attributes.push_back("-sve"); + + if (utils::has_sve2()) + attributes.push_back("+sve2"); + else + attributes.push_back("-sve2"); +#endif + { m_engine.reset(llvm::EngineBuilder(std::move(null_mod)) .setErrorStr(&result) @@ -699,6 +723,7 @@ jit_compiler::jit_compiler(const std::unordered_map& _link, co //.setCodeModel(llvm::CodeModel::Large) #endif .setRelocationModel(llvm::Reloc::Model::PIC_) + .setMAttrs(attributes) .setMCPU(m_cpu) .create()); } diff --git a/Utilities/StrFmt.cpp b/Utilities/StrFmt.cpp index 4431769f3a..d68ef51cb5 100644 --- a/Utilities/StrFmt.cpp +++ b/Utilities/StrFmt.cpp @@ -16,12 +16,12 @@ #include #endif -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) -#elif defined(__clang__) +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4996) #else #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/Utilities/StrUtil.h b/Utilities/StrUtil.h index b5df886164..66c351d60f 100644 --- a/Utilities/StrUtil.h +++ b/Utilities/StrUtil.h @@ -13,13 +13,13 @@ std::string wchar_to_utf8(std::wstring_view src); std::string utf16_to_utf8(std::u16string_view src); std::u16string utf8_to_utf16(std::string_view src); -// Copy null-terminated string from a std::string or a char array to a char array with truncation -template +// Copy null-terminated string from a std::basic_string or a char array to a char array with truncation +template requires requires (D& d, T& t) { std::declval() = &d[0]; } inline void strcpy_trunc(D&& dst, const T& src) { const usz count = std::size(src) >= std::size(dst) ? std::max(std::size(dst), 1) - 1 : std::size(src); - std::memcpy(std::data(dst), std::data(src), count); - std::memset(std::data(dst) + count, 0, std::size(dst) - count); + std::copy_n(std::data(src), count, std::data(dst)); + std::fill_n(std::data(dst) + count, std::size(dst) - count, std::remove_cvref_t{}); } // Convert string to signed integer @@ -188,7 +188,7 @@ namespace fmt result.append(separator); } - return result.append(source.back()); + return result.append(*end); } template diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 810b8fd7c5..b22c1aeb52 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -8,13 +8,17 @@ #include "Emu/RSX/RSXThread.h" #include "Thread.h" #include "Utilities/JIT.h" -#include #include #ifdef ARCH_ARM64 #include "Emu/CPU/Backends/AArch64/AArch64Signal.h" #endif +#ifdef __cpp_lib_stacktrace +#include "rpcs3_version.h" +#include +#endif + #ifdef _WIN32 #include #include @@ -103,7 +107,7 @@ thread_local u64 g_tls_fault_rsx = 0; thread_local u64 g_tls_fault_spu = 0; thread_local u64 g_tls_wait_time = 0; thread_local u64 g_tls_wait_fail = 0; -thread_local bool g_tls_access_violation_recovered = false; +thread_local u64 g_tls_access_violation_recovered = umax; extern thread_local std::string(*g_tls_log_prefix)(); namespace stx @@ -1265,7 +1269,7 @@ namespace rsx extern std::function g_access_violation_handler; } -bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noexcept +bool handle_access_violation(u32 addr, bool is_writing, bool is_exec, ucontext_t* context) noexcept { g_tls_fault_all++; @@ -1301,7 +1305,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe } } spu_protection{cpu}; - if (addr < RAW_SPU_BASE_ADDR && vm::check_addr(addr) && rsx::g_access_violation_handler) + if (!is_exec && addr < RAW_SPU_BASE_ADDR && vm::check_addr(addr) && rsx::g_access_violation_handler) { bool state_changed = false; @@ -1367,7 +1371,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe { auto thread = idm::get_unlocked>(spu_thread::find_raw_spu((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET)); - if (!thread) + if (!thread || is_exec) { break; } @@ -1499,7 +1503,9 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe static_cast(context); #endif /* ARCH_ */ - if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable)) + const auto required_page_perms = (is_writing ? vm::page_writable : vm::page_readable) + (is_exec ? vm::page_executable : 0); + + if (vm::check_addr(addr, required_page_perms)) { return true; } @@ -1507,9 +1513,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe // Hack: allocate memory in case the emulator is stopping const auto hack_alloc = [&]() { - g_tls_access_violation_recovered = true; - - if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable)) + if (vm::check_addr(addr, required_page_perms)) { return true; } @@ -1521,17 +1525,45 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe return false; } + extern void ppu_register_range(u32 addr, u32 size); + + bool reprotected = false; + if (vm::writer_lock mlock; area->flags & vm::preallocated || vm::check_addr(addr, 0)) { // For allocated memory with protection lower than required (such as protection::no or read-only while writing to it) utils::memory_protect(vm::base(addr & -0x1000), 0x1000, utils::protection::rw); + reprotected = true; + } + + if (reprotected) + { + if (is_exec && !vm::check_addr(addr, vm::page_executable)) + { + ppu_register_range(addr & -0x10000, 0x10000); + } + + g_tls_access_violation_recovered = addr; return true; } - return area->falloc(addr & -0x10000, 0x10000) || vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable); + const bool allocated = area->falloc(addr & -0x10000, 0x10000); + + if (allocated) + { + if (is_exec && !vm::check_addr(addr, vm::page_executable)) + { + ppu_register_range(addr & -0x10000, 0x10000); + } + + g_tls_access_violation_recovered = addr; + return true; + } + + return false; }; - if (cpu && (cpu->get_class() == thread_class::ppu || cpu->get_class() == thread_class::spu)) + if (cpu && (cpu->get_class() == thread_class::ppu || cpu->get_class() == thread_class::spu) && !is_exec) { vm::temporary_unlock(*cpu); u32 pf_port_id = 0; @@ -1674,7 +1706,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe if (cpu->get_class() == thread_class::spu) { - if (!g_tls_access_violation_recovered) + if (g_tls_access_violation_recovered != addr) { vm_log.notice("\n%s", dump_useful_thread_info()); vm_log.always()("[%s] Access violation %s location 0x%x (%s)", cpu->get_name(), is_writing ? "writing" : "reading", addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory"); @@ -1710,10 +1742,10 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe // Note: a thread may access violate more than once after hack_alloc recovery // Do not log any further access violations in this case. - if (!g_tls_access_violation_recovered) + if (g_tls_access_violation_recovered != addr) { vm_log.notice("\n%s", dump_useful_thread_info()); - vm_log.fatal("Access violation %s location 0x%x (%s)", is_writing ? "writing" : (cpu && cpu->get_class() == thread_class::ppu && cpu->get_pc() == addr ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory"); + vm_log.fatal("Access violation %s location 0x%x (%s)", is_writing ? "writing" : (is_exec ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory"); } while (Emu.IsPausedOrReady()) @@ -1762,8 +1794,13 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe } } - if (Emu.IsStopped() && !hack_alloc()) + if (Emu.IsStopped()) { + while (!hack_alloc()) + { + thread_ctrl::wait_for(1000); + } + return false; } @@ -1802,6 +1839,7 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp) noexcept if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && !is_executing) { u32 addr = 0; + bool is_exec = false; if (auto [addr0, ok] = vm::try_get_addr(ptr); ok) { @@ -1809,14 +1847,21 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp) noexcept } else if (const usz exec64 = (ptr - vm::g_exec_addr) / 2; exec64 <= u32{umax}) { + is_exec = true; addr = static_cast(exec64); } - else + else if (const usz exec64 = (ptr - vm::g_exec_addr - vm::g_exec_addr_seg_offset); exec64 <= u32{umax}) { + is_exec = true; + addr = static_cast(exec64); + } + else + { + std::this_thread::sleep_for(1ms); return EXCEPTION_CONTINUE_SEARCH; } - if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, pExp->ContextRecord)) + if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, is_exec, pExp->ContextRecord)) { return EXCEPTION_CONTINUE_EXECUTION; } @@ -2023,12 +2068,13 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept #endif const u64 exec64 = (reinterpret_cast(info->si_addr) - reinterpret_cast(vm::g_exec_addr)) / 2; + const u64 exec64_2 = (reinterpret_cast(info->si_addr) - reinterpret_cast(vm::g_exec_addr)) - vm::g_exec_addr_seg_offset; const auto cause = is_executing ? "executing" : is_writing ? "writing" : "reading"; if (auto [addr, ok] = vm::try_get_addr(info->si_addr); ok && !is_executing) { // Try to process access violation - if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, context)) + if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, false, context)) { return; } @@ -2036,7 +2082,14 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept if (exec64 < 0x100000000ull && !is_executing) { - if (thread_ctrl::get_current() && handle_access_violation(static_cast(exec64), is_writing, context)) + if (thread_ctrl::get_current() && handle_access_violation(static_cast(exec64), is_writing, true, context)) + { + return; + } + } + else if (exec64_2 < 0x100000000ull && !is_executing) + { + if (thread_ctrl::get_current() && handle_access_violation(static_cast(exec64_2), is_writing, true, context)) { return; } @@ -2355,7 +2408,7 @@ thread_base::native_entry thread_base::finalize(u64 _self) noexcept g_tls_fault_spu = 0; g_tls_wait_time = 0; g_tls_wait_fail = 0; - g_tls_access_violation_recovered = false; + g_tls_access_violation_recovered = umax; g_tls_log_prefix = []() -> std::string { return {}; }; @@ -2801,6 +2854,16 @@ void thread_base::exec() [[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason) { + // Print stacktrace +#ifdef __cpp_lib_stacktrace + if (rpcs3::is_local_build()) + { + std::ostringstream oss; + oss << std::stacktrace::current(); + sys_log.notice("StackTrace\n\n%s\n", oss.str()); + } +#endif + if (const std::string info = dump_useful_thread_info(); !info.empty()) { sys_log.notice("\n%s", info); @@ -2816,6 +2879,16 @@ void thread_base::exec() } } + if (auto [total, current] = utils::get_memory_usage(); total - current <= 256 * 1024 * 1024) + { + if (reason_buf.empty()) + { + reason_buf = std::string{reason}; + } + + fmt::append(reason_buf, " (Possible RAM deficiency: free RAM: %dMB)", (total - current) / (1024 * 1024)); + } + if (!reason_buf.empty()) { reason = reason_buf; diff --git a/Utilities/Thread.h b/Utilities/Thread.h index 02e5db56ff..7cd9a7c7ea 100644 --- a/Utilities/Thread.h +++ b/Utilities/Thread.h @@ -4,6 +4,7 @@ #include "util/atomic.hpp" #include "util/shared_ptr.hpp" +#include #include // Hardware core layout diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index 9449d808c0..fd94b830e0 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -329,7 +329,7 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st is_valid = false; continue; } - else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(c); })) + else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(static_cast(c)); })) { append_log_message(log_messages, fmt::format("Error: Serial '%s' invalid (patch: %s, key: %s, location: %s, file: %s)", serial, description, main_key, get_yaml_node_location(serial_node), path), &patch_log.error); is_valid = false; diff --git a/Utilities/cheat_info.cpp b/Utilities/cheat_info.cpp index cc8934f15a..7745d26732 100644 --- a/Utilities/cheat_info.cpp +++ b/Utilities/cheat_info.cpp @@ -34,7 +34,7 @@ bool cheat_info::from_str(std::string_view cheat_line) s64 val64 = 0; if (cheat_vec.size() != 5 || !try_to_int64(&val64, cheat_vec[2], 0, cheat_type_max - 1)) { - log_cheat.fatal("Failed to parse cheat line"); + log_cheat.error("Failed to parse cheat line: '%s'", cheat_line); return false; } diff --git a/Utilities/geometry.h b/Utilities/geometry.h index faace6c77e..3ffbc04dd3 100644 --- a/Utilities/geometry.h +++ b/Utilities/geometry.h @@ -821,6 +821,14 @@ struct color4_base a *= rhs; } + void operator += (const color4_base& rhs) + { + r += rhs.r; + g += rhs.g; + b += rhs.b; + a += rhs.a; + } + constexpr color4_base operator * (const color4_base& rhs) const { return { r * rhs.r, g * rhs.g, b * rhs.b, a * rhs.a }; diff --git a/bin/GuiConfigs/Classic (Bright).qss b/bin/GuiConfigs/Classic (Bright).qss index 143e42df94..f961e63e00 100644 --- a/bin/GuiConfigs/Classic (Bright).qss +++ b/bin/GuiConfigs/Classic (Bright).qss @@ -37,10 +37,6 @@ QSlider#sizeSlider::handle:horizontal { QLabel#toolbar_icon_color { color: rgba(64,64,64,255); } -/* thumbnail icon color stylesheet */ -QLabel#thumbnail_icon_color { - color: rgba(0,100,231,255); -} /* gamelist icon color stylesheet */ QLabel#gamelist_icon_background_color { color: rgba(209,209,209,255); diff --git a/bin/GuiConfigs/Darker Style by TheMitoSan.qss b/bin/GuiConfigs/Darker Style by TheMitoSan.qss index 47270a211e..8797ffd3c9 100644 --- a/bin/GuiConfigs/Darker Style by TheMitoSan.qss +++ b/bin/GuiConfigs/Darker Style by TheMitoSan.qss @@ -237,11 +237,6 @@ QLabel#gamelist_icon_background_color { color: transparent; } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #262626; -} - /* Set Log colors */ QPlainTextEdit#log_frame { background-color: #000; /* Black */ diff --git a/bin/GuiConfigs/Envy.qss b/bin/GuiConfigs/Envy.qss index a78ba04f58..3e2e1ddc35 100644 --- a/bin/GuiConfigs/Envy.qss +++ b/bin/GuiConfigs/Envy.qss @@ -573,11 +573,6 @@ QLabel#gamelist_icon_background_color { color: transparent; } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #23262d; -} - /* Log colors */ QPlainTextEdit#log_frame { background-color: #23262d; diff --git a/bin/GuiConfigs/Kuroi (Dark) by Ani.qss b/bin/GuiConfigs/Kuroi (Dark) by Ani.qss index 54c667213b..2cd81267f1 100644 --- a/bin/GuiConfigs/Kuroi (Dark) by Ani.qss +++ b/bin/GuiConfigs/Kuroi (Dark) by Ani.qss @@ -265,11 +265,6 @@ QLabel#gamelist_icon_background_color { color: transparent; } -/* Set Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #444444; -} - /* Memory Viewer */ QLabel#memory_viewer_address_panel { color: #00cbff; /* Font Color: Blue */ diff --git a/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss b/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss index 410db682f7..96b84a9196 100644 --- a/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss +++ b/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss @@ -244,11 +244,6 @@ QLabel#gamelist_icon_background_color { color: transparent; } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #262626; -} - /* Set Log colors */ QPlainTextEdit#log_frame { background-color: #181d24; /* Black */ diff --git a/bin/GuiConfigs/Nekotekina by GooseWing.qss b/bin/GuiConfigs/Nekotekina by GooseWing.qss index 435d550755..93fadcdd68 100755 --- a/bin/GuiConfigs/Nekotekina by GooseWing.qss +++ b/bin/GuiConfigs/Nekotekina by GooseWing.qss @@ -397,12 +397,6 @@ QLabel#gamelist_icon_background_color { } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #ffd785; -} - - QLabel#log_level_always { color: #00ffff; /* Cyan */ } diff --git a/bin/GuiConfigs/Skyline (Nightfall).qss b/bin/GuiConfigs/Skyline (Nightfall).qss index 625a6a28b6..4729a59173 100644 --- a/bin/GuiConfigs/Skyline (Nightfall).qss +++ b/bin/GuiConfigs/Skyline (Nightfall).qss @@ -656,11 +656,6 @@ QLabel#color_button { background: transparent; } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #370048; -} - /* Debugger colors */ QLabel#debugger_frame_breakpoint { color: #000; /* Font Color: Black */ diff --git a/bin/GuiConfigs/Skyline.qss b/bin/GuiConfigs/Skyline.qss index ef3c7c6857..1004dc0016 100644 --- a/bin/GuiConfigs/Skyline.qss +++ b/bin/GuiConfigs/Skyline.qss @@ -664,11 +664,6 @@ QLabel#color_button { background: transparent; } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #8500ae; -} - /* Debugger colors */ QLabel#debugger_frame_breakpoint { color: #000; /* Font Color: Black */ diff --git a/bin/GuiConfigs/YoRHa by Ani.qss b/bin/GuiConfigs/YoRHa by Ani.qss index c772f25196..51f09897b1 100644 --- a/bin/GuiConfigs/YoRHa by Ani.qss +++ b/bin/GuiConfigs/YoRHa by Ani.qss @@ -379,11 +379,6 @@ QLabel#gamelist_icon_background_color { color: transparent; } -/* Set Windows Taskbar Thumbnail colors */ -QLabel#thumbnail_icon_color { - color: #4d4940; -} - QLabel#log_level_always { color: #00ffff; /* Cyan */ } diff --git a/bin/Icons/ui/home/256/bug-solid.png b/bin/Icons/ui/home/256/bug-solid.png new file mode 100644 index 0000000000..2c88980603 Binary files /dev/null and b/bin/Icons/ui/home/256/bug-solid.png differ diff --git a/bin/Icons/ui/home/256/circle-left-solid.png b/bin/Icons/ui/home/256/circle-left-solid.png new file mode 100644 index 0000000000..f6b2e58768 Binary files /dev/null and b/bin/Icons/ui/home/256/circle-left-solid.png differ diff --git a/bin/Icons/ui/home/256/display-solid.png b/bin/Icons/ui/home/256/display-solid.png new file mode 100644 index 0000000000..84cc043b07 Binary files /dev/null and b/bin/Icons/ui/home/256/display-solid.png differ diff --git a/bin/Icons/ui/home/256/floppy-disk-solid.png b/bin/Icons/ui/home/256/floppy-disk-solid.png new file mode 100644 index 0000000000..3701361569 Binary files /dev/null and b/bin/Icons/ui/home/256/floppy-disk-solid.png differ diff --git a/bin/Icons/ui/home/256/gamepad-solid.png b/bin/Icons/ui/home/256/gamepad-solid.png new file mode 100644 index 0000000000..fe08f1bc58 Binary files /dev/null and b/bin/Icons/ui/home/256/gamepad-solid.png differ diff --git a/bin/Icons/ui/home/256/gauge-solid.png b/bin/Icons/ui/home/256/gauge-solid.png new file mode 100644 index 0000000000..5b6d731a9d Binary files /dev/null and b/bin/Icons/ui/home/256/gauge-solid.png differ diff --git a/bin/Icons/ui/home/256/headphones-solid.png b/bin/Icons/ui/home/256/headphones-solid.png new file mode 100644 index 0000000000..feb015695d Binary files /dev/null and b/bin/Icons/ui/home/256/headphones-solid.png differ diff --git a/bin/Icons/ui/home/256/home.png b/bin/Icons/ui/home/256/home.png new file mode 100644 index 0000000000..622984c913 Binary files /dev/null and b/bin/Icons/ui/home/256/home.png differ diff --git a/bin/Icons/ui/home/256/maximize-solid.png b/bin/Icons/ui/home/256/maximize-solid.png new file mode 100644 index 0000000000..65eaa43308 Binary files /dev/null and b/bin/Icons/ui/home/256/maximize-solid.png differ diff --git a/bin/Icons/ui/home/256/play-button-arrowhead.png b/bin/Icons/ui/home/256/play-button-arrowhead.png new file mode 100644 index 0000000000..37e9cefe93 Binary files /dev/null and b/bin/Icons/ui/home/256/play-button-arrowhead.png differ diff --git a/bin/Icons/ui/home/256/power-off-solid.png b/bin/Icons/ui/home/256/power-off-solid.png new file mode 100644 index 0000000000..cf0ab44839 Binary files /dev/null and b/bin/Icons/ui/home/256/power-off-solid.png differ diff --git a/bin/Icons/ui/home/256/rotate-left-solid.png b/bin/Icons/ui/home/256/rotate-left-solid.png new file mode 100644 index 0000000000..5eaf29edba Binary files /dev/null and b/bin/Icons/ui/home/256/rotate-left-solid.png differ diff --git a/bin/Icons/ui/home/256/screenshot.png b/bin/Icons/ui/home/256/screenshot.png new file mode 100644 index 0000000000..091e2bbc2e Binary files /dev/null and b/bin/Icons/ui/home/256/screenshot.png differ diff --git a/bin/Icons/ui/home/256/settings.png b/bin/Icons/ui/home/256/settings.png new file mode 100644 index 0000000000..d682b9b27c Binary files /dev/null and b/bin/Icons/ui/home/256/settings.png differ diff --git a/bin/Icons/ui/home/256/sliders-solid.png b/bin/Icons/ui/home/256/sliders-solid.png new file mode 100644 index 0000000000..cfb030721e Binary files /dev/null and b/bin/Icons/ui/home/256/sliders-solid.png differ diff --git a/bin/Icons/ui/home/256/trophy-solid.png b/bin/Icons/ui/home/256/trophy-solid.png new file mode 100644 index 0000000000..1bd98a9ac9 Binary files /dev/null and b/bin/Icons/ui/home/256/trophy-solid.png differ diff --git a/bin/Icons/ui/home/256/user-group-solid.png b/bin/Icons/ui/home/256/user-group-solid.png new file mode 100644 index 0000000000..a154fa5ba9 Binary files /dev/null and b/bin/Icons/ui/home/256/user-group-solid.png differ diff --git a/bin/Icons/ui/home/256/video-camera.png b/bin/Icons/ui/home/256/video-camera.png new file mode 100644 index 0000000000..9f5460fba6 Binary files /dev/null and b/bin/Icons/ui/home/256/video-camera.png differ diff --git a/bin/Icons/ui/home/32/bug-solid.png b/bin/Icons/ui/home/32/bug-solid.png new file mode 100644 index 0000000000..401fa0ea27 Binary files /dev/null and b/bin/Icons/ui/home/32/bug-solid.png differ diff --git a/bin/Icons/ui/home/32/circle-left-solid.png b/bin/Icons/ui/home/32/circle-left-solid.png new file mode 100644 index 0000000000..1acf201d63 Binary files /dev/null and b/bin/Icons/ui/home/32/circle-left-solid.png differ diff --git a/bin/Icons/ui/home/32/display-solid.png b/bin/Icons/ui/home/32/display-solid.png new file mode 100644 index 0000000000..8a48c89494 Binary files /dev/null and b/bin/Icons/ui/home/32/display-solid.png differ diff --git a/bin/Icons/ui/home/32/floppy-disk-solid.png b/bin/Icons/ui/home/32/floppy-disk-solid.png new file mode 100644 index 0000000000..836c6523c3 Binary files /dev/null and b/bin/Icons/ui/home/32/floppy-disk-solid.png differ diff --git a/bin/Icons/ui/home/32/gamepad-solid.png b/bin/Icons/ui/home/32/gamepad-solid.png new file mode 100644 index 0000000000..b783fee792 Binary files /dev/null and b/bin/Icons/ui/home/32/gamepad-solid.png differ diff --git a/bin/Icons/ui/home/32/gauge-solid.png b/bin/Icons/ui/home/32/gauge-solid.png new file mode 100644 index 0000000000..9853811ae2 Binary files /dev/null and b/bin/Icons/ui/home/32/gauge-solid.png differ diff --git a/bin/Icons/ui/home/32/headphones-solid.png b/bin/Icons/ui/home/32/headphones-solid.png new file mode 100644 index 0000000000..e2cfabb07c Binary files /dev/null and b/bin/Icons/ui/home/32/headphones-solid.png differ diff --git a/bin/Icons/ui/home/32/home.png b/bin/Icons/ui/home/32/home.png new file mode 100644 index 0000000000..2ec05eab24 Binary files /dev/null and b/bin/Icons/ui/home/32/home.png differ diff --git a/bin/Icons/ui/home/32/maximize-solid.png b/bin/Icons/ui/home/32/maximize-solid.png new file mode 100644 index 0000000000..7a0a9e4fb6 Binary files /dev/null and b/bin/Icons/ui/home/32/maximize-solid.png differ diff --git a/bin/Icons/ui/home/32/play-button-arrowhead.png b/bin/Icons/ui/home/32/play-button-arrowhead.png new file mode 100644 index 0000000000..6ce5505f4d Binary files /dev/null and b/bin/Icons/ui/home/32/play-button-arrowhead.png differ diff --git a/bin/Icons/ui/home/32/power-off-solid.png b/bin/Icons/ui/home/32/power-off-solid.png new file mode 100644 index 0000000000..21ebad8e69 Binary files /dev/null and b/bin/Icons/ui/home/32/power-off-solid.png differ diff --git a/bin/Icons/ui/home/32/rotate-left-solid.png b/bin/Icons/ui/home/32/rotate-left-solid.png new file mode 100644 index 0000000000..b466d28a8e Binary files /dev/null and b/bin/Icons/ui/home/32/rotate-left-solid.png differ diff --git a/bin/Icons/ui/home/32/screenshot.png b/bin/Icons/ui/home/32/screenshot.png new file mode 100644 index 0000000000..97255279b4 Binary files /dev/null and b/bin/Icons/ui/home/32/screenshot.png differ diff --git a/bin/Icons/ui/home/32/settings.png b/bin/Icons/ui/home/32/settings.png new file mode 100644 index 0000000000..eeaeceef7d Binary files /dev/null and b/bin/Icons/ui/home/32/settings.png differ diff --git a/bin/Icons/ui/home/32/sliders-solid.png b/bin/Icons/ui/home/32/sliders-solid.png new file mode 100644 index 0000000000..ca4c75df23 Binary files /dev/null and b/bin/Icons/ui/home/32/sliders-solid.png differ diff --git a/bin/Icons/ui/home/32/trophy-solid.png b/bin/Icons/ui/home/32/trophy-solid.png new file mode 100644 index 0000000000..9d94e14b97 Binary files /dev/null and b/bin/Icons/ui/home/32/trophy-solid.png differ diff --git a/bin/Icons/ui/home/32/user-group-solid.png b/bin/Icons/ui/home/32/user-group-solid.png new file mode 100644 index 0000000000..114c45599d Binary files /dev/null and b/bin/Icons/ui/home/32/user-group-solid.png differ diff --git a/bin/Icons/ui/home/32/video-camera.png b/bin/Icons/ui/home/32/video-camera.png new file mode 100644 index 0000000000..d8fa8dfaaf Binary files /dev/null and b/bin/Icons/ui/home/32/video-camera.png differ diff --git a/bin/Icons/ui/loading.png b/bin/Icons/ui/loading.png new file mode 100644 index 0000000000..33288035c7 Binary files /dev/null and b/bin/Icons/ui/loading.png differ diff --git a/buildfiles/cmake/ConfigureCompiler.cmake b/buildfiles/cmake/ConfigureCompiler.cmake index be900d13c2..ea8cd3200b 100644 --- a/buildfiles/cmake/ConfigureCompiler.cmake +++ b/buildfiles/cmake/ConfigureCompiler.cmake @@ -96,11 +96,6 @@ else() # This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts. add_link_options(-Wl,--exclude-libs,ALL) elseif(WIN32) - add_compile_definitions(__STDC_FORMAT_MACROS=1) - - # Workaround for mingw64 (MSYS2) - add_link_options(-Wl,--allow-multiple-definition) - # Increase stack limit to 8 MB add_link_options(-Wl,--stack -Wl,8388608) endif() diff --git a/buildfiles/cmake/FindWolfSSL.cmake b/buildfiles/cmake/FindWolfSSL.cmake index d2e30be60b..35f316837c 100644 --- a/buildfiles/cmake/FindWolfSSL.cmake +++ b/buildfiles/cmake/FindWolfSSL.cmake @@ -1,4 +1,3 @@ -set(WOLFSSL_LIBRARY ON) -set(WOLFSSL_INCLUDE_DIR ON) -set(WOLFSSL_LIBRARIES wolfssl) +set(WOLFSSL_LIBRARY wolfssl) +set(WOLFSSL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/wolfssl) set(WOLFSSL_FOUND TRUE) diff --git a/buildfiles/cmake/FindZLIB.cmake b/buildfiles/cmake/FindZLIB.cmake index 0a29abafa9..ff5869a5f7 100644 --- a/buildfiles/cmake/FindZLIB.cmake +++ b/buildfiles/cmake/FindZLIB.cmake @@ -3,9 +3,9 @@ if(USE_SYSTEM_ZLIB) find_package(ZLIB) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) else() - add_library(ZLIB::ZLIB INTERFACE IMPORTED) + add_library(ZLIB::ZLIB STATIC IMPORTED) set_target_properties(ZLIB::ZLIB PROPERTIES - INTERFACE_LINK_LIBRARIES zlibstatic + IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/3rdparty/zlib/zlib/libzlibstatic.a" INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/3rdparty/zlib/zlib;${CMAKE_BINARY_DIR}/3rdparty/zlib/zlib") set(ZLIB_FOUND TRUE) endif() diff --git a/buildfiles/msvc/common_default.props b/buildfiles/msvc/common_default.props index 04f6502839..bfddbb5465 100644 --- a/buildfiles/msvc/common_default.props +++ b/buildfiles/msvc/common_default.props @@ -13,7 +13,7 @@ stdcpplatest - stdcpp20 + stdcpp23 _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING=1;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) false -d2FH4- %(AdditionalOptions) diff --git a/buildfiles/msvc/rpcs3_default.props b/buildfiles/msvc/rpcs3_default.props index d8df69d503..b612560a8e 100644 --- a/buildfiles/msvc/rpcs3_default.props +++ b/buildfiles/msvc/rpcs3_default.props @@ -7,7 +7,7 @@ $(SolutionDir)build\lib\$(Configuration)-$(Platform)\ $(SolutionDir)build\lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) $(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\ - $(SolutionDir)packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-static.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-static.targets + $(SolutionDir)packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-static.1.8.1.8\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-static.targets true @@ -131,6 +131,97 @@ LLVMX86Info.lib; LLVMX86TargetMCA.lib; LLVMXRay.lib; + absl_log_severity.lib; + absl_raw_logging_internal.lib; + absl_spinlock_wait.lib; + absl_malloc_internal.lib; + absl_base.lib; + absl_throw_delegate.lib; + absl_scoped_set_env.lib; + absl_strerror.lib; + absl_poison.lib; + absl_tracing_internal.lib; + absl_hashtablez_sampler.lib; + absl_raw_hash_set.lib; + absl_crc_cpu_detect.lib; + absl_crc_internal.lib; + absl_crc32c.lib; + absl_crc_cord_state.lib; + absl_stacktrace.lib; + absl_symbolize.lib; + absl_examine_stack.lib; + absl_failure_signal_handler.lib; + absl_debugging_internal.lib; + absl_demangle_internal.lib; + absl_decode_rust_punycode.lib; + absl_demangle_rust.lib; + absl_utf8_for_code_point.lib; + absl_leak_check.lib; + absl_flags_program_name.lib; + absl_flags_config.lib; + absl_flags_marshalling.lib; + absl_flags_commandlineflag_internal.lib; + absl_flags_commandlineflag.lib; + absl_flags_private_handle_accessor.lib; + absl_flags_reflection.lib; + absl_flags_internal.lib; + absl_flags_usage_internal.lib; + absl_flags_usage.lib; + absl_flags_parse.lib; + absl_hash.lib; + absl_city.lib; + absl_low_level_hash.lib; + absl_log_internal_check_op.lib; + absl_log_internal_conditions.lib; + absl_log_internal_format.lib; + absl_log_internal_globals.lib; + absl_log_internal_proto.lib; + absl_log_internal_message.lib; + absl_log_internal_log_sink_set.lib; + absl_log_internal_nullguard.lib; + absl_die_if_null.lib; + absl_log_flags.lib; + absl_log_globals.lib; + absl_log_initialize.lib; + absl_log_sink.lib; + absl_log_internal_structured_proto.lib; + absl_vlog_config_internal.lib; + absl_log_internal_fnmatch.lib; + absl_int128.lib; + absl_exponential_biased.lib; + absl_periodic_sampler.lib; + absl_random_distributions.lib; + absl_random_seed_gen_exception.lib; + absl_random_seed_sequences.lib; + absl_random_internal_seed_material.lib; + absl_random_internal_entropy_pool.lib; + absl_random_internal_platform.lib; + absl_random_internal_randen.lib; + absl_random_internal_randen_slow.lib; + absl_random_internal_randen_hwaes.lib; + absl_random_internal_randen_hwaes_impl.lib; + absl_random_internal_distribution_test_util.lib; + absl_status.lib; + absl_statusor.lib; + absl_string_view.lib; + absl_strings.lib; + absl_strings_internal.lib; + absl_str_format_internal.lib; + absl_cord_internal.lib; + absl_cordz_functions.lib; + absl_cordz_handle.lib; + absl_cordz_info.lib; + absl_cordz_sample_token.lib; + absl_cord.lib; + absl_graphcycles_internal.lib; + absl_kernel_timeout_internal.lib; + absl_synchronization.lib; + absl_time.lib; + absl_civil_time.lib; + absl_time_zone.lib; + libutf8_validity.lib; + libutf8_range.lib; + libprotobuf-lite.lib; $(SolutionDir)3rdparty\ffmpeg\lib\windows\x86_64 8388608 diff --git a/rpcs3.sln b/rpcs3.sln index acc5528038..4cb0830474 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -9,11 +9,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emucore", "rpcs3\emucore.vc {2C902C67-985C-4BE0-94A3-E0FE2EB929A3} = {2C902C67-985C-4BE0-94A3-E0FE2EB929A3} {3C67A2FF-4710-402A-BE3E-31B0CB0576DF} = {3C67A2FF-4710-402A-BE3E-31B0CB0576DF} {5228F863-E0DD-4DE7-AA7B-5C52B14CD4D0} = {5228F863-E0DD-4DE7-AA7B-5C52B14CD4D0} + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D} = {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D} {8846A9AA-5539-4C91-8301-F54260E1A07A} = {8846A9AA-5539-4C91-8301-F54260E1A07A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build", "3rdparty\llvm\llvm_build.vcxproj", "{8BC303AB-25BE-4276-8E57-73F171B2D672}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "protobuf_build", "3rdparty\protobuf\protobuf_build.vcxproj", "{7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLGSRender", "rpcs3\GLGSRender.vcxproj", "{3384223A-6D97-4799-9862-359F85312892}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rpcs3.emu", "rpcs3.emu", "{10FBF193-D532-4CCF-B875-4C7091A7F6C2}" @@ -130,6 +133,10 @@ Global {C4A10229-4712-4BD2-B63E-50D93C67A038}.Release|x64.Build.0 = Release|x64 {8BC303AB-25BE-4276-8E57-73F171B2D672}.Debug|x64.ActiveCfg = Debug|x64 {8BC303AB-25BE-4276-8E57-73F171B2D672}.Release|x64.ActiveCfg = Release|x64 + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D}.Debug|x64.ActiveCfg = Debug|x64 + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D}.Debug|x64.Build.0 = Debug|x64 + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D}.Release|x64.ActiveCfg = Release|x64 + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D}.Release|x64.Build.0 = Release|x64 {3384223A-6D97-4799-9862-359F85312892}.Debug|x64.ActiveCfg = Debug|x64 {3384223A-6D97-4799-9862-359F85312892}.Debug|x64.Build.0 = Debug|x64 {3384223A-6D97-4799-9862-359F85312892}.Release|x64.ActiveCfg = Release|x64 @@ -240,6 +247,7 @@ Global {AC40FF01-426E-4838-A317-66354CEFAE88} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8} {C4A10229-4712-4BD2-B63E-50D93C67A038} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} {8BC303AB-25BE-4276-8E57-73F171B2D672} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668} + {7B3B4C5D-6E7F-8A9B-0C1D-2E3F4A5B6C7D} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8} {3384223A-6D97-4799-9862-359F85312892} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} {78CB2F39-B809-4A06-8329-8C0A19119D3D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} {EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8} diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 02a6bfeed4..cfc2495f15 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -8,7 +8,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake) include(ConfigureCompiler) include(CheckFunctionExists) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) if(UNIX AND NOT APPLE AND NOT ANDROID) add_compile_definitions(DATADIR="${CMAKE_INSTALL_FULL_DATADIR}/rpcs3") @@ -87,12 +87,6 @@ if (NOT ANDROID) message(FATAL_ERROR "RPCS3 requires either X11 or Wayland (or both) for Vulkan.") endif() - if(UNIX) - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package(Threads REQUIRED) - target_link_libraries(rpcs3_lib PRIVATE Threads::Threads) - endif() - if(WIN32) target_link_libraries(rpcs3_lib PRIVATE ws2_32 Iphlpapi Winmm Psapi gdi32 setupapi) else() @@ -148,8 +142,9 @@ if (NOT ANDROID) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $/GuiConfigs COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/test $/test COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt - --no-translations --no-system-d3d-compiler --no-system-dxc-compiler --no-quick-import + --no-system-d3d-compiler --no-system-dxc-compiler --no-quick-import --plugindir "$,$/plugins,$/share/qt6/plugins>" + --translationdir "$,$/translations,$/share/qt6/translations>" --verbose 0 "$") endif() @@ -194,6 +189,7 @@ if(BUILD_RPCS3_TESTS) tests/test_address_range.cpp tests/test_rsx_cfg.cpp tests/test_rsx_fp_asm.cpp + tests/test_dmux_pamf.cpp ) target_link_libraries(rpcs3_test @@ -201,6 +197,7 @@ if(BUILD_RPCS3_TESTS) rpcs3_lib rpcs3_emu GTest::gtest + GTest::gmock ) target_include_directories(rpcs3_test diff --git a/rpcs3/Emu/CMakeLists.txt b/rpcs3/Emu/CMakeLists.txt index defa1ef670..d691952fa0 100644 --- a/rpcs3/Emu/CMakeLists.txt +++ b/rpcs3/Emu/CMakeLists.txt @@ -125,6 +125,7 @@ target_sources(rpcs3_emu PRIVATE ../Loader/PSF.cpp ../Loader/PUP.cpp ../Loader/TAR.cpp + ../Loader/ISO.cpp ../Loader/TROPUSR.cpp ../Loader/TRP.cpp ) @@ -422,6 +423,7 @@ target_sources(rpcs3_emu PRIVATE Io/TopShotFearmaster.cpp Io/Turntable.cpp Io/usb_device.cpp + Io/usb_microphone.cpp Io/usb_vfs.cpp Io/usio.cpp Io/LogitechG27.cpp @@ -430,7 +432,7 @@ target_sources(rpcs3_emu PRIVATE # Np target_sources(rpcs3_emu PRIVATE - NP/fb_helpers.cpp + NP/pb_helpers.cpp NP/np_cache.cpp NP/np_gui_cache.cpp NP/np_contexts.cpp @@ -450,6 +452,7 @@ target_sources(rpcs3_emu PRIVATE NP/upnp_config.cpp NP/upnp_handler.cpp NP/ip_address.cpp + NP/generated/np2_structs.pb.cc ) # Memory @@ -484,6 +487,7 @@ target_sources(rpcs3_emu PRIVATE RSX/NV47/HW/nv406e.cpp RSX/NV47/HW/nv4097.cpp RSX/Overlays/FriendsList/overlay_friends_list_dialog.cpp + RSX/Overlays/HomeMenu/overlay_home_icons.cpp RSX/Overlays/HomeMenu/overlay_home_menu.cpp RSX/Overlays/HomeMenu/overlay_home_menu_components.cpp RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp @@ -497,6 +501,8 @@ target_sources(rpcs3_emu PRIVATE RSX/Overlays/overlays.cpp RSX/Overlays/overlay_animated_icon.cpp RSX/Overlays/overlay_animation.cpp + RSX/Overlays/overlay_audio.cpp + RSX/Overlays/overlay_checkbox.cpp RSX/Overlays/overlay_compile_notification.cpp RSX/Overlays/overlay_controls.cpp RSX/Overlays/overlay_cursor.cpp @@ -513,6 +519,9 @@ target_sources(rpcs3_emu PRIVATE RSX/Overlays/overlay_perf_metrics.cpp RSX/Overlays/overlay_progress_bar.cpp RSX/Overlays/overlay_save_dialog.cpp + RSX/Overlays/overlay_select.cpp + RSX/Overlays/overlay_slider.cpp + RSX/Overlays/overlay_tabs.cpp RSX/Overlays/overlay_trophy_notification.cpp RSX/Overlays/overlay_user_list_dialog.cpp RSX/Overlays/overlay_utils.cpp @@ -545,7 +554,7 @@ target_sources(rpcs3_emu PRIVATE RSX/rsx_vertex_data.cpp ) -if(NOT ANDROID) +if(NOT ANDROID AND NOT APPLE) target_sources(rpcs3_emu PRIVATE RSX/GL/GLCommonDecompiler.cpp RSX/GL/GLCompute.cpp @@ -636,6 +645,9 @@ if(TARGET 3rdparty_vulkan) endif() endif() +if(NOT WIN32) + set(THREADS_PREFER_PTHREAD_FLAG ON) +endif() find_package(Threads REQUIRED) target_link_libraries(rpcs3_emu @@ -655,7 +667,7 @@ target_link_libraries(rpcs3_emu 3rdparty::soundtouch 3rdparty::miniupnpc 3rdparty::libevdev - 3rdparty::flatbuffers + 3rdparty::protobuf 3rdparty::pugixml 3rdparty::vulkanmemoryallocator Threads::Threads @@ -666,6 +678,7 @@ target_link_libraries(rpcs3_emu 3rdparty::yaml-cpp 3rdparty::zlib 3rdparty::zstd + 3rdparty::libcurl ) if(APPLE) diff --git a/rpcs3/Emu/CPU/Backends/AArch64/AArch64Common.h b/rpcs3/Emu/CPU/Backends/AArch64/AArch64Common.h index dff06dfb81..2ce4fa68b3 100644 --- a/rpcs3/Emu/CPU/Backends/AArch64/AArch64Common.h +++ b/rpcs3/Emu/CPU/Backends/AArch64/AArch64Common.h @@ -20,19 +20,19 @@ namespace aarch64 sp }; - static const char* gpr_names[] = + [[maybe_unused]] static const char* gpr_names[] = { "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "x29", "x30" }; - static const char* spr_names[] = + [[maybe_unused]] static const char* spr_names[] = { "xzr", "pc", "sp" }; - static const char* spr_asm_names[] = + [[maybe_unused]] static const char* spr_asm_names[] = { "xzr", ".", "sp" }; diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index afec56f7e1..4bd5fc9157 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -206,11 +206,7 @@ struct cpu_prof // Print only 7 hash characters out of 11 (which covers roughly 48 bits) if (type_id == 2) { - fmt::append(results, "\n\t[%s", fmt::base57(be_t{name})); - results.resize(results.size() - 4); - - // Print chunk address from lowest 16 bits - fmt::append(results, "...chunk-0x%05x]: %.4f%% (%u)", (name & 0xffff) * 4, _frac * 100., count); + fmt::append(results, "\n\t[%s]: %.4f%% (%u)", spu_block_hash{name}, _frac * 100., count); } else { @@ -892,6 +888,14 @@ bool cpu_thread::check_state() noexcept store = true; } + if (flags & cpu_flag::req_exit) + { + // A request for the thread to quit has been made + flags -= cpu_flag::req_exit; + flags += cpu_flag::exit; + store = true; + } + // Can't process dbg_step if we only paused temporarily if (cpu_can_stop && flags & cpu_flag::dbg_step) { @@ -1161,13 +1165,13 @@ void cpu_thread::notify() cpu_thread& cpu_thread::operator=(thread_state) { - if (state & cpu_flag::exit) + if (state & (cpu_flag::exit + cpu_flag::req_exit)) { // Must be notified elsewhere or self-raised return *this; } - const auto old = state.fetch_add(cpu_flag::exit); + const auto old = state.fetch_add(cpu_flag::req_exit); if (old & cpu_flag::wait && old.none_of(cpu_flag::again + cpu_flag::exit)) { @@ -1326,8 +1330,9 @@ extern std::shared_ptr make_disasm(const cpu_thread* cpu, shared_ptr< void cpu_thread::dump_all(std::string& ret) const { std::any func_data; + std::any misc_data; - ret += dump_misc(); + dump_misc(ret, misc_data); ret += '\n'; dump_regs(ret, func_data); ret += '\n'; @@ -1375,9 +1380,9 @@ std::vector> cpu_thread::dump_callstack_list() const return {}; } -std::string cpu_thread::dump_misc() const +void cpu_thread::dump_misc(std::string& ret, std::any& /*custom_data*/) const { - return fmt::format("Type: %s; State: %s\n", get_class() == thread_class::ppu ? "PPU" : get_class() == thread_class::spu ? "SPU" : "RSX", state.load()); + fmt::append(ret, "%s[0x%x]; State: %s\n", get_class() == thread_class::ppu ? "PPU" : get_class() == thread_class::spu ? "SPU" : "RSX", id, state.load()); } bool cpu_thread::suspend_work::push(cpu_thread* _this) noexcept diff --git a/rpcs3/Emu/CPU/CPUThread.h b/rpcs3/Emu/CPU/CPUThread.h index 5e3484f7f5..e723fd2d4b 100644 --- a/rpcs3/Emu/CPU/CPUThread.h +++ b/rpcs3/Emu/CPU/CPUThread.h @@ -29,6 +29,7 @@ enum class cpu_flag : u32 yield, // Thread is being requested to yield its execution time if it's running preempt, // Thread is being requested to preempt the execution of all CPU threads + req_exit, // Request the thread to exit dbg_global_pause, // Emulation paused dbg_pause, // Thread paused dbg_step, // Thread forced to pause after one step (one instruction, etc) @@ -39,7 +40,7 @@ enum class cpu_flag : u32 // Test stopped state constexpr bool is_stopped(bs_t state) { - return !!(state & (cpu_flag::stop + cpu_flag::exit + cpu_flag::again)); + return !!(state & (cpu_flag::stop + cpu_flag::exit + cpu_flag::again + cpu_flag::req_exit)); } // Test paused state @@ -176,7 +177,7 @@ public: virtual std::vector> dump_callstack_list() const; // Get CPU dump of misc information - virtual std::string dump_misc() const; + virtual void dump_misc(std::string& ret, std::any& /*custom_data*/) const; // Thread entry point function virtual void cpu_task() = 0; diff --git a/rpcs3/Emu/CPU/CPUTranslator.cpp b/rpcs3/Emu/CPU/CPUTranslator.cpp index 7cb9186d4d..6bd7924ea5 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.cpp +++ b/rpcs3/Emu/CPU/CPUTranslator.cpp @@ -202,16 +202,15 @@ void cpu_translator::initialize(llvm::LLVMContext& context, llvm::ExecutionEngin m_use_gfni = true; } - // Aarch64 CPUs - if (cpu == "cyclone" || cpu.contains("cortex")) +#ifdef ARCH_ARM64 + if (utils::has_dotprod()) { - m_use_fma = true; - // AVX does not use intrinsics so far - m_use_avx = true; + m_use_dotprod = true; } +#endif } -llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type) const +llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type, std::source_location src_loc) const { uint s1 = type->getScalarSizeInBits(); uint s2 = val->getType()->getScalarSizeInBits(); @@ -223,15 +222,69 @@ llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type) const if (s1 != s2) { - fmt::throw_exception("cpu_translator::bitcast(): incompatible type sizes (%u vs %u)", s1, s2); + fmt::throw_exception("cpu_translator::bitcast(): incompatible type sizes (%u vs %u)\nCalled from: %s", s1, s2, src_loc); } - if (const auto c1 = llvm::dyn_cast(val)) + if (val->getType() == type) + { + return val; + } + + llvm::CastInst* i; + llvm::Value* source_val = val; + + // Try to reuse older bitcasts + while ((i = llvm::dyn_cast_or_null(source_val)) && i->getOpcode() == llvm::Instruction::BitCast) + { + source_val = i->getOperand(0); + + if (source_val->getType() == type) + { + return source_val; + } + } + + for (auto it = source_val->use_begin(); it != source_val->use_end(); ++it) + { + llvm::Value* it_val = *it; + + if (!it_val) + { + continue; + } + + llvm::CastInst* bci = llvm::dyn_cast_or_null(it_val); + + // Walk through bitcasts + while (bci && bci->getOpcode() == llvm::Instruction::BitCast) + { + if (bci->getParent() != m_ir->GetInsertBlock()) + { + break; + } + + if (bci->getType() == type) + { + return bci; + } + + if (bci->use_begin() == bci->use_end()) + { + break; + } + + bci = llvm::dyn_cast_or_null(*bci->use_begin()); + } + } + + // Do bitcast on the source + + if (const auto c1 = llvm::dyn_cast(source_val)) { return ensure(llvm::ConstantFoldCastOperand(llvm::Instruction::BitCast, c1, type, m_module->getDataLayout())); } - return m_ir->CreateBitCast(val, type); + return m_ir->CreateBitCast(source_val, type); } template <> diff --git a/rpcs3/Emu/CPU/CPUTranslator.h b/rpcs3/Emu/CPU/CPUTranslator.h index c709349080..ab2aed8156 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.h +++ b/rpcs3/Emu/CPU/CPUTranslator.h @@ -43,6 +43,7 @@ #include #include +#include // Helper function llvm::Value* peek_through_bitcasts(llvm::Value*); @@ -567,6 +568,32 @@ struct llvm_placeholder_t } }; +template >> +struct llvm_place_stealer_t +{ + // TODO: placeholder extracting actual constant values (u64, f64, vector, etc) + + using type = T; + + static constexpr bool is_ok = true; + + llvm::Value* eval(llvm::IRBuilder<>*) const + { + return nullptr; + } + + std::tuple<> match(llvm::Value*& value, llvm::Module*) const + { + if (value && value->getType() == llvm_value_t::get_type(value->getContext())) + { + return {}; + } + + value = nullptr; + return {}; + } +}; + template struct llvm_const_int { @@ -3081,13 +3108,25 @@ protected: // Allow PSHUFB intrinsic bool m_use_ssse3 = true; +#ifdef ARCH_ARM64 + // all arm CPUS have FMA + bool m_use_fma = true; + // Should be nonsense to set this for ARM, + // but this flag is only used in SPU verification + // For now, setting this flag will speed up SPU verification + // but I will remove this later with explicit parralelism - Whatcookie + bool m_use_avx = true; + + // ARMv8 SDOT/UDOT + bool m_use_dotprod = false; +#else // Allow FMA bool m_use_fma = false; // Allow AVX bool m_use_avx = false; - +#endif // Allow skylake-x tier AVX-512 bool m_use_avx512 = false; @@ -3201,7 +3240,7 @@ public: } // Bitcast with immediate constant folding - llvm::Value* bitcast(llvm::Value* val, llvm::Type* type) const; + llvm::Value* bitcast(llvm::Value* val, llvm::Type* type, std::source_location src_loc = std::source_location::current()) const; template llvm::Value* bitcast(llvm::Value* val) @@ -3215,6 +3254,12 @@ public: return {}; } + template + static llvm_place_stealer_t match_stealer() + { + return {}; + } + template requires requires { typename llvm_common_t; } static auto match_expr(llvm::Value* v, llvm::Module* _m, T&& expr) @@ -3638,10 +3683,59 @@ public: const auto data0 = a.eval(m_ir); const auto data1 = b.eval(m_ir); const auto data2 = c.eval(m_ir); + +#if LLVM_VERSION_MAJOR >= 22 + // LLVM 22+ changed the intrinsic signature from v4i32 to v16i8 for operands 2 and 3 + result.value = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::x86_avx512_vpdpbusd_128), + {data0, m_ir->CreateBitCast(data1, get_type()), m_ir->CreateBitCast(data2, get_type())}); +#else result.value = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::x86_avx512_vpdpbusd_128), {data0, data1, data2}); +#endif return result; } +#ifdef ARCH_ARM64 +template + value_t udot(T1 a, T2 b, T3 c) + { + value_t result; + + const auto data0 = a.eval(m_ir); + const auto data1 = b.eval(m_ir); + const auto data2 = c.eval(m_ir); + + result.value = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::aarch64_neon_udot), {data0, data1, data2}); + return result; + } + + template + value_t sdot(T1 a, T2 b, T3 c) + { + value_t result; + + const auto data0 = a.eval(m_ir); + const auto data1 = b.eval(m_ir); + const auto data2 = c.eval(m_ir); + + result.value = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::aarch64_neon_sdot), {data0, data1, data2}); + return result; + } + +template + auto addp(T1 a, T2 b) + { + using T_vector = typename is_llvm_expr::type; + const auto data1 = a.eval(m_ir); + const auto data2 = b.eval(m_ir); + + const auto func = get_intrinsic(llvm::Intrinsic::aarch64_neon_addp); + + value_t result; + result.value = m_ir->CreateCall(func, {data1, data2}); + return result; + } +#endif + template value_t vpermb(T1 a, T2 b) { @@ -3890,6 +3984,15 @@ public: erase_stores({args.value...}); } + // Debug breakpoint + void debugtrap() + { + const auto _rty = llvm::Type::getVoidTy(m_context); + const auto type = llvm::FunctionType::get(_rty, {}, false); + const auto func = llvm::cast(m_ir->GetInsertBlock()->getParent()->getParent()->getOrInsertFunction("llvm.debugtrap", type).getCallee()); + m_ir->CreateCall(func); + } + template static auto pshufb(T&& a, U&& b) { diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.cpp b/rpcs3/Emu/Cell/Modules/cellAdec.cpp index dfc91c8d2f..0d0c4481e9 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAdec.cpp @@ -261,7 +261,7 @@ void LpcmDecContext::exec(ppu_thread& ppu) savestate = lpcm_dec_state::waiting_for_output_mutex_lock; output_mutex_lock: - error_occurred |= static_cast(sys_mutex_lock(ppu, output_mutex, 0) != CELL_OK); + error_occurred |= static_cast(lv2_syscall(ppu, output_mutex, 0) != CELL_OK); if (ppu.state & cpu_flag::again) { @@ -273,7 +273,7 @@ void LpcmDecContext::exec(ppu_thread& ppu) savestate = lpcm_dec_state::waiting_for_output_cond_wait; output_cond_wait: - ensure(sys_cond_wait(ppu, output_consumed, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, output_consumed, 0) == CELL_OK); // Error code isn't checked on LLE if (ppu.state & cpu_flag::again) { @@ -287,7 +287,7 @@ void LpcmDecContext::exec(ppu_thread& ppu) savestate = lpcm_dec_state::queue_mutex_lock; queue_mutex_lock: - ensure(sys_mutex_lock(ppu, queue_mutex, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, queue_mutex, 0) == CELL_OK); // Error code isn't checked on LLE if (ppu.state & cpu_flag::again) { @@ -296,7 +296,7 @@ void LpcmDecContext::exec(ppu_thread& ppu) cmd_queue.pop(cmd); - ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, queue_mutex) == CELL_OK); // Error code isn't checked on LLE cellAdec.trace("Command type: %d", static_cast(cmd.type.get())); @@ -307,7 +307,7 @@ void LpcmDecContext::exec(ppu_thread& ppu) { case LpcmDecCmdType::start_seq: // LLE sends a command to the SPU thread. The SPU thread consumes the command without doing anything, however - error_occurred |= static_cast(sys_mutex_unlock(ppu, output_mutex) != CELL_OK); + error_occurred |= static_cast(lv2_syscall(ppu, output_mutex) != CELL_OK); break; case LpcmDecCmdType::end_seq: @@ -324,11 +324,11 @@ void LpcmDecContext::exec(ppu_thread& ppu) // Doesn't do anything else notify_seq_done.cbFunc(ppu, notify_seq_done.cbArg); - error_occurred |= static_cast(sys_mutex_unlock(ppu, output_mutex) != CELL_OK); + error_occurred |= static_cast(lv2_syscall(ppu, output_mutex) != CELL_OK); break; } case LpcmDecCmdType::close: - ensure(sys_mutex_unlock(ppu, output_mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, output_mutex) == CELL_OK); // Error code isn't checked on LLE return; case LpcmDecCmdType::decode_au: @@ -685,7 +685,7 @@ void LpcmDecContext::exec(ppu_thread& ppu) notify_au_done.cbFunc(ppu, cmd.pcm_handle, notify_au_done.cbArg); output_locked = true; - error_occurred |= static_cast(sys_mutex_unlock(ppu, output_mutex) != CELL_OK); + error_occurred |= static_cast(lv2_syscall(ppu, output_mutex) != CELL_OK); const vm::var bsi_info{{ lpcm_param->channelNumber, lpcm_param->sampleRate, static_cast(output_size) }}; @@ -703,14 +703,14 @@ error_code LpcmDecContext::send_command(ppu_thread& ppu, auto&&... args) { ppu.state += cpu_flag::wait; - if (error_code ret = sys_mutex_lock(ppu, queue_size_mutex, 0); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, queue_size_mutex, 0); ret != CELL_OK) { return ret; } if (cmd_queue.full()) { - ensure(sys_mutex_unlock(ppu, queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_ADEC_ERROR_BUSY; } @@ -720,39 +720,39 @@ error_code LpcmDecContext::send_command(ppu_thread& ppu, auto&&... args) *lpcm_param = { args... }; } - if (error_code ret = sys_mutex_lock(ppu, queue_mutex, 0); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, queue_mutex, 0); ret != CELL_OK) { - ensure(sys_mutex_unlock(ppu, queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE return ret; } cmd_queue.emplace(type, std::forward(args)...); - if (error_code ret = sys_mutex_unlock(ppu, queue_mutex); ret != CELL_OK + if (error_code ret = lv2_syscall(ppu, queue_mutex); ret != CELL_OK || (ret = cmd_available.release(ppu)) != CELL_OK) { - ensure(sys_mutex_unlock(ppu, queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE return ret; } - return sys_mutex_unlock(ppu, queue_size_mutex); + return lv2_syscall(ppu, queue_size_mutex); } inline error_code LpcmDecContext::release_output(ppu_thread& ppu) { - if (error_code ret = sys_mutex_lock(ppu, output_mutex, 0); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, output_mutex, 0); ret != CELL_OK) { return ret; } output_locked = false; - if (error_code ret = sys_cond_signal(ppu, output_consumed); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, output_consumed); ret != CELL_OK) { return ret; // LLE doesn't unlock the mutex } - return sys_mutex_unlock(ppu, output_mutex); + return lv2_syscall(ppu, output_mutex); } void lpcmDecEntry(ppu_thread& ppu, vm::ptr lpcm_dec) @@ -820,13 +820,13 @@ error_code _CellAdecCoreOpOpenExt_lpcm(ppu_thread& ppu, vm::ptr const vm::var queue_mutex_attr{{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_adem06"_u64 } }}; const vm::var cond_attr{{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_adec03"_u64 } }}; - error_code ret = sys_mutex_create(ppu, handle.ptr(&LpcmDecContext::queue_size_mutex), mutex_attr); - ret = ret ? ret : sys_cond_create(ppu, handle.ptr(&LpcmDecContext::queue_size_cond), handle->queue_size_mutex, cond_attr); - ret = ret ? ret : sys_mutex_create(ppu, handle.ptr(&LpcmDecContext::unk_mutex), mutex_attr); - ret = ret ? ret : sys_cond_create(ppu, handle.ptr(&LpcmDecContext::unk_cond), handle->unk_mutex, cond_attr); - ret = ret ? ret : sys_mutex_create(ppu, handle.ptr(&LpcmDecContext::output_mutex), output_mutex_attr); - ret = ret ? ret : sys_cond_create(ppu, handle.ptr(&LpcmDecContext::output_consumed), handle->output_mutex, cond_attr); - ret = ret ? ret : sys_mutex_create(ppu, handle.ptr(&LpcmDecContext::queue_mutex), queue_mutex_attr); + error_code ret = lv2_syscall(ppu, handle.ptr(&LpcmDecContext::queue_size_mutex), mutex_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::queue_size_cond), handle->queue_size_mutex, cond_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::unk_mutex), mutex_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::unk_cond), handle->unk_mutex, cond_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::output_mutex), output_mutex_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::output_consumed), handle->output_mutex, cond_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::queue_mutex), queue_mutex_attr); ret = ret ? ret : handle->release_output(ppu); ret = ret ? ret : handle->cmd_available.init(ppu, handle.ptr(&LpcmDecContext::cmd_available), 0); ret = ret ? ret : handle->reserved2.init(ppu, handle.ptr(&LpcmDecContext::reserved2), 0); @@ -844,8 +844,8 @@ error_code _CellAdecCoreOpOpenExt_lpcm(ppu_thread& ppu, vm::ptr const auto entry = g_fxo->get().func_addr(FIND_FUNC(lpcmDecEntry)); ret = ppu_execute<&sys_ppu_thread_create>(ppu, handle.ptr(&LpcmDecContext::thread_id), entry, handle.addr(), +res->ppuThreadPriority, +res->ppuThreadStackSize, SYS_PPU_THREAD_CREATE_JOINABLE, +_name); - ret = ret ? ret : sys_mutex_create(ppu, handle.ptr(&LpcmDecContext::spurs_queue_pop_mutex), mutex_attr); - ret = ret ? ret : sys_mutex_create(ppu, handle.ptr(&LpcmDecContext::spurs_queue_push_mutex), mutex_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::spurs_queue_pop_mutex), mutex_attr); + ret = ret ? ret : lv2_syscall(ppu, handle.ptr(&LpcmDecContext::spurs_queue_push_mutex), mutex_attr); return ret; } @@ -865,8 +865,8 @@ error_code _CellAdecCoreOpClose_lpcm(ppu_thread& ppu, vm::ptr ha cellAdec.notice("_CellAdecCoreOpClose_lpcm(handle=*0x%x)", handle); - if (error_code ret = sys_mutex_lock(ppu, handle->queue_size_mutex, 0); ret != CELL_OK - || (ret = sys_mutex_lock(ppu, handle->queue_mutex, 0)) != CELL_OK) + if (error_code ret = lv2_syscall(ppu, handle->queue_size_mutex, 0); ret != CELL_OK + || (ret = lv2_syscall(ppu, handle->queue_mutex, 0)) != CELL_OK) { return ret; } @@ -875,14 +875,14 @@ error_code _CellAdecCoreOpClose_lpcm(ppu_thread& ppu, vm::ptr ha { handle->cmd_queue.emplace(LpcmDecCmdType::close); - if (error_code ret = sys_mutex_unlock(ppu, handle->queue_mutex); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, handle->queue_mutex); ret != CELL_OK) { return ret; // LLE doesn't unlock the queue size mutex } if (error_code ret = handle->cmd_available.release(ppu); ret != CELL_OK) { - ensure(sys_mutex_unlock(ppu, handle->queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, handle->queue_size_mutex) == CELL_OK); // Error code isn't checked on LLE return ret; } } @@ -893,29 +893,29 @@ error_code _CellAdecCoreOpClose_lpcm(ppu_thread& ppu, vm::ptr ha cmd.type = LpcmDecCmdType::close; } - if (error_code ret = sys_mutex_unlock(ppu, handle->queue_mutex); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, handle->queue_mutex); ret != CELL_OK) { return ret; // LLE doesn't unlock the queue size mutex } } - error_code ret = sys_mutex_unlock(ppu, handle->queue_size_mutex); + error_code ret = lv2_syscall(ppu, handle->queue_size_mutex); ret = ret ? ret : handle->release_output(ppu); vm::var thread_ret; - ret = ret ? ret : sys_ppu_thread_join(ppu, static_cast(handle->thread_id), +thread_ret); + ret = ret ? ret : lv2_syscall(ppu, static_cast(handle->thread_id), +thread_ret); - ret = ret ? ret : sys_cond_destroy(ppu, handle->queue_size_cond); - ret = ret ? ret : sys_cond_destroy(ppu, handle->unk_cond); - ret = ret ? ret : sys_cond_destroy(ppu, handle->output_consumed); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->queue_mutex); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->queue_size_mutex); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->unk_mutex); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->output_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->queue_size_cond); + ret = ret ? ret : lv2_syscall(ppu, handle->unk_cond); + ret = ret ? ret : lv2_syscall(ppu, handle->output_consumed); + ret = ret ? ret : lv2_syscall(ppu, handle->queue_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->queue_size_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->unk_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->output_mutex); ret = ret ? ret : handle->cmd_available.finalize(ppu); ret = ret ? ret : handle->reserved2.finalize(ppu); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->spurs_queue_pop_mutex); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->spurs_queue_push_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->spurs_queue_pop_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->spurs_queue_push_mutex); return ret; } @@ -1091,11 +1091,11 @@ error_code AdecContext::set_pcm_item(s32 pcm_handle, vm::ptr pcm_addr, u32 error_code AdecContext::link_frame(ppu_thread& ppu, s32 pcm_handle) { - ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE if (verify_pcm_handle(pcm_handle) == static_cast(CELL_ADEC_ERROR_FATAL)) { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_ADEC_ERROR_FATAL; } @@ -1115,27 +1115,27 @@ error_code AdecContext::link_frame(ppu_thread& ppu, s32 pcm_handle) } else { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_ADEC_ERROR_FATAL; } - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_OK; } error_code AdecContext::unlink_frame(ppu_thread& ppu, s32 pcm_handle) { - ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE if (verify_pcm_handle(pcm_handle) == static_cast(CELL_ADEC_ERROR_FATAL)) { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_ADEC_ERROR_FATAL; } if (frames_head == -1 || frames_tail == -1) { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_ADEC_ERROR_FATAL; } @@ -1146,7 +1146,7 @@ error_code AdecContext::unlink_frame(ppu_thread& ppu, s32 pcm_handle) { if (pcm_handle != frames_tail) { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_ADEC_ERROR_FATAL; } @@ -1171,7 +1171,7 @@ error_code AdecContext::unlink_frame(ppu_thread& ppu, s32 pcm_handle) frames[prev].next = next; } - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_OK; } @@ -1557,7 +1557,7 @@ error_code adecOpen(ppu_thread& ppu, vm::ptr type, vm::cptr(ppu, _this.ptr(&AdecContext::mutex), _this.ptr(&AdecContext::mutex_attribute)) == CELL_OK); // Error code isn't checked on LLE *handle = _this; @@ -1626,7 +1626,7 @@ error_code cellAdecClose(ppu_thread& ppu, vm::ptr handle) return ret; } - if (error_code ret = sys_mutex_destroy(ppu, handle->mutex); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, handle->mutex); ret != CELL_OK) { return ret; } diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.h b/rpcs3/Emu/Cell/Modules/cellAdec.h index a43c3f0aef..2216561516 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.h +++ b/rpcs3/Emu/Cell/Modules/cellAdec.h @@ -485,6 +485,19 @@ struct AdecFrame CHECK_SIZE(AdecFrame, 0x68); +template +static auto lv2_syscall(ppu_thread& ppu, auto&&... args) +{ + const auto ret = Syscall(ppu, std::forward(args)...); + + if (ppu.test_stopped()) + { + ppu.state += cpu_flag::again; + } + + return ret; +} + class AdecOutputQueue { struct entry @@ -511,10 +524,10 @@ public: this->size = 0; const vm::var mutex_attr = {{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_adem07"_u64 } }}; - ensure(sys_mutex_create(ppu, _this.ptr(&AdecOutputQueue::mutex), mutex_attr) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, _this.ptr(&AdecOutputQueue::mutex), mutex_attr) == CELL_OK); // Error code isn't checked on LLE const vm::var cond_attr = {{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_adec05"_u64 } }}; - ensure(sys_cond_create(ppu, _this.ptr(&AdecOutputQueue::cond), mutex, cond_attr) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, _this.ptr(&AdecOutputQueue::cond), mutex, cond_attr) == CELL_OK); // Error code isn't checked on LLE for (s32 i = 0; i < 4; i++) { @@ -524,12 +537,12 @@ public: error_code finalize(ppu_thread& ppu) const { - if (error_code ret = sys_cond_destroy(ppu, cond); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, cond); ret != CELL_OK) { return ret; } - if (error_code ret = sys_mutex_destroy(ppu, mutex); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, mutex); ret != CELL_OK) { return ret; } @@ -539,11 +552,11 @@ public: error_code push(ppu_thread& ppu, vm::ptr pcm_item, s32 pcm_handle) { - ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE if (entries[back].state != 0xff) { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return true; // LLE returns the result of the comparison above } @@ -554,13 +567,13 @@ public: back = (back + 1) & 3; size++; - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return CELL_OK; } const entry* pop(ppu_thread& ppu) { - ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE if (ppu.state & cpu_flag::again) // Savestate was created while waiting on the mutex { @@ -569,7 +582,7 @@ public: if (entries[front].state == 0xff) { - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return nullptr; } @@ -581,15 +594,15 @@ public: front = (front + 1) & 3; size--; - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return ret; } const entry& peek(ppu_thread& ppu) const { - ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE const entry& ret = entries[front]; - ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE + ensure(lv2_syscall(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE return ret; } }; @@ -708,39 +721,39 @@ public: const vm::var mutex_attr{{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_adem01"_u64 } }}; const vm::var cond_attr{{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_adec01"_u64 } }}; - if (error_code ret = sys_mutex_create(ppu, _this.ptr(&LpcmDecSemaphore::mutex), mutex_attr); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, _this.ptr(&LpcmDecSemaphore::mutex), mutex_attr); ret != CELL_OK) { return ret; } - return sys_cond_create(ppu, _this.ptr(&LpcmDecSemaphore::cond), mutex, cond_attr); + return lv2_syscall(ppu, _this.ptr(&LpcmDecSemaphore::cond), mutex, cond_attr); } error_code finalize(ppu_thread& ppu) const { - if (error_code ret = sys_cond_destroy(ppu, cond); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, cond); ret != CELL_OK) { return ret; } - return sys_mutex_destroy(ppu, mutex); + return lv2_syscall(ppu, mutex); } error_code release(ppu_thread& ppu) { - if (error_code ret = sys_mutex_lock(ppu, mutex, 0); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, mutex, 0); ret != CELL_OK) { return ret; } value++; - if (error_code ret = sys_cond_signal(ppu, cond); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, cond); ret != CELL_OK) { return ret; // LLE doesn't unlock the mutex } - return sys_mutex_unlock(ppu, mutex); + return lv2_syscall(ppu, mutex); } error_code acquire(ppu_thread& ppu, lpcm_dec_state& savestate) @@ -752,7 +765,7 @@ public: savestate = lpcm_dec_state::waiting_for_cmd_mutex_lock; - if (error_code ret = sys_mutex_lock(ppu, mutex, 0); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, mutex, 0); ret != CELL_OK) { return ret; } @@ -767,7 +780,7 @@ public: savestate = lpcm_dec_state::waiting_for_cmd_cond_wait; cond_wait: - if (error_code ret = sys_cond_wait(ppu, cond, 0); ret != CELL_OK) + if (error_code ret = lv2_syscall(ppu, cond, 0); ret != CELL_OK) { return ret; // LLE doesn't unlock the mutex } @@ -780,7 +793,7 @@ public: value--; - return sys_mutex_unlock(ppu, mutex); + return lv2_syscall(ppu, mutex); } }; diff --git a/rpcs3/Emu/Cell/Modules/cellAtracXdec.cpp b/rpcs3/Emu/Cell/Modules/cellAtracXdec.cpp index c55cf7b60f..fb3191bcb4 100644 --- a/rpcs3/Emu/Cell/Modules/cellAtracXdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAtracXdec.cpp @@ -295,7 +295,7 @@ void AtracXdecContext::exec(ppu_thread& ppu) { savestate = atracxdec_state::initial; - ensure(sys_mutex_lock(ppu, queue_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -310,24 +310,24 @@ void AtracXdecContext::exec(ppu_thread& ppu) savestate = atracxdec_state::waiting_for_cmd; label1_wait_for_cmd_state: - ensure(sys_cond_wait(ppu, queue_not_empty, 0) == CELL_OK); + ensure(lv2_syscall(ppu, queue_not_empty, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { return; } - ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex) == CELL_OK); } cmd_queue.pop(cmd); - ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex) == CELL_OK); savestate = atracxdec_state::checking_run_thread_1; label2_check_run_thread_1_state: - ensure(sys_mutex_lock(ppu, run_thread_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, run_thread_mutex, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -336,11 +336,11 @@ void AtracXdecContext::exec(ppu_thread& ppu) if (!run_thread) { - ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, run_thread_mutex) == CELL_OK); return; } - ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, run_thread_mutex) == CELL_OK); savestate = atracxdec_state::executing_cmd; label3_execute_cmd_state: @@ -392,7 +392,7 @@ void AtracXdecContext::exec(ppu_thread& ppu) cellAtracXdec.trace("Waiting for output to be consumed..."); - ensure(sys_mutex_lock(ppu, output_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, output_mutex, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -404,7 +404,7 @@ void AtracXdecContext::exec(ppu_thread& ppu) savestate = atracxdec_state::waiting_for_output; label4_wait_for_output_state: - ensure(sys_cond_wait(ppu, output_consumed, 0) == CELL_OK); + ensure(lv2_syscall(ppu, output_consumed, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -417,7 +417,7 @@ void AtracXdecContext::exec(ppu_thread& ppu) savestate = atracxdec_state::checking_run_thread_2; label5_check_run_thread_2_state: - ensure(sys_mutex_lock(ppu, run_thread_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, run_thread_mutex, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -426,12 +426,12 @@ void AtracXdecContext::exec(ppu_thread& ppu) if (!run_thread) { - ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK); - ensure(sys_mutex_unlock(ppu, output_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, run_thread_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, output_mutex) == CELL_OK); return; } - ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, run_thread_mutex) == CELL_OK); savestate = atracxdec_state::decoding; label6_decode_state: @@ -645,7 +645,7 @@ void AtracXdecContext::exec(ppu_thread& ppu) notify_au_done.cbFunc(ppu, cmd.pcm_handle, notify_au_done.cbArg); output_locked = true; - ensure(sys_mutex_unlock(ppu, output_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, output_mutex) == CELL_OK); const u32 output_size = decoded_samples_num * (decoder.bw_pcm & 0x7fu) * decoder.nch_out; @@ -680,7 +680,7 @@ error_code AtracXdecContext::send_command(ppu_thread& ppu, auto&&... args) if (!signal) { - ensure(sys_mutex_lock(ppu, queue_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -692,23 +692,23 @@ error_code AtracXdecContext::send_command(ppu_thread& ppu, auto&&... args) // Close command is only sent if the queue is empty on LLE if (!cmd_queue.empty()) { - ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex) == CELL_OK); return {}; } } if (cmd_queue.full()) { - ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex) == CELL_OK); return CELL_ADEC_ERROR_ATX_BUSY; } cmd_queue.emplace(std::forward(type), std::forward(args)...); - ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, queue_mutex) == CELL_OK); } - ensure(sys_cond_signal(ppu, queue_not_empty) == CELL_OK); + ensure(lv2_syscall(ppu, queue_not_empty) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -779,25 +779,25 @@ error_code _CellAdecCoreOpOpenExt_atracx(ppu_thread& ppu, vm::ptr mutex_attr{{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_atd001"_u64 } }}; const vm::var cond_attr{{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_atd002"_u64 } }}; - ensure(sys_mutex_create(ppu, handle.ptr(&AtracXdecContext::queue_mutex), mutex_attr) == CELL_OK); - ensure(sys_cond_create(ppu, handle.ptr(&AtracXdecContext::queue_not_empty), handle->queue_mutex, cond_attr) == CELL_OK); + ensure(lv2_syscall(ppu, handle.ptr(&AtracXdecContext::queue_mutex), mutex_attr) == CELL_OK); + ensure(lv2_syscall(ppu, handle.ptr(&AtracXdecContext::queue_not_empty), handle->queue_mutex, cond_attr) == CELL_OK); mutex_attr->name_u64 = "_atd003"_u64; cond_attr->name_u64 = "_atd004"_u64; - ensure(sys_mutex_create(ppu, handle.ptr(&AtracXdecContext::run_thread_mutex), mutex_attr) == CELL_OK); - ensure(sys_cond_create(ppu, handle.ptr(&AtracXdecContext::run_thread_cond), handle->run_thread_mutex, cond_attr) == CELL_OK); + ensure(lv2_syscall(ppu, handle.ptr(&AtracXdecContext::run_thread_mutex), mutex_attr) == CELL_OK); + ensure(lv2_syscall(ppu, handle.ptr(&AtracXdecContext::run_thread_cond), handle->run_thread_mutex, cond_attr) == CELL_OK); mutex_attr->name_u64 = "_atd005"_u64; cond_attr->name_u64 = "_atd006"_u64; - ensure(sys_mutex_create(ppu, handle.ptr(&AtracXdecContext::output_mutex), mutex_attr) == CELL_OK); - ensure(sys_cond_create(ppu, handle.ptr(&AtracXdecContext::output_consumed), handle->output_mutex, cond_attr) == CELL_OK); + ensure(lv2_syscall(ppu, handle.ptr(&AtracXdecContext::output_mutex), mutex_attr) == CELL_OK); + ensure(lv2_syscall(ppu, handle.ptr(&AtracXdecContext::output_consumed), handle->output_mutex, cond_attr) == CELL_OK); - ensure(sys_mutex_lock(ppu, handle->output_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_mutex, 0) == CELL_OK); handle->output_locked = false; - ensure(sys_cond_signal(ppu, handle->output_consumed) == CELL_OK); - ensure(sys_mutex_unlock(ppu, handle->output_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_consumed) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_mutex) == CELL_OK); const vm::var _name = vm::make_str("HLE ATRAC3plus decoder"); const auto entry = g_fxo->get().func_addr(FIND_FUNC(atracXdecEntry)); @@ -829,26 +829,26 @@ error_code _CellAdecCoreOpClose_atracx(ppu_thread& ppu, vm::ptrrun_thread_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, handle->run_thread_mutex, 0) == CELL_OK); handle->run_thread = false; - ensure(sys_mutex_unlock(ppu, handle->run_thread_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, handle->run_thread_mutex) == CELL_OK); handle->send_command(ppu); - ensure(sys_mutex_lock(ppu, handle->output_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_mutex, 0) == CELL_OK); handle->output_locked = false; - ensure(sys_mutex_unlock(ppu, handle->output_mutex) == CELL_OK); - ensure(sys_cond_signal(ppu, handle->output_consumed) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_consumed) == CELL_OK); vm::var thread_ret; - ensure(sys_ppu_thread_join(ppu, static_cast(handle->thread_id), +thread_ret) == CELL_OK); + ensure(lv2_syscall(ppu, static_cast(handle->thread_id), +thread_ret) == CELL_OK); - error_code ret = sys_cond_destroy(ppu, handle->queue_not_empty); - ret = ret ? ret : sys_cond_destroy(ppu, handle->run_thread_cond); - ret = ret ? ret : sys_cond_destroy(ppu, handle->output_consumed); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->queue_mutex); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->run_thread_mutex); - ret = ret ? ret : sys_mutex_destroy(ppu, handle->output_mutex); + error_code ret = lv2_syscall(ppu, handle->queue_not_empty); + ret = ret ? ret : lv2_syscall(ppu, handle->run_thread_cond); + ret = ret ? ret : lv2_syscall(ppu, handle->output_consumed); + ret = ret ? ret : lv2_syscall(ppu, handle->queue_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->run_thread_mutex); + ret = ret ? ret : lv2_syscall(ppu, handle->output_mutex); return ret != CELL_OK ? static_cast(CELL_ADEC_ERROR_FATAL) : CELL_OK; } @@ -921,7 +921,7 @@ error_code _CellAdecCoreOpReleasePcm_atracx(ppu_thread& ppu, vm::ptroutput_mutex, 0) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_mutex, 0) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -931,7 +931,7 @@ error_code _CellAdecCoreOpReleasePcm_atracx(ppu_thread& ppu, vm::ptroutput_locked = false; } - ensure(sys_cond_signal(ppu, handle->output_consumed) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_consumed) == CELL_OK); if (ppu.state & cpu_flag::again) { @@ -939,7 +939,7 @@ error_code _CellAdecCoreOpReleasePcm_atracx(ppu_thread& ppu, vm::ptroutput_mutex) == CELL_OK); + ensure(lv2_syscall(ppu, handle->output_mutex) == CELL_OK); return CELL_OK; } diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index 096f9330f4..10f9a89cf0 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -919,7 +919,7 @@ error_code cellCameraGetAttribute(s32 dev_num, s32 attrib, vm::ptr arg1, vm if (!check_dev_num(dev_num)) { - return CELL_CAMERA_ERROR_PARAM; + return { CELL_CAMERA_ERROR_PARAM, "dev_num=%d", dev_num }; } if (g_cfg.io.camera == camera_handler::null) @@ -935,7 +935,7 @@ error_code cellCameraGetAttribute(s32 dev_num, s32 attrib, vm::ptr arg1, vm if (!arg1) { - return CELL_CAMERA_ERROR_PARAM; + return { CELL_CAMERA_ERROR_PARAM, "arg1=null" }; } if (error_code error = check_resolution(dev_num)) @@ -952,7 +952,7 @@ error_code cellCameraGetAttribute(s32 dev_num, s32 attrib, vm::ptr arg1, vm if (!attr_name) // invalid attributes don't have a name { - return CELL_CAMERA_ERROR_PARAM; + return { CELL_CAMERA_ERROR_PARAM, "attrib=0x%x", attrib }; } if (arg1) @@ -983,7 +983,7 @@ error_code cellCameraSetAttribute(s32 dev_num, s32 attrib, u32 arg1, u32 arg2) if (!check_dev_num(dev_num)) { - return CELL_CAMERA_ERROR_PARAM; + return { CELL_CAMERA_ERROR_PARAM, "dev_num=%d", dev_num }; } if (g_cfg.io.camera == camera_handler::null) @@ -1004,7 +1004,7 @@ error_code cellCameraSetAttribute(s32 dev_num, s32 attrib, u32 arg1, u32 arg2) if (!attr_name) // invalid attributes don't have a name { - return CELL_CAMERA_ERROR_PARAM; + return { CELL_CAMERA_ERROR_PARAM, "attrib=0x%x", attrib }; } g_camera.set_attr(attrib, arg1, arg2); diff --git a/rpcs3/Emu/Cell/Modules/cellDmux.cpp b/rpcs3/Emu/Cell/Modules/cellDmux.cpp index d7f6f84f3f..7c2fe6f1a9 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmux.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDmux.cpp @@ -1,16 +1,14 @@ #include "stdafx.h" -#include "Emu/System.h" -#include "Emu/IdManager.h" -#include "Emu/Cell/PPUModule.h" +#include "Emu/Cell/lv2/sys_mutex.h" #include "Emu/Cell/lv2/sys_sync.h" +#include "Emu/Cell/lv2/sys_timer.h" +#include "Emu/Cell/PPUModule.h" +#include "Emu/savestate_utils.hpp" +#include "util/asm.hpp" #include "cellPamf.h" #include "cellDmux.h" -#include "util/asm.hpp" - -#include - LOG_CHANNEL(cellDmux); template <> @@ -31,1331 +29,1209 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } -/* Demuxer Thread Classes */ - -enum +static error_code get_error(u32 internal_error) { - /* http://dvd.sourceforge.net/dvdinfo/mpeghdrs.html */ - - PACKET_START_CODE_MASK = 0xffffff00, - PACKET_START_CODE_PREFIX = 0x00000100, - - PACK_START_CODE = 0x000001ba, - SYSTEM_HEADER_START_CODE = 0x000001bb, - PRIVATE_STREAM_1 = 0x000001bd, - PADDING_STREAM = 0x000001be, - PRIVATE_STREAM_2 = 0x000001bf, -}; - -struct DemuxerStream -{ - u32 addr; - u32 size; - u64 userdata; - bool discontinuity; - - template - bool get(T& out) + switch (internal_error) { - if (sizeof(T) > size) return false; + case 0: return CELL_OK; + case 1: return CELL_DMUX_ERROR_FATAL; + case 2: // Error values two to five are all converted to CELL_DMUX_ERROR_ARG. + case 3: + case 4: + case 5: return CELL_DMUX_ERROR_ARG; + default: return CELL_DMUX_ERROR_FATAL; + } +} - std::memcpy(&out, vm::base(addr), sizeof(T)); - addr += sizeof(T); - size -= sizeof(T); +static inline std::span> get_es_handles(vm::ptr handle) +{ + return { vm::pptr::make(handle.addr() + sizeof(DmuxContext)).get_ptr(), static_cast(handle->enabled_es_num) }; +} - return true; +static inline vm::ptr get_au_queue_elements(vm::ptr es_handle) +{ + return vm::ptr::make(es_handle.addr() + sizeof(DmuxEsContext)); +} + +static inline vm::cptr get_core_ops() +{ + return vm::cptr::make(*ppu_module_manager::cellDmuxPamf.variables.find(0x28b2b7b2)->second.export_addr); +} + +template +static auto lv2_syscall(ppu_thread& ppu, auto&&... args) +{ + const auto ret = Syscall(ppu, std::forward(args)...); + + if (ppu.test_stopped()) + { + ppu.state += cpu_flag::again; } - template - bool peek(T& out, u32 shift = 0) - { - if (sizeof(T) + shift > size) return false; + return ret; +} - std::memcpy(&out, vm::base(addr + shift), sizeof(T)); - return true; - } +// Callbacks for cellDmuxPamf - void skip(u32 count) - { - addr += count; - size = size > count ? size - count : 0; - } - - bool check(u32 count) const - { - return count <= size; - } - - u64 get_ts(u8 c) - { - u8 v[4]; get(v); - return - ((u64{c} & 0x0e) << 29) | - ((u64{v[0]}) << 21) | - ((u64{v[1]} & 0x7e) << 15) | - ((u64{v[2]}) << 7) | (u64{v[3]} >> 1); - } -}; - -struct PesHeader +static error_code notify_demux_done(ppu_thread& ppu, vm::ptr core_handle, u32 error, vm::ptr handle) { - u64 pts; - u64 dts; - u8 size; - bool has_ts; - bool is_ok; + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; - PesHeader(DemuxerStream& stream); -}; - -class ElementaryStream; -class Demuxer; - -enum DemuxerJobType -{ - dmuxSetStream, - dmuxResetStream, - dmuxResetStreamAndWaitDone, - dmuxEnableEs, - dmuxDisableEs, - dmuxResetEs, - dmuxFlushEs, - dmuxClose, -}; - -struct DemuxerTask -{ - DemuxerJobType type; - - union + if (!savestate_lock) { - DemuxerStream stream; + ppu.state += cpu_flag::again; + return {}; + } - struct + cellDmux.trace("notify_demux_done(core_handle=*0x%x, error=%d, handle=*0x%x)", core_handle, error, handle); + + ensure(!!handle); // Not checked on LLE + + ensure(lv2_syscall(ppu, handle->_dx_mhd, 0) == CELL_OK); // Failing this check on LLE would result in it dereferencing an invalid pointer. + handle->dmux_state = DMUX_STOPPED; + ensure(lv2_syscall(ppu, handle->_dx_mhd) == CELL_OK); // Failing this check on LLE would result in it dereferencing an invalid pointer. + + if (handle->_this) + { + const vm::var msg{{ .msgType = CELL_DMUX_MSG_TYPE_DEMUX_DONE, .supplementalInfo = handle->user_data }}; + handle->dmux_cb.cbFunc(ppu, handle, msg, handle->dmux_cb.cbArg); + } + + return CELL_OK; +} + +static error_code notify_fatal_err(ppu_thread& ppu, vm::ptr core_handle, u32 error, vm::ptr handle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.error("notify_fatal_err(core_handle=*0x%x, error=%d, handle=*0x%x)", core_handle, error, handle); + + ensure(!!handle); // Not checked on LLE + + const vm::var msg{{ .msgType = CELL_DMUX_MSG_TYPE_FATAL_ERR, .supplementalInfo = static_cast(get_error(error)) }}; + return handle->dmux_cb.cbFunc(ppu, handle, msg, handle->dmux_cb.cbArg); +} + +static error_code notify_prog_end_code(ppu_thread& ppu, vm::ptr core_handle, vm::ptr handle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("notify_prog_end_code(core_handle=*0x%x, handle=*0x%x)", core_handle, handle); + + ensure(!!handle); // Not checked on LLE + + if (handle->_this) + { + const vm::var msg{{ .msgType = CELL_DMUX_MSG_TYPE_PROG_END_CODE, .supplementalInfo = handle->user_data }}; + handle->dmux_cb.cbFunc(ppu, handle, msg, handle->dmux_cb.cbArg); + } + + return CELL_OK; +} + +static error_code notify_es_au_found(ppu_thread& ppu, vm::ptr core_es_handle, vm::cptr au_info, vm::ptr es_handle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.trace("notify_es_au_found(core_es_handle=*0x%x, au_info=*0x%x, es_handle=*0x%x)", core_es_handle, au_info, es_handle); + + ensure(!!au_info && !!es_handle); // Not checked on LLE + + const auto fatal_err = [&](be_t es_is_enabled, error_code ret) + { + if (es_is_enabled) { - u32 es; - u32 auInfo_ptr_addr; - u32 auSpec_ptr_addr; - ElementaryStream* es_ptr; - } es; + const vm::var demuxerMsg{{ .msgType = CELL_DMUX_MSG_TYPE_FATAL_ERR, .supplementalInfo = static_cast(ret) }}; + es_handle->dmux_handle->dmux_cb.cbFunc(ppu, es_handle->dmux_handle, demuxerMsg, es_handle->dmux_handle->dmux_cb.cbArg); + } }; - DemuxerTask() - { - } - - DemuxerTask(DemuxerJobType type) - : type(type) - { - } -}; - -class ElementaryStream -{ - std::mutex m_mutex; - - squeue_t entries; // AU starting addresses - u32 put_count = 0; // number of AU written - u32 got_count = 0; // number of AU obtained by GetAu(Ex) - u32 released = 0; // number of AU released - - u32 put; // AU that is being written now - - bool is_full(u32 space); - -public: - static const u32 id_base = 1; - static const u32 id_step = 1; - static const u32 id_count = 1023; - SAVESTATE_INIT_POS(34); - - ElementaryStream(Demuxer* dmux, u32 addr, u32 size, u32 fidMajor, u32 fidMinor, u32 sup1, u32 sup2, vm::ptr cbFunc, u32 cbArg, u32 spec); - - Demuxer* dmux; - const u32 id = idm::last_id(); - const u32 memAddr; - const u32 memSize; - const u32 fidMajor; - const u32 fidMinor; - const u32 sup1; - const u32 sup2; - const vm::ptr cbFunc; - const u32 cbArg; - const u32 spec; //addr - - std::vector raw_data; // demultiplexed data stream (managed by demuxer thread) - usz raw_pos = 0; // should be <= raw_data.size() - u64 last_dts = CODEC_TS_INVALID; - u64 last_pts = CODEC_TS_INVALID; - - void push(DemuxerStream& stream, u32 size); // called by demuxer thread (not multithread-safe) - - bool isfull(u32 space); - - void push_au(u32 size, u64 dts, u64 pts, u64 userdata, bool rap, u32 specific); - - bool release(); - - bool peek(u32& out_data, bool no_ex, u32& out_spec, bool update_index); - - void reset(); -}; - -class Demuxer : public ppu_thread -{ -public: - squeue_t job; - const u32 memAddr; - const u32 memSize; - const vm::ptr cbFunc; - const u32 cbArg; - volatile bool is_finished = false; - volatile bool is_closed = false; - atomic_t is_running = false; - atomic_t is_working = false; - - Demuxer(u32 addr, u32 size, vm::ptr func, u32 arg) - : ppu_thread({}, "", 0) - , memAddr(addr) - , memSize(size) - , cbFunc(func) - , cbArg(arg) - { - } - - void non_task() - { - DemuxerTask task; - DemuxerStream stream = {}; - ElementaryStream* esALL[96]{}; - ElementaryStream** esAVC = &esALL[0]; // AVC (max 16 minus M2V count) - //ElementaryStream** esM2V = &esALL[16]; // M2V (max 16 minus AVC count) - //ElementaryStream** esDATA = &esALL[32]; // user data (max 16) - ElementaryStream** esATX = &esALL[48]; // ATRAC3+ (max 16) - //ElementaryStream** esAC3 = &esALL[64]; // AC3 (max 16) - //ElementaryStream** esPCM = &esALL[80]; // LPCM (max 16) - - u32 cb_add = 0; - - while (true) - { - if (Emu.IsStopped() || is_closed) - { - break; - } - - if (!job.try_peek(task) && is_running && stream.addr) - { - // default task (demuxing) (if there is no other work) - be_t code; - be_t len; - - if (!stream.peek(code)) - { - // demuxing finished - is_running = false; - - // callback - auto dmuxMsg = vm::ptr::make(memAddr + (cb_add ^= 16)); - dmuxMsg->msgType = CELL_DMUX_MSG_TYPE_DEMUX_DONE; - dmuxMsg->supplementalInfo = stream.userdata; - cbFunc(*this, id, dmuxMsg, cbArg); - lv2_obj::sleep(*this); - - is_working = false; - - stream = {}; - - continue; - } - - switch (code) - { - case PACK_START_CODE: - { - if (!stream.check(14)) - { - fmt::throw_exception("End of stream (PACK_START_CODE)"); - } - stream.skip(14); - break; - } - - case SYSTEM_HEADER_START_CODE: - { - if (!stream.check(18)) - { - fmt::throw_exception("End of stream (SYSTEM_HEADER_START_CODE)"); - } - stream.skip(18); - break; - } - - case PADDING_STREAM: - { - if (!stream.check(6)) - { - fmt::throw_exception("End of stream (PADDING_STREAM)"); - } - stream.skip(4); - stream.get(len); - - if (!stream.check(len)) - { - fmt::throw_exception("End of stream (PADDING_STREAM, len=%d)", len); - } - stream.skip(len); - break; - } - - case PRIVATE_STREAM_2: - { - if (!stream.check(6)) - { - fmt::throw_exception("End of stream (PRIVATE_STREAM_2)"); - } - stream.skip(4); - stream.get(len); - - cellDmux.notice("PRIVATE_STREAM_2 (%d)", len); - - if (!stream.check(len)) - { - fmt::throw_exception("End of stream (PRIVATE_STREAM_2, len=%d)", len); - } - stream.skip(len); - break; - } - - case PRIVATE_STREAM_1: - { - // audio and user data stream - DemuxerStream backup = stream; - - if (!stream.check(6)) - { - fmt::throw_exception("End of stream (PRIVATE_STREAM_1)"); - } - stream.skip(4); - stream.get(len); - - if (!stream.check(len)) - { - fmt::throw_exception("End of stream (PRIVATE_STREAM_1, len=%d)", len); - } - - const PesHeader pes(stream); - if (!pes.is_ok) - { - fmt::throw_exception("PesHeader error (PRIVATE_STREAM_1, len=%d)", len); - } - - if (len < pes.size + 4) - { - fmt::throw_exception("End of block (PRIVATE_STREAM_1, PesHeader + fid_minor, len=%d)", len); - } - len -= pes.size + 4; - - u8 fid_minor; - if (!stream.get(fid_minor)) - { - fmt::throw_exception("End of stream (PRIVATE_STREAM1, fid_minor)"); - } - - const u32 ch = fid_minor % 16; - if ((fid_minor & -0x10) == 0 && esATX[ch]) - { - ElementaryStream& es = *esATX[ch]; - if (es.raw_data.size() > 1024 * 1024) - { - stream = backup; - std::this_thread::sleep_for(1ms); // hack - continue; - } - - if (len < 3 || !stream.check(3)) - { - fmt::throw_exception("End of block (ATX, unknown header, len=%d)", len); - } - len -= 3; - stream.skip(3); - - if (pes.has_ts) - { - es.last_dts = pes.dts; - es.last_pts = pes.pts; - } - - es.push(stream, len); - - while (true) - { - auto const size = es.raw_data.size() - es.raw_pos; // size of available new data - auto const data = es.raw_data.data() + es.raw_pos; // pointer to available data - - if (size < 8) break; // skip if cannot read ATS header - - if (data[0] != 0x0f || data[1] != 0xd0) - { - fmt::throw_exception("ATX: 0x0fd0 header not found (ats=0x%llx)", *reinterpret_cast*>(data)); - } - - u32 frame_size = (((u32{data[2]} & 0x3) << 8) | u32{data[3]}) * 8 + 8; - - if (size < frame_size + 8) break; // skip non-complete AU - - if (es.isfull(frame_size + 8)) break; // skip if cannot push AU - - es.push_au(frame_size + 8, es.last_dts, es.last_pts, stream.userdata, false /* TODO: set correct value */, 0); - - //cellDmux.notice("ATX AU pushed (ats=0x%llx, frame_size=%d)", *(be_t*)data, frame_size); - - auto esMsg = vm::ptr::make(memAddr + (cb_add ^= 16)); - esMsg->msgType = CELL_DMUX_ES_MSG_TYPE_AU_FOUND; - esMsg->supplementalInfo = stream.userdata; - es.cbFunc(*this, id, es.id, esMsg, es.cbArg); - lv2_obj::sleep(*this); - } - } - else - { - cellDmux.notice("PRIVATE_STREAM_1 (len=%d, fid_minor=0x%x)", len, fid_minor); - stream.skip(len); - } - break; - } - - case 0x1e0: case 0x1e1: case 0x1e2: case 0x1e3: - case 0x1e4: case 0x1e5: case 0x1e6: case 0x1e7: - case 0x1e8: case 0x1e9: case 0x1ea: case 0x1eb: - case 0x1ec: case 0x1ed: case 0x1ee: case 0x1ef: - { - // video stream (AVC or M2V) - DemuxerStream backup = stream; - - if (!stream.check(6)) - { - fmt::throw_exception("End of stream (video, code=0x%x)", code); - } - stream.skip(4); - stream.get(len); - - if (!stream.check(len)) - { - fmt::throw_exception("End of stream (video, code=0x%x, len=%d)", code, len); - } - - const PesHeader pes(stream); - if (!pes.is_ok) - { - fmt::throw_exception("PesHeader error (video, code=0x%x, len=%d)", code, len); - } - - if (len < pes.size + 3) - { - fmt::throw_exception("End of block (video, code=0x%x, PesHeader)", code); - } - len -= pes.size + 3; - - const u32 ch = code % 16; - if (esAVC[ch]) - { - ElementaryStream& es = *esAVC[ch]; - - const u32 old_size = ::size32(es.raw_data); - if (es.isfull(old_size)) - { - stream = backup; - std::this_thread::sleep_for(1ms); // hack - continue; - } - - if ((pes.has_ts && old_size) || old_size >= 0x69800) - { - // push AU if it becomes too big or the next packet contains PTS/DTS - es.push_au(old_size, es.last_dts, es.last_pts, stream.userdata, false /* TODO: set correct value */, 0); - - // callback - auto esMsg = vm::ptr::make(memAddr + (cb_add ^= 16)); - esMsg->msgType = CELL_DMUX_ES_MSG_TYPE_AU_FOUND; - esMsg->supplementalInfo = stream.userdata; - es.cbFunc(*this, id, es.id, esMsg, es.cbArg); - lv2_obj::sleep(*this); - } - - if (pes.has_ts) - { - // preserve dts/pts for next AU - es.last_dts = pes.dts; - es.last_pts = pes.pts; - } - - // reconstruction of MPEG2-PS stream for vdec module - const u32 size = len + pes.size + 9; - stream = backup; - es.push(stream, size); - } - else - { - cellDmux.notice("Video stream (code=0x%x, len=%d)", code, len); - stream.skip(len); - } - break; - } - - default: - { - if ((code & PACKET_START_CODE_MASK) == PACKET_START_CODE_PREFIX) - { - fmt::throw_exception("Unknown code found (0x%x)", code); - } - - // search - stream.skip(1); - } - } - - continue; - } - - // wait for task if no work - if (!job.pop(task, &is_closed)) - { - break; // Emu is stopped - } - - switch (task.type) - { - case dmuxSetStream: - { - if (task.stream.discontinuity) - { - cellDmux.warning("dmuxSetStream (beginning)"); - for (u32 i = 0; i < std::size(esALL); i++) - { - if (esALL[i]) - { - esALL[i]->reset(); - } - } - } - - stream = task.stream; - //cellDmux.notice("*** stream updated(addr=0x%x, size=0x%x, discont=%d, userdata=0x%llx)", - //stream.addr, stream.size, stream.discontinuity, stream.userdata); - break; - } - - case dmuxResetStream: - case dmuxResetStreamAndWaitDone: - { - // demuxing stopped - if (is_running.exchange(false)) - { - // callback - auto dmuxMsg = vm::ptr::make(memAddr + (cb_add ^= 16)); - dmuxMsg->msgType = CELL_DMUX_MSG_TYPE_DEMUX_DONE; - dmuxMsg->supplementalInfo = stream.userdata; - cbFunc(*this, id, dmuxMsg, cbArg); - lv2_obj::sleep(*this); - - stream = {}; - - is_working = false; - } - - break; - } - - case dmuxEnableEs: - { - ElementaryStream& es = *task.es.es_ptr; - - // TODO: uncomment when ready to use - //if ((es.fidMajor & -0x10) == 0xe0 && es.fidMinor == 0 && es.sup1 == 1 && !es.sup2) - //{ - // esAVC[es.fidMajor % 16] = task.es.es_ptr; - //} - //else if ((es.fidMajor & -0x10) == 0xe0 && es.fidMinor == 0 && !es.sup1 && !es.sup2) - //{ - // esM2V[es.fidMajor % 16] = task.es.es_ptr; - //} - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0 && !es.sup1 && !es.sup2) - //{ - // esATX[es.fidMinor % 16] = task.es.es_ptr; - //} - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x20 && !es.sup1 && !es.sup2) - //{ - // esDATA[es.fidMinor % 16] = task.es.es_ptr; - //} - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x30 && !es.sup1 && !es.sup2) - //{ - // esAC3[es.fidMinor % 16] = task.es.es_ptr; - //} - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x40 && !es.sup1 && !es.sup2) - //{ - // esPCM[es.fidMinor % 16] = task.es.es_ptr; - //} - //else - { - fmt::throw_exception("dmuxEnableEs: unknown filter (0x%x, 0x%x, 0x%x, 0x%x)", es.fidMajor, es.fidMinor, es.sup1, es.sup2); - } - es.dmux = this; - break; - } - - case dmuxDisableEs: - { - ElementaryStream& es = *task.es.es_ptr; - if (es.dmux != this) - { - fmt::throw_exception("dmuxDisableEs: invalid elementary stream"); - } - - for (u32 i = 0; i < std::size(esALL); i++) - { - if (esALL[i] == &es) - { - esALL[i] = nullptr; - } - } - es.dmux = nullptr; - idm::remove(task.es.es); - break; - } - - case dmuxFlushEs: - { - ElementaryStream& es = *task.es.es_ptr; - - const u32 old_size = ::size32(es.raw_data); - if (old_size && (es.fidMajor & -0x10) == 0xe0) - { - // TODO (it's only for AVC, some ATX data may be lost) - while (es.isfull(old_size)) - { - if (Emu.IsStopped() || is_closed) break; - - std::this_thread::sleep_for(1ms); // hack - } - - es.push_au(old_size, es.last_dts, es.last_pts, stream.userdata, false, 0); - - // callback - auto esMsg = vm::ptr::make(memAddr + (cb_add ^= 16)); - esMsg->msgType = CELL_DMUX_ES_MSG_TYPE_AU_FOUND; - esMsg->supplementalInfo = stream.userdata; - es.cbFunc(*this, id, es.id, esMsg, es.cbArg); - lv2_obj::sleep(*this); - } - - if (!es.raw_data.empty()) - { - cellDmux.error("dmuxFlushEs: 0x%x bytes lost (es_id=%d)", ::size32(es.raw_data), es.id); - } - - // callback - auto esMsg = vm::ptr::make(memAddr + (cb_add ^= 16)); - esMsg->msgType = CELL_DMUX_ES_MSG_TYPE_FLUSH_DONE; - esMsg->supplementalInfo = stream.userdata; - es.cbFunc(*this, id, es.id, esMsg, es.cbArg); - lv2_obj::sleep(*this); - break; - } - - case dmuxResetEs: - { - task.es.es_ptr->reset(); - break; - } - - case dmuxClose: - { - break; - } - - default: - { - fmt::throw_exception("Demuxer thread error: unknown task (0x%x)", +task.type); - } - } - } - - is_finished = true; - } -}; - - -PesHeader::PesHeader(DemuxerStream& stream) - : pts(CODEC_TS_INVALID) - , dts(CODEC_TS_INVALID) - , size(0) - , has_ts(false) - , is_ok(false) -{ - u16 header; - if (!stream.get(header)) - { - fmt::throw_exception("End of stream (header)"); - } - if (!stream.get(size)) - { - fmt::throw_exception("End of stream (size)"); - } - if (!stream.check(size)) - { - fmt::throw_exception("End of stream (size=%d)", size); - } - - u8 pos = 0; - while (pos++ < size) - { - u8 v; - if (!stream.get(v)) - { - return; // should never occur - } - - if (v == 0xff) // skip padding bytes - { - continue; - } - - if ((v & 0xf0) == 0x20 && (size - pos) >= 4) // pts only - { - pos += 4; - pts = stream.get_ts(v); - has_ts = true; - } - else if ((v & 0xf0) == 0x30 && (size - pos) >= 9) // pts and dts - { - pos += 5; - pts = stream.get_ts(v); - stream.get(v); - has_ts = true; - - if ((v & 0xf0) != 0x10) - { - cellDmux.error("PesHeader(): dts not found (v=0x%x, size=%d, pos=%d)", v, size, pos - 1); - stream.skip(size - pos); - return; - } - pos += 4; - dts = stream.get_ts(v); - } - else - { - cellDmux.warning("PesHeader(): unknown code (v=0x%x, size=%d, pos=%d)", v, size, pos - 1); - stream.skip(size - pos); - pos = size; - break; - } - } - - is_ok = true; -} - -ElementaryStream::ElementaryStream(Demuxer* dmux, u32 addr, u32 size, u32 fidMajor, u32 fidMinor, u32 sup1, u32 sup2, vm::ptr cbFunc, u32 cbArg, u32 spec) - : put(utils::align(addr, 128)) - , dmux(dmux) - , memAddr(utils::align(addr, 128)) - , memSize(size - (addr - memAddr)) - , fidMajor(fidMajor) - , fidMinor(fidMinor) - , sup1(sup1) - , sup2(sup2) - , cbFunc(cbFunc) - , cbArg(cbArg) - , spec(spec) -{ -} - -bool ElementaryStream::is_full(u32 space) -{ - if (released < put_count) - { - if (entries.is_full()) - { - return true; - } - - u32 first = 0; - if (!entries.peek(first, 0, &dmux->is_closed) || !first) - { - fmt::throw_exception("entries.peek() failed"); - } - else if (first >= put) - { - return first - put < space + 128; - } - else if (put + space + 128 > memAddr + memSize) - { - return first - memAddr < space + 128; - } - else - { - return false; - } - } - else - { - return false; - } -} - -bool ElementaryStream::isfull(u32 space) -{ - std::lock_guard lock(m_mutex); - return is_full(space); -} - -void ElementaryStream::push_au(u32 size, u64 dts, u64 pts, u64 userdata, bool rap, u32 specific) -{ - u32 addr; - { - std::lock_guard lock(m_mutex); - ensure(!is_full(size)); - - if (put + size + 128 > memAddr + memSize) - { - put = memAddr; - } - - std::memcpy(vm::base(put + 128), raw_data.data(), size); - raw_data.erase(raw_data.begin(), raw_data.begin() + size); - - auto info = vm::ptr::make(put); - info->auAddr = put + 128; - info->auSize = size; - info->dts.lower = static_cast(dts); - info->dts.upper = static_cast(dts >> 32); - info->pts.lower = static_cast(pts); - info->pts.upper = static_cast(pts >> 32); - info->isRap = rap; - info->reserved = 0; - info->userData = userdata; - - auto spec = vm::ptr::make(put + u32{sizeof(CellDmuxAuInfoEx)}); - *spec = specific; - - auto inf = vm::ptr::make(put + 64); - inf->auAddr = put + 128; - inf->auSize = size; - inf->dtsLower = static_cast(dts); - inf->dtsUpper = static_cast(dts >> 32); - inf->ptsLower = static_cast(pts); - inf->ptsUpper = static_cast(pts >> 32); - inf->auMaxSize = 0; // ????? - inf->userData = userdata; - - addr = put; - - put = utils::align(put + 128 + size, 128); - - put_count++; - } - - ensure(entries.push(addr, &dmux->is_closed)); -} - -void ElementaryStream::push(DemuxerStream& stream, u32 size) -{ - auto const old_size = raw_data.size(); - - raw_data.resize(old_size + size); - - std::memcpy(raw_data.data() + old_size, vm::base(stream.addr), size); // append bytes - - stream.skip(size); -} - -bool ElementaryStream::release() -{ - std::lock_guard lock(m_mutex); - if (released >= put_count) - { - cellDmux.fatal("es::release() error: buffer is empty"); - return false; - } - if (released >= got_count) - { - cellDmux.fatal("es::release() error: buffer has not been seen yet"); - return false; - } - - u32 addr = 0; - if (!entries.pop(addr, &dmux->is_closed) || !addr) - { - cellDmux.fatal("es::release() error: entries.Pop() failed"); - return false; - } - - released++; - return true; -} - -bool ElementaryStream::peek(u32& out_data, bool no_ex, u32& out_spec, bool update_index) -{ - std::lock_guard lock(m_mutex); - if (got_count < released) - { - cellDmux.fatal("es::peek() error: got_count(%d) < released(%d) (put_count=%d)", got_count, released, put_count); - return false; - } - if (got_count >= put_count) - { - return false; - } - - u32 addr = 0; - if (!entries.peek(addr, got_count - released, &dmux->is_closed) || !addr) - { - cellDmux.fatal("es::peek() error: entries.Peek() failed"); - return false; - } - - out_data = no_ex ? addr + 64 : addr; - out_spec = addr + sizeof(CellDmuxAuInfoEx); - - if (update_index) - { - got_count++; - } - return true; -} - -void ElementaryStream::reset() -{ - std::lock_guard lock(m_mutex); - put = memAddr; - entries.clear(); - put_count = 0; - got_count = 0; - released = 0; - raw_data.clear(); - raw_pos = 0; -} - -void dmuxQueryAttr(u32 /* info_addr, may be 0 */, vm::ptr attr) -{ - attr->demuxerVerLower = 0x280000; // TODO: check values - attr->demuxerVerUpper = 0x260000; - attr->memSize = 0x10000; // 0x3e8e6 from ps3 -} - -void dmuxQueryEsAttr(u32 /* info, may be 0 */, vm::cptr esFilterId, u32 /*esSpecificInfo*/, vm::ptr attr) -{ - if (esFilterId->filterIdMajor >= 0xe0) - { - attr->memSize = 0x500000; // 0x45fa49 from ps3 - } - else - { - attr->memSize = 0x7000; // 0x73d9 from ps3 - } - - cellDmux.warning("*** filter(0x%x, 0x%x, 0x%x, 0x%x)", esFilterId->filterIdMajor, esFilterId->filterIdMinor, esFilterId->supplementalInfo1, esFilterId->supplementalInfo2); -} - -error_code cellDmuxQueryAttr(vm::cptr type, vm::ptr attr) -{ - cellDmux.warning("cellDmuxQueryAttr(type=*0x%x, attr=*0x%x)", type, attr); - - if (type->streamType != CELL_DMUX_STREAM_TYPE_PAMF) - { - return CELL_DMUX_ERROR_ARG; - } - - dmuxQueryAttr(0, attr); - return CELL_OK; -} - -error_code cellDmuxQueryAttr2(vm::cptr type2, vm::ptr attr) -{ - cellDmux.warning("cellDmuxQueryAttr2(demuxerType2=*0x%x, demuxerAttr=*0x%x)", type2, attr); - - if (type2->streamType != CELL_DMUX_STREAM_TYPE_PAMF) - { - return CELL_DMUX_ERROR_ARG; - } - - dmuxQueryAttr(type2->streamSpecificInfo, attr); - return CELL_OK; -} - -error_code cellDmuxOpen(vm::cptr type, vm::cptr res, vm::cptr cb, vm::ptr handle) -{ - cellDmux.warning("cellDmuxOpen(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle); - - if (type->streamType != CELL_DMUX_STREAM_TYPE_PAMF) - { - return CELL_DMUX_ERROR_ARG; - } - - // TODO: check demuxerResource and demuxerCb arguments - fmt::throw_exception("cellDmux disabled, use LLE."); -} - -error_code cellDmuxOpenEx(vm::cptr type, vm::cptr resEx, vm::cptr cb, vm::ptr handle) -{ - cellDmux.warning("cellDmuxOpenEx(type=*0x%x, resEx=*0x%x, cb=*0x%x, handle=*0x%x)", type, resEx, cb, handle); - - if (type->streamType != CELL_DMUX_STREAM_TYPE_PAMF) - { - return CELL_DMUX_ERROR_ARG; - } - - // TODO: check demuxerResourceEx and demuxerCb arguments - fmt::throw_exception("cellDmux disabled, use LLE."); -} - -error_code cellDmuxOpenExt(vm::cptr type, vm::cptr resEx, vm::cptr cb, vm::ptr handle) -{ - cellDmux.warning("cellDmuxOpenExt(type=*0x%x, resEx=*0x%x, cb=*0x%x, handle=*0x%x)", type, resEx, cb, handle); - - return cellDmuxOpenEx(type, resEx, cb, handle); -} - -error_code cellDmuxOpen2(vm::cptr type2, vm::cptr res2, vm::cptr cb, vm::ptr handle) -{ - cellDmux.warning("cellDmuxOpen2(type2=*0x%x, res2=*0x%x, cb=*0x%x, handle=*0x%x)", type2, res2, cb, handle); - - if (type2->streamType != CELL_DMUX_STREAM_TYPE_PAMF) - { - return CELL_DMUX_ERROR_ARG; - } - - // TODO: check demuxerType2, demuxerResource2 and demuxerCb arguments - fmt::throw_exception("cellDmux disabled, use LLE."); -} - -error_code cellDmuxClose(u32 handle) -{ - cellDmux.warning("cellDmuxClose(handle=0x%x)", handle); - - const auto dmux = idm::get_unlocked(handle); - - if (!dmux) - { - return CELL_DMUX_ERROR_ARG; - } - - dmux->is_closed = true; - dmux->job.try_push(DemuxerTask(dmuxClose)); - - while (!dmux->is_finished) - { - if (Emu.IsStopped()) - { - cellDmux.warning("cellDmuxClose(%d) aborted", handle); - return CELL_OK; - } - - std::this_thread::sleep_for(1ms); // hack - } - - idm::remove(handle); - return CELL_OK; -} - -error_code cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 discontinuity, u64 userData) -{ - cellDmux.trace("cellDmuxSetStream(handle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx)", handle, streamAddress, streamSize, discontinuity, userData); - - const auto dmux = idm::get_unlocked(handle); - - if (!dmux) - { - return CELL_DMUX_ERROR_ARG; - } - - if (dmux->is_running.exchange(true)) - { - //std::this_thread::sleep_for(1ms); // hack - return CELL_DMUX_ERROR_BUSY; - } - - DemuxerTask task(dmuxSetStream); - auto& info = task.stream; - info.addr = streamAddress; - info.size = streamSize; - info.discontinuity = discontinuity; - info.userdata = userData; - - dmux->job.push(task, &dmux->is_closed); - return CELL_OK; -} - -error_code cellDmuxResetStream(u32 handle) -{ - cellDmux.warning("cellDmuxResetStream(handle=0x%x)", handle); - - const auto dmux = idm::get_unlocked(handle); - - if (!dmux) - { - return CELL_DMUX_ERROR_ARG; - } - - dmux->job.push(DemuxerTask(dmuxResetStream), &dmux->is_closed); - return CELL_OK; -} - -error_code cellDmuxResetStreamAndWaitDone(u32 handle) -{ - cellDmux.warning("cellDmuxResetStreamAndWaitDone(handle=0x%x)", handle); - - const auto dmux = idm::get_unlocked(handle); - - if (!dmux) - { - return CELL_DMUX_ERROR_ARG; - } - - if (!dmux->is_running) + // This is frequently checked in here because the elementary stream could get disabled at any time by a different thread via cellDmuxDisableEs() or cellDmuxClose(). + if (!es_handle->is_enabled) { return CELL_OK; } - dmux->is_working = true; - - dmux->job.push(DemuxerTask(dmuxResetStreamAndWaitDone), &dmux->is_closed); - - while (dmux->is_running && dmux->is_working && !dmux->is_closed) // TODO: ensure that it is safe + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes, 0); ret != CELL_OK) { - if (Emu.IsStopped()) + fatal_err(es_handle->is_enabled, ret); + return 1; + } + + // Check if the access unit queue is full. One slot is reserved for the access unit produced by flushing the stream, so that flushing always succeeds. + if (!es_handle->is_enabled || es_handle->au_queue.allocated_size >= es_handle->au_queue.max_size - !es_handle->flush_started) + { + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes); ret != CELL_OK) { - cellDmux.warning("cellDmuxResetStreamAndWaitDone(%d) aborted", handle); - return CELL_OK; + fatal_err(es_handle->is_enabled, ret); + return 1; } - std::this_thread::sleep_for(1ms); // hack + + return !es_handle->is_enabled ? CELL_OK : not_an_error(1); // Disable error reporting if the queue is full. This is expected to happen frequently. } + DmuxAuInfo& _au_info = get_au_queue_elements(es_handle)[es_handle->au_queue.back].au_info; + + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes); ret != CELL_OK) + { + fatal_err(es_handle->is_enabled, ret); + return 1; + } + + _au_info.info = au_info->info; + std::memcpy(_au_info.specific_info.get_ptr(), au_info->specific_info.get_ptr(), au_info->specific_info_size); + + if (!es_handle->is_enabled) + { + return CELL_OK; + } + + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes, 0); ret != CELL_OK) + { + fatal_err(es_handle->is_enabled, ret); + return CELL_OK; // LLE returns CELL_OK + } + + if (!es_handle->is_enabled) + { + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes); ret != CELL_OK) + { + fatal_err(es_handle->is_enabled, ret); + } + + return CELL_OK; + } + + es_handle->au_queue.back = (es_handle->au_queue.back + 1) % es_handle->au_queue.max_size; + es_handle->au_queue.allocated_size++; + es_handle->au_queue.size++; + + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes); ret != CELL_OK) + { + fatal_err(es_handle->is_enabled, ret); + return CELL_OK; // LLE returns CELL_OK + } + + if (!es_handle->is_enabled) + { + return CELL_OK; + } + + const vm::var es_msg{{ .msgType = CELL_DMUX_ES_MSG_TYPE_AU_FOUND, .supplementalInfo = es_handle->dmux_handle->user_data }}; + es_handle->es_cb.cbFunc(ppu, es_handle->dmux_handle, es_handle, es_msg, es_handle->es_cb.cbArg); + return CELL_OK; } -error_code cellDmuxQueryEsAttr(vm::cptr type, vm::cptr esFilterId, u32 esSpecificInfo, vm::ptr esAttr) +static error_code notify_es_flush_done(ppu_thread& ppu, vm::ptr core_es_handle, vm::ptr es_handle) { - cellDmux.warning("cellDmuxQueryEsAttr(demuxerType=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", type, esFilterId, esSpecificInfo, esAttr); + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; - if (type->streamType != CELL_DMUX_STREAM_TYPE_PAMF) + if (!savestate_lock) { - return CELL_DMUX_ERROR_ARG; + ppu.state += cpu_flag::again; + return {}; } - // TODO: check esFilterId and esSpecificInfo correctly - dmuxQueryEsAttr(0, esFilterId, esSpecificInfo, esAttr); + cellDmux.notice("dmuxEsNotifyFlushDone(unk=*0x%x, es_handle=*0x%x)", core_es_handle, es_handle); + + ensure(!!es_handle); // Not checked on LLE + + if (!es_handle->dmux_handle->_this || !es_handle->is_enabled) + { + return CELL_OK; + } + + es_handle->flush_started = false; + + const vm::var es_msg{{ .msgType = CELL_DMUX_ES_MSG_TYPE_FLUSH_DONE, .supplementalInfo = es_handle->dmux_handle->user_data }}; + es_handle->es_cb.cbFunc(ppu, es_handle->dmux_handle, es_handle, es_msg, es_handle->es_cb.cbArg); + return CELL_OK; } -error_code cellDmuxQueryEsAttr2(vm::cptr type2, vm::cptr esFilterId, u32 esSpecificInfo, vm::ptr esAttr) -{ - cellDmux.warning("cellDmuxQueryEsAttr2(type2=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", type2, esFilterId, esSpecificInfo, esAttr); - if (type2->streamType != CELL_DMUX_STREAM_TYPE_PAMF) +static error_code query_attr(ppu_thread& ppu, vm::ptr demuxerAttr, vm::cptr streamSpecificInfo) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) { - return CELL_DMUX_ERROR_ARG; + ppu.state += cpu_flag::again; + return {}; } - // TODO: check demuxerType2, esFilterId and esSpecificInfo correctly - dmuxQueryEsAttr(type2->streamSpecificInfo, esFilterId, esSpecificInfo, esAttr); + const vm::var pamf_attr; + + if (const error_code ret = get_error(get_core_ops()->queryAttr(ppu, streamSpecificInfo, pamf_attr)); ret != CELL_OK) + { + return ret; + } + + demuxerAttr->memSize = utils::align(sizeof(DmuxContext) + (pamf_attr->maxEnabledEsNum * sizeof(vm::addr_t)) + sizeof(DmuxEsContext), alignof(DmuxContext)) + + pamf_attr->memSize + 0xf; + demuxerAttr->demuxerVerUpper = 0x260000; + demuxerAttr->demuxerVerLower = pamf_attr->version; + return CELL_OK; } -error_code cellDmuxEnableEs(u32 handle, vm::cptr esFilterId, vm::cptr esResourceInfo, vm::cptr esCb, u32 esSpecificInfo, vm::ptr esHandle) +error_code cellDmuxQueryAttr(ppu_thread& ppu, vm::cptr demuxerType, vm::ptr demuxerAttr) { - cellDmux.warning("cellDmuxEnableEs(handle=0x%x, esFilterId=*0x%x, esResourceInfo=*0x%x, esCb=*0x%x, esSpecificInfo=*0x%x, esHandle=*0x%x)", handle, esFilterId, esResourceInfo, esCb, esSpecificInfo, esHandle); + cellDmux.notice("cellDmuxQueryAttr(demuxerType=*0x%x, demuxerAttr=*0x%x)", demuxerType, demuxerAttr); - const auto dmux = idm::get_unlocked(handle); - - if (!dmux) + if (!demuxerType || !demuxerAttr || demuxerType->streamType != CELL_DMUX_STREAM_TYPE_PAMF) { return CELL_DMUX_ERROR_ARG; } - // TODO: check esFilterId, esResourceInfo, esCb and esSpecificInfo correctly + return query_attr(ppu, demuxerAttr, vm::null); +} - const auto es = idm::make_ptr(dmux.get(), esResourceInfo->memAddr, esResourceInfo->memSize, - esFilterId->filterIdMajor, esFilterId->filterIdMinor, esFilterId->supplementalInfo1, esFilterId->supplementalInfo2, - esCb->cbFunc, esCb->cbArg, esSpecificInfo); +error_code cellDmuxQueryAttr2(ppu_thread& ppu, vm::cptr demuxerType2, vm::ptr demuxerAttr) +{ + cellDmux.notice("cellDmuxQueryAttr2(demuxerType2=*0x%x, demuxerAttr=*0x%x)", demuxerType2, demuxerAttr); - *esHandle = es->id; + if (!demuxerType2 || !demuxerAttr || demuxerType2->streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } - cellDmux.warning("*** New ES(dmux=0x%x, addr=0x%x, size=0x%x, filter={0x%x, 0x%x, 0x%x, 0x%x}, cb=0x%x, arg=0x%x, spec=0x%x): id = 0x%x", - handle, es->memAddr, es->memSize, es->fidMajor, es->fidMinor, es->sup1, es->sup2, es->cbFunc, es->cbArg, es->spec, es->id); + return query_attr(ppu, demuxerAttr, demuxerType2->streamSpecificInfo); +} - DemuxerTask task(dmuxEnableEs); - task.es.es = es->id; - task.es.es_ptr = es.get(); +static error_code open(ppu_thread& ppu, vm::cptr demuxerType, vm::cptr demuxerResource, vm::cptr demuxerResourceEx, + vm::cptr demuxerCb, vm::cptr streamSpecificInfo, vm::pptr demuxerHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + const vm::var type{{ .streamType = demuxerType->streamType, .streamSpecificInfo = streamSpecificInfo }}; + const vm::var attr; + + if (const error_code ret = cellDmuxQueryAttr2(ppu, type, attr); ret != CELL_OK) + { + return ret; + } + + if (attr->memSize > demuxerResource->memSize) + { + return CELL_DMUX_ERROR_ARG; + } + + const vm::var core_attr; + + if (const error_code ret = get_error(get_core_ops()->queryAttr(ppu, streamSpecificInfo, core_attr)); ret != CELL_OK) + { + return ret; + } + + const auto handle = vm::ptr::make(utils::align(demuxerResource->memAddr.addr(), alignof(DmuxContext))); + const u32 es_handles_size = core_attr->maxEnabledEsNum * sizeof(vm::addr_t); + const auto core_mem_addr = vm::ptr::make(utils::align(handle.addr() + sizeof(DmuxContext) + es_handles_size, 0x10)); + + const vm::var core_resource = + {{ + .memAddr = core_mem_addr, + .memSize = demuxerResource->memSize - (core_mem_addr.addr() - demuxerResource->memAddr.addr()), + .ppuThreadPriority = demuxerResource->ppuThreadPriority, + .ppuThreadStackSize = demuxerResource->ppuThreadStackSize, + .spuThreadPriority = demuxerResource->spuThreadPriority, + .numOfSpus = demuxerResource->numOfSpus + }}; + + const vm::var res_spurs; + + if (demuxerResourceEx) + { + res_spurs->spurs = demuxerResourceEx->spurs; + res_spurs->priority = demuxerResourceEx->priority; + res_spurs->maxContention = demuxerResourceEx->maxContention; + } + + const auto demux_done_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(notify_demux_done))); + const auto prog_end_code_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(notify_prog_end_code))); + const auto fatal_err_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(notify_fatal_err))); + const vm::var> cb_demux_done{{ .cbFunc = demux_done_func, .cbArg = handle }}; + const vm::var> cb_prog_end_code{{ .cbFunc = prog_end_code_func, .cbArg = handle }}; + const vm::var> cb_fatal_err{{ .cbFunc = fatal_err_func, .cbArg = handle }}; + + const vm::var> core_handle; + + if (const error_code ret = get_error(get_core_ops()->open(ppu, streamSpecificInfo, core_resource, demuxerResourceEx ? +res_spurs : vm::null, + cb_demux_done, cb_prog_end_code, cb_fatal_err, core_handle)); + ret != CELL_OK) + { + return ret; + } + + handle->_this = handle; + handle->_this_size = sizeof(DmuxContext) + es_handles_size; + handle->version = core_attr->version; + handle->dmux_state = DMUX_STOPPED; + handle->dmux_type = *demuxerType; + handle->dmux_cb = *demuxerCb; + handle->stream_is_set = false; + handle->core_handle = *core_handle; + handle->version_ = core_attr->version; + handle->user_data = 0; + handle->max_enabled_es_num = core_attr->maxEnabledEsNum; + handle->enabled_es_num = 0; + + const vm::var mutex_attr = + {{ + .protocol = SYS_SYNC_PRIORITY, + .recursive = SYS_SYNC_NOT_RECURSIVE, + .pshared = SYS_SYNC_NOT_PROCESS_SHARED, + .adaptive = SYS_SYNC_NOT_ADAPTIVE, + .name_u64 = "_dx_mhd"_u64 + }}; + + if (const error_code ret = lv2_syscall(ppu, handle.ptr(&DmuxContext::_dx_mhd), mutex_attr); ret != CELL_OK) + { + return ret; + } + + *demuxerHandle = handle; - dmux->job.push(task, &dmux->is_closed); return CELL_OK; } -error_code cellDmuxDisableEs(u32 esHandle) +error_code cellDmuxOpen(ppu_thread& ppu, vm::cptr demuxerType, vm::cptr demuxerResource, vm::cptr demuxerCb, vm::pptr demuxerHandle) { - cellDmux.warning("cellDmuxDisableEs(esHandle=0x%x)", esHandle); + cellDmux.notice("cellDmuxOpen(demuxerType=*0x%x, demuxerResource=*0x%x, demuxerCb=*0x%x, handle=*0x%x)", demuxerType, demuxerResource, demuxerCb, demuxerHandle); - const auto es = idm::get_unlocked(esHandle); - - if (!es) + if (!demuxerType || demuxerType->streamType != CELL_DMUX_STREAM_TYPE_PAMF + || !demuxerResource || !demuxerResource->memAddr || demuxerResource->memSize == umax || demuxerResource->ppuThreadStackSize == umax + || !demuxerCb || !demuxerCb->cbFunc + || !demuxerHandle) { return CELL_DMUX_ERROR_ARG; } - DemuxerTask task(dmuxDisableEs); - task.es.es = esHandle; - task.es.es_ptr = es.get(); - - es->dmux->job.push(task, &es->dmux->is_closed); - return CELL_OK; + return open(ppu, demuxerType, demuxerResource, vm::null, demuxerCb, vm::null, demuxerHandle); } -error_code cellDmuxResetEs(u32 esHandle) +error_code cellDmuxOpenEx(ppu_thread& ppu, vm::cptr demuxerType, vm::cptr demuxerResourceEx, vm::cptr demuxerCb, vm::pptr demuxerHandle) { - cellDmux.trace("cellDmuxResetEs(esHandle=0x%x)", esHandle); + cellDmux.notice("cellDmuxOpenEx(demuxerType=*0x%x, demuxerResourceEx=*0x%x, demuxerCb=*0x%x, demuxerHandle=*0x%x)", demuxerType, demuxerResourceEx, demuxerCb, demuxerHandle); - const auto es = idm::get_unlocked(esHandle); - - if (!es) + if (!demuxerType || demuxerType->streamType != CELL_DMUX_STREAM_TYPE_PAMF + || !demuxerResourceEx || !demuxerResourceEx->memAddr || demuxerResourceEx->memSize == umax || demuxerResourceEx->ppuThreadStackSize == umax + || !demuxerResourceEx->spurs || demuxerResourceEx->maxContention == 0u + || (demuxerResourceEx->priority & 0xf0f0f0f0f0f0f0f0ull) != 0u // Each byte in priority must be less than 0x10 + || !demuxerCb + || !demuxerHandle) { return CELL_DMUX_ERROR_ARG; } - DemuxerTask task(dmuxResetEs); - task.es.es = esHandle; - task.es.es_ptr = es.get(); + const vm::var resource + {{ + .memAddr = demuxerResourceEx->memAddr, + .memSize = demuxerResourceEx->memSize, + .ppuThreadPriority = demuxerResourceEx->ppuThreadPriority, + .ppuThreadStackSize = demuxerResourceEx->ppuThreadStackSize, + .spuThreadPriority = 0xfa, + .numOfSpus = 1 + }}; - es->dmux->job.push(task, &es->dmux->is_closed); - return CELL_OK; + return open(ppu, demuxerType, resource, demuxerResourceEx, demuxerCb, vm::null, demuxerHandle); } -error_code cellDmuxGetAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo) +error_code cellDmuxOpenExt(ppu_thread& ppu, vm::cptr demuxerType, vm::cptr demuxerResourceEx, vm::cptr demuxerCb, vm::pptr demuxerHandle) { - cellDmux.trace("cellDmuxGetAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo); + cellDmux.notice("cellDmuxOpenExt(demuxerType=*0x%x, demuxerResourceEx=*0x%x, demuxerCb=*0x%x, demuxerHandle=*0x%x)", demuxerType, demuxerResourceEx, demuxerCb, demuxerHandle); - const auto es = idm::get_unlocked(esHandle); - - if (!es) - { - return CELL_DMUX_ERROR_ARG; - } - - u32 info; - u32 spec; - if (!es->peek(info, true, spec, true)) - { - return CELL_DMUX_ERROR_EMPTY; - } - - *auInfo = info; - *auSpecificInfo = spec; - return CELL_OK; + return cellDmuxOpenEx(ppu, demuxerType, demuxerResourceEx, demuxerCb, demuxerHandle); } -error_code cellDmuxPeekAu(u32 esHandle, vm::ptr auInfo, vm::ptr auSpecificInfo) +error_code cellDmuxOpen2(ppu_thread& ppu, vm::cptr demuxerType2, vm::cptr demuxerResource2, vm::cptr demuxerCb, vm::pptr demuxerHandle) { - cellDmux.trace("cellDmuxPeekAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo); + cellDmux.notice("cellDmuxOpen2(demuxerType2=*0x%x, demuxerResource2=*0x%x, demuxerCb=*0x%x, demuxerHandle=*0x%x)", demuxerType2, demuxerResource2, demuxerCb, demuxerHandle); - const auto es = idm::get_unlocked(esHandle); - - if (!es) + if (!demuxerType2 || demuxerType2->streamType != CELL_DMUX_STREAM_TYPE_PAMF + || !demuxerResource2 + || !demuxerCb || !demuxerCb->cbFunc + || !demuxerHandle) { return CELL_DMUX_ERROR_ARG; } - u32 info; - u32 spec; - if (!es->peek(info, true, spec, false)) + const vm::var type{{ .streamType = CELL_DMUX_STREAM_TYPE_PAMF }}; + + if (demuxerResource2->isResourceEx) { - return CELL_DMUX_ERROR_EMPTY; + if (!demuxerResource2->resourceEx.memAddr || demuxerResource2->resourceEx.memSize == umax || demuxerResource2->resourceEx.ppuThreadStackSize == umax + || !demuxerResource2->resourceEx.spurs || demuxerResource2->resourceEx.maxContention == 0u + || (demuxerResource2->resourceEx.priority & 0xf0f0f0f0f0f0f0f0ull) != 0u) // Each byte in priority must be less than 0x10 + { + return CELL_DMUX_ERROR_ARG; + } + + const vm::var resource + {{ + .memAddr = demuxerResource2->resourceEx.memAddr, + .memSize = demuxerResource2->resourceEx.memSize, + .ppuThreadPriority = demuxerResource2->resourceEx.ppuThreadPriority, + .ppuThreadStackSize = demuxerResource2->resourceEx.ppuThreadStackSize, + .spuThreadPriority = 0xfa, + .numOfSpus = 1 + }}; + + return open(ppu, type, resource, demuxerResource2.ptr(&CellDmuxResource2::resourceEx), demuxerCb, demuxerType2->streamSpecificInfo, demuxerHandle); } - *auInfo = info; - *auSpecificInfo = spec; - return CELL_OK; + if (!demuxerResource2->resource.memAddr || demuxerResource2->resource.memSize == umax || demuxerResource2->resource.ppuThreadStackSize == umax) + { + return CELL_DMUX_ERROR_ARG; + } + + return open(ppu, type, demuxerResource2.ptr(&CellDmuxResource2::resource), vm::null, demuxerCb, demuxerType2->streamSpecificInfo, demuxerHandle); } -error_code cellDmuxGetAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecificInfo) +static error_code disable_es(ppu_thread& ppu, DmuxEsContext& esHandle) { - cellDmux.trace("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo); - - const auto es = idm::get_unlocked(esHandle); - - if (!es) + if (const error_code ret = lv2_syscall(ppu, esHandle._dx_mes, 0); ret != CELL_OK) { - return CELL_DMUX_ERROR_ARG; + return ret; } - u32 info; - u32 spec; - if (!es->peek(info, false, spec, true)) + const error_code core_ret = get_core_ops()->disableEs(ppu, esHandle.core_es_handle); + + esHandle.is_enabled = false; + + if (const error_code ret = lv2_syscall(ppu, esHandle._dx_mes); ret != CELL_OK) { - return CELL_DMUX_ERROR_EMPTY; + return ret; } - *auInfoEx = info; - *auSpecificInfo = spec; - return CELL_OK; + error_code ret; + while ((ret = lv2_syscall(ppu, esHandle._dx_mes)) == static_cast(CELL_EBUSY)) + { + lv2_syscall(ppu, 200); + } + + if (ret != CELL_OK) + { + return ret; + } + + esHandle._this = vm::null; + + return get_error(core_ret); } -error_code cellDmuxPeekAuEx(u32 esHandle, vm::ptr auInfoEx, vm::ptr auSpecificInfo) +error_code cellDmuxClose(ppu_thread& ppu, vm::ptr demuxerHandle) { - cellDmux.trace("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo); + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; - const auto es = idm::get_unlocked(esHandle); + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } - if (!es) + cellDmux.notice("cellDmuxClose(demuxerHandle=*0x%x)", demuxerHandle); + + if (!demuxerHandle || !demuxerHandle->_this || demuxerHandle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) { return CELL_DMUX_ERROR_ARG; } - u32 info; - u32 spec; - if (!es->peek(info, false, spec, false)) + demuxerHandle->_this = vm::null; + + if (const error_code ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd, 0); ret != CELL_OK) { - return CELL_DMUX_ERROR_EMPTY; + demuxerHandle->_this = demuxerHandle; + return ret; } - *auInfoEx = info; - *auSpecificInfo = spec; - return CELL_OK; + for (const vm::ptr es_handle : get_es_handles(demuxerHandle)) + { + if (const error_code ret = disable_es(ppu, *es_handle); ret != CELL_OK) + { + ensure(lv2_syscall(ppu, demuxerHandle->_dx_mhd) == CELL_OK); // Not checked on LLE + demuxerHandle->_this = demuxerHandle; + return ret; + } + + es_handle->dmux_handle = vm::null; + demuxerHandle->enabled_es_num--; + } + + error_code ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + ret = ret ? ret : get_error(get_core_ops()->close(ppu, demuxerHandle->core_handle)); + ret = ret ? ret : lv2_syscall(ppu, demuxerHandle->_dx_mhd); + + if (ret != CELL_OK) + { + demuxerHandle->_this = demuxerHandle; + } + + return ret; } -error_code cellDmuxReleaseAu(u32 esHandle) +error_code cellDmuxSetStream(ppu_thread& ppu, vm::ptr demuxerHandle, vm::cptr streamAddress, u32 streamSize, b8 discontinuity, u64 userData) { - cellDmux.trace("cellDmuxReleaseAu(esHandle=0x%x)", esHandle); + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; - const auto es = idm::get_unlocked(esHandle); + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } - if (!es) + cellDmux.trace("cellDmuxSetStream(demuxerHandle=*0x%x, streamAddress=*0x%x, streamSize=0x%x, discontinuity=%d, userData=0x%llx)", + demuxerHandle, streamAddress, streamSize, +discontinuity, userData); + + if (!demuxerHandle || !demuxerHandle->_this || streamSize == 0 || streamSize == umax || demuxerHandle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) { return CELL_DMUX_ERROR_ARG; } - if (!es->release()) + if (!(demuxerHandle->dmux_state & DMUX_STOPPED)) + { + return CELL_DMUX_ERROR_BUSY; + } + + if (const error_code ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd, 0); ret != CELL_OK) + { + return ret; + } + + if (const error_code ret = get_error(get_core_ops()->setStream(ppu, demuxerHandle->core_handle, streamAddress, streamSize, discontinuity, userData)); + ret != CELL_OK) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + return mutex_unlock_ret ? mutex_unlock_ret : ret; + } + + demuxerHandle->stream_is_set = true; + demuxerHandle->dmux_state = DMUX_RUNNING; + demuxerHandle->user_data = userData; + + return lv2_syscall(ppu, demuxerHandle->_dx_mhd); +} + +error_code cellDmuxResetStream(ppu_thread& ppu, vm::ptr demuxerHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("cellDmuxResetStream(demuxerHandle=*0x%x)", demuxerHandle); + + if (!demuxerHandle || !demuxerHandle->_this || demuxerHandle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd, 0); ret != CELL_OK) + { + return ret; + } + + const u32 dmux_status = demuxerHandle->dmux_state; + + if (const error_code ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); ret != CELL_OK) + { + return ret; + } + + if (!(dmux_status & DMUX_RUNNING) || !demuxerHandle->stream_is_set) { return CELL_DMUX_ERROR_SEQ; } + + if (const error_code ret = get_error(get_core_ops()->resetStream(ppu, demuxerHandle->core_handle)); ret != CELL_OK) + { + return ret; + } + + demuxerHandle->stream_is_set = false; + return CELL_OK; } -error_code cellDmuxFlushEs(u32 esHandle) +error_code cellDmuxResetStreamAndWaitDone(ppu_thread& ppu, vm::ptr demuxerHandle) { - cellDmux.warning("cellDmuxFlushEs(esHandle=0x%x)", esHandle); + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; - const auto es = idm::get_unlocked(esHandle); + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } - if (!es) + cellDmux.notice("cellDmuxResetStreamAndWaitDone(demuxerHandle=*0x%x)", demuxerHandle); + + if (!demuxerHandle || !demuxerHandle->_this || demuxerHandle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) { return CELL_DMUX_ERROR_ARG; } - DemuxerTask task(dmuxFlushEs); - task.es.es = esHandle; - task.es.es_ptr = es.get(); + if (const error_code ret = get_error(get_core_ops()->resetStreamAndWaitDone(ppu, demuxerHandle->core_handle)); ret != CELL_OK) + { + return ret; + } + + // LLE doesn't set DmuxContext::stream_is_set to false + + return CELL_OK; +} + +error_code cellDmuxQueryEsAttr(ppu_thread& ppu, vm::cptr demuxerType, vm::cptr esFilterId, vm::cptr esSpecificInfo, vm::ptr esAttr) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("cellDmuxQueryEsAttr(demuxerType=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", demuxerType, esFilterId, esSpecificInfo, esAttr); + + if (!demuxerType || demuxerType->streamType != CELL_DMUX_STREAM_TYPE_PAMF || !esFilterId || !esAttr) + { + return CELL_DMUX_ERROR_ARG; + } + + const vm::var core_es_attr; + + if (const error_code ret = get_error(get_core_ops()->queryEsAttr(ppu, vm::make_var(*esFilterId), esSpecificInfo, core_es_attr)); + ret != CELL_OK) + { + return ret; + } + + esAttr->memSize = utils::align(sizeof(DmuxEsContext) + ((core_es_attr->auQueueMaxSize + 1) * (core_es_attr->specificInfoSize + sizeof(DmuxAuQueueElement))), alignof(DmuxEsContext)) + + core_es_attr->memSize + 0xf; + + return CELL_OK; +} + +error_code cellDmuxQueryEsAttr2(ppu_thread& ppu, vm::cptr demuxerType2, vm::cptr esFilterId, vm::cptr esSpecificInfo, vm::ptr esAttr) +{ + cellDmux.notice("cellDmuxQueryEsAttr2(demuxerType2=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", demuxerType2, esFilterId, esSpecificInfo, esAttr); + + ensure(!!demuxerType2); // Not checked on LLE + + const vm::var demuxerType{{ .streamType = demuxerType2->streamType }}; + + return cellDmuxQueryEsAttr(ppu, demuxerType, esFilterId, esSpecificInfo, esAttr); +} + +error_code cellDmuxEnableEs(ppu_thread& ppu, vm::ptr demuxerHandle, vm::cptr esFilterId, vm::cptr esResourceInfo, + vm::cptr esCb, vm::cptr esSpecificInfo, vm::pptr esHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("cellDmuxEnableEs(demuxerHandle=*0x%x, esFilterId=*0x%x, esResourceInfo=*0x%x, esCb=*0x%x, esSpecificInfo=*0x%x, esHandle=**0x%x)", + demuxerHandle, esFilterId, esResourceInfo, esCb, esSpecificInfo, esHandle); + + if (!demuxerHandle || !demuxerHandle->_this || demuxerHandle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF + || !esFilterId + || !esResourceInfo || !esResourceInfo->memAddr || esResourceInfo->memSize == umax + || !esCb || !esCb->cbFunc + || !esHandle) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd, 0); ret != CELL_OK) + { + return ret; + } + + if (demuxerHandle->enabled_es_num >= demuxerHandle->max_enabled_es_num) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + return mutex_unlock_ret ? mutex_unlock_ret : CELL_DMUX_ERROR_ARG; + } + + const vm::var es_attr; + + if (const error_code ret = cellDmuxQueryEsAttr(ppu, demuxerHandle.ptr(&DmuxContext::dmux_type), esFilterId, esSpecificInfo, es_attr); ret != CELL_OK) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + return mutex_unlock_ret ? mutex_unlock_ret : ret; + } + + if (es_attr->memSize > esResourceInfo->memSize) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + return mutex_unlock_ret ? mutex_unlock_ret : CELL_DMUX_ERROR_ARG; + } + + const vm::var es_filter_id{ *esFilterId }; + const vm::var core_es_attr; + + if (const error_code ret = get_error(get_core_ops()->queryEsAttr(ppu, es_filter_id, esSpecificInfo, core_es_attr)); ret != CELL_OK) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + return mutex_unlock_ret ? mutex_unlock_ret : ret; + } + + core_es_attr->auQueueMaxSize++; // One extra slot for the access unit produced by flushing the stream, so that flushing always succeeds + + const auto es_handle = vm::ptr::make(utils::align(esResourceInfo->memAddr.addr(), alignof(DmuxEsContext))); + const u32 au_queue_elements_size = core_es_attr->auQueueMaxSize * (core_es_attr->specificInfoSize + sizeof(DmuxAuQueueElement)); + const auto core_mem_addr = vm::bptr::make(utils::align(es_handle.addr() + sizeof(DmuxEsContext) + au_queue_elements_size, 0x10)); + + const vm::var core_es_resource + {{ + .memAddr = core_mem_addr, + .memSize = esResourceInfo->memSize - (core_mem_addr.addr() - esResourceInfo->memAddr.addr()) + }}; + + const vm::var mutex_attr = + {{ + .protocol = SYS_SYNC_PRIORITY, + .recursive = SYS_SYNC_NOT_RECURSIVE, + .pshared = SYS_SYNC_NOT_PROCESS_SHARED, + .adaptive = SYS_SYNC_NOT_ADAPTIVE, + .name_u64 = "_dx_mes"_u64 + }}; + + if (const error_code ret = lv2_syscall(ppu, es_handle.ptr(&DmuxEsContext::_dx_mes), mutex_attr); ret != CELL_OK) + { + ensure(lv2_syscall(ppu, demuxerHandle->_dx_mhd) == CELL_OK); // Not checked on LLE + return ret; + } + + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes, 0); ret != CELL_OK) + { + ensure(lv2_syscall(ppu, es_handle->_dx_mes) == CELL_OK); // Not checked on LLE + ensure(lv2_syscall(ppu, demuxerHandle->_dx_mhd) == CELL_OK); // Not checked on LLE + return ret; + } + + const auto au_found_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(notify_es_au_found))); + const auto flush_done_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(notify_es_flush_done))); + const vm::var> cb_au_found{{ .cbFunc = au_found_func, .cbArg = es_handle }}; + const vm::var> cb_flush_done{{ .cbFunc = flush_done_func, .cbArg = es_handle }}; + + const vm::var> core_es_handle; + + if (const error_code ret = get_error(get_core_ops()->enableEs(ppu, demuxerHandle->core_handle, es_filter_id, core_es_resource, cb_au_found, cb_flush_done, + esSpecificInfo, core_es_handle)); + ret != CELL_OK) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, es_handle->_dx_mes); + const error_code mutex_destroy_ret = lv2_syscall(ppu, es_handle->_dx_mes); + + if (mutex_unlock_ret != CELL_OK) + { + ensure(lv2_syscall(ppu, demuxerHandle->_dx_mhd) == CELL_OK); // Not checked on LLE + return mutex_unlock_ret; + } + + if (mutex_destroy_ret != CELL_OK) + { + ensure(lv2_syscall(ppu, demuxerHandle->_dx_mhd) == CELL_OK); // Not checked on LLE + return mutex_destroy_ret; + } + + const error_code mutex_unlock_ret2 = lv2_syscall(ppu, demuxerHandle->_dx_mhd); + return mutex_unlock_ret2 ? mutex_unlock_ret2 : ret; + } + + es_handle->is_enabled = true; + es_handle->error_mem_size = 0; + es_handle->error_count = 0; + // es_handle->error_mem_addr is not initialized on LLE + es_handle->_this = es_handle; + es_handle->_this_size = sizeof(DmuxEsContext) + au_queue_elements_size; + es_handle->_this_index = demuxerHandle->enabled_es_num; + es_handle->dmux_handle = demuxerHandle; + es_handle->es_cb = *esCb; + es_handle->core_es_handle = *core_es_handle; + es_handle->flush_started = bf_t, 0, 1>{}; + es_handle->au_queue.max_size = core_es_attr->auQueueMaxSize; + es_handle->au_queue.allocated_size = 0; + es_handle->au_queue.size = 0; + es_handle->au_queue.front = 0; + es_handle->au_queue.back = 0; + es_handle->au_queue.allocated_back = 0; + + const vm::ptr au_queue_elements = get_au_queue_elements(es_handle); + + for (u32 i = 0; i < core_es_attr->auQueueMaxSize; i++) + { + au_queue_elements[i].index = i; + au_queue_elements[i].unk = 0; + au_queue_elements[i].au_info.info.auAddr = vm::null; + au_queue_elements[i].au_info.info.auMaxSize = 0; + au_queue_elements[i].au_info.specific_info.set(au_queue_elements.addr() + (core_es_attr->auQueueMaxSize * static_cast(sizeof(DmuxAuQueueElement))) + (i * core_es_attr->specificInfoSize)); + au_queue_elements[i].au_info.specific_info_size = core_es_attr->specificInfoSize; + } + + demuxerHandle->enabled_es_num++; + *get_es_handles(demuxerHandle).rbegin() = es_handle; + *esHandle = es_handle; + + if (const error_code ret = lv2_syscall(ppu, es_handle->_dx_mes); ret != CELL_OK) + { + ensure(lv2_syscall(ppu, es_handle->_dx_mes) == CELL_OK); // Not checked on LLE + ensure(lv2_syscall(ppu, demuxerHandle->_dx_mhd) == CELL_OK); // Not checked on LLE + return ret; + } + + return lv2_syscall(ppu, demuxerHandle->_dx_mhd); +} + +error_code cellDmuxDisableEs(ppu_thread& ppu, vm::ptr esHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("cellDmuxDisableEs(esHandle=*0x%x)", esHandle); + + if (!esHandle || !esHandle->_this || !esHandle->dmux_handle || esHandle->dmux_handle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd, 0); ret != CELL_OK) + { + return ret; + } + + if (const error_code ret = disable_es(ppu, *esHandle); ret != CELL_OK) + { + ensure(lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd) == CELL_OK); // Not checked on LLE + return ret; + } + + const std::span> es_handles = get_es_handles(esHandle->dmux_handle); + + std::shift_left(std::ranges::find(es_handles, static_cast>(esHandle)), es_handles.end(), 1); + + esHandle->dmux_handle->enabled_es_num--; + *es_handles.rbegin() = vm::null; + + return lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd); +} + +error_code cellDmuxResetEs(ppu_thread& ppu, vm::ptr esHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("cellDmuxResetEs(esHandle=*0x%x)", esHandle); + + if (!esHandle || !esHandle->_this || !esHandle->dmux_handle || esHandle->dmux_handle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd, 0); ret != CELL_OK) + { + return ret; + } + + const u32 dmux_status = esHandle->dmux_handle->dmux_state; + + if (const error_code ret = lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd); ret != CELL_OK) + { + return ret; + } + + if (dmux_status & DMUX_STOPPED) + { + return CELL_DMUX_ERROR_SEQ; + } + + if (const error_code ret = lv2_syscall(ppu, esHandle->_dx_mes, 0); ret != CELL_OK) + { + return ret; + } + + if (const error_code ret = get_error(get_core_ops()->resetEs(ppu, esHandle->core_es_handle)); ret != CELL_OK) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, esHandle->_dx_mes); + return mutex_unlock_ret ? mutex_unlock_ret : ret; + } + + const auto au_queue_elements = get_au_queue_elements(esHandle); + + for (s32 i = 0; i < esHandle->au_queue.max_size; i++) + { + au_queue_elements[i].index = i; + au_queue_elements[i].unk = 0; + au_queue_elements[i].au_info.info.auAddr = vm::null; + au_queue_elements[i].au_info.info.auMaxSize = 0; + } + + esHandle->error_mem_size = 0; + esHandle->error_count = 0; + esHandle->au_queue.allocated_size = 0; + esHandle->au_queue.size = 0; + esHandle->au_queue.front = 0; + esHandle->au_queue.back = 0; + esHandle->au_queue.allocated_back = 0; + + return lv2_syscall(ppu, esHandle->_dx_mes); +} + +template +static error_code pop_au(ppu_thread& ppu, vm::ptr esHandle, vm::cpptr auInfo, vm::cpptr auSpecificInfo) +{ + if (!esHandle || !esHandle->_this || !esHandle->dmux_handle || esHandle->dmux_handle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, esHandle->_dx_mes, 0); ret != CELL_OK) + { + return ret; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + + if (esHandle->au_queue.size <= 0) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, esHandle->_dx_mes); + return mutex_unlock_ret ? mutex_unlock_ret : CELL_DMUX_ERROR_EMPTY; + } + + const vm::ptr au_info = (get_au_queue_elements(esHandle) + esHandle->au_queue.front).ptr(&DmuxAuQueueElement::au_info); + + if (auInfo) + { + *auInfo = au_info.ptr(&DmuxAuInfo::info); + } + + if (auSpecificInfo) + { + *auSpecificInfo = au_info->specific_info; + } + + if constexpr (!is_peek) + { + esHandle->au_queue.front = (esHandle->au_queue.front + 1) % esHandle->au_queue.max_size; + esHandle->au_queue.size--; + } + + return lv2_syscall(ppu, esHandle->_dx_mes); +} + +error_code cellDmuxGetAu(ppu_thread& ppu, vm::ptr esHandle, vm::cpptr auInfo, vm::cpptr auSpecificInfo) +{ + cellDmux.trace("cellDmuxGetAu(esHandle=*0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo); + + return pop_au(ppu, esHandle, auInfo, auSpecificInfo); +} + +error_code cellDmuxPeekAu(ppu_thread& ppu, vm::ptr esHandle, vm::cpptr auInfo, vm::cpptr auSpecificInfo) +{ + cellDmux.trace("cellDmuxPeekAu(esHandle=*0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo); + + return pop_au(ppu, esHandle, auInfo, auSpecificInfo); +} + +error_code cellDmuxGetAuEx(ppu_thread& ppu, vm::ptr esHandle, vm::cpptr auInfoEx, vm::cpptr auSpecificInfo) +{ + cellDmux.trace("cellDmuxGetAuEx(esHandle=*0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo); + + return pop_au(ppu, esHandle, auInfoEx, auSpecificInfo); +} + +error_code cellDmuxPeekAuEx(ppu_thread& ppu, vm::ptr esHandle, vm::cpptr auInfoEx, vm::cpptr auSpecificInfo) +{ + cellDmux.trace("cellDmuxPeekAuEx(esHandle=*0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo); + + return pop_au(ppu, esHandle, auInfoEx, auSpecificInfo); +} + +error_code cellDmuxReleaseAu(ppu_thread& ppu, vm::ptr esHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.trace("cellDmuxReleaseAu(esHandle=*0x%x)", esHandle); + + if (!esHandle || !esHandle->_this || !esHandle->dmux_handle || esHandle->dmux_handle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, esHandle->_dx_mes, 0); ret != CELL_OK) + { + return ret; + } + + vm::bptr mem_addr; + u32 mem_size; + + if (esHandle->au_queue.allocated_size < 1) + { + if (esHandle->error_count == 0u) + { + const error_code mutex_unlock_ret = lv2_syscall(ppu, esHandle->_dx_mes); + return mutex_unlock_ret ? mutex_unlock_ret : CELL_DMUX_ERROR_SEQ; + } + + mem_addr = esHandle->error_mem_addr; + mem_size = esHandle->error_mem_size; + } + else + { + const DmuxAuInfo& au_info = get_au_queue_elements(esHandle)[esHandle->au_queue.allocated_back].au_info; + + mem_size = + esHandle->error_mem_size += au_info.info.auSize; + + if (esHandle->error_count == 0u) + { + mem_addr = au_info.info.auAddr; + } + else + { + mem_addr = esHandle->error_mem_addr; + } + + esHandle->au_queue.allocated_back = (esHandle->au_queue.allocated_back + 1) % esHandle->au_queue.max_size; + esHandle->au_queue.allocated_size--; + + if (esHandle->au_queue.allocated_size < esHandle->au_queue.size) + { + esHandle->au_queue.front = (esHandle->au_queue.front + 1) % esHandle->au_queue.max_size; + esHandle->au_queue.size--; + } + } + + if (const error_code ret = get_error(get_core_ops()->releaseAu(ppu, esHandle->core_es_handle, mem_addr, mem_size)); ret != CELL_OK) + { + if (esHandle->error_count == 0u) + { + esHandle->error_mem_addr = mem_addr; + } + + esHandle->error_count++; + + const error_code mutex_unlock_ret = lv2_syscall(ppu, esHandle->_dx_mes); + return mutex_unlock_ret ? mutex_unlock_ret : ret; + } + + esHandle->error_count = 0; + esHandle->error_mem_size = 0; + + return lv2_syscall(ppu, esHandle->_dx_mes); +} + +error_code cellDmuxFlushEs(ppu_thread& ppu, vm::ptr esHandle) +{ + // Blocking savestate creation due to ppu_thread::fast_call() + const std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmux.notice("cellDmuxFlushEs(esHandle=*0x%x)", esHandle); + + if (!esHandle || !esHandle->_this || !esHandle->dmux_handle || esHandle->dmux_handle->dmux_type.streamType != CELL_DMUX_STREAM_TYPE_PAMF) + { + return CELL_DMUX_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd, 0); ret != CELL_OK) + { + return ret; + } + + const u32 dmux_state = esHandle->dmux_handle->dmux_state; + + if (const error_code ret = lv2_syscall(ppu, esHandle->dmux_handle->_dx_mhd); ret != CELL_OK) + { + return ret; + } + + if (!(dmux_state & DMUX_STOPPED)) + { + return CELL_DMUX_ERROR_SEQ; + } + + esHandle->flush_started = true; + + if (const error_code ret = get_error(get_core_ops()->flushEs(ppu, esHandle->core_es_handle)); ret != CELL_OK) + { + esHandle->flush_started = false; + return ret; + } - es->dmux->job.push(task, &es->dmux->is_closed); return CELL_OK; } @@ -1382,4 +1258,11 @@ DECLARE(ppu_module_manager::cellDmux)("cellDmux", []() REG_FUNC(cellDmux, cellDmuxPeekAuEx); REG_FUNC(cellDmux, cellDmuxReleaseAu); REG_FUNC(cellDmux, cellDmuxFlushEs); + + REG_HIDDEN_FUNC(notify_demux_done); + REG_HIDDEN_FUNC(notify_fatal_err); + REG_HIDDEN_FUNC(notify_prog_end_code); + + REG_HIDDEN_FUNC(notify_es_au_found); + REG_HIDDEN_FUNC(notify_es_flush_done); }); diff --git a/rpcs3/Emu/Cell/Modules/cellDmux.h b/rpcs3/Emu/Cell/Modules/cellDmux.h index 1767165283..3db8c63bee 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmux.h +++ b/rpcs3/Emu/Cell/Modules/cellDmux.h @@ -1,7 +1,8 @@ #pragma once #include "Emu/Memory/vm_ptr.h" -#include "cellPamf.h" +#include "Emu/Cell/ErrorCodes.h" +#include "Utilities/BitField.h" // Error Codes enum CellDmuxError :u32 @@ -18,6 +19,10 @@ enum CellDmuxStreamType : s32 CELL_DMUX_STREAM_TYPE_UNDEF = 0, CELL_DMUX_STREAM_TYPE_PAMF = 1, CELL_DMUX_STREAM_TYPE_TERMINATOR = 2, + + // Only used in cellSail + CELL_DMUX_STREAM_TYPE_MP4 = 0x81, + CELL_DMUX_STREAM_TYPE_AVI = 0x82 }; enum CellDmuxMsgType : s32 @@ -33,118 +38,6 @@ enum CellDmuxEsMsgType : s32 CELL_DMUX_ES_MSG_TYPE_FLUSH_DONE = 1, }; -enum CellDmuxPamfM2vLevel : s32 -{ - CELL_DMUX_PAMF_M2V_MP_LL = 0, - CELL_DMUX_PAMF_M2V_MP_ML, - CELL_DMUX_PAMF_M2V_MP_H14, - CELL_DMUX_PAMF_M2V_MP_HL, -}; - -enum CellDmuxPamfAvcLevel : s32 -{ - CELL_DMUX_PAMF_AVC_LEVEL_2P1 = 21, - CELL_DMUX_PAMF_AVC_LEVEL_3P0 = 30, - CELL_DMUX_PAMF_AVC_LEVEL_3P1 = 31, - CELL_DMUX_PAMF_AVC_LEVEL_3P2 = 32, - CELL_DMUX_PAMF_AVC_LEVEL_4P1 = 41, - CELL_DMUX_PAMF_AVC_LEVEL_4P2 = 42, -}; - -struct CellDmuxPamfAuSpecificInfoM2v -{ - be_t reserved1; -}; - -struct CellDmuxPamfAuSpecificInfoAvc -{ - be_t reserved1; -}; - -struct CellDmuxPamfAuSpecificInfoLpcm -{ - u8 channelAssignmentInfo; - u8 samplingFreqInfo; - u8 bitsPerSample; -}; - -struct CellDmuxPamfAuSpecificInfoAc3 -{ - be_t reserved1; -}; - -struct CellDmuxPamfAuSpecificInfoAtrac3plus -{ - be_t reserved1; -}; - -struct CellDmuxPamfAuSpecificInfoUserData -{ - be_t reserved1; -}; - -struct CellDmuxPamfEsSpecificInfoM2v -{ - be_t profileLevel; -}; - -struct CellDmuxPamfEsSpecificInfoAvc -{ - be_t level; -}; - -struct CellDmuxPamfEsSpecificInfoLpcm -{ - be_t samplingFreq; - be_t numOfChannels; - be_t bitsPerSample; -}; - -struct CellDmuxPamfEsSpecificInfoAc3 -{ - be_t reserved1; -}; - -struct CellDmuxPamfEsSpecificInfoAtrac3plus -{ - be_t reserved1; -}; - -struct CellDmuxPamfEsSpecificInfoUserData -{ - be_t reserved1; -}; - -enum CellDmuxPamfSamplingFrequency : s32 -{ - CELL_DMUX_PAMF_FS_48K = 48000, -}; - -enum CellDmuxPamfBitsPerSample : s32 -{ - CELL_DMUX_PAMF_BITS_PER_SAMPLE_16 = 16, - CELL_DMUX_PAMF_BITS_PER_SAMPLE_24 = 24, -}; - -enum CellDmuxPamfLpcmChannelAssignmentInfo : s32 -{ - CELL_DMUX_PAMF_LPCM_CH_M1 = 1, - CELL_DMUX_PAMF_LPCM_CH_LR = 3, - CELL_DMUX_PAMF_LPCM_CH_LRCLSRSLFE = 9, - CELL_DMUX_PAMF_LPCM_CH_LRCLSCS1CS2RSLFE = 11, -}; - -enum CellDmuxPamfLpcmFs : s32 -{ - CELL_DMUX_PAMF_LPCM_FS_48K = 1, -}; - -enum CellDmuxPamfLpcmBitsPerSamples : s32 -{ - CELL_DMUX_PAMF_LPCM_BITS_PER_SAMPLE_16 = 1, - CELL_DMUX_PAMF_LPCM_BITS_PER_SAMPLE_24 = 3, -}; - struct CellDmuxMsg { be_t msgType; // CellDmuxMsgType @@ -160,24 +53,19 @@ struct CellDmuxEsMsg struct CellDmuxType { be_t streamType; // CellDmuxStreamType - be_t reserved[2]; -}; - -struct CellDmuxPamfSpecificInfo -{ - be_t thisSize; - b8 programEndCodeCb; + be_t reserved1; + be_t reserved2; }; struct CellDmuxType2 { - be_t streamType; // CellDmuxStreamType - be_t streamSpecificInfo; + be_t streamType; + vm::bcptr streamSpecificInfo; }; struct CellDmuxResource { - be_t memAddr; + vm::bptr memAddr; be_t memSize; be_t ppuThreadPriority; be_t ppuThreadStackSize; @@ -187,12 +75,12 @@ struct CellDmuxResource struct CellDmuxResourceEx { - be_t memAddr; + vm::bptr memAddr; be_t memSize; be_t ppuThreadPriority; be_t ppuThreadStackSize; - be_t spurs_addr; - u8 priority[8]; + vm::bptr spurs; // CellSpurs* + be_t priority; be_t maxContention; }; @@ -203,40 +91,30 @@ struct CellDmuxResourceSpurs be_t maxContention; }; -/* -struct CellDmuxResource2Ex -{ - b8 isResourceEx; //true - CellDmuxResourceEx resourceEx; -}; - -struct CellDmuxResource2NoEx -{ - b8 isResourceEx; //false - CellDmuxResource resource; -}; -*/ - struct CellDmuxResource2 { b8 isResourceEx; - be_t memAddr; - be_t memSize; - be_t ppuThreadPriority; - be_t ppuThreadStackSize; - be_t shit[4]; + + union + { + CellDmuxResource resource; + CellDmuxResourceEx resourceEx; + }; }; -using CellDmuxCbMsg = u32(u32 demuxerHandle, vm::ptr demuxerMsg, u32 cbArg); +struct DmuxContext; +struct DmuxEsContext; -using CellDmuxCbEsMsg = u32(u32 demuxerHandle, u32 esHandle, vm::ptr esMsg, u32 cbArg); +using CellDmuxCbMsg = u32(vm::ptr demuxerHandle, vm::cptr demuxerMsg, vm::ptr cbArg); + +using CellDmuxCbEsMsg = u32(vm::ptr demuxerHandle, vm::ptr esHandle, vm::cptr esMsg, vm::ptr cbArg); // Used for internal callbacks as well template struct DmuxCb { vm::bptr cbFunc; - be_t cbArg; + vm::bptr cbArg; }; using CellDmuxCb = DmuxCb; @@ -250,42 +128,114 @@ struct CellDmuxAttr be_t demuxerVerLower; }; +struct CellDmuxPamfAttr +{ + be_t maxEnabledEsNum; + be_t version; + be_t memSize; +}; + struct CellDmuxEsAttr { be_t memSize; }; +struct CellDmuxPamfEsAttr +{ + be_t auQueueMaxSize; + be_t memSize; + be_t specificInfoSize; +}; + struct CellDmuxEsResource { - be_t memAddr; + vm::bptr memAddr; be_t memSize; }; struct CellDmuxAuInfo { - be_t auAddr; + vm::bptr auAddr; be_t auSize; be_t auMaxSize; - be_t userData; - be_t ptsUpper; - be_t ptsLower; - be_t dtsUpper; - be_t dtsLower; -}; - -struct CellDmuxAuInfoEx -{ - be_t auAddr; - be_t auSize; - be_t reserved; b8 isRap; be_t userData; CellCodecTimeStamp pts; CellCodecTimeStamp dts; }; -struct CellDmuxPamfAttr; -struct CellDmuxPamfEsAttr; +using CellDmuxAuInfoEx = CellDmuxAuInfo; + +struct DmuxAuInfo +{ + CellDmuxAuInfo info; + vm::bptr specific_info; + be_t specific_info_size; +}; + +struct DmuxAuQueueElement +{ + be_t index; + u8 unk; // unused + DmuxAuInfo au_info; +}; + +CHECK_SIZE(DmuxAuQueueElement, 0x38); + +enum DmuxState : u32 +{ + DMUX_STOPPED = 1 << 0, + DMUX_RUNNING = 1 << 1, +}; + +struct alignas(0x10) DmuxContext // CellDmuxHandle = DmuxContext* +{ + vm::bptr _this; + be_t _this_size; + be_t version; + be_t dmux_state; + CellDmuxType dmux_type; + CellDmuxCb dmux_cb; + b8 stream_is_set; + vm::bptr core_handle; + be_t version_; // Same value as 'version' + be_t user_data; + be_t max_enabled_es_num; + be_t enabled_es_num; + be_t _dx_mhd; // sys_mutex_t + u8 reserved[0x7c]; +}; + +CHECK_SIZE_ALIGN(DmuxContext, 0xc0, 0x10); + +struct alignas(0x10) DmuxEsContext // CellDmuxEsHandle = DmuxEsContext* +{ + be_t _dx_mes; // sys_mutex_t + be_t is_enabled; + be_t error_mem_size; + be_t error_count; + vm::bptr error_mem_addr; + vm::bptr _this; + be_t _this_size; + be_t _this_index; + vm::bptr dmux_handle; + CellDmuxEsCb es_cb; + vm::bptr core_es_handle; + bf_t, 0, 1> flush_started; + + struct + { + be_t max_size; + be_t allocated_size; + be_t size; + be_t front; + be_t back; + be_t allocated_back; + } + au_queue; +}; + +CHECK_SIZE_ALIGN(DmuxEsContext, 0x50, 0x10); using DmuxNotifyDemuxDone = error_code(vm::ptr, u32, vm::ptr); using DmuxNotifyFatalErr = error_code(vm::ptr, u32, vm::ptr); @@ -301,13 +251,13 @@ using CellDmuxCoreOpResetStream = error_code(vm::ptr); using CellDmuxCoreOpCreateThread = error_code(vm::ptr); using CellDmuxCoreOpJoinThread = error_code(vm::ptr); using CellDmuxCoreOpSetStream = error_code(vm::ptr, vm::cptr, u32, b8, u64); -using CellDmuxCoreOpFreeMemory = error_code(vm::ptr, vm::ptr, u32); +using CellDmuxCoreOpReleaseAu = error_code(vm::ptr, vm::ptr, u32); using CellDmuxCoreOpQueryEsAttr = error_code(vm::cptr, vm::cptr, vm::ptr); using CellDmuxCoreOpEnableEs = error_code(vm::ptr, vm::cptr, vm::cptr, vm::cptr>, vm::cptr>, vm::cptr, vm::pptr); -using CellDmuxCoreOpDisableEs = u32(vm::ptr); -using CellDmuxCoreOpFlushEs = u32(vm::ptr); -using CellDmuxCoreOpResetEs = u32(vm::ptr); -using CellDmuxCoreOpResetStreamAndWaitDone = u32(vm::ptr); +using CellDmuxCoreOpDisableEs = error_code(vm::ptr); +using CellDmuxCoreOpFlushEs = error_code(vm::ptr); +using CellDmuxCoreOpResetEs = error_code(vm::ptr); +using CellDmuxCoreOpResetStreamAndWaitDone = error_code(vm::ptr); struct CellDmuxCoreOps { @@ -318,7 +268,7 @@ struct CellDmuxCoreOps vm::bptr createThread; vm::bptr joinThread; vm::bptr setStream; - vm::bptr freeMemory; + vm::bptr releaseAu; vm::bptr queryEsAttr; vm::bptr enableEs; vm::bptr disableEs; diff --git a/rpcs3/Emu/Cell/Modules/cellDmuxPamf.cpp b/rpcs3/Emu/Cell/Modules/cellDmuxPamf.cpp index 70162d4031..ecf59db508 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmuxPamf.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDmuxPamf.cpp @@ -1,121 +1,2860 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -#include "Emu/IdManager.h" +#include "Emu/Cell/lv2/sys_cond.h" +#include "Emu/Cell/lv2/sys_memory.h" +#include "Emu/Cell/lv2/sys_mutex.h" +#include "Emu/Cell/lv2/sys_ppu_thread.h" +#include "Emu/Cell/lv2/sys_sync.h" +#include "sysPrxForUser.h" +#include "util/asm.hpp" -#include "cellDmux.h" #include "cellDmuxPamf.h" - +#include +#include vm::gvar g_cell_dmux_core_ops_pamf; vm::gvar g_cell_dmux_core_ops_raw_es; LOG_CHANNEL(cellDmuxPamf) +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](CellDmuxPamfError value) + { + switch (value) + { + STR_CASE(CELL_DMUX_PAMF_ERROR_BUSY); + STR_CASE(CELL_DMUX_PAMF_ERROR_ARG); + STR_CASE(CELL_DMUX_PAMF_ERROR_UNKNOWN_STREAM); + STR_CASE(CELL_DMUX_PAMF_ERROR_NO_MEMORY); + STR_CASE(CELL_DMUX_PAMF_ERROR_FATAL); + } + + return unknown; + }); +} + +inline std::pair dmuxPamfStreamIdToTypeChannel(u16 stream_id, u16 private_stream_id) +{ + if ((stream_id & 0xf0) == 0xe0) + { + return { DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO, stream_id & 0x0f }; + } + + if ((stream_id & 0xff) != 0xbd) + { + return { DMUX_PAMF_STREAM_TYPE_INDEX_INVALID, 0 }; + } + + switch (private_stream_id & 0xf0) + { + case 0x40: return { DMUX_PAMF_STREAM_TYPE_INDEX_LPCM, private_stream_id & 0x0f }; + case 0x30: return { DMUX_PAMF_STREAM_TYPE_INDEX_AC3, private_stream_id & 0x0f }; + case 0x00: return { DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX, private_stream_id & 0x0f }; + case 0x20: return { DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA, private_stream_id & 0x0f }; + default: return { DMUX_PAMF_STREAM_TYPE_INDEX_INVALID, 0 }; + } +} + + +// SPU thread + +void dmux_pamf_base::output_queue::pop_back(u32 au_size) +{ + ensure(back - au_size >= buffer.data(), "Invalid au_size"); + back -= au_size; +} + +void dmux_pamf_base::output_queue::pop_back(u8* au_addr) +{ + ensure(au_addr >= buffer.data() && au_addr < std::to_address(buffer.end()), "Invalid au_addr"); + + // If au_begin is in front of the back pointer, unwrap the back pointer (there are no more access units behind the back pointer) + if (au_addr > back) + { + wrap_pos = buffer.data(); + } + + back = au_addr; +} + +void dmux_pamf_base::output_queue::pop_front(u32 au_size) +{ + ensure(front + au_size <= std::to_address(buffer.end()), "Invalid au_size"); + front += au_size; + + // When front reaches wrap_pos, unwrap the queue + if (wrap_pos != buffer.data() && wrap_pos <= front) + { + ensure(wrap_pos == front, "Invalid au_size"); + front = buffer.data(); + wrap_pos = buffer.data(); + } +} + +void dmux_pamf_base::output_queue::push_unchecked(const access_unit_chunk& au_chunk) +{ + std::ranges::copy(au_chunk.cached_data, back); + std::ranges::copy(au_chunk.data, back + au_chunk.cached_data.size()); + back += au_chunk.data.size() + au_chunk.cached_data.size(); +} + +bool dmux_pamf_base::output_queue::push(const access_unit_chunk& au_chunk, const std::function& on_fatal_error) +{ + // If there are any unconsumed access units behind the back pointer, the distance between the front and back pointers is the remaining capacity, + // otherwise the distance between the end of the buffer and the back pointer is the remaining capacity + if (wrap_pos == buffer.data()) + { + // Since it was already checked if there is enough space for au_max_size, this can only occur if the current access unit is larger than au_max_size + if (au_chunk.data.size() + au_chunk.cached_data.size() > static_cast(std::to_address(buffer.end()) - back)) + { + cellDmuxPamf.error("Access unit larger than specified maximum access unit size"); + on_fatal_error(); + return false; + } + } + else if (au_chunk.data.size() + au_chunk.cached_data.size() + 0x10 > static_cast(front - back)) // + sizeof(v128) because of SPU shenanigans probably + { + return false; + } + + push_unchecked(au_chunk); + return true; +} + +bool dmux_pamf_base::output_queue::prepare_next_au(u32 au_max_size) +{ + // LLE always checks the distance between the end of the buffer and the back pointer, even if the back pointer is wrapped around and there are unconsumed access units behind it + if (std::to_address(buffer.end()) - back < au_max_size) + { + // Can't wrap the back pointer around again as long as there are unconsumed access units behind it + if (wrap_pos != buffer.data()) + { + return false; + } + + wrap_pos = back; + back = buffer.data(); + } + + return true; +} + +void dmux_pamf_base::elementary_stream::flush_es() +{ + if (current_au.accumulated_size != 0) + { + ensure(au_queue.get_free_size() >= cache.size()); + au_queue.push_unchecked({ {}, cache }); + + current_au.accumulated_size += static_cast(cache.size()); + + ctx.on_au_found(get_stream_id().first, get_stream_id().second, user_data, { au_queue.peek_back(current_au.accumulated_size), current_au.accumulated_size }, current_au.pts, current_au.dts, + current_au.rap, au_specific_info_size, current_au.au_specific_info_buf); + } + + reset(); + + while (!ctx.on_flush_done(get_stream_id().first, get_stream_id().second, user_data)) {} // The flush_done event is repeatedly fired until it succeeds +} + +void dmux_pamf_base::elementary_stream::reset_es(u8* au_addr) +{ + if (!au_addr) + { + reset(); + au_queue.clear(); + } + else + { + au_queue.pop_back(au_addr); + } +} + +void dmux_pamf_base::elementary_stream::discard_access_unit() +{ + au_queue.pop_back(current_au.accumulated_size - static_cast(au_chunk.data.size() + au_chunk.cached_data.size())); + reset(); + cache.clear(); +} + +template +u32 dmux_pamf_base::elementary_stream::parse_audio_stream_header(std::span pes_packet_data) +{ + u32 extra_header_size_unk = 0; // No clue what this is, I have not found a single instance in any PAMF stream where it is something other than zero + + if (!au_size_unk) // For some reason, LLE uses the member that stores the size of user data access units here as bool + { + // Not checked on LLE + if (pes_packet_data.size() < sizeof(u32)) + { + return umax; + } + + extra_header_size_unk = read_from_ptr>(pes_packet_data) & extra_header_size_unk_mask; + au_size_unk = true; + } + + return extra_header_size_unk + sizeof(u32); +} + +bool dmux_pamf_base::elementary_stream::process_pes_packet_data() +{ + ensure(pes_packet_data, "set_pes_packet_data() should be used before process_stream()"); + + for (;;) + { + switch (state) + { + case state::initial: + if (stream_chunk.empty()) + { + pes_packet_data.reset(); + return true; + } + + // Parse the current stream section and increment the reading position by the amount that was consumed + stream_chunk = stream_chunk.subspan(parse_stream(stream_chunk)); + + current_au.accumulated_size += static_cast(au_chunk.data.size() + au_chunk.cached_data.size()); + + // If the beginning of a new access unit was found, set the current timestamps and rap indicator + if (!current_au.timestamps_rap_set && (current_au.state == access_unit::state::commenced || current_au.state == access_unit::state::m2v_sequence + || (current_au.state == access_unit::state::complete && au_chunk.cached_data.empty()))) + { + set_au_timestamps_rap(); + } + + state = state::pushing_au_queue; + [[fallthrough]]; + + case state::pushing_au_queue: + if (!au_chunk.data.empty() || !au_chunk.cached_data.empty()) + { + if (!au_queue.push(au_chunk, std::bind_front(&dmux_pamf_base::on_fatal_error, &ctx))) + { + ctx.on_au_queue_full(); + return false; + } + + au_chunk.data = {}; + au_chunk.cached_data.clear(); + } + + // This happens if the distance between two delimiters is greater than the size indicated in the info header of the stream. + if (current_au.state == access_unit::state::size_mismatch) + { + // LLE cuts off one byte from the beginning of the current PES packet data and then starts over. + pes_packet_data = pes_packet_data->subspan<1>(); + stream_chunk = *pes_packet_data; + + // It also removes the entire current access unit from the queue, even if it began in an earlier PES packet + au_queue.pop_back(current_au.accumulated_size); + current_au.accumulated_size = 0; + + state = state::initial; + continue; + } + + state = state::notifying_au_found; + [[fallthrough]]; + + case state::notifying_au_found: + if (current_au.state == access_unit::state::complete && !ctx.on_au_found(get_stream_id().first, get_stream_id().second, user_data, + { au_queue.peek_back(current_au.accumulated_size), current_au.accumulated_size }, current_au.pts, current_au.dts, current_au.rap, au_specific_info_size, current_au.au_specific_info_buf)) + { + return false; + } + + state = state::preparing_for_next_au; + [[fallthrough]]; + + case state::preparing_for_next_au: + if (current_au.state == access_unit::state::complete) + { + if (!au_queue.prepare_next_au(au_max_size)) + { + ctx.on_au_queue_full(); + return false; + } + + current_au = {}; + } + + state = state::initial; + } + } +} + +template +u32 dmux_pamf_base::video_stream::parse_stream(std::span stream) +{ + if (current_au.state != access_unit::state::none && (avc || current_au.state != access_unit::state::m2v_sequence)) + { + current_au.state = access_unit::state::incomplete; + } + + // Concatenate the cache of the previous stream section and the beginning of the current section + std::array buf{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; // Prevent false positives (M2V pic start code ends with 0x00) + ensure(cache.size() <= 3, "The size of the cache should never exceed three bytes"); + std::ranges::copy(cache, buf.begin()); + std::copy_n(stream.begin(), std::min(sizeof(u32) - 1, stream.size()), buf.begin() + cache.size()); // Not entirely accurate: LLE always reads three bytes from the stream, even if it is smaller than that + + auto au_chunk_begin = stream.begin(); + s32 cache_idx = 0; + auto stream_it = stream.begin(); + [&] + { + // Search for delimiter in cache + for (; cache_idx < static_cast(cache.size()); cache_idx++) + { + if (const be_t code = read_from_ptr>(buf.data(), cache_idx); + (avc && code == AVC_AU_DELIMITER) || (!avc && (code == M2V_PIC_START || code == M2V_SEQUENCE_HEADER || code == M2V_SEQUENCE_END))) + { + if (current_au.state != access_unit::state::none && (avc || current_au.state != access_unit::state::m2v_sequence)) + { + // The sequence end code is included in the access unit + // LLE increments the stream pointer instead of the cache index, which will cause the access unit to be corrupted at the end + if (!avc && code == M2V_SEQUENCE_END) + { + cellDmuxPamf.warning("M2V sequence end code in cache"); + stream_it += std::min(sizeof(u32), stream.size()); // Not accurate, LLE always increments by four, regardless of the stream size + } + + current_au.state = access_unit::state::complete; + return; + } + + // If current_au.state is none and there was a delimiter found here, then LLE outputs the entire cache, even if the access unit starts at cache_idx > 0 + + current_au.state = avc || code == M2V_PIC_START ? access_unit::state::commenced : access_unit::state::m2v_sequence; + } + } + + // Search for delimiter in stream + for (; stream_it <= stream.end() - sizeof(u32); stream_it++) + { + if (const be_t code = read_from_ptr>(stream_it); + (avc && code == AVC_AU_DELIMITER) || (!avc && (code == M2V_PIC_START || code == M2V_SEQUENCE_HEADER || code == M2V_SEQUENCE_END))) + { + if (current_au.state != access_unit::state::none && (avc || current_au.state != access_unit::state::m2v_sequence)) + { + stream_it += !avc && code == M2V_SEQUENCE_END ? sizeof(u32) : 0; // The sequence end code is included in the access unit + current_au.state = access_unit::state::complete; + return; + } + + au_chunk_begin = avc || current_au.state == access_unit::state::none ? stream_it : au_chunk_begin; + current_au.state = avc || code == M2V_PIC_START ? access_unit::state::commenced : access_unit::state::m2v_sequence; + } + } + }(); + + if (current_au.state != access_unit::state::none) + { + au_chunk.data = { au_chunk_begin, stream_it }; + std::copy_n(cache.begin(), cache_idx, std::back_inserter(au_chunk.cached_data)); + } + + cache.erase(cache.begin(), cache.begin() + cache_idx); + + // Cache the end of the stream if an access unit wasn't completed. There could be the beginning of a delimiter in the last three bytes + if (current_au.state != access_unit::state::complete) + { + std::copy(stream_it, stream.end(), std::back_inserter(cache)); + } + + return static_cast((current_au.state != access_unit::state::complete || stream_it > stream.end() ? stream.end() : stream_it) - stream.begin()); +} + +u32 dmux_pamf_base::lpcm_stream::parse_stream_header(std::span pes_packet_data, [[maybe_unused]] s8 pts_dts_flag) +{ + // Not checked on LLE + if (pes_packet_data.size() < sizeof(u8) + 0x10) + { + return umax; + } + + std::memcpy(au_specific_info_buf.data(), &pes_packet_data[1], au_specific_info_buf.size()); + return parse_audio_stream_header<0x7ff>(pes_packet_data); +} + +u32 dmux_pamf_base::lpcm_stream::parse_stream(std::span stream) +{ + if (current_au.state == access_unit::state::none) + { + current_au.au_specific_info_buf = au_specific_info_buf; + } + + if (au_max_size - current_au.accumulated_size > stream.size()) + { + au_chunk.data = stream; + current_au.state = current_au.state == access_unit::state::none ? access_unit::state::commenced : access_unit::state::incomplete; + } + else + { + au_chunk.data = stream.first(au_max_size - current_au.accumulated_size); + current_au.state = access_unit::state::complete; + } + + return static_cast(au_chunk.data.size()); +} + +template +u32 dmux_pamf_base::audio_stream::parse_stream(std::span stream) +{ + const auto parse_au_size = [](be_t data) -> u16 + { + if constexpr (ac3) + { + if (const u8 fscod = data >> 14, frmsizecod = data >> 8 & 0x3f; fscod < 3 && frmsizecod < 38) + { + return AC3_FRMSIZE_TABLE[fscod][frmsizecod] * sizeof(s16); + } + } + else if ((data & 0x3ff) < 0x200) + { + return ((data & 0x3ff) + 1) * 8 + ATRACX_ATS_HEADER_SIZE; + } + + return 0; + }; + + if (current_au.state != access_unit::state::none) + { + current_au.state = access_unit::state::incomplete; + } + + // Concatenate the cache of the previous stream section and the beginning of the current section + std::array buf{}; + ensure(cache.size() <= 3, "The size of the cache should never exceed three bytes"); + std::ranges::copy(cache, buf.begin()); + std::copy_n(stream.begin(), std::min(sizeof(u16) - 1, stream.size()), buf.begin() + cache.size()); + + auto au_chunk_begin = stream.begin(); + s32 cache_idx = 0; + auto stream_it = stream.begin(); + [&] + { + // Search for delimiter in cache + for (; cache_idx <= static_cast(cache.size() + std::min(sizeof(u16) - 1, stream.size()) - sizeof(u16)); cache_idx++) + { + if (const be_t tmp = read_from_ptr>(buf.data(), cache_idx); current_au.size_info_offset != 0) + { + if (--current_au.size_info_offset == 0) + { + current_au.parsed_size = parse_au_size(tmp); + } + } + else if (tmp == SYNC_WORD) + { + if (current_au.state == access_unit::state::none) + { + // If current_au.state is none and there was a delimiter found here, then LLE outputs the entire cache, even if the access unit starts at cache_idx > 0 + + current_au.size_info_offset = ac3 ? sizeof(u16) * 2 : sizeof(u16); + current_au.state = access_unit::state::commenced; + } + else if (const u32 au_size = current_au.accumulated_size + cache_idx; au_size >= current_au.parsed_size) + { + current_au.state = au_size == current_au.parsed_size ? access_unit::state::complete : access_unit::state::size_mismatch; + return; + } + } + } + + // As long as the current access unit hasn't reached the size indicated in its header, we don't need to parse the stream + if (current_au.state != access_unit::state::none && current_au.size_info_offset == 0 && current_au.accumulated_size + cache.size() < current_au.parsed_size) + { + stream_it += std::min(current_au.parsed_size - current_au.accumulated_size - cache.size(), stream.size() - sizeof(u32)); + } + + // Search for delimiter in stream + for (; stream_it <= stream.end() - sizeof(u32); stream_it++) // LLE uses sizeof(u32), even though the delimiter is only two bytes large + { + if (const be_t tmp = read_from_ptr>(stream_it); current_au.size_info_offset != 0) + { + if (--current_au.size_info_offset == 0) + { + current_au.parsed_size = parse_au_size(tmp); + } + } + else if (tmp == SYNC_WORD) + { + if (current_au.state == access_unit::state::none) + { + au_chunk_begin = stream_it; + current_au.size_info_offset = ac3 ? sizeof(u16) * 2 : sizeof(u16); + current_au.state = access_unit::state::commenced; + } + else if (const u32 au_size = static_cast(current_au.accumulated_size + stream_it - au_chunk_begin + cache.size()); au_size >= current_au.parsed_size) + { + current_au.state = au_size == current_au.parsed_size ? access_unit::state::complete : access_unit::state::size_mismatch; + return; + } + } + } + }(); + + if (current_au.state != access_unit::state::none) + { + au_chunk.data = { au_chunk_begin, stream_it }; + std::copy_n(cache.begin(), cache_idx, std::back_inserter(au_chunk.cached_data)); + } + + cache.erase(cache.begin(), cache.begin() + cache_idx); + + // Cache the end of the stream if an access unit wasn't completed. There could be the beginning of a delimiter in the last three bytes + if (current_au.state != access_unit::state::complete && current_au.state != access_unit::state::size_mismatch) + { + std::copy(stream_it, stream.end(), std::back_inserter(cache)); + } + + return static_cast((current_au.state != access_unit::state::complete ? stream.end() : stream_it) - stream.begin()); +} + +u32 dmux_pamf_base::user_data_stream::parse_stream_header(std::span pes_packet_data, s8 pts_dts_flag) +{ + if (pts_dts_flag < 0) // PTS field exists + { + // Not checked on LLE + if (pes_packet_data.size() < 2 + sizeof(u32)) + { + return umax; + } + + au_size_unk = read_from_ptr>(pes_packet_data.begin(), 2) - sizeof(u32); + return 10; + } + + return 2; +} + +u32 dmux_pamf_base::user_data_stream::parse_stream(std::span stream) +{ + if (au_size_unk > stream.size()) + { + au_chunk.data = stream; + au_size_unk -= static_cast(stream.size()); + current_au.state = access_unit::state::commenced; // User data streams always use commenced + } + else + { + au_chunk.data = stream.first(au_size_unk); + au_size_unk = 0; + current_au.state = access_unit::state::complete; + } + + return static_cast(stream.size()); // Always consume the entire stream +} + +bool dmux_pamf_base::enable_es(u32 stream_id, u32 private_stream_id, bool is_avc, std::span au_queue_buffer, u32 au_max_size, bool raw_es, u32 user_data) +{ + const auto [type_idx, channel] = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id); + + if (type_idx == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID || elementary_stream::is_enabled(elementary_streams[type_idx][channel])) + { + return false; + } + + this->raw_es = raw_es; + pack_es_type_idx = type_idx; + + switch (type_idx) + { + case DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO: + elementary_streams[0][channel] = is_avc ? static_cast>(std::make_unique>(channel, au_max_size, *this, user_data, au_queue_buffer)) + : std::make_unique>(channel, au_max_size, *this, user_data, au_queue_buffer); + return true; + + case DMUX_PAMF_STREAM_TYPE_INDEX_LPCM: elementary_streams[1][channel] = std::make_unique(channel, au_max_size, *this, user_data, au_queue_buffer); return true; + case DMUX_PAMF_STREAM_TYPE_INDEX_AC3: elementary_streams[2][channel] = std::make_unique>(channel, au_max_size, *this, user_data, au_queue_buffer); return true; + case DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX: elementary_streams[3][channel] = std::make_unique>(channel, au_max_size, *this, user_data, au_queue_buffer); return true; + case DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA: elementary_streams[4][channel] = std::make_unique(channel, au_max_size, *this, user_data, au_queue_buffer); return true; + default: fmt::throw_exception("Unreachable"); + } +} + +bool dmux_pamf_base::disable_es(u32 stream_id, u32 private_stream_id) +{ + const auto [type_idx, channel] = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id); + + if (type_idx == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID || !elementary_stream::is_enabled(elementary_streams[type_idx][channel])) + { + return false; + } + + elementary_streams[type_idx][channel] = nullptr; + return true; +} + +bool dmux_pamf_base::release_au(u32 stream_id, u32 private_stream_id, u32 au_size) const +{ + const auto [type_idx, channel] = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id); + + if (type_idx == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID || !elementary_stream::is_enabled(elementary_streams[type_idx][channel])) + { + return false; + } + + elementary_streams[type_idx][channel]->release_au(au_size); + return true; +} + +bool dmux_pamf_base::flush_es(u32 stream_id, u32 private_stream_id) +{ + const auto [type_idx, channel] = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id); + + if (type_idx == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID || !elementary_stream::is_enabled(elementary_streams[type_idx][channel])) + { + return false; + } + + state = state::initial; + elementary_streams[type_idx][channel]->flush_es(); + return true; +} + +void dmux_pamf_base::set_stream(std::span stream, bool continuity) +{ + if (!continuity) + { + std::ranges::for_each(elementary_streams | std::views::join | std::views::filter(elementary_stream::is_enabled), &elementary_stream::discard_access_unit); + } + + state = state::initial; + + // Not checked on LLE, it would parse old memory contents or uninitialized memory if the size of the input stream set by the user is not a multiple of 0x800. + // Valid PAMF streams are always a multiple of 0x800 bytes large. + if ((stream.size() & 0x7ff) != 0) + { + cellDmuxPamf.warning("Invalid stream size"); + } + + this->stream = stream; + demux_done_notified = false; +} + +void dmux_pamf_base::reset_stream() +{ + std::ranges::for_each(elementary_streams | std::views::join | std::views::filter(elementary_stream::is_enabled), &elementary_stream::discard_access_unit); + state = state::initial; + stream.reset(); +} + +bool dmux_pamf_base::reset_es(u32 stream_id, u32 private_stream_id, u8* au_addr) +{ + const auto [type_idx, channel] = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id); + + if (type_idx == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID || !elementary_stream::is_enabled(elementary_streams[type_idx][channel])) + { + return false; + } + + if (!au_addr) + { + state = state::initial; + } + + elementary_streams[type_idx][channel]->reset_es(au_addr); + return true; +} + +bool dmux_pamf_base::process_next_pack() +{ + if (!stream) + { + demux_done_notified = demux_done_notified || on_demux_done(); + return true; + } + + switch (state) + { + case state::initial: + { + // Search for the next pack start code or prog end code + std::span pack; + + for (;;) + { + if (stream->size() < PACK_STUFFING_LENGTH_OFFSET + sizeof(u8)) + { + stream.reset(); + demux_done_notified = on_demux_done(); + return true; + } + + pack = stream->first(std::min(stream->size(), PACK_SIZE)); + stream = stream->subspan(std::min(stream->size(), PACK_SIZE)); + + // If the input stream is a raw elementary stream, skip everything MPEG-PS related and go straight to elementary stream parsing + if (raw_es) + { + if (elementary_stream::is_enabled(elementary_streams[pack_es_type_idx][0])) + { + elementary_streams[pack_es_type_idx][0]->set_pes_packet_data(pack); + } + + state = state::elementary_stream; + return true; + } + + // While LLE is actually searching the entire section for a pack start code or program end code, + // it doesn't set its current reading position to the address where it found the code, so it would bug out if there isn't one at the start of the section + + if (const be_t code = read_from_ptr>(pack); code == PACK_START) + { + break; + } + else if (code == PROG_END) + { + if (!on_prog_end()) + { + state = state::prog_end; + } + + return true; + } + + cellDmuxPamf.warning("No start code found at the beginning of the current section"); + } + + // Skip over pack header + const u8 pack_stuffing_length = read_from_ptr>(pack, PACK_STUFFING_LENGTH_OFFSET); + + // Not checked on LLE, the SPU task would just increment the reading position and read random data in the SPU local store + if (PACK_STUFFING_LENGTH_OFFSET + sizeof(u8) + pack_stuffing_length + PES_HEADER_DATA_LENGTH_OFFSET + sizeof(u8) > pack.size()) + { + cellDmuxPamf.error("Invalid pack stuffing length"); + return false; + } + + std::span current_pes_packet = pack.subspan(PACK_STUFFING_LENGTH_OFFSET + sizeof(u8) + pack_stuffing_length); + + if (read_from_ptr, 8, 24>>(current_pes_packet) != PACKET_START_CODE_PREFIX) + { + cellDmuxPamf.error("Invalid start code after pack header"); + return false; + } + + // Skip over system header if present + if (read_from_ptr>(current_pes_packet) == SYSTEM_HEADER) + { + const u32 system_header_length = read_from_ptr>(current_pes_packet.begin(), PES_PACKET_LENGTH_OFFSET) + PES_PACKET_LENGTH_OFFSET + sizeof(u16); + + // Not checked on LLE, the SPU task would just increment the reading position and read random data in the SPU local store + if (system_header_length + PES_HEADER_DATA_LENGTH_OFFSET + sizeof(u8) > current_pes_packet.size()) + { + cellDmuxPamf.error("Invalid system header length"); + return false; + } + + current_pes_packet = current_pes_packet.subspan(system_header_length); + + // The SPU thread isn't doing load + rotate here for 4-byte loading (in valid PAMF streams, the next start code after a system header is always 0x10 byte aligned) + const u32 offset_low = (current_pes_packet.data() - pack.data()) & 0xf; + current_pes_packet = { current_pes_packet.begin() - offset_low, current_pes_packet.end() }; + + if (const be_t code = read_from_ptr>(current_pes_packet); code >> 8 != PACKET_START_CODE_PREFIX) + { + cellDmuxPamf.error("Invalid start code after system header"); + return false; + } + else if (code == PRIVATE_STREAM_2) + { + // A system header is optionally followed by a private stream 2 + // The first two bytes of the stream are the stream id of a video stream. The next access unit of that stream is a random access point/keyframe + + const u16 pes_packet_length = read_from_ptr>(current_pes_packet.begin(), PES_PACKET_LENGTH_OFFSET) + PES_PACKET_LENGTH_OFFSET + sizeof(u16); + + // Not checked on LLE, the SPU task would just increment the reading position and read random data in the SPU local store + if (pes_packet_length + PES_HEADER_DATA_LENGTH_OFFSET + sizeof(u8) > current_pes_packet.size()) + { + cellDmuxPamf.error("Invalid private stream 2 length"); + return false; + } + + if (const u8 channel = read_from_ptr>(current_pes_packet.begin(), PES_PACKET_LENGTH_OFFSET + sizeof(u16)) & 0xf; + elementary_stream::is_enabled(elementary_streams[0][channel])) + { + elementary_streams[0][channel]->set_rap(); + } + + current_pes_packet = current_pes_packet.subspan(pes_packet_length); + } + } + + // Parse PES packet + // LLE only parses the first PES packet per pack (valid PAMF streams only have one PES packet per pack, not including the system header + private stream 2) + + const u32 pes_packet_start_code = read_from_ptr>(current_pes_packet); + + if (pes_packet_start_code >> 8 != PACKET_START_CODE_PREFIX) + { + cellDmuxPamf.error("Invalid start code"); + return false; + } + + const u16 pes_packet_length = read_from_ptr>(current_pes_packet.begin(), PES_PACKET_LENGTH_OFFSET) + PES_PACKET_LENGTH_OFFSET + sizeof(u16); + const u8 pes_header_data_length = read_from_ptr(current_pes_packet.begin(), PES_HEADER_DATA_LENGTH_OFFSET) + PES_HEADER_DATA_LENGTH_OFFSET + sizeof(u8); + + // Not checked on LLE, the SPU task would just increment the reading position and read random data in the SPU local store + if (pes_packet_length > current_pes_packet.size() || pes_packet_length <= pes_header_data_length) + { + cellDmuxPamf.error("Invalid pes packet length"); + return false; + } + + const std::span pes_packet_data = current_pes_packet.subspan(pes_header_data_length, pes_packet_length - pes_header_data_length); + + const auto [type_idx, channel] = dmuxPamfStreamIdToTypeChannel(pes_packet_start_code, read_from_ptr(pes_packet_data)); + + if (type_idx == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID) + { + cellDmuxPamf.error("Invalid stream type"); + return false; + } + + pack_es_type_idx = type_idx; + pack_es_channel = channel; + + if (elementary_stream::is_enabled(elementary_streams[type_idx][channel])) + { + const s8 pts_dts_flag = read_from_ptr(current_pes_packet.begin(), PTS_DTS_FLAG_OFFSET); + + if (pts_dts_flag < 0) + { + // The timestamps should be unsigned, but are sign-extended from s32 to u64 on LLE. They probably forgot about integer promotion + const s32 PTS_32_30 = read_from_ptr>(current_pes_packet.begin(), 9); + const s32 PTS_29_15 = read_from_ptr, 1, 15>>(current_pes_packet.begin(), 10); + const s32 PTS_14_0 = read_from_ptr, 1, 15>>(current_pes_packet.begin(), 12); + + elementary_streams[type_idx][channel]->set_pts(PTS_32_30 << 30 | PTS_29_15 << 15 | PTS_14_0); // Bit 32 is discarded + } + + if (pts_dts_flag & 0x40) + { + const s32 DTS_32_30 = read_from_ptr>(current_pes_packet.begin(), 14); + const s32 DTS_29_15 = read_from_ptr, 1, 15>>(current_pes_packet.begin(), 15); + const s32 DTS_14_0 = read_from_ptr, 1, 15>>(current_pes_packet.begin(), 17); + + elementary_streams[type_idx][channel]->set_dts(DTS_32_30 << 30 | DTS_29_15 << 15 | DTS_14_0); // Bit 32 is discarded + } + + const usz stream_header_size = elementary_streams[type_idx][channel]->parse_stream_header(pes_packet_data, pts_dts_flag); + + // Not checked on LLE, the SPU task would just increment the reading position and read random data in the SPU local store + if (stream_header_size > pes_packet_data.size()) + { + cellDmuxPamf.error("Invalid stream header size"); + return false; + } + + elementary_streams[type_idx][channel]->set_pes_packet_data(pes_packet_data.subspan(stream_header_size)); + } + + state = state::elementary_stream; + [[fallthrough]]; + } + case state::elementary_stream: + { + if (!elementary_stream::is_enabled(elementary_streams[pack_es_type_idx][pack_es_channel]) || elementary_streams[pack_es_type_idx][pack_es_channel]->process_pes_packet_data()) + { + state = state::initial; + } + + return true; + } + case state::prog_end: + { + if (on_prog_end()) + { + state = state::initial; + } + + return true; + } + default: + fmt::throw_exception("Unreachable"); + } +} + +u32 dmux_pamf_base::get_enabled_es_count() const +{ + return static_cast(std::ranges::count_if(elementary_streams | std::views::join, elementary_stream::is_enabled)); +} + +bool dmux_pamf_spu_context::get_next_cmd(DmuxPamfCommand& lhs, bool new_stream) const +{ + cellDmuxPamf.trace("Getting next command"); + + if (cmd_queue->pop(lhs)) + { + cellDmuxPamf.trace("Command type: %d", static_cast(lhs.type.get())); + return true; + } + + if ((new_stream || has_work()) && !wait_for_au_queue && !wait_for_event_queue) + { + cellDmuxPamf.trace("No new command, continuing demuxing"); + return false; + } + + cellDmuxPamf.trace("No new command and nothing to do, waiting..."); + + cmd_queue->wait(); + + if (thread_ctrl::state() == thread_state::aborting) + { + return false; + } + + ensure(cmd_queue->pop(lhs)); + + cellDmuxPamf.trace("Command type: %d", static_cast(lhs.type.get())); + return true; +} + +bool dmux_pamf_spu_context::send_event(auto&&... args) const +{ + if (event_queue->size() >= max_enqueued_events) + { + return false; + } + + return ensure(event_queue->emplace(std::forward(args)..., event_queue_was_too_full)); +} + +void dmux_pamf_spu_context::operator()() // cellSpursMain() +{ + DmuxPamfCommand cmd; + + while (thread_ctrl::state() != thread_state::aborting) + { + if (get_next_cmd(cmd, new_stream)) + { + event_queue_was_too_full = wait_for_event_queue; + wait_for_event_queue = false; + wait_for_au_queue = false; + + ensure(cmd_result_queue->emplace(static_cast(cmd.type.value()) + 1)); + + switch (cmd.type) + { + case DmuxPamfCommandType::enable_es: + max_enqueued_events += 2; + enable_es(cmd.enable_es.stream_id, cmd.enable_es.private_stream_id, cmd.enable_es.is_avc, { cmd.enable_es.au_queue_buffer.get_ptr(), cmd.enable_es.au_queue_buffer_size }, + cmd.enable_es.au_max_size, cmd.enable_es.is_raw_es, cmd.enable_es.user_data); + break; + + case DmuxPamfCommandType::disable_es: + disable_es(cmd.disable_flush_es.stream_id, cmd.disable_flush_es.private_stream_id); + max_enqueued_events -= 2; + break; + + case DmuxPamfCommandType::set_stream: + new_stream = true; + break; + + case DmuxPamfCommandType::release_au: + release_au(cmd.release_au.stream_id, cmd.release_au.private_stream_id, cmd.release_au.au_size); + break; + + case DmuxPamfCommandType::flush_es: + flush_es(cmd.disable_flush_es.stream_id, cmd.disable_flush_es.private_stream_id); + break; + + case DmuxPamfCommandType::close: + while (!send_event(DmuxPamfEventType::close)) {} + return; + + case DmuxPamfCommandType::reset_stream: + reset_stream(); + break; + + case DmuxPamfCommandType::reset_es: + reset_es(cmd.reset_es.stream_id, cmd.reset_es.private_stream_id, cmd.reset_es.au_addr ? cmd.reset_es.au_addr.get_ptr() : nullptr); + break; + + case DmuxPamfCommandType::resume: + break; + + default: + cellDmuxPamf.error("Invalid command"); + return; + } + } + else if (thread_ctrl::state() == thread_state::aborting) + { + return; + } + + // Only set the new stream once the previous one has been entirely consumed + if (new_stream && !has_work()) + { + new_stream = false; + + DmuxPamfStreamInfo stream_info; + ensure(stream_info_queue->pop(stream_info)); + + set_stream({ stream_info.stream_addr.get_ptr(), stream_info.stream_size }, stream_info.continuity); + + // Delay demuxing a bit + // Prevents White Knight Chronicles II FMVs from freezing, since events are otherwise fired before the game has finished initializing FMV playback + thread_ctrl::wait_for(1'500); + } + + process_next_pack(); + } +} + +void dmux_pamf_base::elementary_stream::save(utils::serial& ar) +{ + // These need to be saved first since they need to be initialized in the constructor's initializer list + if (ar.is_writing()) + { + ar(au_max_size, user_data); + au_queue.save(ar); + } + + ar(state, au_size_unk, au_specific_info_buf, current_au, pts, dts, rap); + + if (state == state::pushing_au_queue) + { + ar(au_chunk.cached_data); + + if (ar.is_writing()) + { + ar(vm::get_addr(au_chunk.data.data()), static_cast(au_chunk.data.size())); + } + else + { + au_chunk.data = { vm::_ptr(ar.pop()), ar.pop() }; + } + } + + if (current_au.state != access_unit::state::complete) + { + ar(cache); + } + + bool save_stream = !!pes_packet_data; + ar(save_stream); + + if (save_stream) + { + if (ar.is_writing()) + { + ensure(stream_chunk.size() <= pes_packet_data->size()); + ar(vm::get_addr(pes_packet_data->data()), static_cast(pes_packet_data->size()), static_cast(stream_chunk.data() - pes_packet_data->data())); + } + else + { + pes_packet_data = { vm::_ptr(ar.pop()), ar.pop() }; + stream_chunk = { pes_packet_data->begin() + ar.pop(), pes_packet_data->end() }; + } + } +} + +void dmux_pamf_base::save_base(utils::serial& ar) +{ + bool stream_not_consumed = !!stream; + + ar(state, stream_not_consumed, demux_done_notified, pack_es_type_idx, raw_es); + + if (stream_not_consumed) + { + if (ar.is_writing()) + { + ar(vm::get_addr(stream->data()), static_cast(stream->size())); + } + else + { + stream = std::span{ vm::_ptr(ar.pop()), ar.pop() }; + } + } + + if (state == state::elementary_stream) + { + ar(pack_es_channel); + } + + std::array enabled_video_streams; + std::array avc_video_streams; + std::array enabled_lpcm_streams; + std::array enabled_ac3_streams; + std::array enabled_atracx_streams; + std::array enabled_user_data_streams; + + if (ar.is_writing()) + { + std::ranges::transform(elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO], enabled_video_streams.begin(), elementary_stream::is_enabled); + std::ranges::transform(elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO], avc_video_streams.begin(), [](auto& es){ return !!dynamic_cast*>(es.get()); }); + std::ranges::transform(elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_LPCM], enabled_lpcm_streams.begin(), elementary_stream::is_enabled); + std::ranges::transform(elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_AC3], enabled_ac3_streams.begin(), elementary_stream::is_enabled); + std::ranges::transform(elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX], enabled_atracx_streams.begin(), elementary_stream::is_enabled); + std::ranges::transform(elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA], enabled_user_data_streams.begin(), elementary_stream::is_enabled); + } + + ar(enabled_video_streams, avc_video_streams, enabled_lpcm_streams, enabled_ac3_streams, enabled_atracx_streams, enabled_user_data_streams); + + if (ar.is_writing()) + { + std::ranges::for_each(elementary_streams | std::views::join | std::views::filter(elementary_stream::is_enabled), [&](const auto& es){ es->save(ar); }); + } + else + { + for (u32 ch = 0; ch < 0x10; ch++) + { + if (enabled_video_streams[ch]) + { + elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO][ch] = avc_video_streams[ch] ? static_cast>(std::make_unique>(ar, ch, *this)) + : std::make_unique>(ar, ch, *this); + } + } + + for (u32 ch = 0; ch < 0x10; ch++) + { + if (enabled_lpcm_streams[ch]) + { + elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_LPCM][ch] = std::make_unique(ar, ch, *this); + } + } + + for (u32 ch = 0; ch < 0x10; ch++) + { + if (enabled_ac3_streams[ch]) + { + elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_AC3][ch] = std::make_unique>(ar, ch, *this); + } + } + + for (u32 ch = 0; ch < 0x10; ch++) + { + if (enabled_atracx_streams[ch]) + { + elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX][ch] = std::make_unique>(ar, ch, *this); + } + } + + for (u32 ch = 0; ch < 0x10; ch++) + { + if (enabled_user_data_streams[ch]) + { + elementary_streams[DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA][ch] = std::make_unique(ar, ch, *this); + } + } + } +} + +void dmux_pamf_spu_context::save(utils::serial& ar) +{ + USING_SERIALIZATION_VERSION(cellDmuxPamf); + ar(cmd_queue, new_stream); // The queues are contiguous in guest memory, so we only need to save the address of the first one + save_base(ar); +} + + +// PPU thread + +template +static auto lv2_syscall(ppu_thread& ppu, auto&&... args) +{ + const auto ret = Syscall(ppu, std::forward(args)...); + + if (ppu.test_stopped()) + { + ppu.state += cpu_flag::again; + } + + return ret; +} + +template +void DmuxPamfContext::send_spu_command_and_wait(ppu_thread& ppu, bool waiting_for_spu_state, auto&&... cmd_params) +{ + if (!waiting_for_spu_state) + { + // The caller is supposed to own the mutex until the SPU thread has consumed the command, so the queue should always be empty here + ensure(cmd_queue.emplace(type, std::forward(cmd_params)...), "The command queue wasn't empty"); + } + + lv2_obj::sleep(ppu); + + // Block until the SPU thread has consumed the command + cmd_result_queue.wait(); + + if (ppu.check_state()) + { + ppu.state += cpu_flag::again; + return; + } + + be_t result{}; + ensure(cmd_result_queue.pop(result), "The result queue was empty"); + ensure(result == static_cast(type) + 1, "The HLE SPU thread sent an invalid result"); +} + +DmuxPamfElementaryStream* DmuxPamfContext::find_es(u16 stream_id, u16 private_stream_id) +{ + const auto it = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first == DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO + ? std::ranges::find_if(elementary_streams | std::views::reverse, [&](const auto& es){ return es && es->stream_id == stream_id; }) + : std::ranges::find_if(elementary_streams | std::views::reverse, [&](const auto& es){ return es && es->stream_id == stream_id && es->private_stream_id == private_stream_id; }); + + return it != std::ranges::rend(elementary_streams) ? it->get_ptr() : nullptr; +} + +error_code DmuxPamfContext::wait_au_released_or_stream_reset(ppu_thread& ppu, u64 au_queue_full_bitset, b8& stream_reset_started, dmux_pamf_state& savestate) +{ + if (savestate == dmux_pamf_state::waiting_for_au_released) + { + goto label1_waiting_for_au_released_state; + } + + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + + if (au_queue_full_bitset) + { + cellDmuxPamf.trace("Access unit queue of elementary stream no. %d is full. Waiting for access unit to be released...", std::countr_zero(au_queue_full_bitset)); + + while (!(au_queue_full_bitset & au_released_bitset) && !stream_reset_requested) + { + savestate = dmux_pamf_state::waiting_for_au_released; + label1_waiting_for_au_released_state: + + if (lv2_syscall(ppu, cond, 0) != CELL_OK) + { + lv2_syscall(ppu, mutex); + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + } + + cellDmuxPamf.trace("Access unit released"); + } + + stream_reset_started = stream_reset_requested; + stream_reset_requested = false; + + au_released_bitset = 0; + + return lv2_syscall(ppu, mutex) != CELL_OK ? static_cast(CELL_DMUX_PAMF_ERROR_FATAL) : CELL_OK; +} + +template +error_code DmuxPamfContext::set_au_reset(ppu_thread& ppu) +{ + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + + std::ranges::for_each(elementary_streams | std::views::filter([](auto es){ return !!es; }), [](auto& reset_next_au) { reset_next_au = reset; }, &DmuxPamfElementaryStream::reset_next_au); + + return lv2_syscall(ppu, mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; +} + +template +error_code DmuxPamfContext::callback(ppu_thread& ppu, DmuxCb cb, auto&&... args) +{ + std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock.owns_lock()) + { + ppu.state += cpu_flag::again; + return {}; + } + + return cb.cbFunc(ppu, std::forward(args)..., cb.cbArg); +} + +void DmuxPamfContext::run_spu_thread() +{ + hle_spu_thread_id = idm::make(cmd_queue_addr, cmd_result_queue_addr, stream_info_queue_addr, event_queue_addr); +} + +void DmuxPamfContext::exec(ppu_thread& ppu) +{ + // This is repeated a lot in this function, in my opinion using a define here makes it more readable +#define RETURN_ON_CPU_FLAG_AGAIN()\ + if (ppu.state & cpu_flag::again)\ + return + + switch (savestate) + { + case dmux_pamf_state::initial: break; + case dmux_pamf_state::waiting_for_au_released: goto label1_waiting_for_au_released_state; + case dmux_pamf_state::waiting_for_au_released_error: goto label2_waiting_for_au_released_error_state; + case dmux_pamf_state::waiting_for_event: goto label3_waiting_for_event_state; + case dmux_pamf_state::starting_demux_done: goto label4_starting_demux_done_state; + case dmux_pamf_state::starting_demux_done_mutex_lock_error: goto label5_starting_demux_done_mutex_lock_error_state; + case dmux_pamf_state::starting_demux_done_mutex_unlock_error: goto label6_starting_demux_done_mutex_unlock_error_state; + case dmux_pamf_state::starting_demux_done_checking_stream_reset: goto label7_starting_demux_done_check_stream_reset_state; + case dmux_pamf_state::starting_demux_done_checking_stream_reset_error: goto label8_start_demux_done_check_stream_reset_error_state; + case dmux_pamf_state::setting_au_reset: goto label9_setting_au_reset_state; + case dmux_pamf_state::setting_au_reset_error: goto label10_setting_au_reset_error_state; + case dmux_pamf_state::processing_event: goto label11_processing_event_state; + case dmux_pamf_state::au_found_waiting_for_spu: goto label12_au_found_waiting_for_spu_state; + case dmux_pamf_state::unsetting_au_reset: goto label13_unsetting_au_reset_state; + case dmux_pamf_state::demux_done_notifying: goto label14_demux_done_notifying_state; + case dmux_pamf_state::demux_done_mutex_lock: goto label15_demux_done_mutex_lock_state; + case dmux_pamf_state::demux_done_cond_signal: goto label16_demux_done_cond_signal_state; + case dmux_pamf_state::resuming_demux_mutex_lock: goto label17_resuming_demux_mutex_lock_state; + case dmux_pamf_state::resuming_demux_waiting_for_spu: goto label18_resuming_demux_waiting_for_spu_state; + case dmux_pamf_state::sending_fatal_err: ; // Handled below + } + + for (;;) + { + if (savestate == dmux_pamf_state::sending_fatal_err) + { + callback(ppu, notify_fatal_err, _this, CELL_OK); + RETURN_ON_CPU_FLAG_AGAIN(); + } + + savestate = dmux_pamf_state::initial; + + stream_reset_started = false; + + // If the access unit queue of an enabled elementary stream is full, wait until the user releases an access unit or requests a stream reset before processing the next event + label1_waiting_for_au_released_state: + + if (wait_au_released_or_stream_reset(ppu, au_queue_full_bitset, stream_reset_started, savestate) != CELL_OK) + { + savestate = dmux_pamf_state::waiting_for_au_released_error; + label2_waiting_for_au_released_error_state: + + callback(ppu, notify_fatal_err, _this, CELL_OK); + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + // Wait for the next event + if (!event_queue.peek(event)) + { + savestate = dmux_pamf_state::waiting_for_event; + label3_waiting_for_event_state: + + cellDmuxPamf.trace("Waiting for the next event..."); + + lv2_obj::sleep(ppu); + event_queue.wait(); + + if (ppu.check_state()) + { + ppu.state += cpu_flag::again; + return; + } + + ensure(event_queue.peek(event)); + } + + cellDmuxPamf.trace("Event type: %d", static_cast(event.type.get())); + + // If the event is a demux done event, set the sequence state to resetting and check for a potential stream reset request again + if (event.type == DmuxPamfEventType::demux_done) + { + savestate = dmux_pamf_state::starting_demux_done; + label4_starting_demux_done_state: + + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + savestate = dmux_pamf_state::starting_demux_done_mutex_lock_error; + label5_starting_demux_done_mutex_lock_error_state: + + callback(ppu, notify_fatal_err, _this, CELL_OK); + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + sequence_state = DmuxPamfSequenceState::resetting; + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::starting_demux_done_mutex_unlock_error; + label6_starting_demux_done_mutex_unlock_error_state: + + callback(ppu, notify_fatal_err, _this, CELL_OK); + + RETURN_ON_CPU_FLAG_AGAIN(); + } + + if (!stream_reset_started) + { + savestate = dmux_pamf_state::starting_demux_done_checking_stream_reset; + label7_starting_demux_done_check_stream_reset_state: + + if (wait_au_released_or_stream_reset(ppu, 0, stream_reset_started, savestate) != CELL_OK) + { + savestate = dmux_pamf_state::starting_demux_done_checking_stream_reset_error; + label8_start_demux_done_check_stream_reset_error_state: + + callback(ppu, notify_fatal_err, _this, CELL_OK); + } + + RETURN_ON_CPU_FLAG_AGAIN(); + } + } + + // If the user requested a stream reset, set the reset flag for every enabled elementary stream + if (stream_reset_started) + { + stream_reset_in_progress = true; + + savestate = dmux_pamf_state::setting_au_reset; + label9_setting_au_reset_state: + + if (set_au_reset(ppu) != CELL_OK) + { + savestate = dmux_pamf_state::setting_au_reset_error; + label10_setting_au_reset_error_state: + + callback(ppu, notify_fatal_err, _this, CELL_OK); + } + + RETURN_ON_CPU_FLAG_AGAIN(); + } + + savestate = dmux_pamf_state::processing_event; + label11_processing_event_state: + + switch (event.type) + { + case DmuxPamfEventType::au_found: + { + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + label12_au_found_waiting_for_spu_state: + + DmuxPamfElementaryStream* const es = find_es(event.au_found.stream_id, event.au_found.private_stream_id); + + // If the elementary stream of the found access unit is not enabled, don't do anything + if (!es || es->_this.get_ptr() != es || es->es_id != event.au_found.user_data) + { + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + break; + } + + // If a stream reset was requested, don't notify the user of any found access units that are still in the event queue + // We need to send the SPU thread the address of the first found access unit for each elementary stream still in the event queue, + // so that it can remove the access units from the queue. + if (stream_reset_in_progress) + { + if (es->reset_next_au) + { + send_spu_command_and_wait(ppu, savestate == dmux_pamf_state::au_found_waiting_for_spu, + event.au_found.stream_id, event.au_found.private_stream_id, event.au_found.au_addr); + + if (ppu.state & cpu_flag::again) + { + savestate = dmux_pamf_state::au_found_waiting_for_spu; + return; + } + + es->reset_next_au = false; + } + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + break; + } + + const vm::var au_info; + au_info->addr = std::bit_cast>(event.au_found.au_addr); + au_info->size = event.au_found.au_size; + au_info->pts = event.au_found.pts; + au_info->dts = event.au_found.dts; + au_info->user_data = user_data; + au_info->specific_info = es->_this.ptr(&DmuxPamfElementaryStream::au_specific_info); + au_info->specific_info_size = es->au_specific_info_size; + au_info->is_rap = static_cast(event.au_found.is_rap); + + if (!is_raw_es && dmuxPamfStreamIdToTypeChannel(event.au_found.stream_id, event.au_found.private_stream_id).first == DMUX_PAMF_STREAM_TYPE_INDEX_LPCM) + { + es->au_specific_info[0] = read_from_ptr>(event.au_found.stream_header_buf); + es->au_specific_info[1] = read_from_ptr>(event.au_found.stream_header_buf); + es->au_specific_info[2] = read_from_ptr>(event.au_found.stream_header_buf, 1); + } + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + if (callback(ppu, es->notify_au_found, es->_this, au_info) != CELL_OK) + { + // If the callback returns an error, the access unit queue for this elementary stream is full + au_queue_full_bitset |= 1ull << es->this_index; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + break; + } + case DmuxPamfEventType::demux_done: + { + if (stream_reset_in_progress) + { + stream_reset_in_progress = false; + + savestate = dmux_pamf_state::unsetting_au_reset; + label13_unsetting_au_reset_state: + + if (set_au_reset(ppu) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + } + + savestate = dmux_pamf_state::demux_done_notifying; + label14_demux_done_notifying_state: + + callback(ppu, notify_demux_done, _this, CELL_OK); + + RETURN_ON_CPU_FLAG_AGAIN(); + + savestate = dmux_pamf_state::demux_done_mutex_lock; + label15_demux_done_mutex_lock_state: + + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + if (sequence_state == DmuxPamfSequenceState::resetting) + { + sequence_state = DmuxPamfSequenceState::dormant; + + savestate = dmux_pamf_state::demux_done_cond_signal; + label16_demux_done_cond_signal_state: + + if (lv2_syscall(ppu, cond) != CELL_OK) + { + lv2_syscall(ppu, mutex); + + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + } + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + break; + } + case DmuxPamfEventType::close: + { + while (event_queue.pop()){} // Clear the event queue + return; + } + case DmuxPamfEventType::flush_done: + { + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + DmuxPamfElementaryStream* const es = find_es(event.flush_done.stream_id, event.flush_done.private_stream_id); + const bool valid = es && es->_this.get_ptr() == es && es->es_id == event.flush_done.user_data; + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + if (valid) + { + callback(ppu, es->notify_flush_done, es->_this); + + RETURN_ON_CPU_FLAG_AGAIN(); + } + + break; + } + case DmuxPamfEventType::prog_end_code: + { + callback(ppu, notify_prog_end_code, _this); + + RETURN_ON_CPU_FLAG_AGAIN(); + + break; + } + case DmuxPamfEventType::fatal_error: + { + ensure(event_queue.pop()); + + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + default: + fmt::throw_exception("Invalid event"); + } + + ensure(event_queue.pop()); + + // If there are too many events enqueued, the SPU thread will stop demuxing until it receives a new command. + // Once the event queue size is reduced to two, send a resume command + if (enabled_es_num >= 0 && event_queue.size() == 2) + { + savestate = dmux_pamf_state::resuming_demux_mutex_lock; + label17_resuming_demux_mutex_lock_state: + + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + + RETURN_ON_CPU_FLAG_AGAIN(); + + if (enabled_es_num >= 0) + { + ensure(cmd_queue.emplace(DmuxPamfCommandType::resume)); + + savestate = dmux_pamf_state::resuming_demux_waiting_for_spu; + label18_resuming_demux_waiting_for_spu_state: + + lv2_obj::sleep(ppu); + cmd_result_queue.wait(); + + if (ppu.check_state()) + { + ppu.state += cpu_flag::again; + return; + } + + ensure(cmd_result_queue.pop()); + } + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + savestate = dmux_pamf_state::sending_fatal_err; + continue; + } + } + + au_queue_full_bitset = 0; + } +} + +void dmuxPamfEntry(ppu_thread& ppu, vm::ptr dmux) +{ + dmux->exec(ppu); + + if (ppu.state & cpu_flag::again) + { + ppu.syscall_args[0] = dmux.addr(); + return; + } + + ppu_execute<&sys_ppu_thread_exit>(ppu, CELL_OK); +} + +error_code dmuxPamfVerifyEsSpecificInfo(u16 stream_id, u16 private_stream_id, bool is_avc, vm::cptr es_specific_info) +{ + // The meaning of error code value 5 in here is inconsistent with how it's used elsewhere for some reason + + if (!es_specific_info) + { + return CELL_OK; + } + + switch (dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first) + { + case DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO: + if (is_avc) + { + if (const u32 level = vm::static_ptr_cast(es_specific_info)->level; + level != CELL_DMUX_PAMF_AVC_LEVEL_2P1 && level != CELL_DMUX_PAMF_AVC_LEVEL_3P0 && level != CELL_DMUX_PAMF_AVC_LEVEL_3P1 + && level != CELL_DMUX_PAMF_AVC_LEVEL_3P2 && level != CELL_DMUX_PAMF_AVC_LEVEL_4P1 && level != CELL_DMUX_PAMF_AVC_LEVEL_4P2) + { + return 5; + } + } + else if (vm::static_ptr_cast(es_specific_info)->profileLevel > CELL_DMUX_PAMF_M2V_MP_HL) + { + return 5; + } + + return CELL_OK; + + case DMUX_PAMF_STREAM_TYPE_INDEX_LPCM: + if (const auto [sampling_freq, nch, bps] = *vm::static_ptr_cast(es_specific_info); + sampling_freq != CELL_DMUX_PAMF_FS_48K || (nch != 1u && nch != 2u && nch != 6u && nch != 8u) || (bps != CELL_DMUX_PAMF_BITS_PER_SAMPLE_16 && bps != CELL_DMUX_PAMF_BITS_PER_SAMPLE_24)) + { + return 5; + } + + return CELL_OK; + + case DMUX_PAMF_STREAM_TYPE_INDEX_AC3: + case DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX: + case DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA: + return CELL_OK; + + default: + return 5; + } +} + +template +u32 dmuxPamfGetAuSpecificInfoSize(u16 stream_id, u16 private_stream_id, bool is_avc) +{ + if constexpr (raw_es) + { + return 0; + } + + switch (dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first) + { + case DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO: + if (is_avc) + { + return 4; // LLE returns four, even though CellDmuxPamfAuSpecificInfoAvc only has a reserved field like the others + } + + return 0; + + case DMUX_PAMF_STREAM_TYPE_INDEX_LPCM: + case DMUX_PAMF_STREAM_TYPE_INDEX_AC3: // LLE returns three, even though CellDmuxPamfAuSpecificInfoAc3 only has a reserved field like the others + return 3; + + case DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX: + case DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA: + default: + return 0; + } +} + +u32 dmuxPamfGetAuQueueMaxSize(u16 stream_id, u16 private_stream_id) +{ + switch (dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first) + { + case DMUX_PAMF_STREAM_TYPE_INDEX_LPCM: + return 0x100; + + case DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO: + case DMUX_PAMF_STREAM_TYPE_INDEX_AC3: + case DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX: + case DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA: + return 0x40; + + default: + return 0; + } +} + +u32 dmuxPamfGetLpcmAuSize(vm::cptr lpcm_info) +{ + return lpcm_info->samplingFreq * lpcm_info->bitsPerSample / CHAR_BIT * (lpcm_info->numOfChannels + (lpcm_info->numOfChannels & 1)) / DMUX_PAMF_LPCM_FRAMES_PER_SEC; // Streams with an odd number of channels contain an empty dummy channel +} + +u32 dmuxPamfGetAuQueueBufferSize(u16 stream_id, u16 private_stream_id, bool is_avc, vm::cptr es_specific_info) +{ + switch (dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first) + { + case DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO: + if (is_avc) + { + if (!es_specific_info) + { + return 0x46a870; + } + + switch (vm::static_ptr_cast(es_specific_info)->level) + { + case CELL_DMUX_PAMF_AVC_LEVEL_2P1: return 0xb00c0; + case CELL_DMUX_PAMF_AVC_LEVEL_3P0: return 0x19f2e0; + case CELL_DMUX_PAMF_AVC_LEVEL_3P1: return 0x260120; + case CELL_DMUX_PAMF_AVC_LEVEL_3P2: return 0x35f6c0; + case CELL_DMUX_PAMF_AVC_LEVEL_4P1: return 0x45e870; + case CELL_DMUX_PAMF_AVC_LEVEL_4P2: // Same as below + default: return 0x46a870; + } + } + + if (es_specific_info && vm::static_ptr_cast(es_specific_info)->profileLevel > CELL_DMUX_PAMF_M2V_MP_ML) + { + return 0x255000; + } + + return 0x70000; + + case DMUX_PAMF_STREAM_TYPE_INDEX_LPCM: + { + if (!es_specific_info) + { + return 0x104380; + } + + const u32 nch = vm::static_ptr_cast(es_specific_info)->numOfChannels; + const u32 lpcm_au_size = dmuxPamfGetLpcmAuSize(vm::static_ptr_cast(es_specific_info)); + + if (vm::static_ptr_cast(es_specific_info)->samplingFreq <= 96000) + { + if (nch > 0 && nch <= 2) + { + return 0x20000 + lpcm_au_size; + } + + if (nch <= 6) + { + return 0x60000 + lpcm_au_size; + } + + if (nch <= 8) + { + return 0x80000 + lpcm_au_size; + } + + return lpcm_au_size; + } + + if (nch > 0 && nch <= 2) + { + return 0x60000 + lpcm_au_size; + } + + if (nch <= 6) + { + return 0x100000 + lpcm_au_size; + } + + return lpcm_au_size; + } + case DMUX_PAMF_STREAM_TYPE_INDEX_AC3: + return 0xa000; + + case DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX: + return 0x6400; + + case DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA: + return 0x160000; + + default: + return 0; + } +} + +template +u32 dmuxPamfGetEsMemSize(u16 stream_id, u16 private_stream_id, bool is_avc, vm::cptr es_specific_info) +{ + return dmuxPamfGetAuSpecificInfoSize(stream_id, private_stream_id, is_avc) * dmuxPamfGetAuQueueMaxSize(stream_id, private_stream_id) + + dmuxPamfGetAuQueueBufferSize(stream_id, private_stream_id, is_avc, es_specific_info) + 0x7f + static_cast(sizeof(DmuxPamfElementaryStream)) + 0xf; +} + +error_code dmuxPamfNotifyDemuxDone(ppu_thread& ppu, [[maybe_unused]] vm::ptr core_handle, error_code error, vm::ptr handle) +{ + handle->notify_demux_done.cbFunc(ppu, handle, error, handle->notify_demux_done.cbArg); + return CELL_OK; +} + +error_code dmuxPamfNotifyProgEndCode(ppu_thread& ppu, [[maybe_unused]] vm::ptr core_handle, vm::ptr handle) +{ + if (handle->notify_prog_end_code.cbFunc) + { + handle->notify_prog_end_code.cbFunc(ppu, handle, handle->notify_prog_end_code.cbArg); + } + + return CELL_OK; +} + +error_code dmuxPamfNotifyFatalErr(ppu_thread& ppu, [[maybe_unused]] vm::ptr core_handle, error_code error, vm::ptr handle) +{ + handle->notify_fatal_err.cbFunc(ppu, handle, error, handle->notify_fatal_err.cbArg); + return CELL_OK; +} + +error_code dmuxPamfEsNotifyAuFound(ppu_thread& ppu, [[maybe_unused]] vm::ptr core_handle, vm::cptr au_info, vm::ptr handle) +{ + const vm::var _au_info; + _au_info->info.auAddr = au_info->addr; + _au_info->info.auSize = au_info->size; + _au_info->info.isRap = au_info->is_rap; + _au_info->info.userData = au_info->user_data; + _au_info->info.pts = au_info->pts; + _au_info->info.dts = au_info->dts; + _au_info->specific_info = au_info->specific_info; + _au_info->specific_info_size = au_info->specific_info_size; + // _au_info->info.auMaxSize is left uninitialized + + return handle->notify_au_found.cbFunc(ppu, handle, _au_info, handle->notify_au_found.cbArg); +} + +error_code dmuxPamfEsNotifyFlushDone(ppu_thread& ppu, [[maybe_unused]] vm::ptr core_handle, vm::ptr handle) +{ + return handle->notify_flush_done.cbFunc(ppu, handle, handle->notify_flush_done.cbArg); +} + error_code _CellDmuxCoreOpQueryAttr(vm::cptr pamfSpecificInfo, vm::ptr pamfAttr) { - cellDmuxPamf.todo("_CellDmuxCoreOpQueryAttr(pamfSpecificInfo=*0x%x, pamfAttr=*0x%x)", pamfSpecificInfo, pamfAttr); + cellDmuxPamf.notice("_CellDmuxCoreOpQueryAttr(pamfSpecificInfo=*0x%x, pamfAttr=*0x%x)", pamfSpecificInfo, pamfAttr); + + if (!pamfAttr || (pamfSpecificInfo && pamfSpecificInfo->thisSize != sizeof(CellDmuxPamfSpecificInfo))) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + pamfAttr->maxEnabledEsNum = DMUX_PAMF_MAX_ENABLED_ES_NUM; + pamfAttr->version = DMUX_PAMF_VERSION; + pamfAttr->memSize = sizeof(CellDmuxPamfHandle) + sizeof(DmuxPamfContext) + 0xe7b; return CELL_OK; } -error_code _CellDmuxCoreOpOpen(vm::cptr pamfSpecificInfo, vm::cptr demuxerResource, vm::cptr demuxerResourceSpurs, vm::cptr> notifyDemuxDone, - vm::cptr> notifyProgEndCode, vm::cptr> notifyFatalErr, vm::pptr handle) +error_code DmuxPamfContext::open(ppu_thread& ppu, const CellDmuxPamfResource& res, vm::cptr res_spurs, const DmuxCb& notify_dmux_done, + const DmuxCb& notify_prog_end_code, const DmuxCb& notify_fatal_err, vm::bptr& handle) { - cellDmuxPamf.todo("_CellDmuxCoreOpOpen(pamfSpecificInfo=*0x%x, demuxerResource=*0x%x, demuxerResourceSpurs=*0x%x, notifyDemuxDone=*0x%x, notifyProgEndCode=*0x%x, notifyFatalErr=*0x%x, handle=**0x%x)", + if (res.ppuThreadPriority >= 0xc00u || res.ppuThreadStackSize < 0x1000u || res.spuThreadPriority >= 0x100u || res.numOfSpus != 1u || !res.memAddr || res.memSize < sizeof(DmuxPamfContext) + 0xe7b) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + const auto _this = vm::ptr::make(utils::align(+res.memAddr.addr(), 0x80)); + + _this->_this = _this; + _this->this_size = res.memSize; + _this->version = DMUX_PAMF_VERSION; + _this->notify_demux_done = notify_dmux_done; + _this->notify_prog_end_code = notify_prog_end_code; + _this->notify_fatal_err = notify_fatal_err; + _this->resource = res; + _this->unk = 0; + _this->ppu_thread_stack_size = res.ppuThreadStackSize; + _this->au_released_bitset = 0; + _this->stream_reset_requested = false; + _this->sequence_state = DmuxPamfSequenceState::dormant; + _this->max_enabled_es_num = DMUX_PAMF_MAX_ENABLED_ES_NUM; + _this->enabled_es_num = 0; + std::ranges::fill(_this->elementary_streams, vm::null); + _this->next_es_id = 0; + + const vm::var mutex_attr = {{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_dxpmtx"_u64 } }}; + const vm::var cond_attr = {{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_dxpcnd"_u64 } }}; + + if (lv2_syscall(ppu, _this.ptr(&DmuxPamfContext::mutex), mutex_attr) != CELL_OK + || lv2_syscall(ppu, _this.ptr(&DmuxPamfContext::cond), _this->mutex, cond_attr) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + _this->spurs_context_addr = _this.ptr(&DmuxPamfContext::spurs_context); + _this->cmd_queue_addr_ = _this.ptr(&DmuxPamfContext::cmd_queue); + _this->cmd_queue_buffer_addr_ = _this.ptr(&DmuxPamfContext::cmd_queue_buffer); + _this->cmd_queue_addr = _this.ptr(&DmuxPamfContext::cmd_queue); + _this->cmd_result_queue_addr = _this.ptr(&DmuxPamfContext::cmd_result_queue); + _this->stream_info_queue_addr = _this.ptr(&DmuxPamfContext::stream_info_queue); + _this->event_queue_addr = _this.ptr(&DmuxPamfContext::event_queue); + _this->cmd_queue_buffer_addr = _this.ptr(&DmuxPamfContext::cmd_queue_buffer); + _this->cmd_result_queue_buffer_addr = _this.ptr(&DmuxPamfContext::cmd_result_queue_buffer); + _this->event_queue_buffer_addr = _this.ptr(&DmuxPamfContext::event_queue_buffer); + _this->stream_info_queue_buffer_addr = _this.ptr(&DmuxPamfContext::stream_info_queue_buffer); + _this->cmd_queue_addr__ = _this.ptr(&DmuxPamfContext::cmd_queue); + + ensure(std::snprintf(_this->spurs_taskset_name, sizeof(_this->spurs_taskset_name), "_libdmux_pamf_%08x", _this.addr()) == 22); + + _this->use_existing_spurs = !!res_spurs; + + if (!res_spurs && g_fxo->get().take(0x40000) != 0x40000) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + _this->cmd_queue.init(_this->cmd_queue_buffer); + _this->cmd_result_queue.init(_this->cmd_result_queue_buffer); + _this->stream_info_queue.init(_this->stream_info_queue_buffer); + _this->event_queue.init(_this->event_queue_buffer); + + // HLE exclusive + _this->savestate = {}; + _this->au_queue_full_bitset = 0; + _this->stream_reset_started = false; + _this->stream_reset_in_progress = false; + + _this->run_spu_thread(); + + handle = _this; + return _this->create_thread(ppu); +} + +error_code _CellDmuxCoreOpOpen(ppu_thread& ppu, vm::cptr pamfSpecificInfo, vm::cptr demuxerResource, vm::cptr demuxerResourceSpurs, vm::cptr> notifyDemuxDone, + vm::cptr> notifyProgEndCode, vm::cptr> notifyFatalErr, vm::pptr handle) +{ + // Block savestates during ppu_execute + std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock.owns_lock()) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmuxPamf.notice("_CellDmuxCoreOpOpen(pamfSpecificInfo=*0x%x, demuxerResource=*0x%x, demuxerResourceSpurs=*0x%x, notifyDemuxDone=*0x%x, notifyProgEndCode=*0x%x, notifyFatalErr=*0x%x, handle=**0x%x)", pamfSpecificInfo, demuxerResource, demuxerResourceSpurs, notifyDemuxDone, notifyProgEndCode, notifyFatalErr, handle); - return CELL_OK; + if ((pamfSpecificInfo && pamfSpecificInfo->thisSize != sizeof(CellDmuxPamfSpecificInfo)) + || !demuxerResource + || (demuxerResourceSpurs && !demuxerResourceSpurs->spurs) + || !notifyDemuxDone || !notifyDemuxDone->cbFunc || !notifyDemuxDone->cbArg + || !notifyProgEndCode + || !notifyFatalErr || !notifyFatalErr->cbFunc || !notifyFatalErr->cbArg + || !handle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + ensure(demuxerResource->memAddr.aligned(0x10)); // Not checked on LLE + ensure(demuxerResource->memSize >= sizeof(CellDmuxPamfHandle)); // Not checked on LLE + ensure(vm::check_addr(demuxerResource->memAddr.addr(), vm::page_readable | vm::page_writable, demuxerResource->memSize)); + + const auto _handle = vm::static_ptr_cast(demuxerResource->memAddr); + + _handle->notify_demux_done = *notifyDemuxDone; + _handle->notify_fatal_err = *notifyFatalErr; + _handle->notify_prog_end_code = *notifyProgEndCode; + + if (!pamfSpecificInfo || !pamfSpecificInfo->programEndCodeCb) + { + _handle->notify_prog_end_code.cbFunc = vm::null; + } + + const CellDmuxPamfResource res{ demuxerResource->ppuThreadPriority, demuxerResource->ppuThreadStackSize, demuxerResource->numOfSpus, demuxerResource->spuThreadPriority, + vm::bptr::make(demuxerResource->memAddr.addr() + sizeof(CellDmuxPamfHandle)), demuxerResource->memSize - sizeof(CellDmuxPamfHandle) }; + + const auto demux_done_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(dmuxPamfNotifyDemuxDone))); + const auto prog_end_code_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(dmuxPamfNotifyProgEndCode))); + const auto fatal_err_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(dmuxPamfNotifyFatalErr))); + + const error_code ret = DmuxPamfContext::open(ppu, res, demuxerResourceSpurs, { demux_done_func, _handle }, { prog_end_code_func, _handle }, { fatal_err_func, _handle }, _handle->demuxer); + + *handle = _handle; + + return ret; } -error_code _CellDmuxCoreOpClose(vm::ptr handle) +error_code DmuxPamfContext::close(ppu_thread& ppu) { - cellDmuxPamf.todo("_CellDmuxCoreOpClose(handle=*0x%x)", handle); + if (join_thread(ppu) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + ensure(idm::remove(hle_spu_thread_id)); + + if (!use_existing_spurs) + { + g_fxo->get().free(0x40000); + } + + if (lv2_syscall(ppu, cond) != CELL_OK + || lv2_syscall(ppu, mutex) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } return CELL_OK; } -error_code _CellDmuxCoreOpResetStream(vm::ptr handle) +error_code _CellDmuxCoreOpClose(ppu_thread& ppu, vm::ptr handle) { - cellDmuxPamf.todo("_CellDmuxCoreOpResetStream(handle=*0x%x)", handle); + // The PPU thread is going to use ppu_execute + std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock.owns_lock()) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmuxPamf.notice("_CellDmuxCoreOpClose(handle=*0x%x)", handle); + + if (!handle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return handle->demuxer->close(ppu); +} + +error_code DmuxPamfContext::reset_stream(ppu_thread& ppu) +{ + auto& ar = *ppu.optional_savestate_state; + const u8 savestate = ar.try_read().second; + ar.clear(); + + switch (savestate) + { + case 0: + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(0); + return {}; + } + + if (sequence_state != DmuxPamfSequenceState::running) + { + return lv2_syscall(ppu, mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; + } + + [[fallthrough]]; + + case 1: + send_spu_command_and_wait(ppu, savestate); + + if (ppu.state & cpu_flag::again) + { + ar(1); + return {}; + } + + stream_reset_requested = true; + [[fallthrough]]; + + case 2: + if (const error_code ret = lv2_syscall(ppu, cond, static_cast(thread_id)); ret != CELL_OK && ret != static_cast(CELL_EPERM)) + { + lv2_syscall(ppu, mutex); + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(2); + return {}; + } + + return lv2_syscall(ppu, mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; + + default: + fmt::throw_exception("Unexpected savestate value: 0x%x", savestate); + } +} + +error_code _CellDmuxCoreOpResetStream(ppu_thread& ppu, vm::ptr handle) +{ + cellDmuxPamf.notice("_CellDmuxCoreOpResetStream(handle=*0x%x)", handle); + + if (!handle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return handle->demuxer->reset_stream(ppu); +} + +error_code DmuxPamfContext::create_thread(ppu_thread& ppu) +{ + const vm::var name = vm::make_str("HLE PAMF demuxer"); + const auto entry = g_fxo->get().func_addr(FIND_FUNC(dmuxPamfEntry)); + + if (ppu_execute<&sys_ppu_thread_create>(ppu, _this.ptr(&DmuxPamfContext::thread_id), entry, +_this.addr(), +resource.ppuThreadPriority, +resource.ppuThreadStackSize, SYS_PPU_THREAD_CREATE_JOINABLE, +name) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } return CELL_OK; } -error_code _CellDmuxCoreOpCreateThread(vm::ptr handle) +error_code _CellDmuxCoreOpCreateThread(ppu_thread& ppu, vm::ptr handle) { - cellDmuxPamf.todo("_CellDmuxCoreOpCreateThread(handle=*0x%x)", handle); + // Block savestates during ppu_execute + std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; - return CELL_OK; + if (!savestate_lock.owns_lock()) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmuxPamf.notice("_CellDmuxCoreOpCreateThread(handle=*0x%x)", handle); + + if (!handle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return handle->demuxer->create_thread(ppu); } -error_code _CellDmuxCoreOpJoinThread(vm::ptr handle) +error_code DmuxPamfContext::join_thread(ppu_thread& ppu) { - cellDmuxPamf.todo("_CellDmuxCoreOpJoinThread(handle=*0x%x)", handle); + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + std::ranges::fill_n(elementary_streams, enabled_es_num, vm::null); + + enabled_es_num = -1; + + send_spu_command_and_wait(ppu, false); + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + return lv2_syscall(ppu, static_cast(thread_id), +vm::var{}) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; +} + +error_code _CellDmuxCoreOpJoinThread(ppu_thread& ppu, vm::ptr handle) +{ + // The PPU thread is going to use ppu_execute + std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock.owns_lock()) + { + ppu.state += cpu_flag::again; + return {}; + } + + cellDmuxPamf.notice("_CellDmuxCoreOpJoinThread(handle=*0x%x)", handle); + + if (!handle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return handle->demuxer->join_thread(ppu); +} + +template +error_code DmuxPamfContext::set_stream(ppu_thread& ppu, vm::cptr stream_address, u32 stream_size, b8 discontinuity, u32 user_data) +{ + auto& ar = *ppu.optional_savestate_state; + const bool waiting_for_spu_state = ar.try_read().second; + ar.clear(); + + if (!waiting_for_spu_state) + { + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(false); + return {}; + } + + this->user_data = user_data; + + if (!stream_info_queue.emplace(stream_address, stream_size, user_data, !discontinuity, raw_es)) + { + return lv2_syscall(ppu, mutex) == CELL_OK ? CELL_DMUX_PAMF_ERROR_BUSY : CELL_DMUX_PAMF_ERROR_FATAL; + } + } + + send_spu_command_and_wait(ppu, waiting_for_spu_state); + + if (ppu.state & cpu_flag::again) + { + ar(true); + return {}; + } + + sequence_state = DmuxPamfSequenceState::running; + + return lv2_syscall(ppu, mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; +} + +template +error_code _CellDmuxCoreOpSetStream(ppu_thread& ppu, vm::ptr handle, vm::cptr streamAddress, u32 streamSize, b8 discontinuity, u64 userData) +{ + cellDmuxPamf.trace("_CellDmuxCoreOpSetStream(handle=*0x%x, streamAddress=*0x%x, streamSize=0x%x, discontinuity=%d, userData=0x%llx)", raw_es, handle, streamAddress, streamSize, +discontinuity, userData); + + if (!streamAddress || streamSize == 0) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + ensure(!!handle); // Not checked on LLE + + return handle->demuxer->set_stream(ppu, streamAddress, streamSize, discontinuity, static_cast(userData)); +} + +error_code DmuxPamfElementaryStream::release_au(ppu_thread& ppu, vm::ptr au_addr, u32 au_size) const +{ + auto& ar = *ppu.optional_savestate_state; + const u8 savestate = ar.try_read().second; + ar.clear(); + + switch (savestate) + { + case 0: + if (lv2_syscall(ppu, demuxer->mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(0); + return {}; + } + + [[fallthrough]]; + + case 1: + demuxer->send_spu_command_and_wait(ppu, savestate, au_addr, au_size, static_cast>(stream_id), static_cast>(private_stream_id)); + + if (ppu.state & cpu_flag::again) + { + ar(1); + return {}; + } + + demuxer->au_released_bitset |= 1ull << this_index; + [[fallthrough]]; + + case 2: + if (const error_code ret = lv2_syscall(ppu, demuxer->cond, static_cast(demuxer->thread_id)); ret != CELL_OK && ret != static_cast(CELL_EPERM)) + { + lv2_syscall(ppu, demuxer->mutex); + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(2); + return {}; + } + + return lv2_syscall(ppu, demuxer->mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; + + default: + fmt::throw_exception("Unexpected savestate value: 0x%x", savestate); + } +} + +error_code _CellDmuxCoreOpReleaseAu(ppu_thread& ppu, vm::ptr esHandle, vm::ptr auAddr, u32 auSize) +{ + cellDmuxPamf.trace("_CellDmuxCoreOpReleaseAu(esHandle=*0x%x, auAddr=*0x%x, auSize=0x%x)", esHandle, auAddr, auSize); + + if (!auAddr || auSize == 0) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + ensure(!!esHandle); // Not checked on LLE + + return esHandle->es->release_au(ppu, auAddr, auSize); +} + +template +error_code dmuxPamfGetEsAttr(u16 stream_id, u16 private_stream_id, bool is_avc, vm::cptr es_specific_info, CellDmuxPamfEsAttr& attr) +{ + if (dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID) + { + return CELL_DMUX_PAMF_ERROR_UNKNOWN_STREAM; + } + + if (dmuxPamfVerifyEsSpecificInfo(stream_id, private_stream_id, is_avc, es_specific_info) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + attr.auQueueMaxSize = dmuxPamfGetAuQueueMaxSize(stream_id, private_stream_id); + attr.memSize = dmuxPamfGetEsMemSize(stream_id, private_stream_id, is_avc, es_specific_info); + attr.specificInfoSize = dmuxPamfGetAuSpecificInfoSize(stream_id, private_stream_id, is_avc); return CELL_OK; } template -error_code _CellDmuxCoreOpSetStream(vm::ptr handle, vm::cptr streamAddress, u32 streamSize, b8 discontinuity, u64 userData) +static inline std::tuple get_stream_ids(vm::cptr esFilterId) { - cellDmuxPamf.todo("_CellDmuxCoreOpSetStream(handle=*0x%x, streamAddress=*0x%x, streamSize=0x%x, discontinuity=%d, userData=0x%llx)", raw_es, handle, streamAddress, streamSize, +discontinuity, userData); + if constexpr (raw_es) + { + const auto filter_id = vm::static_ptr_cast(esFilterId); + return { filter_id[2], filter_id[3], filter_id[8] >> 7 }; + } - return CELL_OK; -} - -error_code _CellDmuxCoreOpFreeMemory(vm::ptr esHandle, vm::ptr memAddr, u32 memSize) -{ - cellDmuxPamf.todo("_CellDmuxCoreOpFreeMemory(esHandle=*0x%x, memAddr=*0x%x, memSize=0x%x)", esHandle, memAddr, memSize); - - return CELL_OK; + const auto filter_id = vm::static_ptr_cast(esFilterId); + return { filter_id->filterIdMajor, filter_id->filterIdMinor, filter_id->supplementalInfo1 }; } template error_code _CellDmuxCoreOpQueryEsAttr(vm::cptr esFilterId, vm::cptr esSpecificInfo, vm::ptr attr) { - cellDmuxPamf.todo("_CellDmuxCoreOpQueryEsAttr(esFilterId=*0x%x, esSpecificInfo=*0x%x, attr=*0x%x)", raw_es, esFilterId, esSpecificInfo, attr); + cellDmuxPamf.notice("_CellDmuxCoreOpQueryEsAttr(esFilterId=*0x%x, esSpecificInfo=*0x%x, attr=*0x%x)", raw_es, esFilterId, esSpecificInfo, attr); + if (!esFilterId || !attr) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + const auto [stream_id, private_stream_id, is_avc] = get_stream_ids(esFilterId); + + CellDmuxPamfEsAttr es_attr; + + const error_code ret = dmuxPamfGetEsAttr(stream_id, private_stream_id, is_avc, esSpecificInfo, es_attr); + + *attr = es_attr; + attr->memSize += static_cast(sizeof(CellDmuxPamfEsHandle)); + + return ret; +} + +template +error_code DmuxPamfContext::enable_es(ppu_thread& ppu, u16 stream_id, u16 private_stream_id, bool is_avc, vm::cptr es_specific_info, vm::ptr mem_addr, u32 mem_size, const DmuxCb& notify_au_found, + const DmuxCb& notify_flush_done, vm::bptr& es) +{ + auto& ar = *ppu.optional_savestate_state; + const bool waiting_for_spu_state = ar.try_read().second; + ar.clear(); + + if (mem_size < dmuxPamfGetEsMemSize(stream_id, private_stream_id, is_avc, es_specific_info)) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + const auto stream_type = dmuxPamfStreamIdToTypeChannel(stream_id, private_stream_id).first; + + if (!waiting_for_spu_state) + { + if (stream_type == DMUX_PAMF_STREAM_TYPE_INDEX_INVALID) + { + return CELL_DMUX_PAMF_ERROR_UNKNOWN_STREAM; + } + + if (dmuxPamfVerifyEsSpecificInfo(stream_id, private_stream_id, is_avc, es_specific_info) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + if (const error_code ret = lv2_syscall(ppu, mutex, 0); ret != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(false); + return {}; + } + + this->is_raw_es = raw_es; + + if (enabled_es_num == max_enabled_es_num) + { + return lv2_syscall(ppu, mutex) == CELL_OK ? CELL_DMUX_PAMF_ERROR_NO_MEMORY : CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (find_es(stream_id, private_stream_id)) + { + // Elementary stream is already enabled + return lv2_syscall(ppu, mutex) == CELL_OK ? CELL_DMUX_PAMF_ERROR_ARG : CELL_DMUX_PAMF_ERROR_FATAL; + } + } + + const be_t au_max_size = [&]() -> be_t + { + switch (stream_type) + { + case DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO: + if (is_avc) + { + if (!es_specific_info || vm::static_ptr_cast(es_specific_info)->level == CELL_DMUX_PAMF_AVC_LEVEL_4P2) + { + return 0xcc000u; + } + + switch (vm::static_ptr_cast(es_specific_info)->level) + { + case CELL_DMUX_PAMF_AVC_LEVEL_2P1: return 0x12900u; + case CELL_DMUX_PAMF_AVC_LEVEL_3P0: return 0x25f80u; + case CELL_DMUX_PAMF_AVC_LEVEL_3P1: return 0x54600u; + case CELL_DMUX_PAMF_AVC_LEVEL_3P2: return 0x78000u; + case CELL_DMUX_PAMF_AVC_LEVEL_4P1: return 0xc0000u; + default: fmt::throw_exception("Unreachable"); // es_specific_info was already checked for invalid values in dmuxPamfVerifyEsSpecificInfo() + } + } + + if (!es_specific_info || vm::static_ptr_cast(es_specific_info)->profileLevel > CELL_DMUX_PAMF_M2V_MP_ML) + { + return 0x12a800u; + } + + return 0x38000u; + + case DMUX_PAMF_STREAM_TYPE_INDEX_LPCM: return dmuxPamfGetLpcmAuSize(vm::static_ptr_cast(es_specific_info)); + case DMUX_PAMF_STREAM_TYPE_INDEX_AC3: return 0xf00u; + case DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX: return 0x1008u; + case DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA: return 0xa0000u; + default: fmt::throw_exception("Unreachable"); // stream_type was already checked + } + }(); + + const auto _es = vm::bptr::make(utils::align(mem_addr.addr(), 0x10)); + + const auto au_queue_buffer = vm::bptr::make(utils::align(_es.addr() + static_cast(sizeof(DmuxPamfElementaryStream)), 0x80)); + const be_t au_specific_info_size = dmuxPamfGetAuSpecificInfoSize(stream_id, private_stream_id, is_avc); + + send_spu_command_and_wait(ppu, waiting_for_spu_state, stream_id, private_stream_id, is_avc, au_queue_buffer, + dmuxPamfGetAuQueueBufferSize(stream_id, private_stream_id, is_avc, es_specific_info), au_max_size, au_specific_info_size, raw_es, next_es_id); + + if (ppu.state & cpu_flag::again) + { + ar(true); + return {}; + } + + u32 es_idx = umax; + while (elementary_streams[++es_idx]){} // There is guaranteed to be an empty slot, this was already checked above + + _es->_this = _es; + _es->this_size = mem_size; + _es->this_index = es_idx; + _es->demuxer = _this; + _es->notify_au_found = notify_au_found; + _es->notify_flush_done = notify_flush_done; + _es->stream_id = stream_id; + _es->private_stream_id = private_stream_id; + _es->is_avc = is_avc; + _es->au_queue_buffer = au_queue_buffer; + _es->au_max_size = au_max_size; + _es->au_specific_info_size = au_specific_info_size; + _es->reset_next_au = false; + _es->es_id = next_es_id++; + + elementary_streams[es_idx] = _es; + + enabled_es_num++; + + if (lv2_syscall(ppu, mutex) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + es = _es; return CELL_OK; } template -error_code _CellDmuxCoreOpEnableEs(vm::ptr handle, vm::cptr esFilterId, vm::cptr esResource, vm::cptr> notifyAuFound, - vm::cptr> notifyFlushDone, vm::cptr esSpecificInfo, vm::pptr esHandle) +error_code _CellDmuxCoreOpEnableEs(ppu_thread& ppu, vm::ptr handle, vm::cptr esFilterId, vm::cptr esResource, vm::cptr> notifyAuFound, + vm::cptr> notifyFlushDone, vm::cptr esSpecificInfo, vm::pptr esHandle) { - cellDmuxPamf.todo("_CellDmuxCoreOpEnableEs(handle=*0x%x, esFilterId=*0x%x, esResource=*0x%x, notifyAuFound=*0x%x, notifyFlushDone=*0x%x, esSpecificInfo=*0x%x, esHandle)", + cellDmuxPamf.notice("_CellDmuxCoreOpEnableEs(handle=*0x%x, esFilterId=*0x%x, esResource=*0x%x, notifyAuFound=*0x%x, notifyFlushDone=*0x%x, esSpecificInfo=*0x%x, esHandle=**0x%x)", raw_es, handle, esFilterId, esResource, notifyAuFound, notifyFlushDone, esSpecificInfo, esHandle); - return CELL_OK; + if (!handle || !esFilterId || !esResource || !esResource->memAddr || esResource->memSize == 0u || !notifyAuFound || !notifyAuFound->cbFunc || !notifyAuFound->cbArg || !notifyFlushDone || !notifyFlushDone->cbFunc || !notifyFlushDone->cbArg) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + ensure(!!esHandle && esResource->memAddr.aligned(0x10)); // Not checked on LLE + ensure(esResource->memSize >= sizeof(CellDmuxPamfEsHandle)); // Not checked on LLE + ensure(vm::check_addr(esResource->memAddr.addr(), vm::page_readable | vm::page_writable, esResource->memSize)); + + const auto es_handle = vm::static_ptr_cast(esResource->memAddr); + + es_handle->notify_au_found = *notifyAuFound; + es_handle->notify_flush_done = *notifyFlushDone; + + const auto au_found_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(dmuxPamfEsNotifyAuFound))); + const auto flush_done_func = vm::bptr::make(g_fxo->get().func_addr(FIND_FUNC(dmuxPamfEsNotifyFlushDone))); + + const auto [stream_id, private_stream_id, is_avc] = get_stream_ids(esFilterId); + + const error_code ret = handle->demuxer->enable_es(ppu, stream_id, private_stream_id, is_avc, esSpecificInfo, vm::ptr::make(esResource->memAddr.addr() + sizeof(CellDmuxPamfEsHandle)), + esResource->memSize - sizeof(CellDmuxPamfEsHandle), { au_found_func, es_handle }, { flush_done_func, es_handle }, es_handle->es); + + *esHandle = es_handle; + + return ret; } -error_code _CellDmuxCoreOpDisableEs(vm::ptr esHandle) +error_code DmuxPamfElementaryStream::disable_es(ppu_thread& ppu) { - cellDmuxPamf.todo("_CellDmuxCoreOpDisableEs(esHandle=*0x%x)", esHandle); + const auto dmux = demuxer.get_ptr(); - return CELL_OK; + auto& ar = *ppu.optional_savestate_state; + const u8 savestate = ar.try_read().second; + ar.clear(); + + switch (savestate) + { + case 0: + if (lv2_syscall(ppu, dmux->mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(0); + return {}; + } + + if (!dmux->find_es(stream_id, private_stream_id)) + { + // Elementary stream is already disabled + return lv2_syscall(ppu, dmux->mutex) == CELL_OK ? CELL_DMUX_PAMF_ERROR_ARG : CELL_DMUX_PAMF_ERROR_FATAL; + } + + [[fallthrough]]; + + case 1: + dmux->send_spu_command_and_wait(ppu, savestate, static_cast>(stream_id), static_cast>(private_stream_id)); + + if (ppu.state & cpu_flag::again) + { + ar(1); + return {}; + } + + _this = vm::null; + this_size = 0; + demuxer = vm::null; + notify_au_found = {}; + au_queue_buffer = vm::null; + unk = 0; + au_max_size = 0; + + dmux->elementary_streams[this_index] = vm::null; + dmux->enabled_es_num--; + + dmux->au_released_bitset |= 1ull << this_index; + + this_index = 0; + [[fallthrough]]; + + case 2: + if (const error_code ret = lv2_syscall(ppu, dmux->cond, static_cast(dmux->thread_id)); ret != CELL_OK && ret != static_cast(CELL_EPERM)) + { + lv2_syscall(ppu, dmux->mutex); + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(2); + return {}; + } + + return lv2_syscall(ppu, dmux->mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; + + default: + fmt::throw_exception("Unexpected savestate value: 0x%x", savestate); + } } -error_code _CellDmuxCoreOpFlushEs(vm::ptr esHandle) +error_code _CellDmuxCoreOpDisableEs(ppu_thread& ppu, vm::ptr esHandle) { - cellDmuxPamf.todo("_CellDmuxCoreOpFlushEs(esHandle=*0x%x)", esHandle); + cellDmuxPamf.notice("_CellDmuxCoreOpDisableEs(esHandle=*0x%x)", esHandle); - return CELL_OK; + if (!esHandle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return esHandle->es->disable_es(ppu); } -error_code _CellDmuxCoreOpResetEs(vm::ptr esHandle) +error_code DmuxPamfElementaryStream::flush_es(ppu_thread& ppu) const { - cellDmuxPamf.todo("_CellDmuxCoreOpResetEs(esHandle=*0x%x)", esHandle); + auto& ar = *ppu.optional_savestate_state; + const bool waiting_for_spu_state = ar.try_read().second; + ar.clear(); - return CELL_OK; + if (!waiting_for_spu_state) + { + if (lv2_syscall(ppu, demuxer->mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(false); + return {}; + } + } + + demuxer->send_spu_command_and_wait(ppu, waiting_for_spu_state, static_cast>(stream_id), static_cast>(private_stream_id)); + + if (ppu.state & cpu_flag::again) + { + ar(true); + return {}; + } + + return lv2_syscall(ppu, demuxer->mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; } -error_code _CellDmuxCoreOpResetStreamAndWaitDone(vm::ptr handle) +error_code _CellDmuxCoreOpFlushEs(ppu_thread& ppu, vm::ptr esHandle) { - cellDmuxPamf.todo("_CellDmuxCoreOpResetStreamAndWaitDone(handle=*0x%x)", handle); + cellDmuxPamf.notice("_CellDmuxCoreOpFlushEs(esHandle=*0x%x)", esHandle); - return CELL_OK; + if (!esHandle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return esHandle->es->flush_es(ppu); } +error_code DmuxPamfElementaryStream::reset_es(ppu_thread& ppu) const +{ + auto& ar = *ppu.optional_savestate_state; + const bool waiting_for_spu_state = ar.try_read().second; + ar.clear(); + + if (!waiting_for_spu_state) + { + if (lv2_syscall(ppu, demuxer->mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + ar(false); + return {}; + } + } + + demuxer->send_spu_command_and_wait(ppu, waiting_for_spu_state, static_cast>(stream_id), static_cast>(private_stream_id), vm::null); + + if (ppu.state & cpu_flag::again) + { + ar(true); + return {}; + } + + return lv2_syscall(ppu, demuxer->mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; +} + +error_code _CellDmuxCoreOpResetEs(ppu_thread& ppu, vm::ptr esHandle) +{ + cellDmuxPamf.notice("_CellDmuxCoreOpResetEs(esHandle=*0x%x)", esHandle); + + if (!esHandle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return esHandle->es->reset_es(ppu); +} + +error_code DmuxPamfContext::reset_stream_and_wait_done(ppu_thread& ppu) +{ + // Both sys_cond_wait() and DmuxPamfContext::reset_stream() are already using ppu_thread::optional_savestate_state, so we can't save this function currently + std::unique_lock savestate_lock{ g_fxo->get(), std::try_to_lock }; + + if (!savestate_lock.owns_lock()) + { + ppu.state += cpu_flag::again; + return {}; + } + + if (reset_stream(ppu) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + + if (lv2_syscall(ppu, mutex, 0) != CELL_OK) + { + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + + while (sequence_state != DmuxPamfSequenceState::dormant) + { + if (lv2_syscall(ppu, cond, 0) != CELL_OK) + { + lv2_syscall(ppu, mutex); + return CELL_DMUX_PAMF_ERROR_FATAL; + } + + if (ppu.state & cpu_flag::again) + { + return {}; + } + } + + return lv2_syscall(ppu, mutex) == CELL_OK ? static_cast(CELL_OK) : CELL_DMUX_PAMF_ERROR_FATAL; +} + +error_code _CellDmuxCoreOpResetStreamAndWaitDone(ppu_thread& ppu, vm::ptr handle) +{ + cellDmuxPamf.notice("_CellDmuxCoreOpResetStreamAndWaitDone(handle=*0x%x)", handle); + + if (!handle) + { + return CELL_DMUX_PAMF_ERROR_ARG; + } + + return handle->demuxer->reset_stream_and_wait_done(ppu); +} + +template static void init_gvar(const vm::gvar& var) { var->queryAttr.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryAttr))); @@ -124,7 +2863,10 @@ static void init_gvar(const vm::gvar& var) var->resetStream.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpResetStream))); var->createThread.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpCreateThread))); var->joinThread.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpJoinThread))); - var->freeMemory.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpFreeMemory))); + var->setStream.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpSetStream))); + var->releaseAu.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpReleaseAu))); + var->queryEsAttr.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryEsAttr))); + var->enableEs.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpEnableEs))); var->disableEs.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpDisableEs))); var->flushEs.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpFlushEs))); var->resetEs.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpResetEs))); @@ -133,21 +2875,8 @@ static void init_gvar(const vm::gvar& var) DECLARE(ppu_module_manager::cellDmuxPamf)("cellDmuxPamf", [] { - REG_VNID(cellDmuxPamf, 0x28b2b7b2, g_cell_dmux_core_ops_pamf).init = [] - { - g_cell_dmux_core_ops_pamf->setStream.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpSetStream))); - g_cell_dmux_core_ops_pamf->queryEsAttr.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryEsAttr))); - g_cell_dmux_core_ops_pamf->enableEs.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpEnableEs))); - init_gvar(g_cell_dmux_core_ops_pamf); - }; - - REG_VNID(cellDmuxPamf, 0x9728a0e9, g_cell_dmux_core_ops_raw_es).init = [] - { - g_cell_dmux_core_ops_raw_es->setStream.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpSetStream))); - g_cell_dmux_core_ops_raw_es->queryEsAttr.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryEsAttr))); - g_cell_dmux_core_ops_raw_es->enableEs.set(g_fxo->get().func_addr(FIND_FUNC(_CellDmuxCoreOpEnableEs))); - init_gvar(g_cell_dmux_core_ops_raw_es); - }; + REG_VNID(cellDmuxPamf, 0x28b2b7b2, g_cell_dmux_core_ops_pamf).init = []{ init_gvar(g_cell_dmux_core_ops_pamf); }; + REG_VNID(cellDmuxPamf, 0x9728a0e9, g_cell_dmux_core_ops_raw_es).init = []{ init_gvar(g_cell_dmux_core_ops_raw_es); }; REG_HIDDEN_FUNC(_CellDmuxCoreOpQueryAttr); REG_HIDDEN_FUNC(_CellDmuxCoreOpOpen); @@ -157,7 +2886,7 @@ DECLARE(ppu_module_manager::cellDmuxPamf)("cellDmuxPamf", [] REG_HIDDEN_FUNC(_CellDmuxCoreOpJoinThread); REG_HIDDEN_FUNC(_CellDmuxCoreOpSetStream); REG_HIDDEN_FUNC(_CellDmuxCoreOpSetStream); - REG_HIDDEN_FUNC(_CellDmuxCoreOpFreeMemory); + REG_HIDDEN_FUNC(_CellDmuxCoreOpReleaseAu); REG_HIDDEN_FUNC(_CellDmuxCoreOpQueryEsAttr); REG_HIDDEN_FUNC(_CellDmuxCoreOpQueryEsAttr); REG_HIDDEN_FUNC(_CellDmuxCoreOpEnableEs); @@ -166,4 +2895,12 @@ DECLARE(ppu_module_manager::cellDmuxPamf)("cellDmuxPamf", [] REG_HIDDEN_FUNC(_CellDmuxCoreOpFlushEs); REG_HIDDEN_FUNC(_CellDmuxCoreOpResetEs); REG_HIDDEN_FUNC(_CellDmuxCoreOpResetStreamAndWaitDone); + + REG_HIDDEN_FUNC(dmuxPamfNotifyDemuxDone); + REG_HIDDEN_FUNC(dmuxPamfNotifyProgEndCode); + REG_HIDDEN_FUNC(dmuxPamfNotifyFatalErr); + REG_HIDDEN_FUNC(dmuxPamfEsNotifyAuFound); + REG_HIDDEN_FUNC(dmuxPamfEsNotifyFlushDone); + + REG_HIDDEN_FUNC(dmuxPamfEntry); }); diff --git a/rpcs3/Emu/Cell/Modules/cellDmuxPamf.h b/rpcs3/Emu/Cell/Modules/cellDmuxPamf.h index 01983b724a..5b42103ca7 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmuxPamf.h +++ b/rpcs3/Emu/Cell/Modules/cellDmuxPamf.h @@ -1,15 +1,1039 @@ #pragma once -struct CellDmuxPamfAttr +#include "Emu/savestate_utils.hpp" +#include "Utilities/Thread.h" +#include "cellPamf.h" +#include "cellDmux.h" +#include + +// Replacement for CellSpursQueue +template requires(std::is_trivial_v && max_num_of_entries > 0) +class alignas(0x80) dmux_pamf_hle_spurs_queue { - be_t maxEnabledEsNum; - be_t version; + T* buffer; + + alignas(atomic_t) std::array)> _size; // Stored in a byte array since the PPU context needs to be trivial + u32 front; + u32 back; + + template + bool _pop(T* lhs) + { + atomic_t& _size = *std::launder(reinterpret_cast*>(this->_size.data())); + + if (_size == 0) + { + return false; + } + + if (lhs) + { + *lhs = buffer[front]; + } + + if constexpr (!is_peek) + { + front = (front + 1) % max_num_of_entries; + _size--; + _size.notify_one(); + } + + return true; + } + +public: + void init(T (&buffer)[max_num_of_entries]) + { + this->buffer = buffer; + new (_size.data()) atomic_t(0); + front = 0; + back = 0; + } + + bool pop(T& lhs) { return _pop(&lhs); } + bool pop() { return _pop(nullptr); } + bool peek(T& lhs) const { return const_cast(this)->_pop(&lhs); } + bool emplace(auto&&... args) + { + atomic_t& _size = *std::launder(reinterpret_cast*>(this->_size.data())); + + if (_size >= max_num_of_entries) + { + return false; + } + + new (&buffer[back]) T(std::forward(args)...); + + back = (back + 1) % max_num_of_entries; + _size++; + _size.notify_one(); + + return true; + } + + [[nodiscard]] u32 size() const { return std::launder(reinterpret_cast*>(this->_size.data()))->observe(); } + + void wait() const + { + const atomic_t& _size = *std::launder(reinterpret_cast*>(this->_size.data())); + + while (_size == 0 && thread_ctrl::state() != thread_state::aborting) + { + thread_ctrl::wait_on(_size, 0); + } + } +}; + +enum class DmuxPamfCommandType : u32 +{ + enable_es = 0, + disable_es = 2, + set_stream = 4, + release_au = 6, + flush_es = 8, + close = 10, + reset_stream = 12, + reset_es = 14, + resume = 16, +}; + +struct alignas(0x80) DmuxPamfCommand +{ + be_t type; + + union + { + struct + { + be_t stream_id; + be_t private_stream_id; + be_t is_avc; + vm::bptr au_queue_buffer; + be_t au_queue_buffer_size; + be_t au_max_size; + be_t au_specific_info_size; + be_t is_raw_es; + be_t user_data; + } + enable_es; + + struct + { + be_t stream_id; + be_t private_stream_id; + } + disable_flush_es; + + struct + { + vm::ptr> au_addr; + be_t au_size; + be_t stream_id; + be_t private_stream_id; + } + release_au; + + struct + { + be_t stream_id; + be_t private_stream_id; + vm::ptr> au_addr; + } + reset_es; + }; + + DmuxPamfCommand() = default; + + DmuxPamfCommand(be_t&& type) + : type(type) + { + } + + DmuxPamfCommand(be_t&& type, const be_t& stream_id, const be_t& private_stream_id) + : type(type), disable_flush_es{ stream_id, private_stream_id } + { + } + + DmuxPamfCommand(be_t&& type, const be_t& stream_id, const be_t& private_stream_id, const vm::ptr>& au_addr) + : type(type), reset_es{ stream_id, private_stream_id, au_addr } + { + } + + DmuxPamfCommand(be_t&& type, const vm::ptr>& au_addr, const be_t& au_size, const be_t& stream_id, const be_t& private_stream_id) + : type(type), release_au{ au_addr, au_size, stream_id, private_stream_id } + { + } + + DmuxPamfCommand(be_t&& type, const be_t& stream_id, const be_t& private_stream_id, const be_t& is_avc, const vm::bptr& au_queue_buffer, + const be_t& au_queue_buffer_size, const be_t& au_max_size, const be_t& au_specific_info_size, const be_t& is_raw_es, const be_t& user_data) + : type(type), enable_es{ stream_id, private_stream_id, is_avc, au_queue_buffer, au_queue_buffer_size, au_max_size, au_specific_info_size, is_raw_es, user_data } + { + } +}; + +CHECK_SIZE_ALIGN(DmuxPamfCommand, 0x80, 0x80); + +enum class DmuxPamfEventType : u32 +{ + au_found, + demux_done, + fatal_error, + close, + flush_done, + prog_end_code, +}; + +struct alignas(0x80) DmuxPamfEvent +{ + be_t type; + + union + { + u8 pad[0x78]; + + struct + { + be_t stream_id; + be_t private_stream_id; + vm::ptr> au_addr; + CellCodecTimeStamp pts; + CellCodecTimeStamp dts; + be_t unk; + u8 reserved[4]; + be_t au_size; + be_t stream_header_size; + std::array stream_header_buf; + be_t user_data; + be_t is_rap; + } + au_found; + + struct + { + be_t stream_id; + be_t private_stream_id; + be_t user_data; + } + flush_done; + }; + + be_t event_queue_was_too_full; + + DmuxPamfEvent() = default; + + DmuxPamfEvent(be_t&& type, const be_t& event_queue_was_too_full) + : type(type), event_queue_was_too_full(event_queue_was_too_full) + { + } + + DmuxPamfEvent(be_t&& type, const be_t& stream_id, const be_t& private_stream_id, const be_t& user_data, const be_t& event_queue_was_too_full) + : type(type), flush_done{ stream_id, private_stream_id, user_data }, event_queue_was_too_full(event_queue_was_too_full) + { + } + + DmuxPamfEvent(be_t&& type, const be_t& stream_id, const be_t& private_stream_id, const vm::ptr>& au_addr, const CellCodecTimeStamp& pts, const CellCodecTimeStamp& dts, const be_t& unk, + const be_t& au_size, const be_t& au_specific_info_size, const std::array& au_specific_info, const be_t& user_data, const be_t& is_rap, const be_t& event_queue_was_too_full) + : type(type) + , au_found{ stream_id, private_stream_id, au_addr, pts, dts, static_cast>(unk), {}, au_size, au_specific_info_size, au_specific_info, user_data, is_rap } + , event_queue_was_too_full(event_queue_was_too_full) + { + } +}; + +CHECK_SIZE_ALIGN(DmuxPamfEvent, 0x80, 0x80); + +struct alignas(0x80) DmuxPamfStreamInfo +{ + vm::bcptr stream_addr; + be_t stream_size; + be_t user_data; + be_t continuity; + be_t is_raw_es; +}; + +CHECK_SIZE_ALIGN(DmuxPamfStreamInfo, 0x80, 0x80); + +enum DmuxPamfStreamTypeIndex +{ + DMUX_PAMF_STREAM_TYPE_INDEX_INVALID = -1, + DMUX_PAMF_STREAM_TYPE_INDEX_VIDEO, + DMUX_PAMF_STREAM_TYPE_INDEX_LPCM, + DMUX_PAMF_STREAM_TYPE_INDEX_AC3, + DMUX_PAMF_STREAM_TYPE_INDEX_ATRACX, + DMUX_PAMF_STREAM_TYPE_INDEX_USER_DATA, +}; + + +// SPU thread + +class dmux_pamf_base +{ + // Event handlers for the demuxer. These correspond to the events that the SPU thread sends to the PPU thread on LLE (except for au_queue_full(): the SPU thread just sets a global bool, + // but it is never notified to the PPU thread or the user). + + virtual bool on_au_found(u8 stream_id, u8 private_stream_id, u32 user_data, std::span au, u64 pts, u64 dts, bool rap, u8 au_specific_info_size, std::array au_specific_info_buf) = 0; + virtual bool on_demux_done() = 0; + virtual void on_fatal_error() = 0; + virtual bool on_flush_done(u8 stream_id, u8 private_stream_id, u32 user_data) = 0; + virtual bool on_prog_end() = 0; + virtual void on_au_queue_full() = 0; + +public: + virtual ~dmux_pamf_base() = default; + + bool enable_es(u32 stream_id, u32 private_stream_id, bool is_avc, std::span au_queue_buffer, u32 au_max_size, bool raw_es, u32 user_data); + bool disable_es(u32 stream_id, u32 private_stream_id); + bool release_au(u32 stream_id, u32 private_stream_id, u32 au_size) const; + bool flush_es(u32 stream_id, u32 private_stream_id); + void set_stream(std::span stream, bool continuity); + void reset_stream(); + bool reset_es(u32 stream_id, u32 private_stream_id, u8* au_addr); + bool process_next_pack(); + +protected: + void save_base(utils::serial& ar); + [[nodiscard]] bool has_work() const { return !!stream || !demux_done_notified; } + [[nodiscard]] u32 get_enabled_es_count() const; + +private: + static constexpr u16 PACK_SIZE = 0x800; + static constexpr s8 PACK_STUFFING_LENGTH_OFFSET = 0xd; + static constexpr s8 PES_PACKET_LENGTH_OFFSET = 0x4; + static constexpr s8 PES_HEADER_DATA_LENGTH_OFFSET = 0x8; + static constexpr s8 PTS_DTS_FLAG_OFFSET = 0x7; + static constexpr u8 PACKET_START_CODE_PREFIX = 1; + + static constexpr be_t M2V_PIC_START = 0x100; + static constexpr be_t AVC_AU_DELIMITER = 0x109; + static constexpr be_t M2V_SEQUENCE_HEADER = 0x1b3; + static constexpr be_t M2V_SEQUENCE_END = 0x1b7; + static constexpr be_t PACK_START = 0x1ba; + static constexpr be_t SYSTEM_HEADER = 0x1bb; + static constexpr be_t PRIVATE_STREAM_1 = 0x1bd; + static constexpr be_t PRIVATE_STREAM_2 = 0x1bf; + static constexpr be_t PROG_END = 0x1b9; + static constexpr be_t VIDEO_STREAM_BASE = 0x1e0; // The lower 4 bits indicate the channel + + // Partial access unit that will be written to the output queue + struct access_unit_chunk + { + std::vector cached_data; // Up to three bytes of data from the previous PES packet (copied into this vector, since it might not be in memory anymore) + std::span data; // Data of the current PES packet + }; + + // Output queue for access units + // The queue doesn't keep track of where access units are in the buffer (only which parts are used and which are free), this has to be done extenally + class output_queue + { + public: + explicit output_queue(std::span buffer) : buffer(buffer) {} + + explicit output_queue(utils::serial& ar) + : buffer{vm::_ptr(ar.pop()), ar.pop()} + , back(vm::_ptr(ar.pop())) + , front(vm::_ptr(ar.pop())) + , wrap_pos(vm::_ptr(ar.pop())) + { + } + + void save(utils::serial& ar) const { ar(vm::get_addr(buffer.data()), static_cast(buffer.size()), vm::get_addr(back), vm::get_addr(front), vm::get_addr(wrap_pos)); } + + // The queue itself doesn't keep track of the location of each access unit, so the pop and access operations need the size or address of the access unit to remove/return + void pop_back(u32 au_size); + void pop_back(u8* au_addr); + void pop_front(u32 au_size); + [[nodiscard]] const u8* peek_back(u32 au_size) const { return back - au_size; } + + void clear() { wrap_pos = front = back = buffer.data(); } + + void push_unchecked(const access_unit_chunk& au_chunk); + bool push(const access_unit_chunk& au_chunk, const std::function& on_fatal_error); + + [[nodiscard]] bool prepare_next_au(u32 au_max_size); + + [[nodiscard]] usz get_free_size() const { return wrap_pos != buffer.data() ? front - back : std::to_address(buffer.end()) - back; } + + private: + const std::span buffer; + + // Since access units have a variable size, uses pointers instead of indices + u8* back = buffer.data(); + const u8* front = buffer.data(); + const u8* wrap_pos = buffer.data(); // The address where the back pointer wrapped around to the beginning of the queue + }; + + // Base class for elementary streams and subclasses for each stream type + // Responsible for processing the data section of PES packets and splitting it into access units with the stream parsers of each subclass + class elementary_stream + { + public: + elementary_stream(u8 channel, u32 au_max_size, dmux_pamf_base& ctx, u32 user_data, u8 au_specific_info_size, std::span au_queue_buffer) + : channel(channel) + , au_max_size(au_max_size == umax || au_max_size > au_queue_buffer.size() ? 0x800 : au_max_size) + , ctx(ctx) + , au_specific_info_size(au_specific_info_size) + , user_data(user_data) + , au_queue(au_queue_buffer) + { + // The cache sizes will never exceed three bytes + cache.reserve(3); + au_chunk.cached_data.reserve(3); + } + + elementary_stream(utils::serial& ar, u8 channel, dmux_pamf_base& ctx, u8 au_specific_info_size) + : channel(channel) + , au_max_size(ar.pop()) + , ctx(ctx) + , au_specific_info_size(au_specific_info_size) + , user_data(ar.pop()) + , au_queue(ar) + { + save(ar); + } + + virtual ~elementary_stream() = default; + void save(utils::serial& ar); + + static bool is_enabled(const std::unique_ptr& es) { return !!es; } + + [[nodiscard]] virtual std::pair get_stream_id() const = 0; + + void set_pes_packet_data(std::span pes_packet_data) { ensure(!this->pes_packet_data); this->pes_packet_data = this->stream_chunk = pes_packet_data; } + void set_pts(u64 pts) { this->pts = pts; } + void set_dts(u64 dts) { this->dts = dts; } + void set_rap() { rap = true; } + + // Parses the proprietary header of private streams. Returns the size of the header or umax if the stream is invalid + virtual u32 parse_stream_header(std::span elementary_stream, s8 pts_dts_flag) = 0; + + // Processes the current PES packet. Returns true if it has been entirely consumed + bool process_pes_packet_data(); + + void release_au(u32 au_size) { au_queue.pop_front(au_size); } + void flush_es(); + void reset_es(u8* au_addr); + void discard_access_unit(); + + protected: + const u8 channel : 4; + const u32 au_max_size; // Maximum possible size of an access unit + u32 au_size_unk = 0; // For user data streams, used to store the size of the current access unit. For other private streams, used as a bool for some reason + alignas(0x10) std::array au_specific_info_buf{}; // For LPCM streams, stores the first 0x10 bytes of the current PES packet data, contains info like the number of channels + + // The access unit that is currently being cut out + struct access_unit + { + ENABLE_BITWISE_SERIALIZATION + + enum class state : u8 + { + none, // An access unit is not currently being cut out + incomplete, // An access unit is currently being cut out + commenced, // The current PES packet contains the beginning of an access unit + complete, // The current PES packet contains the end of an access unit + size_mismatch, // The distance between sync words and size indicated in the access unit's info header does not match + m2v_sequence, // Special case for M2V, access unit commenced, but the next start code does not complete the access unit + } + state = state::none; + + bool rap = false; + bool timestamps_rap_set = false; + + // Since the delimiters of compressed audio streams are allowed to appear anywhere in the stream (instead of just the beginning of an access unit), we need to parse the size of the access unit from the stream + u8 size_info_offset = 0; + u16 parsed_size = 0; + + u32 accumulated_size = 0; // Incremented after every access unit chunk cut out from the stream + + u64 pts = umax; + u64 dts = umax; + + alignas(0x10) std::array au_specific_info_buf{}; + } + current_au; + + access_unit_chunk au_chunk; // A partial access unit that will be written to the access unit queue. Set by the stream parsers + std::vector cache; // The last three bytes of the current PES packet need to be saved, since they could contain part of an access unit delimiter + + // Returns the stream header size of audio streams. The only difference between LPCM and compressed streams is the extra_header_size_unk_mask + template + u32 parse_audio_stream_header(std::span pes_packet_data); + + private: + dmux_pamf_base& ctx; // For access to event handlers + + enum class state : u8 + { + initial, + pushing_au_queue, + notifying_au_found, + preparing_for_next_au + } + state = state::initial; + + // Size of the "CellDmuxPamfAuSpecificInfo..." struct for the type of this stream ("reserved" fields are not counted, so for all stream types other than LPCM this will be 0) + // This does NOT correspond to the amount of data in au_specific_info_buf, the info in the buffer gets unpacked by the PPU thread + const u8 au_specific_info_size; + + const u32 user_data; + + // Data section of the current PES packet. Needs to be remembered separately from the span we're working with below + std::optional> pes_packet_data; + + std::span stream_chunk; // The current section of the PES packet data to be processed + u64 pts = umax; // Presentation time stamp of the current PES packet + u64 dts = umax; // Decoding time stamp of the current PES packet + bool rap = false; // Random access point indicator + + output_queue au_queue; + + // Extracts access units from the stream by searching for the access unit delimiter and setting au_chunk accordingly. Returns the number of bytes that were parsed + virtual u32 parse_stream(std::span stream) = 0; + + void reset() + { + state = state::initial; + pes_packet_data.reset(); + au_size_unk = 0; + pts = + dts = umax; + rap = false; + au_chunk.data = {}; + au_chunk.cached_data.clear(); + current_au = {}; + } + + void set_au_timestamps_rap() + { + current_au.pts = pts; + current_au.dts = dts; + current_au.rap = rap; + pts = + dts = umax; + rap = false; + current_au.timestamps_rap_set = true; + } + }; + + template + class video_stream final : public elementary_stream + { + public: + video_stream(u8 channel, u32 au_max_size, dmux_pamf_base& ctx, u32 user_data, std::span au_queue_buffer) : elementary_stream(channel, au_max_size, ctx, user_data, 0, au_queue_buffer) {} + video_stream(utils::serial& ar, u8 channel, dmux_pamf_base& ctx) : elementary_stream(ar, channel, ctx, 0) {} + + private: + u32 parse_stream(std::span stream) override; + u32 parse_stream_header([[maybe_unused]] std::span pes_packet_data, [[maybe_unused]] s8 pts_dts_flag) override { return 0; } + [[nodiscard]] std::pair get_stream_id() const override { return { 0xe0 | channel, 0 }; } + }; + + class lpcm_stream final : public elementary_stream + { + public: + lpcm_stream(u8 channel, u32 au_max_size, dmux_pamf_base& ctx, u32 user_data, std::span au_queue_buffer) : elementary_stream(channel, au_max_size, ctx, user_data, 3, au_queue_buffer) {} + lpcm_stream(utils::serial& ar, u8 channel, dmux_pamf_base& ctx) : elementary_stream(ar, channel, ctx, 3) {} + + private: + u32 parse_stream(std::span stream) override; + u32 parse_stream_header(std::span pes_packet_data, [[maybe_unused]] s8 pts_dts_flag) override; + [[nodiscard]] std::pair get_stream_id() const override { return { 0xbd, 0x40 | channel }; } + }; + + template + class audio_stream final : public elementary_stream + { + public: + audio_stream(u8 channel, u32 au_max_size, dmux_pamf_base& ctx, u32 user_data, std::span au_queue_buffer) : elementary_stream(channel, au_max_size, ctx, user_data, 0, au_queue_buffer) {} + audio_stream(utils::serial& ar, u8 channel, dmux_pamf_base& ctx) : elementary_stream(ar, channel, ctx, 0) {} + + private: + static constexpr be_t SYNC_WORD = ac3 ? 0x0b77 : 0x0fd0; + static constexpr u8 ATRACX_ATS_HEADER_SIZE = 8; + static constexpr u16 AC3_FRMSIZE_TABLE[3][38] = + { + { 0x40, 0x40, 0x50, 0x50, 0x60, 0x60, 0x70, 0x70, 0x80, 0x80, 0xa0, 0xa0, 0xc0, 0xc0, 0xe0, 0xe0, 0x100, 0x100, 0x140, 0x140, 0x180, 0x180, 0x1c0, 0x1c0, 0x200, 0x200, 0x280, 0x280, 0x300, 0x300, 0x380, 0x380, 0x400, 0x400, 0x480, 0x480, 0x500, 0x500 }, + { 0x45, 0x46, 0x57, 0x58, 0x68, 0x69, 0x79, 0x7a, 0x8b, 0x8c, 0xae, 0xaf, 0xd0, 0xd1, 0xf3, 0xf4, 0x116, 0x117, 0x15c, 0x15d, 0x1a1, 0x1a2, 0x1e7, 0x1e8, 0x22d, 0x22e, 0x2b8, 0x2b9, 0x343, 0x344, 0x3cf, 0x3d0, 0x45a, 0x45b, 0x4e5, 0x4e6, 0x571, 0x572 }, + { 0x60, 0x60, 0x78, 0x78, 0x90, 0x90, 0xa8, 0xa8, 0xc0, 0xc0, 0xf0, 0xf0, 0x120, 0x120, 0x150, 0x150, 0x180, 0x180, 0x1e0, 0x1e0, 0x240, 0x240, 0x2a0, 0x2a0, 0x300, 0x300, 0x3c0, 0x3c0, 0x480, 0x480, 0x540, 0x540, 0x600, 0x600, 0x6c0, 0x6c0, 0x780, 0x780 } + }; + + u32 parse_stream(std::span stream) override; + u32 parse_stream_header(std::span pes_packet_data, [[maybe_unused]] s8 pts_dts_flag) override { return parse_audio_stream_header<0xffff>(pes_packet_data); } + [[nodiscard]] std::pair get_stream_id() const override { return { 0xbd, (ac3 ? 0x30 : 0x00) | channel }; } + }; + + class user_data_stream final : public elementary_stream + { + public: + user_data_stream(u8 channel, u32 au_max_size, dmux_pamf_base& ctx, u32 user_data, std::span au_queue_buffer) : elementary_stream(channel, au_max_size, ctx, user_data, 0, au_queue_buffer) {} + user_data_stream(utils::serial& ar, u8 channel, dmux_pamf_base& ctx) : elementary_stream(ar, channel, ctx, 0) {} + + private: + u32 parse_stream(std::span stream) override; + u32 parse_stream_header(std::span pes_packet_data, s8 pts_dts_flag) override; + [[nodiscard]] std::pair get_stream_id() const override { return { 0xbd, 0x20 | channel }; } + }; + + + enum class state : u8 + { + initial, + elementary_stream, + prog_end + } + state = state::initial; + + bool demux_done_notified = true; // User was successfully notified that the stream has been consumed + + u8 pack_es_type_idx = umax; // Elementary stream type in the current pack + u8 pack_es_channel = 0; // Elementary stream channel in the current pack + + bool raw_es = false; // Indicates that the input stream is a raw elementary stream instead of a multiplexed MPEG program stream. If set to true, MPEG-PS related parsing will be skipped + + std::optional> stream; // The stream to be demultiplexed, provided by the user + + std::unique_ptr elementary_streams[5][0x10]; // One for each possible type and channel +}; + +// Implementation of the SPU thread +class dmux_pamf_spu_context : dmux_pamf_base +{ +public: + static constexpr u32 id_base = 0; + static constexpr u32 id_step = 1; + static constexpr u32 id_count = 0x400; + SAVESTATE_INIT_POS(std::numeric_limits::max()); // Doesn't depend on or is a dependency of anything + + dmux_pamf_spu_context(vm::ptr> cmd_queue, vm::ptr, 1>> cmd_result_queue, + vm::ptr> stream_info_queue, vm::ptr> event_queue) + : cmd_queue(cmd_queue), cmd_result_queue(cmd_result_queue), stream_info_queue(stream_info_queue), event_queue(event_queue) + { + } + + explicit dmux_pamf_spu_context(utils::serial& ar) + : cmd_queue(ar.pop>>()) + , cmd_result_queue(vm::ptr, 1>>::make(cmd_queue.addr() + sizeof(dmux_pamf_hle_spurs_queue))) + , stream_info_queue(vm::ptr>::make(cmd_result_queue.addr() + sizeof(dmux_pamf_hle_spurs_queue, 1>))) + , event_queue(vm::ptr>::make(stream_info_queue.addr() + sizeof(dmux_pamf_hle_spurs_queue))) + , new_stream(ar.pop()) + { + save_base(ar); + max_enqueued_events += 2 * get_enabled_es_count(); + } + + void save(utils::serial& ar); + + void operator()(); // cellSpursMain() + static constexpr auto thread_name = "HLE PAMF demuxer SPU thread"sv; + +private: + // These are globals in the SPU thread + const vm::ptr> cmd_queue; + const vm::ptr, 1>> cmd_result_queue; + const vm::ptr> stream_info_queue; + const vm::ptr> event_queue; + bool wait_for_au_queue = false; + bool wait_for_event_queue = false; + bool event_queue_was_too_full = false; // Sent to the PPU thread + u8 max_enqueued_events = 4; // 4 + 2 * number of enabled elementary streams + + // This is a local variable in cellSpursMain(), needs to be saved for savestates + bool new_stream = false; + + bool get_next_cmd(DmuxPamfCommand& lhs, bool new_stream) const; + bool send_event(auto&&... args) const; + + // The events are sent to the PPU thread via the event_queue + bool on_au_found(u8 stream_id, u8 private_stream_id, u32 user_data, std::span au, u64 pts, u64 dts, bool rap, u8 au_specific_info_size, std::array au_specific_info_buf) override + { + return !((wait_for_event_queue = !send_event(DmuxPamfEventType::au_found, stream_id, private_stream_id, vm::get_addr(au.data()), std::bit_cast(static_cast>(pts)), + std::bit_cast(static_cast>(dts)), 0, static_cast(au.size()), au_specific_info_size, au_specific_info_buf, user_data, rap))); + } + bool on_demux_done() override { return !((wait_for_event_queue = !send_event(DmuxPamfEventType::demux_done))); } + void on_fatal_error() override { send_event(DmuxPamfEventType::fatal_error); } + bool on_flush_done(u8 stream_id, u8 private_stream_id, u32 user_data) override { return send_event(DmuxPamfEventType::flush_done, stream_id, private_stream_id, user_data); } // The "flush done" event does not set wait_for_event_queue if the queue is full + bool on_prog_end() override { return !((wait_for_event_queue = !send_event(DmuxPamfEventType::prog_end_code))); } + void on_au_queue_full() override { wait_for_au_queue = true; } +}; + +using dmux_pamf_spu_thread = named_thread; + + +// PPU thread + +// For some reason, cellDmuxPamf doesn't use regular error code values and also has a second set of error codes that's only used internally +enum CellDmuxPamfError +{ + CELL_DMUX_PAMF_ERROR_BUSY = 1, + CELL_DMUX_PAMF_ERROR_ARG = 2, + CELL_DMUX_PAMF_ERROR_UNKNOWN_STREAM = 3, + CELL_DMUX_PAMF_ERROR_NO_MEMORY = 5, + CELL_DMUX_PAMF_ERROR_FATAL = 6, +}; + +enum CellDmuxPamfM2vLevel +{ + CELL_DMUX_PAMF_M2V_MP_LL = 0, + CELL_DMUX_PAMF_M2V_MP_ML, + CELL_DMUX_PAMF_M2V_MP_H14, + CELL_DMUX_PAMF_M2V_MP_HL, +}; + +enum CellDmuxPamfAvcLevel +{ + CELL_DMUX_PAMF_AVC_LEVEL_2P1 = 21, + CELL_DMUX_PAMF_AVC_LEVEL_3P0 = 30, + CELL_DMUX_PAMF_AVC_LEVEL_3P1 = 31, + CELL_DMUX_PAMF_AVC_LEVEL_3P2 = 32, + CELL_DMUX_PAMF_AVC_LEVEL_4P1 = 41, + CELL_DMUX_PAMF_AVC_LEVEL_4P2 = 42, +}; + +struct CellDmuxPamfAuSpecificInfoM2v +{ + be_t reserved1; +}; + +struct CellDmuxPamfAuSpecificInfoAvc +{ + be_t reserved1; +}; + +struct CellDmuxPamfAuSpecificInfoLpcm +{ + u8 channelAssignmentInfo; + u8 samplingFreqInfo; + u8 bitsPerSample; +}; + +struct CellDmuxPamfAuSpecificInfoAc3 +{ + be_t reserved1; +}; + +struct CellDmuxPamfAuSpecificInfoAtrac3plus +{ + be_t reserved1; +}; + +struct CellDmuxPamfAuSpecificInfoUserData +{ + be_t reserved1; +}; + +struct CellDmuxPamfEsSpecificInfoM2v +{ + be_t profileLevel; +}; + +struct CellDmuxPamfEsSpecificInfoAvc +{ + be_t level; +}; + +struct CellDmuxPamfEsSpecificInfoLpcm +{ + be_t samplingFreq; + be_t numOfChannels; + be_t bitsPerSample; +}; + +struct CellDmuxPamfEsSpecificInfoAc3 +{ + be_t reserved1; +}; + +struct CellDmuxPamfEsSpecificInfoAtrac3plus +{ + be_t reserved1; +}; + +struct CellDmuxPamfEsSpecificInfoUserData +{ + be_t reserved1; +}; + +enum CellDmuxPamfSamplingFrequency +{ + CELL_DMUX_PAMF_FS_48K = 48000, +}; + +enum CellDmuxPamfBitsPerSample +{ + CELL_DMUX_PAMF_BITS_PER_SAMPLE_16 = 16, + CELL_DMUX_PAMF_BITS_PER_SAMPLE_24 = 24, +}; + +enum CellDmuxPamfLpcmChannelAssignmentInfo +{ + CELL_DMUX_PAMF_LPCM_CH_M1 = 1, + CELL_DMUX_PAMF_LPCM_CH_LR = 3, + CELL_DMUX_PAMF_LPCM_CH_LRCLSRSLFE = 9, + CELL_DMUX_PAMF_LPCM_CH_LRCLSCS1CS2RSLFE = 11, +}; + +enum CellDmuxPamfLpcmFs +{ + CELL_DMUX_PAMF_LPCM_FS_48K = 1, +}; + +enum CellDmuxPamfLpcmBitsPerSamples +{ + CELL_DMUX_PAMF_LPCM_BITS_PER_SAMPLE_16 = 1, + CELL_DMUX_PAMF_LPCM_BITS_PER_SAMPLE_24 = 3, +}; + +constexpr u8 DMUX_PAMF_LPCM_FRAMES_PER_SEC = 200; + +struct CellDmuxPamfSpecificInfo +{ + be_t thisSize; + b8 programEndCodeCb; +}; + +struct CellDmuxPamfResource +{ + be_t ppuThreadPriority; + be_t ppuThreadStackSize; + be_t numOfSpus; + be_t spuThreadPriority; + vm::bptr memAddr; be_t memSize; }; -struct CellDmuxPamfEsAttr +struct DmuxPamfAuInfo { - be_t auQueueMaxSize; - be_t memSize; - be_t specificInfoSize; + vm::bptr addr; + be_t size; + CellCodecTimeStamp pts; + CellCodecTimeStamp dts; + be_t user_data; + vm::bptr specific_info; + be_t specific_info_size; + b8 is_rap; }; + +CHECK_SIZE(DmuxPamfAuInfo, 0x30); + +constexpr u32 DMUX_PAMF_VERSION = 0x280000; +constexpr s32 DMUX_PAMF_MAX_ENABLED_ES_NUM = 0x40; + +// HLE exclusive, for savestates +enum class dmux_pamf_state : u8 +{ + initial, + waiting_for_au_released, + waiting_for_au_released_error, + waiting_for_event, + starting_demux_done, + starting_demux_done_mutex_lock_error, + starting_demux_done_mutex_unlock_error, + starting_demux_done_checking_stream_reset, + starting_demux_done_checking_stream_reset_error, + setting_au_reset, + setting_au_reset_error, + processing_event, + au_found_waiting_for_spu, + unsetting_au_reset, + demux_done_notifying, + demux_done_mutex_lock, + demux_done_cond_signal, + resuming_demux_mutex_lock, + resuming_demux_waiting_for_spu, + sending_fatal_err +}; + +enum class DmuxPamfSequenceState : u32 +{ + dormant, + resetting, + running +}; + +struct DmuxPamfElementaryStream; + +class DmuxPamfContext +{ + // HLE exclusive + // These are local variables in the PPU thread function, they're here for savestates + DmuxPamfEvent event; + u64 au_queue_full_bitset; + b8 stream_reset_started; + b8 stream_reset_in_progress; + + u32 hle_spu_thread_id; + dmux_pamf_state savestate; + + [[maybe_unused]] u8 spurs[0xf6b]; // CellSpurs, 0x1000 bytes on LLE + [[maybe_unused]] vm::bptr spurs_addr; // CellSpurs* + [[maybe_unused]] b8 use_existing_spurs; + + [[maybe_unused]] alignas(0x80) u8 spurs_taskset[0x1900]; // CellSpursTaskset + [[maybe_unused]] be_t spurs_task_id; // CellSpursTaskId + vm::bptr spurs_context_addr; + + [[maybe_unused]] u8 reserved1[0x10]; + + vm::bptr _this; + be_t this_size; + be_t version; + + DmuxCb notify_demux_done; + DmuxCb notify_prog_end_code; + DmuxCb notify_fatal_err; + + CellDmuxPamfResource resource; + + be_t thread_id; // sys_ppu_thread_t + + be_t unk; // Unused + + be_t ppu_thread_stack_size; + + be_t au_released_bitset; // Each bit corresponds to an elementary stream, if a bit is set then cellDmuxReleaseAu() was called for that elementary stream + + b8 stream_reset_requested; + + be_t sequence_state; + + be_t max_enabled_es_num; + be_t enabled_es_num; + vm::bptr elementary_streams[DMUX_PAMF_MAX_ENABLED_ES_NUM]; + + be_t mutex; // sys_mutex_t + be_t cond; // sys_cond_t + + vm::bptr> cmd_queue_addr_; // Same as cmd_queue_addr, unused + vm::bptr cmd_queue_buffer_addr_; // Same as cmd_queue_buffer_addr, unused + + vm::bptr> cmd_queue_addr; // CellSpursQueue* + vm::bptr, 1>> cmd_result_queue_addr; // CellSpursQueue* + vm::bptr> stream_info_queue_addr; // CellSpursQueue* + vm::bptr> event_queue_addr; // CellSpursQueue* + + vm::bptr cmd_queue_buffer_addr; + vm::bptr[1]> cmd_result_queue_buffer_addr; + vm::bptr event_queue_buffer_addr; + vm::bptr stream_info_queue_buffer_addr; + + vm::bptr> cmd_queue_addr__; // Same as cmd_queue_addr, unused + + be_t user_data; + + b8 is_raw_es; + + be_t next_es_id; + + char spurs_taskset_name[24]; + + [[maybe_unused]] u8 reserved2[928]; // Unused + + dmux_pamf_hle_spurs_queue cmd_queue; // CellSpursQueue + dmux_pamf_hle_spurs_queue, 1> cmd_result_queue; // CellSpursQueue + dmux_pamf_hle_spurs_queue stream_info_queue; // CellSpursQueue + dmux_pamf_hle_spurs_queue event_queue; // CellSpursQueue + + DmuxPamfCommand cmd_queue_buffer[1]; + alignas(0x80) be_t cmd_result_queue_buffer[1]; + DmuxPamfStreamInfo stream_info_queue_buffer[1]; + DmuxPamfEvent event_queue_buffer[4 + 2 * DMUX_PAMF_MAX_ENABLED_ES_NUM]; + + alignas(0x80) u8 spurs_context[0x36400]; + + + template + void send_spu_command_and_wait(ppu_thread& ppu, bool waiting_for_spu_state, auto&&... cmd_params); + + error_code wait_au_released_or_stream_reset(ppu_thread& ppu, u64 au_queue_full_bitset, b8& stream_reset_started, dmux_pamf_state& savestate); + + template + error_code set_au_reset(ppu_thread& ppu); + + template + static error_code callback(ppu_thread& ppu, DmuxCb cb, auto&&... args); + + friend struct DmuxPamfElementaryStream; + +public: + void run_spu_thread(); + + DmuxPamfElementaryStream* find_es(u16 stream_id, u16 private_stream_id); + + void exec(ppu_thread& ppu); + + static error_code open(ppu_thread& ppu, const CellDmuxPamfResource& res, vm::cptr res_spurs, const DmuxCb& notify_dmux_done, + const DmuxCb& notify_prog_end_code, const DmuxCb& notify_fatal_err, vm::bptr& handle); + error_code create_thread(ppu_thread& ppu); + error_code close(ppu_thread& ppu); + error_code reset_stream(ppu_thread& ppu); + error_code join_thread(ppu_thread& ppu); + + template + error_code set_stream(ppu_thread& ppu, vm::cptr stream_address, u32 stream_size, b8 discontinuity, u32 user_data); + + template + error_code enable_es(ppu_thread& ppu, u16 stream_id, u16 private_stream_id, bool is_avc, vm::cptr es_specific_info, vm::ptr mem_addr, u32 mem_size, const DmuxCb& notify_au_found, + const DmuxCb& notify_flush_done, vm::bptr& es); + + error_code reset_stream_and_wait_done(ppu_thread& ppu); +}; + +static_assert(std::is_standard_layout_v && std::is_trivial_v); +CHECK_SIZE_ALIGN(DmuxPamfContext, 0x3d880, 0x80); + +struct CellDmuxPamfHandle +{ + vm::bptr demuxer; + + DmuxCb notify_demux_done; + DmuxCb notify_prog_end_code; + DmuxCb notify_fatal_err; +}; + +CHECK_SIZE(CellDmuxPamfHandle, 0x1c); + +struct DmuxPamfElementaryStream +{ + vm::bptr _this; + be_t this_size; + u8 this_index; + + vm::bptr demuxer; + + DmuxCb notify_au_found; + DmuxCb notify_flush_done; + + be_t stream_id; + be_t private_stream_id; + b8 is_avc; + + vm::bptr au_queue_buffer; + be_t unk; // Likely au_queue_buffer_size, unused + be_t au_max_size; + u8 au_specific_info[0x10]; + be_t au_specific_info_size; + + b8 reset_next_au; + + be_t es_id; + + u8 reserved[72]; + + error_code release_au(ppu_thread& ppu, vm::ptr au_addr, u32 au_size) const; + error_code disable_es(ppu_thread& ppu); + error_code flush_es(ppu_thread& ppu) const; + error_code reset_es(ppu_thread& ppu) const; +}; + +static_assert(std::is_standard_layout_v && std::is_trivial_v); +CHECK_SIZE_ALIGN(DmuxPamfElementaryStream, 0x98, 4); + +struct CellDmuxPamfEsHandle +{ + vm::bptr es; + + DmuxCb notify_au_found; + DmuxCb notify_flush_done; +}; + +CHECK_SIZE(CellDmuxPamfEsHandle, 0x14); diff --git a/rpcs3/Emu/Cell/Modules/cellFont.cpp b/rpcs3/Emu/Cell/Modules/cellFont.cpp index c960375c0c..348a2869fc 100644 --- a/rpcs3/Emu/Cell/Modules/cellFont.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFont.cpp @@ -2228,6 +2228,12 @@ error_code cellFontStatic() return CELL_OK; } +error_code cellFontsetUSleep() +{ + cellFont.todo("cellFontsetUSleep()"); + return CELL_OK; +} + DECLARE(ppu_module_manager::cellFont)("cellFont", []() { @@ -2315,4 +2321,5 @@ DECLARE(ppu_module_manager::cellFont)("cellFont", []() REG_FUNC(cellFont, cellFontGraphicsGetLineRGBA); REG_FUNC(cellFont, cellFontControl); REG_FUNC(cellFont, cellFontStatic); + REG_FUNC(cellFont, cellFontsetUSleep); }); diff --git a/rpcs3/Emu/Cell/Modules/cellFs.cpp b/rpcs3/Emu/Cell/Modules/cellFs.cpp index bff73f530b..1aa83390ae 100644 --- a/rpcs3/Emu/Cell/Modules/cellFs.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFs.cpp @@ -1034,6 +1034,18 @@ s32 cellFsUnregisterL10nCallbacks() return CELL_OK; } +s32 cellFsGetDirent() +{ + cellFs.todo("cellFsGetDirent()"); + return CELL_OK; +} + +s32 cellFsGetDirentCount() +{ + cellFs.todo("cellFsGetDirentCount()"); + return CELL_OK; +} + DECLARE(ppu_module_manager::cellFs)("sys_fs", []() { REG_FUNC(sys_fs, cellFsAccess); @@ -1065,6 +1077,8 @@ DECLARE(ppu_module_manager::cellFs)("sys_fs", []() REG_FUNC(sys_fs, cellFsGetBlockSize); REG_FUNC(sys_fs, cellFsGetBlockSize2); REG_FUNC(sys_fs, cellFsGetDirectoryEntries); + REG_FUNC(sys_fs, cellFsGetDirent); + REG_FUNC(sys_fs, cellFsGetDirentCount); REG_FUNC(sys_fs, cellFsGetFreeSize); REG_FUNC(sys_fs, cellFsGetPath); REG_FUNC(sys_fs, cellFsLink); diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 371aa2a7b3..51e5ed6a33 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -492,8 +492,8 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr dirName strcpy_trunc(get->getParam.titleLang[i], psf::get_string(psf, fmt::format("TITLE_%02d", i))); } - cellGame.warning("cellHddGameCheck(): Data exists:\nATTRIBUTE: 0x%x, RESOLUTION: 0x%x, RESOLUTION: 0x%x, SOUND_FORMAT: 0x%x, dataVersion: %s" - , get->getParam.attribute, get->getParam.resolution, get->getParam.soundFormat, get->getParam.soundFormat, std::span(reinterpret_cast(get->getParam.dataVersion), 6)); + cellGame.warning("cellHddGameCheck(): Data exists:\nATTRIBUTE: 0x%x, RESOLUTION: 0x%x, SOUND_FORMAT: 0x%x, dataVersion: %s" + , get->getParam.attribute, get->getParam.resolution, get->getParam.soundFormat, std::span(reinterpret_cast(get->getParam.dataVersion), 6)); } // TODO ? @@ -580,7 +580,7 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr dirName break; default: - cellGame.error("cellHddGameCheck(): callback returned unknown error (code=0x%x). Error message: %s", result->invalidMsg); + cellGame.error("cellHddGameCheck(): callback returned unknown error (code=0x%x). Error message: %s", result->result, result->invalidMsg); error_msg = get_localized_string(localized_string_id::CELL_HDD_GAME_CHECK_INVALID, "%s", result->invalidMsg); break; } @@ -1199,7 +1199,7 @@ error_code cellGameDataCheckCreate2(ppu_thread& ppu, u32 version, vm::cptr break; default: - cellGame.error("cellGameDataCheckCreate2(): callback returned unknown error (code=0x%x). Error message: %s", cbResult->invalidMsg); + cellGame.error("cellGameDataCheckCreate2(): callback returned unknown error (code=0x%x). Error message: %s", cbResult->result, cbResult->invalidMsg); error_msg = get_localized_string(localized_string_id::CELL_GAMEDATA_CHECK_INVALID, "%s", cbResult->invalidMsg); break; } @@ -1747,7 +1747,7 @@ error_code cellGameThemeInstall(vm::cptr usrdirPath, vm::cptr fileNa { u32 magic{}; - if (src_path.ends_with(".p3t") || !theme.read(magic) || magic != "P3TF"_u32) + if (!fmt::to_lower(src_path).ends_with(".p3t") || !theme.read(magic) || magic != "P3TF"_u32) { return CELL_GAME_ERROR_INVALID_THEME_FILE; } @@ -1819,7 +1819,7 @@ error_code cellGameThemeInstallFromBuffer(ppu_thread& ppu, u32 fileSize, u32 buf const u32 read_size = std::min(bufSize, fileSize - file_offset); cellGame.notice("cellGameThemeInstallFromBuffer: writing %d bytes at pos %d", read_size, file_offset); - if (theme.write(reinterpret_cast(buf.get_ptr()) + file_offset, read_size) != read_size) + if (theme.write(reinterpret_cast(buf.get_ptr()), read_size) != read_size) { cellGame.error("cellGameThemeInstallFromBuffer: failed to write to destination file '%s' (error=%s)", dst_path, fs::g_tls_error); diff --git a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp index a96017b16b..4c219b71b0 100644 --- a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp @@ -98,16 +98,26 @@ u32 gcmGetLocalMemorySize(u32 sdk_version) error_code gcmMapEaIoAddress(ppu_thread& ppu, u32 ea, u32 io, u32 size, bool is_strict); -u32 gcmIoOffsetToAddress(u32 ioOffset) +u32 gcmIoOffsetToAddress(u32 io_offs) { - const u32 upper12Bits = g_fxo->get().offsetTable.eaAddress[ioOffset >> 20]; + u32 upper_12bits = 0; - if (upper12Bits > 0xBFF) + if (io_offs < 0x20000000) { - return 0; + upper_12bits = rsx::get_current_renderer()->iomap_table.ea[io_offs >> 20]; + + if (upper_12bits >= rsx::constants::local_mem_base) + { + upper_12bits = 0; + } } - return (upper12Bits << 20) | (ioOffset & 0xFFFFF); + if (!upper_12bits) + { + cellGcmSys.error("Failed to convert io offset: 0x%x", io_offs); + } + + return upper_12bits | (io_offs & 0xFFFFF); } void InitOffsetTable() @@ -132,15 +142,15 @@ u32 cellGcmGetLabelAddress(u8 index) return rsx::get_current_renderer()->label_addr + 0x10 * index; } -vm::ptr cellGcmGetReportDataAddressLocation(u32 index, u32 location) +vm::ptr cellGcmGetReportDataAddressLocation(ppu_thread& ppu, u32 index, u32 location) { - cellGcmSys.warning("cellGcmGetReportDataAddressLocation(index=%d, location=%d)", index, location); + cellGcmSys.trace("cellGcmGetReportDataAddressLocation(index=%d, location=%d)", index, location); if (location == CELL_GCM_LOCATION_MAIN) { if (index >= 1024 * 1024) { - cellGcmSys.error("cellGcmGetReportDataAddressLocation: Wrong main index (%d)", index); + cellGcmSys.error("%s: Wrong main index (%d)", ppu.current_function, index); } return vm::cast(gcmIoOffsetToAddress(0x0e000000 + index * 0x10)); @@ -150,7 +160,7 @@ vm::ptr cellGcmGetReportDataAddressLocation(u32 index, u32 lo if (index >= 2048) { - cellGcmSys.error("cellGcmGetReportDataAddressLocation: Wrong local index (%d)", index); + cellGcmSys.error("%s: Wrong local index (%d)", ppu.current_function, index); } return vm::cast(rsx::get_current_renderer()->label_addr + ::offset32(&RsxReports::report) + index * 0x10); @@ -225,20 +235,22 @@ u32 cellGcmGetReportDataAddress(u32 index) return rsx::get_current_renderer()->label_addr + ::offset32(&RsxReports::report) + index * 0x10; } -u32 cellGcmGetReportDataLocation(u32 index, u32 location) +u32 cellGcmGetReportDataLocation(ppu_thread& ppu, u32 index, u32 location) { cellGcmSys.warning("cellGcmGetReportDataLocation(index=%d, location=%d)", index, location); - vm::ptr report = cellGcmGetReportDataAddressLocation(index, location); + vm::ptr report = cellGcmGetReportDataAddressLocation(ppu, index, location); return report->value; } -u64 cellGcmGetTimeStampLocation(u32 index, u32 location) +u64 cellGcmGetTimeStampLocation(ppu_thread& ppu, u32 index, u32 location) { - cellGcmSys.warning("cellGcmGetTimeStampLocation(index=%d, location=%d)", index, location); + cellGcmSys.trace("cellGcmGetTimeStampLocation(index=%d, location=%d)", index, location); - // NOTE: No error checkings - return cellGcmGetReportDataAddressLocation(index, location)->timer; + vm::ptr report = cellGcmGetReportDataAddressLocation(ppu, index, location); + + // Timestamp reports don't need host GPU access and are much faster to emulate + return vm::get_super_ptr(report.addr())->timer; } //---------------------------------------------------------------------------- @@ -1508,8 +1520,8 @@ DECLARE(ppu_module_manager::cellGcmSys)("cellGcmSys", []() REG_FUNC(cellGcmSys, cellGcmGetReportDataAddress); REG_FUNC(cellGcmSys, cellGcmGetReportDataAddressLocation); REG_FUNC(cellGcmSys, cellGcmGetReportDataLocation); - REG_FUNC(cellGcmSys, cellGcmGetTimeStamp).flag(MFF_FORCED_HLE); // HLE-ing this allows for optimizations around reports - REG_FUNC(cellGcmSys, cellGcmGetTimeStampLocation); + REG_FUNC(cellGcmSys, cellGcmGetTimeStamp).flag(MFF_FORCED_HLE); // HLE-ing this allows for optimizations around reports + REG_FUNC(cellGcmSys, cellGcmGetTimeStampLocation).flag(MFF_FORCED_HLE); // Ditto // Command Buffer Control REG_FUNC(cellGcmSys, cellGcmGetControlRegister); diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index 2de2d2cd3c..f9f5ea4100 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -770,8 +770,8 @@ namespace gem if constexpr (use_gain) { dst0[0] = static_cast(std::clamp(r * gain_r, 0.0f, 255.0f)); - dst0[1] = static_cast(std::clamp(b * gain_b, 0.0f, 255.0f)); - dst0[2] = static_cast(std::clamp(g * gain_g, 0.0f, 255.0f)); + dst0[1] = static_cast(std::clamp(g * gain_g, 0.0f, 255.0f)); + dst0[2] = static_cast(std::clamp(b * gain_b, 0.0f, 255.0f)); } else { @@ -822,8 +822,8 @@ namespace gem if constexpr (use_gain) { dst0[0] = static_cast(std::clamp(r * gain_r, 0.0f, 255.0f)); - dst0[1] = static_cast(std::clamp(b * gain_b, 0.0f, 255.0f)); - dst0[2] = static_cast(std::clamp(g * gain_g, 0.0f, 255.0f)); + dst0[1] = static_cast(std::clamp(g * gain_g, 0.0f, 255.0f)); + dst0[2] = static_cast(std::clamp(b * gain_b, 0.0f, 255.0f)); } else { @@ -845,6 +845,53 @@ namespace gem debayer_raw8_impl(src, dst, alpha, gain_r, gain_g, gain_b); } + template + static inline void debayer_raw8_downscale_impl(const u8* src, u8* dst, u8 alpha, f32 gain_r, f32 gain_g, f32 gain_b) + { + constexpr u32 in_pitch = 640; + constexpr u32 out_pitch = 320 * 4; + + // Simple debayer + for (s32 y = 0; y < 240; y++) + { + const u8* src0 = src + y * 2 * in_pitch; + const u8* src1 = src0 + in_pitch; + + u8* dst0 = dst + y * out_pitch; + + for (s32 x = 0; x < 320; x++, dst0 += 4, src0 += 2, src1 += 2) + { + const u8 b = src0[0]; + const u8 g0 = src0[1]; + const u8 g1 = src1[0]; + const u8 r = src1[1]; + const u8 g = (g0 + g1) >> 1; + + if constexpr (use_gain) + { + dst0[0] = static_cast(std::clamp(r * gain_r, 0.0f, 255.0f)); + dst0[1] = static_cast(std::clamp(g * gain_g, 0.0f, 255.0f)); + dst0[2] = static_cast(std::clamp(b * gain_b, 0.0f, 255.0f)); + } + else + { + dst0[0] = r; + dst0[1] = g; + dst0[2] = b; + } + dst0[3] = alpha; + } + } + } + + static void debayer_raw8_downscale(const u8* src, u8* dst, u8 alpha, f32 gain_r, f32 gain_g, f32 gain_b) + { + if (gain_r != 1.0f || gain_g != 1.0f || gain_b != 1.0f) + debayer_raw8_downscale_impl(src, dst, alpha, gain_r, gain_g, gain_b); + else + debayer_raw8_downscale_impl(src, dst, alpha, gain_r, gain_g, gain_b); + } + bool convert_image_format(CellCameraFormat input_format, const CellGemVideoConvertAttribute& vc, const std::vector& video_data_in, u32 width, u32 height, u8* video_data_out, u32 video_data_out_size, u8* buffer_memory, @@ -881,9 +928,9 @@ namespace gem const u8* src_data = video_data_in.data(); const u8 alpha = vc.alpha; - const f32 gain_r = vc.gain * vc.blue_gain; + const f32 gain_r = vc.gain * vc.red_gain; const f32 gain_g = vc.gain * vc.green_gain; - const f32 gain_b = vc.gain * vc.red_gain; + const f32 gain_b = vc.gain * vc.blue_gain; // Only RAW8 should be relevant for cellGem unless I'm mistaken if (input_format == CELL_CAMERA_RAW8) @@ -1183,34 +1230,7 @@ namespace gem { case CELL_CAMERA_RAW8: { - const u32 in_pitch = width; - const u32 out_pitch = width * 4 / 2; - - for (u32 y = 0; y < height - 1; y += 2) - { - const u8* src0 = src_data + y * in_pitch; - const u8* src1 = src0 + in_pitch; - - u8* dst0 = video_data_out + (y / 2) * out_pitch; - u8* dst1 = dst0 + out_pitch; - - for (u32 x = 0; x < width - 1; x += 2, src0 += 2, src1 += 2, dst0 += 4, dst1 += 4) - { - const u8 b = src0[0]; - const u8 g0 = src0[1]; - const u8 g1 = src1[0]; - const u8 r = src1[1]; - - const u8 top[4] = { r, g0, b, alpha }; - const u8 bottom[4] = { r, g1, b, alpha }; - - // Top-Left - std::memcpy(dst0, top, 4); - - // Bottom-Left Pixel - std::memcpy(dst1, bottom, 4); - } - } + debayer_raw8_downscale(src_data, video_data_out, alpha, gain_r, gain_g, gain_b); break; } case CELL_CAMERA_RGBA: @@ -1501,8 +1521,15 @@ void gem_config_data::operator()() vc = vc_attribute; } - if (g_cfg.io.camera != camera_handler::qt) + switch (g_cfg.io.camera) { +#ifdef HAVE_SDL3 + case camera_handler::sdl: +#endif + case camera_handler::qt: + break; + case camera_handler::fake: + case camera_handler::null: video_conversion_in_progress = false; done(); continue; @@ -1602,13 +1629,8 @@ public: return false; } - if (!m_camera_info.bytesize) - { - cellGem.error("gem_tracker: unexpected image size: %d", m_camera_info.bytesize); - return false; - } - m_tracker.set_image_data(m_camera_info.buffer.get_ptr(), m_camera_info.bytesize, m_camera_info.width, m_camera_info.height, m_camera_info.format); + m_framenumber++; // using framenumber instead of timestamp since the timestamp could be identical return true; } @@ -1641,6 +1663,7 @@ public: } auto& gem = g_fxo->get(); + u64 last_framenumber = 0; while (thread_ctrl::state() != thread_state::aborting) { @@ -1656,6 +1679,13 @@ public: } } + if (std::exchange(last_framenumber, m_framenumber.load()) == last_framenumber) + { + cellGem.warning("Tracker woke up without new frame. Skipping processing (framenumber=%d)", last_framenumber); + tracker_done(); + continue; + } + m_busy.release(true); // Update PS Move LED colors @@ -1744,9 +1774,16 @@ public: shared_mutex mutex; + gem_tracker& operator=(thread_state) noexcept + { + wake_up_tracker(); + return *this; + } + private: atomic_t m_wake_up_tracker = 0; atomic_t m_tracker_done = 0; + atomic_t m_framenumber = 0; atomic_t m_busy = false; ps_move_tracker m_tracker{}; CellCameraInfoEx m_camera_info{}; @@ -1866,21 +1903,10 @@ static inline void pos_to_gem_state(u32 gem_num, gem_config::gem_controller& con gem_state->pos[2] = controller.distance_mm; gem_state->pos[3] = 0.f; - // TODO: calculate handle position based on our world coordinate and the angles - gem_state->handle_pos[0] = camera_x; - gem_state->handle_pos[1] = camera_y; - gem_state->handle_pos[2] = controller.distance_mm + 10.0f; - gem_state->handle_pos[3] = 0.f; - // Calculate orientation - if (g_cfg.io.move == move_handler::real || (g_cfg.io.move == move_handler::fake && move_data.orientation_enabled)) - { - gem_state->quat[0] = move_data.quaternion.x(); - gem_state->quat[1] = move_data.quaternion.y(); - gem_state->quat[2] = move_data.quaternion.z(); - gem_state->quat[3] = move_data.quaternion.w(); - } - else + ps_move_data::vect<4> quat = move_data.quaternion; + + if (g_cfg.io.move != move_handler::real && !(g_cfg.io.move == move_handler::fake && move_data.orientation_enabled)) { const f32 max_angle_per_side_h = g_cfg.io.fake_move_rotation_cone_h / 2.0f; const f32 max_angle_per_side_v = g_cfg.io.fake_move_rotation_cone_v / 2.0f; @@ -1894,17 +1920,27 @@ static inline void pos_to_gem_state(u32 gem_num, gem_config::gem_controller& con const f32 cy = std::cos(yaw * 0.5f); const f32 sy = std::sin(yaw * 0.5f); - const f32 q_x = sr * cp * cy - cr * sp * sy; - const f32 q_y = cr * sp * cy + sr * cp * sy; - const f32 q_z = cr * cp * sy - sr * sp * cy; - const f32 q_w = cr * cp * cy + sr * sp * sy; - - gem_state->quat[0] = q_x; - gem_state->quat[1] = q_y; - gem_state->quat[2] = q_z; - gem_state->quat[3] = q_w; + quat.x() = sr * cp * cy - cr * sp * sy; + quat.y() = cr * sp * cy + sr * cp * sy; + quat.z() = cr * cp * sy - sr * sp * cy; + quat.w() = cr * cp * cy + sr * sp * sy; } + gem_state->quat[0] = quat.x(); + gem_state->quat[1] = quat.y(); + gem_state->quat[2] = quat.z(); + gem_state->quat[3] = quat.w(); + + // Calculate handle position based on our world coordinate and the current orientation + constexpr ps_move_data::vect<3> offset_local_mm({0.f, 0.f, -45.f}); // handle is ~45 mm below sphere + const ps_move_data::vect<3> offset_world = ps_move_data::rotate_vector(quat, offset_local_mm); + + gem_state->handle_pos[0] = gem_state->pos[0] - offset_world.x(); // Flip x offset + gem_state->handle_pos[1] = gem_state->pos[1] - offset_world.y(); // Flip y offset + gem_state->handle_pos[2] = gem_state->pos[2] + offset_world.z(); + gem_state->handle_pos[3] = 0.f; + + // Calculate velocity if constexpr (!ps_move_data::use_imu_for_velocity) { move_data.update_velocity(shared_data.frame_timestamp_us, gem_state->pos); @@ -1913,6 +1949,10 @@ static inline void pos_to_gem_state(u32 gem_num, gem_config::gem_controller& con { gem_state->vel[i] = move_data.vel_world[i]; gem_state->accel[i] = move_data.accel_world[i]; + + // TODO: maybe this also needs to be adjusted depending on the orientation + gem_state->handle_vel[i] = gem_state->vel[i]; + gem_state->handle_accel[i] = gem_state->accel[i]; } } @@ -3605,7 +3645,7 @@ error_code cellGemReadExternalPortDeviceInfo(u32 gem_num, vm::ptr ext_id, v if (!pad->move_data.external_device_read_requested) { *ext_id = controller.ext_id = pad->move_data.external_device_id; - std::memcpy(pad->move_data.external_device_read.data(), ext_info.get_ptr(), CELL_GEM_EXTERNAL_PORT_OUTPUT_SIZE); + std::memcpy(ext_info.get_ptr(), pad->move_data.external_device_read.data(), CELL_GEM_EXTERNAL_PORT_DEVICE_INFO_SIZE); break; } } @@ -3869,13 +3909,15 @@ error_code cellGemUpdateStart(vm::cptr camera_frame, u64 timestamp) gem.camera_frame = camera_frame.addr(); - if (!tracker.set_image(gem.camera_frame)) + const bool image_set = tracker.set_image(gem.camera_frame); + + tracker.wake_up_tracker(); + + if (!image_set) { return not_an_error(CELL_GEM_NO_VIDEO); } - tracker.wake_up_tracker(); - return CELL_OK; } diff --git a/rpcs3/Emu/Cell/Modules/cellMic.cpp b/rpcs3/Emu/Cell/Modules/cellMic.cpp index 0724b48927..0c58d2ec7e 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMic.cpp @@ -634,7 +634,7 @@ u32 microphone_device::capture_audio() if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR) { cellMic.error("Error getting number of captured samples of device '%s' (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); - return CELL_MICIN_ERROR_FATAL; + return 0; } num_samples = std::min(num_samples, samples_in); diff --git a/rpcs3/Emu/Cell/Modules/cellMic.h b/rpcs3/Emu/Cell/Modules/cellMic.h index 88a2f4d937..a07cec23a8 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.h +++ b/rpcs3/Emu/Cell/Modules/cellMic.h @@ -238,7 +238,7 @@ public: if (over_size > Size) { m_tail += (over_size - Size); - if (m_tail > Size) + if (m_tail >= Size) m_tail -= Size; m_used = Size; diff --git a/rpcs3/Emu/Cell/Modules/cellMusic.cpp b/rpcs3/Emu/Cell/Modules/cellMusic.cpp index 83937f7d16..c23bf274b0 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusic.cpp @@ -215,7 +215,7 @@ error_code cell_music_select_contents() const std::string vfs_dir_path = vfs::get("/dev_hdd0/music"); const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE); - error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, vfs_dir_path, title, + error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, music_selection_context::max_depth, vfs_dir_path, title, [&music](s32 status, utils::media_info info) { sysutil_register_cb([&music, info = std::move(info), status](ppu_thread& ppu) -> s32 diff --git a/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp b/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp index c938f723b1..b7f21b90ad 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp @@ -134,7 +134,7 @@ error_code cell_music_decode_select_contents() const std::string vfs_dir_path = vfs::get("/dev_hdd0/music"); const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE); - error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, vfs_dir_path, title, + error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, music_selection_context::max_depth, vfs_dir_path, title, [&dec](s32 status, utils::media_info info) { sysutil_register_cb([&dec, info = std::move(info), status](ppu_thread& ppu) -> s32 diff --git a/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp b/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp index 97375c4e6d..83b001cc52 100644 --- a/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp +++ b/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp @@ -192,7 +192,46 @@ error_code cellNetCtlDelHandler(s32 hid) error_code cellNetCtlGetInfo(s32 code, vm::ptr info) { - cellNetCtl.warning("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info); + bool log_it_once = false; + + switch (code) + { + case CELL_NET_CTL_INFO_ETHER_ADDR: + case CELL_NET_CTL_INFO_DEVICE: + case CELL_NET_CTL_INFO_MTU: + case CELL_NET_CTL_INFO_LINK_TYPE: + case CELL_NET_CTL_INFO_IP_CONFIG: + case CELL_NET_CTL_INFO_IP_ADDRESS: + case CELL_NET_CTL_INFO_NETMASK: + case CELL_NET_CTL_INFO_DEFAULT_ROUTE: + case CELL_NET_CTL_INFO_HTTP_PROXY_CONFIG: + case CELL_NET_CTL_INFO_UPNP_CONFIG: + { + log_it_once = true; + break; + } + default: + { + break; + } + } + + bool log_it = true; + + if (log_it_once && vm::check_addr(info.addr())) + { + struct logged_t + { + std::array, 256> logged_code{}; + }; + + if (g_fxo->get().logged_code[::narrow(code)].exchange(true)) + { + log_it = false; + } + } + + (log_it ? cellNetCtl.warning : cellNetCtl.trace)("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info); auto& nph = g_fxo->get>(); diff --git a/rpcs3/Emu/Cell/Modules/cellPamf.cpp b/rpcs3/Emu/Cell/Modules/cellPamf.cpp index d63e7bb3e2..4bb383c2d2 100644 --- a/rpcs3/Emu/Cell/Modules/cellPamf.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPamf.cpp @@ -5,14 +5,6 @@ #include #include "cellPamf.h" -const std::function SQUEUE_ALWAYS_EXIT = []() { return true; }; -const std::function SQUEUE_NEVER_EXIT = []() { return false; }; - -bool squeue_test_exit() -{ - return Emu.IsStopped(); -} - LOG_CHANNEL(cellPamf); template<> diff --git a/rpcs3/Emu/Cell/Modules/cellPamf.h b/rpcs3/Emu/Cell/Modules/cellPamf.h index e42acf60f4..14608f9100 100644 --- a/rpcs3/Emu/Cell/Modules/cellPamf.h +++ b/rpcs3/Emu/Cell/Modules/cellPamf.h @@ -1,5 +1,6 @@ #pragma once +#include "Emu/Cell/ErrorCodes.h" #include "Emu/Memory/vm_ptr.h" // Error Codes @@ -594,345 +595,3 @@ struct CellPamfReader CHECK_SIZE(CellPamfReader, 128); error_code cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr pAddr, u64 fileSize, u32 attribute); - -#include -#include - -extern const std::function SQUEUE_ALWAYS_EXIT; -extern const std::function SQUEUE_NEVER_EXIT; - -bool squeue_test_exit(); - -// TODO: eliminate this boolshit -template -class squeue_t -{ - struct squeue_sync_var_t - { - struct - { - u32 position : 31; - u32 pop_lock : 1; - }; - struct - { - u32 count : 31; - u32 push_lock : 1; - }; - }; - - atomic_t m_sync; - - mutable std::mutex m_rcv_mutex; - mutable std::mutex m_wcv_mutex; - mutable std::condition_variable m_rcv; - mutable std::condition_variable m_wcv; - - T m_data[sq_size]; - - enum squeue_sync_var_result : u32 - { - SQSVR_OK = 0, - SQSVR_LOCKED = 1, - SQSVR_FAILED = 2, - }; - -public: - squeue_t() - : m_sync(squeue_sync_var_t{}) - { - } - - static u32 get_max_size() - { - return sq_size; - } - - bool is_full() const - { - return m_sync.load().count == sq_size; - } - - bool push(const T& data, const std::function& test_exit) - { - u32 pos = 0; - - while (u32 res = m_sync.atomic_op([&pos](squeue_sync_var_t& sync) -> u32 - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - - if (sync.push_lock) - { - return SQSVR_LOCKED; - } - if (sync.count == sq_size) - { - return SQSVR_FAILED; - } - - sync.push_lock = 1; - pos = sync.position + sync.count; - return SQSVR_OK; - })) - { - if (res == SQSVR_FAILED && (test_exit() || squeue_test_exit())) - { - return false; - } - - std::unique_lock wcv_lock(m_wcv_mutex); - m_wcv.wait_for(wcv_lock, std::chrono::milliseconds(1)); - } - - m_data[pos >= sq_size ? pos - sq_size : pos] = data; - - m_sync.atomic_op([](squeue_sync_var_t& sync) - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - ensure(!!sync.push_lock); - sync.push_lock = 0; - sync.count++; - }); - - m_rcv.notify_one(); - m_wcv.notify_one(); - return true; - } - - bool push(const T& data, const volatile bool* do_exit) - { - return push(data, [do_exit]() { return do_exit && *do_exit; }); - } - - bool push(const T& data) - { - return push(data, SQUEUE_NEVER_EXIT); - } - - bool try_push(const T& data) - { - return push(data, SQUEUE_ALWAYS_EXIT); - } - - bool pop(T& data, const std::function& test_exit) - { - u32 pos = 0; - - while (u32 res = m_sync.atomic_op([&pos](squeue_sync_var_t& sync) -> u32 - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - - if (!sync.count) - { - return SQSVR_FAILED; - } - if (sync.pop_lock) - { - return SQSVR_LOCKED; - } - - sync.pop_lock = 1; - pos = sync.position; - return SQSVR_OK; - })) - { - if (res == SQSVR_FAILED && (test_exit() || squeue_test_exit())) - { - return false; - } - - std::unique_lock rcv_lock(m_rcv_mutex); - m_rcv.wait_for(rcv_lock, std::chrono::milliseconds(1)); - } - - data = m_data[pos]; - - m_sync.atomic_op([](squeue_sync_var_t& sync) - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - ensure(!!sync.pop_lock); - sync.pop_lock = 0; - sync.position++; - sync.count--; - if (sync.position == sq_size) - { - sync.position = 0; - } - }); - - m_rcv.notify_one(); - m_wcv.notify_one(); - return true; - } - - bool pop(T& data, const volatile bool* do_exit) - { - return pop(data, [do_exit]() { return do_exit && *do_exit; }); - } - - bool pop(T& data) - { - return pop(data, SQUEUE_NEVER_EXIT); - } - - bool try_pop(T& data) - { - return pop(data, SQUEUE_ALWAYS_EXIT); - } - - bool peek(T& data, u32 start_pos, const std::function& test_exit) - { - ensure(start_pos < sq_size); - u32 pos = 0; - - while (u32 res = m_sync.atomic_op([&pos, start_pos](squeue_sync_var_t& sync) -> u32 - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - - if (sync.count <= start_pos) - { - return SQSVR_FAILED; - } - if (sync.pop_lock) - { - return SQSVR_LOCKED; - } - - sync.pop_lock = 1; - pos = sync.position + start_pos; - return SQSVR_OK; - })) - { - if (res == SQSVR_FAILED && (test_exit() || squeue_test_exit())) - { - return false; - } - - std::unique_lock rcv_lock(m_rcv_mutex); - m_rcv.wait_for(rcv_lock, std::chrono::milliseconds(1)); - } - - data = m_data[pos >= sq_size ? pos - sq_size : pos]; - - m_sync.atomic_op([](squeue_sync_var_t& sync) - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - ensure(!!sync.pop_lock); - sync.pop_lock = 0; - }); - - m_rcv.notify_one(); - return true; - } - - bool peek(T& data, u32 start_pos, const volatile bool* do_exit) - { - return peek(data, start_pos, [do_exit]() { return do_exit && *do_exit; }); - } - - bool peek(T& data, u32 start_pos = 0) - { - return peek(data, start_pos, SQUEUE_NEVER_EXIT); - } - - bool try_peek(T& data, u32 start_pos = 0) - { - return peek(data, start_pos, SQUEUE_ALWAYS_EXIT); - } - - class squeue_data_t - { - T* const m_data; - const u32 m_pos; - const u32 m_count; - - squeue_data_t(T* data, u32 pos, u32 count) - : m_data(data) - , m_pos(pos) - , m_count(count) - { - } - - public: - T& operator [] (u32 index) - { - ensure(index < m_count); - index += m_pos; - index = index < sq_size ? index : index - sq_size; - return m_data[index]; - } - }; - - void process(void(*proc)(squeue_data_t data)) - { - u32 pos, count; - - while (m_sync.atomic_op([&pos, &count](squeue_sync_var_t& sync) -> u32 - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - - if (sync.pop_lock || sync.push_lock) - { - return SQSVR_LOCKED; - } - - pos = sync.position; - count = sync.count; - sync.pop_lock = 1; - sync.push_lock = 1; - return SQSVR_OK; - })) - { - std::unique_lock rcv_lock(m_rcv_mutex); - m_rcv.wait_for(rcv_lock, std::chrono::milliseconds(1)); - } - - proc(squeue_data_t(m_data, pos, count)); - - m_sync.atomic_op([](squeue_sync_var_t& sync) - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - ensure(!!sync.pop_lock); - ensure(!!sync.push_lock); - sync.pop_lock = 0; - sync.push_lock = 0; - }); - - m_wcv.notify_one(); - m_rcv.notify_one(); - } - - void clear() - { - while (m_sync.atomic_op([](squeue_sync_var_t& sync) -> u32 - { - ensure(sync.count <= sq_size); - ensure(sync.position < sq_size); - - if (sync.pop_lock || sync.push_lock) - { - return SQSVR_LOCKED; - } - - sync.pop_lock = 1; - sync.push_lock = 1; - return SQSVR_OK; - })) - { - std::unique_lock rcv_lock(m_rcv_mutex); - m_rcv.wait_for(rcv_lock, std::chrono::milliseconds(1)); - } - - m_sync.exchange({}); - m_wcv.notify_one(); - m_rcv.notify_one(); - } -}; diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp index 8a264bc721..473bd435e7 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp @@ -1,5 +1,6 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" +#include "Emu/System.h" #include "Emu/IdManager.h" #include "Emu/VFS.h" #include "cellSysutil.h" @@ -107,30 +108,16 @@ bool check_photo_path(const std::string& file_path) return true; } -std::string get_available_photo_path(const std::string& filename) +std::string get_available_photo_path(std::string_view filename) { - const std::string photo_dir = "/dev_hdd0/photo/"; - std::string dst_path = vfs::get(photo_dir + filename); - - // Do not overwrite existing files. Add a suffix instead. - for (u32 i = 0; fs::exists(dst_path); i++) + std::string_view extension = ".png"; + if (const auto extension_start = filename.find_last_of('.'); + extension_start != umax) { - const std::string suffix = fmt::format("_%d", i); - std::string new_filename = filename; - - if (const usz pos = new_filename.find_last_of('.'); pos != std::string::npos) - { - new_filename.insert(pos, suffix); - } - else - { - new_filename.append(suffix); - } - - dst_path = vfs::get(photo_dir + new_filename); + extension = filename.substr(extension_start); } - return dst_path; + return Emu.GetCallbacks().get_photo_path(fmt::format("%s%s", Emu.GetTitle(), extension)); } diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp index d56db1f060..03f6e147ee 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp @@ -142,7 +142,7 @@ error_code select_photo(std::string dst_dir) const std::string vfs_dir_path = vfs::get("/dev_hdd0/photo"); const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE_PHOTO_IMPORT); - error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::photo, vfs_dir_path, title, + error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::photo, umax, vfs_dir_path, title, [&pi_manager, dst_dir](s32 status, utils::media_info info) { sysutil_register_cb([&pi_manager, dst_dir, info, status](ppu_thread& ppu) -> s32 @@ -176,10 +176,29 @@ error_code select_photo(std::string dst_dir) const std::string filename = info.path.substr(info.path.find_last_of(fs::delim) + 1); const std::string title = info.get_metadata("title", filename); - const std::string dst_path = dst_dir + "/" + filename; + std::string dst_path = dst_dir + "/"; std::string sub_type = info.sub_type; - strcpy_trunc(g_filedata->dstFileName, filename); + // Try to find a unique filename (TODO: how does the PS3 copy the files exactly?) + std::string extension; + std::string dst_filename = filename; + if (const auto extension_start = filename.find_last_of('.'); + extension_start != umax) + { + extension = filename.substr(extension_start); + dst_filename = filename.substr(0, extension_start); + } + + std::string suffix = extension; + u32 counter = 0; + while (!Emu.IsStopped() && fs::is_file(dst_path + dst_filename + suffix)) + { + suffix = fmt::format(" %d%s", ++counter, extension); + } + dst_filename += std::move(suffix); + dst_path += dst_filename; + + strcpy_trunc(g_filedata->dstFileName, dst_filename); strcpy_trunc(g_filedata->photo_title, title); strcpy_trunc(g_filedata->game_title, Emu.GetTitle()); strcpy_trunc(g_filedata->game_comment, ""); // TODO diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index bb99a1f6d6..7878e86642 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -876,39 +876,42 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v // Sort the entries { - const u32 order = setList->sortOrder; const u32 type = setList->sortType; - std::sort(save_entries.begin(), save_entries.end(), [order, type](const SaveDataEntry& entry1, const SaveDataEntry& entry2) -> bool + auto comp = [type](const SaveDataEntry& entry1, const SaveDataEntry& entry2) -> bool { const bool mtime_lower = entry1.mtime < entry2.mtime; const bool mtime_equal = entry1.mtime == entry2.mtime; const bool subtitle_lower = entry1.subtitle < entry2.subtitle; const bool subtitle_equal = entry1.subtitle == entry2.subtitle; - const bool revert_order = order == CELL_SAVEDATA_SORTORDER_DESCENT; if (type == CELL_SAVEDATA_SORTTYPE_MODIFIEDTIME) { if (mtime_equal) { - return subtitle_lower != revert_order; + return subtitle_lower; } - return mtime_lower != revert_order; + return mtime_lower; } else if (type == CELL_SAVEDATA_SORTTYPE_SUBTITLE) { if (subtitle_equal) { - return mtime_lower != revert_order; + return mtime_lower; } - return subtitle_lower != revert_order; + return subtitle_lower; } ensure(false); return true; - }); + }; + + if (setList->sortOrder == CELL_SAVEDATA_SORTORDER_ASCENT) + std::sort(save_entries.begin(), save_entries.end(), comp); + else + std::sort(save_entries.rbegin(), save_entries.rend(), comp); } // Fill the listGet->dirList array @@ -2514,6 +2517,18 @@ error_code cellSaveDataUserFixedDelete(ppu_thread& ppu, u32 userId, PSetList set return savedata_op(ppu, SAVEDATA_OP_FIXED_DELETE, 0, vm::null, 1, setList, setBuf, vm::null, funcFixed, vm::null, vm::null, container, 6, userdata, userId, funcDone); } +error_code cellSaveDataGetEnableOverlay() +{ + cellSaveData.todo("cellSaveDataGetEnableOverlay()"); + + // auto& manager = g_fxo->get(); + // manager.enable_overlay; + + // TODO + + return CELL_OK; +} + void cellSaveDataEnableOverlay(s32 enable) { cellSaveData.notice("cellSaveDataEnableOverlay(enable=%d)", enable); @@ -2521,7 +2536,6 @@ void cellSaveDataEnableOverlay(s32 enable) manager.enable_overlay = enable != 0; } - // Functions (Extensions) error_code cellSaveDataListDelete(ppu_thread& ppu, PSetList setList, PSetBuf setBuf, PFuncList funcList, PFuncDone funcDone, u32 container, vm::ptr userdata) { @@ -2678,6 +2692,7 @@ void cellSysutil_SaveData_init() REG_VAR(cellSysutil, g_savedata_context).flag(MFF_HIDDEN); // libsysutil functions: + REG_FUNC(cellSysutil, cellSaveDataGetEnableOverlay); REG_FUNC(cellSysutil, cellSaveDataEnableOverlay); REG_FUNC(cellSysutil, cellSaveDataDelete2); diff --git a/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp b/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp index b899155dde..060683bdea 100644 --- a/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp +++ b/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp @@ -33,18 +33,12 @@ std::string screenshot_info::get_overlay_path() const std::string screenshot_info::get_photo_title() const { - std::string photo = photo_title; - if (photo.empty()) - photo = Emu.GetTitle(); - return photo; + return photo_title.empty() ? Emu.GetTitle() : photo_title; } std::string screenshot_info::get_game_title() const { - std::string game = game_title; - if (game.empty()) - game = Emu.GetTitle(); - return game; + return game_title.empty() ? Emu.GetTitle() : game_title; } std::string screenshot_info::get_game_comment() const @@ -52,20 +46,6 @@ std::string screenshot_info::get_game_comment() const return game_comment; } -std::string screenshot_info::get_screenshot_path(const std::string& date_path) const -{ - u32 counter = 0; - std::string path = vfs::get("/dev_hdd0/photo/" + date_path + "/" + get_photo_title()); - std::string suffix = ".png"; - - while (!Emu.IsStopped() && fs::is_file(path + suffix)) - { - suffix = fmt::format("_%d.png", ++counter); - } - - return path + suffix; -} - error_code cellScreenShotSetParameter(vm::cptr param) { diff --git a/rpcs3/Emu/Cell/Modules/cellScreenshot.h b/rpcs3/Emu/Cell/Modules/cellScreenshot.h index 20a8d41cc5..e581400dcd 100644 --- a/rpcs3/Emu/Cell/Modules/cellScreenshot.h +++ b/rpcs3/Emu/Cell/Modules/cellScreenshot.h @@ -44,7 +44,6 @@ struct screenshot_info std::string get_photo_title() const; std::string get_game_title() const; std::string get_game_comment() const; - std::string get_screenshot_path(const std::string& date_path) const; }; struct screenshot_manager : public screenshot_info diff --git a/rpcs3/Emu/Cell/Modules/cellSpurs.cpp b/rpcs3/Emu/Cell/Modules/cellSpurs.cpp index c5defbd048..7caee24849 100644 --- a/rpcs3/Emu/Cell/Modules/cellSpurs.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSpurs.cpp @@ -1438,6 +1438,13 @@ s32 cellSpursInitializeWithAttribute2(ppu_thread& ppu, vm::ptr spurs, attr->swlIsPreem); } +// Initialise SPURS +s32 cellSpursInitializeForSpuSharing() +{ + cellSpurs.todo("cellSpursInitializeForSpuSharing()"); + return CELL_OK; +} + /// Initialise SPURS attribute s32 _cellSpursAttributeInitialize(vm::ptr attr, u32 revision, u32 sdkVersion, u32 nSpus, s32 spuPriority, s32 ppuPriority, b8 exitIfNoWork) { @@ -5390,6 +5397,7 @@ DECLARE(ppu_module_manager::cellSpurs)("cellSpurs", [](ppu_static_module* _this) REG_FUNC(cellSpurs, cellSpursInitialize); REG_FUNC(cellSpurs, cellSpursInitializeWithAttribute); REG_FUNC(cellSpurs, cellSpursInitializeWithAttribute2); + REG_FUNC(cellSpurs, cellSpursInitializeForSpuSharing); REG_FUNC(cellSpurs, cellSpursFinalize); REG_FUNC(cellSpurs, _cellSpursAttributeInitialize); REG_FUNC(cellSpurs, cellSpursAttributeSetMemoryContainerForSpuThread); diff --git a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp index 5548a1bbb4..41eae6bb82 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp @@ -406,6 +406,30 @@ error_code cellSysmoduleIsLoadedEx() return CELL_OK; } +error_code cellSysmoduleLoadModuleFile() +{ + UNIMPLEMENTED_FUNC(cellSysmodule); + return CELL_OK; +} + +error_code cellSysmoduleUnloadModuleFile() +{ + UNIMPLEMENTED_FUNC(cellSysmodule); + return CELL_OK; +} + +error_code cellSysmoduleSetDebugmode() +{ + UNIMPLEMENTED_FUNC(cellSysmodule); + return CELL_OK; +} + +error_code cellSysmoduleSetInternalmode() +{ + UNIMPLEMENTED_FUNC(cellSysmodule); + return CELL_OK; +} + DECLARE(ppu_module_manager::cellSysmodule)("cellSysmodule", []() { REG_FUNC(cellSysmodule, cellSysmoduleInitialize); @@ -421,4 +445,8 @@ DECLARE(ppu_module_manager::cellSysmodule)("cellSysmodule", []() REG_FUNC(cellSysmodule, cellSysmoduleUnloadModuleEx); REG_FUNC(cellSysmodule, cellSysmoduleLoadModuleEx); REG_FUNC(cellSysmodule, cellSysmoduleIsLoadedEx); + REG_FUNC(cellSysmodule, cellSysmoduleLoadModuleFile); + REG_FUNC(cellSysmodule, cellSysmoduleUnloadModuleFile); + REG_FUNC(cellSysmodule, cellSysmoduleSetDebugmode); + REG_FUNC(cellSysmodule, cellSysmoduleSetInternalmode); }); diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index 84bb74ad28..3205afd786 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -211,6 +211,7 @@ struct vdec_context final lf_queue in_cmd; AVRational log_time_base{}; // Used to reduce log spam + AVRational log_framerate{}; // Used to reduce log spam vdec_context(s32 type, u32 /*profile*/, u32 addr, u32 size, vm::ptr func, u32 arg) : type(type) @@ -231,6 +232,7 @@ struct vdec_context final codec = avcodec_find_decoder(AV_CODEC_ID_H264); break; } + case CELL_VDEC_CODEC_TYPE_MPEG4: case CELL_VDEC_CODEC_TYPE_DIVX: { codec = avcodec_find_decoder(AV_CODEC_ID_MPEG4); @@ -292,6 +294,19 @@ struct vdec_context final sws_freeContext(sws); } + static u32 freq_to_framerate_code(f64 freq) + { + if (std::abs(freq - 23.976) < 0.002) return CELL_VDEC_FRC_24000DIV1001; + if (std::abs(freq - 24.000) < 0.001) return CELL_VDEC_FRC_24; + if (std::abs(freq - 25.000) < 0.001) return CELL_VDEC_FRC_25; + if (std::abs(freq - 29.970) < 0.002) return CELL_VDEC_FRC_30000DIV1001; + if (std::abs(freq - 30.000) < 0.001) return CELL_VDEC_FRC_30; + if (std::abs(freq - 50.000) < 0.001) return CELL_VDEC_FRC_50; + if (std::abs(freq - 59.940) < 0.002) return CELL_VDEC_FRC_60000DIV1001; + if (std::abs(freq - 60.000) < 0.001) return CELL_VDEC_FRC_60; + return 0; + } + void exec(ppu_thread& ppu, u32 vid) { perf_meter<"VDEC"_u32> perf0; @@ -341,6 +356,7 @@ struct vdec_context final out_queue.clear(); // Flush image queue log_time_base = {}; + log_framerate = {}; frc_set = 0; // TODO: ??? next_pts = 0; @@ -471,10 +487,10 @@ struct vdec_context final frame.userdata = au_usrd; frame.attr = attr; + u64 amend = 0; + if (frc_set) { - u64 amend = 0; - switch (frc_set) { case CELL_VDEC_FRC_24000DIV1001: amend = 1001 * 90000 / 24000; break; @@ -491,62 +507,45 @@ struct vdec_context final } } - next_pts += amend; - next_dts += amend; frame.frc = frc_set; } - else if (ctx->time_base.num == 0) + else if (ctx->time_base.den && ctx->time_base.num) { - if (log_time_base.den != ctx->time_base.den || log_time_base.num != ctx->time_base.num) + const auto freq = 1. * ctx->time_base.den / ctx->time_base.num / ticks_per_frame; + + frame.frc = freq_to_framerate_code(freq); + if (frame.frc) { - cellVdec.error("time_base.num is 0 (handle=0x%x, seq_id=%d, cmd_id=%d, %d/%d, tpf=%d framerate=%d/%d)", handle, cmd->seq_id, cmd->id, ctx->time_base.num, ctx->time_base.den, ticks_per_frame, ctx->framerate.num, ctx->framerate.den); + amend = u64{90000} * ctx->time_base.num * ticks_per_frame / ctx->time_base.den; + } + } + else if (ctx->framerate.den && ctx->framerate.num) + { + const auto freq = ctx->framerate.num / static_cast(ctx->framerate.den); + + frame.frc = freq_to_framerate_code(freq); + if (frame.frc) + { + amend = u64{90000} * ctx->framerate.den / ctx->framerate.num; + } + } + + if (amend == 0 || frame.frc == 0) + { + if (log_time_base.den != ctx->time_base.den || log_time_base.num != ctx->time_base.num || log_framerate.den != ctx->framerate.den || log_framerate.num != ctx->framerate.num) + { + cellVdec.error("Invalid frequency (handle=0x%x, seq_id=%d, cmd_id=%d, timebase=%d/%d, tpf=%d framerate=%d/%d)", handle, cmd->seq_id, cmd->id, ctx->time_base.num, ctx->time_base.den, ticks_per_frame, ctx->framerate.num, ctx->framerate.den); log_time_base = ctx->time_base; + log_framerate = ctx->framerate; } // Hack - const u64 amend = u64{90000} / 30; + amend = u64{90000} / 30; frame.frc = CELL_VDEC_FRC_30; - next_pts += amend; - next_dts += amend; } - else - { - u64 amend = u64{90000} * ctx->time_base.num * ticks_per_frame / ctx->time_base.den; - const auto freq = 1. * ctx->time_base.den / ctx->time_base.num / ticks_per_frame; - if (std::abs(freq - 23.976) < 0.002) - frame.frc = CELL_VDEC_FRC_24000DIV1001; - else if (std::abs(freq - 24.000) < 0.001) - frame.frc = CELL_VDEC_FRC_24; - else if (std::abs(freq - 25.000) < 0.001) - frame.frc = CELL_VDEC_FRC_25; - else if (std::abs(freq - 29.970) < 0.002) - frame.frc = CELL_VDEC_FRC_30000DIV1001; - else if (std::abs(freq - 30.000) < 0.001) - frame.frc = CELL_VDEC_FRC_30; - else if (std::abs(freq - 50.000) < 0.001) - frame.frc = CELL_VDEC_FRC_50; - else if (std::abs(freq - 59.940) < 0.002) - frame.frc = CELL_VDEC_FRC_60000DIV1001; - else if (std::abs(freq - 60.000) < 0.001) - frame.frc = CELL_VDEC_FRC_60; - else - { - if (log_time_base.den != ctx->time_base.den || log_time_base.num != ctx->time_base.num) - { - // 1/1000 usually means that the time stamps are written in 1ms units and that the frame rate may vary. - cellVdec.error("Unsupported time_base (handle=0x%x, seq_id=%d, cmd_id=%d, %d/%d, tpf=%d framerate=%d/%d)", handle, cmd->seq_id, cmd->id, ctx->time_base.num, ctx->time_base.den, ticks_per_frame, ctx->framerate.num, ctx->framerate.den); - log_time_base = ctx->time_base; - } - - // Hack - amend = u64{90000} / 30; - frame.frc = CELL_VDEC_FRC_30; - } - - next_pts += amend; - next_dts += amend; - } + next_pts += amend; + next_dts += amend; cellVdec.trace("Got picture (handle=0x%x, seq_id=%d, cmd_id=%d, pts=0x%llx[0x%llx], dts=0x%llx[0x%llx])", handle, cmd->seq_id, cmd->id, frame.pts, frame->pts, frame.dts, frame->pkt_dts); @@ -680,7 +679,15 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { cellVdec.warning("cellVdecQueryAttr: AVC (profile=%d)", profile); - //const vm::ptr sinfo = vm::cast(spec_addr); + const vm::ptr sinfo = vm::cast(spec_addr); + + if (sinfo) + { + if (sinfo->thisSize != sizeof(CellVdecAvcSpecificInfo)) + { + return { CELL_VDEC_ERROR_ARG, "Invalid AVC specific info size %d", sinfo->thisSize }; + } + } // TODO: sinfo @@ -699,7 +706,7 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 case CELL_VDEC_AVC_LEVEL_4P0: memSize = new_sdk ? 0x33A5FFD : 0x36A527D; break; case CELL_VDEC_AVC_LEVEL_4P1: memSize = new_sdk ? 0x33A5FFD : 0x36A527D; break; case CELL_VDEC_AVC_LEVEL_4P2: memSize = new_sdk ? 0x33A5FFD : 0x36A527D; break; - default: return CELL_VDEC_ERROR_ARG; + default: return { CELL_VDEC_ERROR_ARG, "Invalid AVC profile level %d", profile }; } decoderVerLower = 0x11300; @@ -715,12 +722,10 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { if (sinfo->thisSize != sizeof(CellVdecMpeg2SpecificInfo)) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid MPEG2 specific info size %d", sinfo->thisSize }; } } - // TODO: sinfo - const u32 maxDecH = sinfo ? +sinfo->maxDecodedFrameHeight : 0; const u32 maxDecW = sinfo ? +sinfo->maxDecodedFrameWidth : 0; @@ -730,7 +735,7 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { if (maxDecW > 352 || maxDecH > 288) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; } memSize = new_sdk ? 0x11290B : 0x2A610B; @@ -740,7 +745,7 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { if (maxDecW > 720 || maxDecH > 576) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; } memSize = new_sdk ? 0x2DFB8B : 0x47110B; @@ -750,7 +755,7 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { if (maxDecW > 1440 || maxDecH > 1152) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; } memSize = new_sdk ? 0xA0270B : 0xB8F90B; @@ -760,18 +765,94 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { if (maxDecW > 1920 || maxDecH > 1152) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; } memSize = new_sdk ? 0xD2F40B : 0xEB990B; break; } - default: return CELL_VDEC_ERROR_ARG; + default: return { CELL_VDEC_ERROR_ARG, "Invalid MPEG2 profile %d", profile }; } decoderVerLower = 0x1030000; break; } + case CELL_VDEC_CODEC_TYPE_MPEG4: + { + cellVdec.warning("cellVdecQueryAttr: MPEG4 (profile=%d)", profile); + + const vm::ptr sinfo = vm::cast(spec_addr); + + if (sinfo) + { + if (sinfo->thisSize != sizeof(CellVdecMpeg4SpecificInfo)) + { + return { CELL_VDEC_ERROR_ARG, "Invalid MPEG4 specific info size %d", sinfo->thisSize }; + } + } + + const u32 maxDecH = sinfo ? +sinfo->maxDecodedFrameHeight : 0; + const u32 maxDecW = sinfo ? +sinfo->maxDecodedFrameWidth : 0; + + switch (profile) + { + case CELL_VDEC_MPEG4_SP_L1: + { + if (maxDecW > 176 || maxDecH > 144) + { + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; + } + + memSize = new_sdk ? 0x8B78B : 0xBB70B; + break; + } + case CELL_VDEC_MPEG4_SP_L2: + case CELL_VDEC_MPEG4_SP_L3: + { + if (maxDecW > 352 || maxDecH > 288) + { + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; + } + + memSize = new_sdk ? 0xEFE0B : 0x11FD8B; + break; + } + case CELL_VDEC_MPEG4_SP_D1_NTSC: + { + if (maxDecW > 720 || maxDecH > 480) + { + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; + } + + memSize = new_sdk ? 0x22DB0B : 0x25DA8B; + break; + } + case CELL_VDEC_MPEG4_SP_VGA: + { + if (maxDecW > 640 || maxDecH > 480) + { + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; + } + + memSize = new_sdk ? 0x1FC00B : 0x22BF8B; + break; + } + case CELL_VDEC_MPEG4_SP_D1_PAL: + { + if (maxDecW > 720 || maxDecH > 576) + { + return { CELL_VDEC_ERROR_ARG, "Invalid max decoded frame size %dx%d for profile %d", maxDecH, maxDecW, profile }; + } + + memSize = new_sdk ? 0x28570B : 0x2B568B; + break; + } + default: return { CELL_VDEC_ERROR_ARG, "Invalid MPEG4 profile %d", profile }; + } + + decoderVerLower = 0x1080000; + break; + } case CELL_VDEC_CODEC_TYPE_DIVX: { cellVdec.warning("cellVdecQueryAttr: DivX (profile=%d)", profile); @@ -780,9 +861,9 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 if (sinfo) { - if (sinfo->thisSize != sizeof(CellVdecDivxSpecificInfo2)) + if (sinfo->thisSize != sizeof(CellVdecDivxSpecificInfo) && sinfo->thisSize != sizeof(CellVdecDivxSpecificInfo2)) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid DIVX specific info size %d", sinfo->thisSize }; } } @@ -790,7 +871,7 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 //const u32 maxDecH = sinfo ? +sinfo->maxDecodedFrameHeight : 0; //const u32 maxDecW = sinfo ? +sinfo->maxDecodedFrameWidth : 0; - u32 nrOfBuf = sinfo ? +sinfo->numberOfDecodedFrameBuffer : 0; + u32 nrOfBuf = sinfo && sinfo->thisSize == sizeof(CellVdecDivxSpecificInfo2) ? +sinfo->numberOfDecodedFrameBuffer : 0; if (nrOfBuf == 0) { @@ -800,12 +881,12 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 { if (profile != CELL_VDEC_DIVX_QMOBILE && profile != CELL_VDEC_DIVX_MOBILE) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid number of decoded frame buffers %d for DIVX profile %d", nrOfBuf, profile }; } } else if (nrOfBuf != 4 && nrOfBuf != 3) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "Invalid number of decoded frame buffers %d for DIVX", nrOfBuf }; } // TODO: change memSize based on buffercount. @@ -817,13 +898,13 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0 case CELL_VDEC_DIVX_HOME_THEATER: memSize = new_sdk ? 0x386A60 : 0x498060; break; case CELL_VDEC_DIVX_HD_720 : memSize = new_sdk ? 0x692070 : 0x805690; break; case CELL_VDEC_DIVX_HD_1080 : memSize = new_sdk ? 0xD78100 : 0xFC9870; break; - default: return CELL_VDEC_ERROR_ARG; + default: return { CELL_VDEC_ERROR_ARG, "Invalid DIVX profile %d", profile }; } decoderVerLower = 0x30806; break; } - default: return CELL_VDEC_ERROR_ARG; + default: return { CELL_VDEC_ERROR_ARG, "Invalid codec type %d", type }; } attr->decoderVerLower = decoderVerLower; @@ -839,7 +920,7 @@ error_code cellVdecQueryAttr(vm::cptr type, vm::ptr if (!type || !attr) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "type=%d, attr=%d", !!type, !!attr }; } return vdecQueryAttr(type->codecType, type->profileLevel, 0, attr.get_ptr()); @@ -851,7 +932,7 @@ error_code cellVdecQueryAttrEx(vm::cptr type, vm::ptrcodecType, type->profileLevel, type->codecSpecificInfo_addr, attr.get_ptr()); @@ -862,13 +943,14 @@ static error_code vdecOpen(ppu_thread& ppu, T type, U res, vm::cptr { if (!type || !res || !cb || !handle || !cb->cbFunc) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "type=%d, res=%d, cb=%d, handle=%d, cbFunc=%d", !!type, !!res, !!cb, !!handle, cb && cb->cbFunc }; } if (!res->memAddr || res->ppuThreadPriority + 0u >= 3072 || res->spuThreadPriority + 0u >= 256 || res->ppuThreadStackSize < 4096 || type->codecType + 0u >= 0xe) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "memAddr=%d, ppuThreadPriority=%d, spuThreadPriority=%d, ppuThreadStackSize=%d, codecType=%d", + res->memAddr, res->ppuThreadPriority, res->spuThreadPriority, res->ppuThreadStackSize, type->codecType }; } u32 spec_addr = 0; @@ -878,11 +960,16 @@ static error_code vdecOpen(ppu_thread& ppu, T type, U res, vm::cptr spec_addr = type->codecSpecificInfo_addr; } - if (CellVdecAttr attr{}; - vdecQueryAttr(type->codecType, type->profileLevel, spec_addr, &attr) != CELL_OK || - attr.memSize > res->memSize) + CellVdecAttr attr{}; + const error_code err = vdecQueryAttr(type->codecType, type->profileLevel, spec_addr, &attr); + if (err != CELL_OK) { - return CELL_VDEC_ERROR_ARG; + return err; + } + + if (attr.memSize > res->memSize) + { + return { CELL_VDEC_ERROR_ARG, "attr.memSize=%d, res->memSize=%d", attr.memSize, res->memSize }; } // Create decoder context @@ -953,7 +1040,7 @@ error_code cellVdecClose(ppu_thread& ppu, u32 handle) if (!vdec) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "vdec is nullptr" }; } { @@ -991,7 +1078,7 @@ error_code cellVdecClose(ppu_thread& ppu, u32 handle) if (!idm::remove_verify(handle, std::move(vdec))) { // Other thread removed it beforehead - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "remove_verify failed" }; } return CELL_OK; @@ -1007,7 +1094,7 @@ error_code cellVdecStartSeq(ppu_thread& ppu, u32 handle) if (!vdec) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "vdec is nullptr" }; } sequence_state old_state{}; @@ -1059,7 +1146,7 @@ error_code cellVdecEndSeq(ppu_thread& ppu, u32 handle) if (!vdec) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "vdec is nullptr" }; } { @@ -1109,8 +1196,7 @@ error_code cellVdecDecodeAu(ppu_thread& ppu, u32 handle, CellVdecDecodeMode mode return { CELL_VDEC_ERROR_ARG, "mode=%d", +mode }; } - // TODO: what does the 3 stand for ? - if ((mode == (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP) && vdec->type != 3) || + if ((mode == (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP) && vdec->type != CELL_VDEC_CODEC_TYPE_VC1) || (mode == CELL_VDEC_DEC_MODE_PB_SKIP && vdec->type != CELL_VDEC_CODEC_TYPE_AVC)) { return { CELL_VDEC_ERROR_ARG, "mode=%d, type=%d", +mode, vdec->type }; @@ -1157,8 +1243,7 @@ error_code cellVdecDecodeAuEx2(ppu_thread& ppu, u32 handle, CellVdecDecodeMode m return { CELL_VDEC_ERROR_ARG, "mode=%d", +mode }; } - // TODO: what does the 3 stand for ? - if ((mode == (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP) && vdec->type != 3) || + if ((mode == (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP) && vdec->type != CELL_VDEC_CODEC_TYPE_VC1) || (mode == CELL_VDEC_DEC_MODE_PB_SKIP && vdec->type != CELL_VDEC_CODEC_TYPE_AVC)) { return { CELL_VDEC_ERROR_ARG, "mode=%d, type=%d", +mode, vdec->type }; @@ -1196,7 +1281,7 @@ error_code cellVdecGetPictureExt(ppu_thread& ppu, u32 handle, vm::cptrformatType > 4 || (format->formatType <= CELL_VDEC_PICFMT_RGBA32_ILV && format->colorMatrixType > CELL_VDEC_COLOR_MATRIX_TYPE_BT709)) { - return CELL_VDEC_ERROR_ARG; + return {CELL_VDEC_ERROR_ARG, "formatType=%d, colorMatrixType=%d", +format->formatType, +format->colorMatrixType}; } if (arg4 && arg4 != 8 && arg4 != 0xc) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "arg4=0x%x", arg4 }; } if (arg4 || format->unk0 || format->unk1) @@ -1335,7 +1420,7 @@ error_code cellVdecGetPicture(ppu_thread& ppu, u32 handle, vm::cptr format2; @@ -1358,7 +1443,7 @@ error_code cellVdecGetPicItem(ppu_thread& ppu, u32 handle, vm::pptr picInfo; + union + { + CellVdecAvcInfo avcInfo; + CellVdecDivxInfo divxInfo; + CellVdecMpeg2Info mpeg2Info; + } picInfo; }; AVFrame* frame{}; @@ -1510,7 +1600,8 @@ error_code cellVdecGetPicItem(ppu_thread& ppu, u32 handle, vm::pptrreserved[0] = 0; avc->reserved[1] = 0; } - else if (vdec->type == CELL_VDEC_CODEC_TYPE_DIVX) + // TODO: handle MPEG4 properly + else if (vdec->type == CELL_VDEC_CODEC_TYPE_MPEG4 || vdec->type == CELL_VDEC_CODEC_TYPE_DIVX) { const vm::ptr dvx = picinfo_addr; @@ -1601,7 +1692,7 @@ error_code cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frameRateCode) // 0x80 seems like a common prefix if (!vdec || (frameRateCode & 0xf8) != 0x80) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "vdec=%d, frameRateCode=0x%x", !!vdec, +frameRateCode }; } std::lock_guard lock{vdec->mutex}; @@ -1625,7 +1716,7 @@ error_code cellVdecOpenExt(ppu_thread& ppu, vm::cptr type, vm::cpt if (!res) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "res is nullptr" }; } vm::var tmp = vm::make_var({}); @@ -1678,7 +1769,7 @@ error_code cellVdecSetPts(u32 handle, vm::ptr unk) if (!vdec || !unk) { - return CELL_VDEC_ERROR_ARG; + return { CELL_VDEC_ERROR_ARG, "vdec=%d, unk=%d", !!vdec, !!unk }; } std::lock_guard lock{vdec->mutex}; diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.h b/rpcs3/Emu/Cell/Modules/cellVdec.h index 9f30b7d1b0..a1f9c3ae50 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.h +++ b/rpcs3/Emu/Cell/Modules/cellVdec.h @@ -14,9 +14,15 @@ enum CellVdecError : u32 enum CellVdecCodecType : s32 { - CELL_VDEC_CODEC_TYPE_MPEG2 = 0, - CELL_VDEC_CODEC_TYPE_AVC = 1, - CELL_VDEC_CODEC_TYPE_DIVX = 5, + CELL_VDEC_CODEC_TYPE_MPEG2 = 0, + CELL_VDEC_CODEC_TYPE_AVC = 1, + CELL_VDEC_CODEC_TYPE_MPEG4 = 2, + CELL_VDEC_CODEC_TYPE_VC1 = 3, + CELL_VDEC_CODEC_TYPE_DIVX = 5, + CELL_VDEC_CODEC_TYPE_JVT = 7, + CELL_VDEC_CODEC_TYPE_DIVX3_11 = 9, + CELL_VDEC_CODEC_TYPE_MVC = 11, + CELL_VDEC_CODEC_TYPE_MVC2 = 13, // seems the same as CELL_VDEC_CODEC_TYPE_MVC? CELL_VDEC_CODEC_TYPE_MAX }; @@ -672,3 +678,20 @@ struct CellVdecMpeg2Info u8 ccData[2][128]; be_t reserved[2]; }; + +enum MPEG4_level +{ + CELL_VDEC_MPEG4_SP_L1, + CELL_VDEC_MPEG4_SP_L2, + CELL_VDEC_MPEG4_SP_L3, + CELL_VDEC_MPEG4_SP_D1_NTSC, + CELL_VDEC_MPEG4_SP_VGA, + CELL_VDEC_MPEG4_SP_D1_PAL, +}; + +struct CellVdecMpeg4SpecificInfo +{ + be_t thisSize; + be_t maxDecodedFrameWidth; + be_t maxDecodedFrameHeight; +}; diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index beb6c2da91..e82491eac1 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -745,7 +745,7 @@ error_code sceNpDrmIsAvailable(ppu_thread& ppu, vm::cptr k_licensee_addr, vm lv2_obj::sleep(ppu); const auto ret = npDrmIsAvailable(k_licensee_addr, drm_path); - lv2_sleep(25'000, &ppu); + lv2_sleep(5'000, &ppu); return ret; } @@ -871,7 +871,7 @@ error_code sceNpDrmGetTimelimit(vm::cptr path, vm::ptr time_remain) } // Convert time to milliseconds - s64 msec = *sec * 1000ll + *nsec / 1000ll; + s64 msec = *sec * 1000ll + *nsec / 1'000'000ll; // Return the remaining time in microseconds if (npd.activate_time != 0 && msec < npd.activate_time) @@ -1118,10 +1118,35 @@ error_code sceNpBasicSetPresenceDetails2(vm::cptr pr return CELL_OK; } -error_code sceNpBasicSendMessage(vm::cptr to, vm::cptr data, u32 size) -{ - sceNp.warning("sceNpBasicSendMessage(to=*0x%x, data=*0x%x, size=%d)", to, data, size); +u64 sys_time_get_system_time(); +error_code acquire_time_slot(u64* time_array, usz array_size, u64 slot_duration) +{ + static shared_mutex mutex; + std::lock_guard lock(mutex); + + const u64 current_time = sys_time_get_system_time(); + + for (usz index = 0; index < array_size; index++) + { + if (time_array[index] == 0) + { + time_array[index] = current_time; + return CELL_OK; + } + + if (current_time > (time_array[index] + slot_duration)) + { + time_array[index] = current_time; + return CELL_OK; + } + } + + return SCE_NP_BASIC_ERROR_BUSY; +} + +error_code _sceNpBasicSendMessage(vm::cptr to, vm::cptr data, u32 size, bool rate_limited) +{ auto& nph = g_fxo->get>(); if (!nph.is_NP_init) @@ -1144,6 +1169,23 @@ error_code sceNpBasicSendMessage(vm::cptr to, vm::cptr data, u32 return SCE_NP_BASIC_ERROR_EXCEEDS_MAX; } + if (rate_limited) + { + struct sceNpBasicSendMessage_time_slots + { + sceNpBasicSendMessage_time_slots() = default; + sceNpBasicSendMessage_time_slots(sceNpBasicSendMessage_time_slots&&) = delete; + std::array data{}; + }; + + auto& time_slots = g_fxo->get(); + + if (auto error = acquire_time_slot(time_slots.data.data(), time_slots.data.size(), 60000000); error != CELL_OK) + { + return error; + } + } + if (nph.get_psn_status() != SCE_NP_MANAGER_STATUS_ONLINE) { return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED); @@ -1157,13 +1199,26 @@ error_code sceNpBasicSendMessage(vm::cptr to, vm::cptr data, u32 .msgFeatures = {}, .data = std::vector(static_cast(data.get_ptr()), static_cast(data.get_ptr()) + size)}; std::set npids; - npids.insert(std::string(to->handle.data)); + npids.insert(np::npid_to_string(*to)); nph.send_message(msg_data, npids); return CELL_OK; } +error_code sceNpBasicSendMessage(vm::cptr to, vm::cptr data, u32 size) +{ + sceNp.warning("sceNpBasicSendMessage(to=*0x%x, data=*0x%x, size=%d)", to, data, size); + return _sceNpBasicSendMessage(to, data, size, false); +} + +// This function is sceNpBasicSendMessage + a rate limiter that will return SCE_NP_BASIC_ERROR_BUSY if it too many messages have been sent +error_code sceNpBasicLimited_0xEB42E2E6(vm::cptr to, vm::cptr data, u32 size) +{ + sceNp.warning("sceNpBasicLimited_0xEB42E2E6(to=*0x%x, data=*0x%x, size=%d)", to, data, size); + return _sceNpBasicSendMessage(to, data, size, true); +} + error_code sceNpBasicSendMessageGui(ppu_thread& ppu, vm::cptr msg, sys_memory_container_t containerId) { sceNp.warning("sceNpBasicSendMessageGui(msg=*0x%x, containerId=%d)", msg, containerId); @@ -1173,7 +1228,7 @@ error_code sceNpBasicSendMessageGui(ppu_thread& ppu, vm::cptrmsgId, msg->mainType, msg->subType, msg->msgFeatures, msg->count, msg->npids); for (u32 i = 0; i < msg->count && msg->npids; i++) { - sceNp.trace("sceNpBasicSendMessageGui: NpId[%d] = %s", i, static_cast(&msg->npids[i].handle.data[0])); + sceNp.trace("sceNpBasicSendMessageGui: NpId[%d] = %s", i, np::npid_to_string(msg->npids[i])); } sceNp.notice("sceNpBasicSendMessageGui: subject: %s", msg->subject); sceNp.notice("sceNpBasicSendMessageGui: body: %s", msg->body); @@ -1343,7 +1398,7 @@ error_code sceNpBasicSendMessageGui(ppu_thread& ppu, vm::cptrcount; i++) { - npids.insert(std::string(msg->npids[i].handle.data)); + npids.insert(np::npid_to_string(msg->npids[i])); } } @@ -3433,7 +3488,7 @@ error_code sceNpLookupUserProfile(s32 transId, vm::cptr npId, vm::ptr npId, vm::ptr userInfo, vm::ptr aboutMe, vm::ptr languages, vm::ptr countryCode, vm::ptr avatarImage, s32 prio, vm::ptr option) { - sceNp.todo("sceNpLookupUserProfile(transId=%d, npId=*0x%x, userInfo=*0x%x, aboutMe=*0x%x, languages=*0x%x, countryCode=*0x%x, avatarImage=*0x%x, prio=%d, option=*0x%x)", transId, npId, userInfo, + sceNp.todo("sceNpLookupUserProfileAsync(transId=%d, npId=*0x%x, userInfo=*0x%x, aboutMe=*0x%x, languages=*0x%x, countryCode=*0x%x, avatarImage=*0x%x, prio=%d, option=*0x%x)", transId, npId, userInfo, aboutMe, languages, countryCode, avatarImage, prio, option); auto& nph = g_fxo->get>(); @@ -4187,19 +4242,16 @@ error_code sceNpManagerGetTicket(vm::ptr buffer, vm::ptr bufferSize) } const auto& ticket = nph.get_ticket(); - *bufferSize = static_cast(ticket.size()); if (!buffer) { + *bufferSize = static_cast(ticket.size()); return CELL_OK; } - if (*bufferSize < ticket.size()) - { - return SCE_NP_ERROR_INVALID_ARGUMENT; - } - - memcpy(buffer.get_ptr(), ticket.data(), ticket.size()); + const u32 size_read = std::min(::size32(ticket), static_cast(*bufferSize)); + std::memcpy(buffer.get_ptr(), ticket.data(), size_read); + *bufferSize = size_read; return CELL_OK; } @@ -5621,7 +5673,7 @@ error_code scenp_score_record_score(s32 transId, SceNpScoreBoardId boardId, SceN else { data = &gameInfo->nativeData[0]; - data_size = 64; + data_size = sizeof(gameInfo->nativeData); } nph.record_score(trans_ctx, boardId, score, scoreComment, data, data_size, tmpRank, async); @@ -7089,7 +7141,7 @@ error_code sceNpUtilCanonicalizeNpIdForPsp(vm::ptr npId) error_code sceNpUtilCmpNpId(vm::ptr id1, vm::ptr id2) { - sceNp.trace("sceNpUtilCmpNpId(id1=*0x%x(%s), id2=*0x%x(%s))", id1, id1 ? id1->handle.data : "", id2, id2 ? id2->handle.data : ""); + sceNp.trace("sceNpUtilCmpNpId(id1=*0x%x(%s), id2=*0x%x(%s))", id1, id1 ? np::npid_to_string(*id1) : std::string(), id2, id2 ? np::npid_to_string(*id2) : std::string()); if (!id1 || !id2) { @@ -7289,6 +7341,11 @@ s32 _Z32_sce_np_sysutil_cxml_prepare_docPN16sysutil_cxmlutil11FixedMemoryERN4cxm return CELL_OK; } +DECLARE(ppu_module_manager::sceNpBasicLimited) +("sceNpBasicLimited", []() { + ppu_module_manager::register_static_function<&sceNpBasicLimited_0xEB42E2E6>("sceNpBasicLimited", ppu_select_name("sceNpBasicLimited", "sceNpBasicLimited_0xEB42E2E6"), BIND_FUNC_WITH_BLR(sceNpBasicLimited_0xEB42E2E6, "sceNpBasicLimited"), 0xEB42E2E6); +}); + DECLARE(ppu_module_manager::sceNp) ("sceNp", []() { REG_FUNC(sceNp, sceNpInit); diff --git a/rpcs3/Emu/Cell/Modules/sceNp.h b/rpcs3/Emu/Cell/Modules/sceNp.h index 6f29a2f8a9..e6b8bff945 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.h +++ b/rpcs3/Emu/Cell/Modules/sceNp.h @@ -1265,8 +1265,13 @@ struct SceNpCommunicationId // OnlineId structure struct SceNpOnlineId { - char data[16 + 1]; // char term; + char data[SCE_NET_NP_ONLINEID_MAX_LENGTH + 1]; // char term; char dummy[3]; + + bool operator<(const SceNpOnlineId& other) const + { + return memcmp(data, other.data, sizeof(data)) < 0; + } }; // NP ID structure @@ -1283,6 +1288,11 @@ struct SceNpId }; u8 reserved[8]; + + bool operator<(const SceNpId& other) const + { + return handle < other.handle; + } }; CHECK_SIZE_ALIGN(SceNpId, 0x24, 1); @@ -1397,9 +1407,9 @@ struct SceNpBasicMessageDetails // Presence details of an user struct SceNpBasicPresenceDetails { - s8 title[SCE_NP_BASIC_PRESENCE_TITLE_SIZE_MAX]; - s8 status[SCE_NP_BASIC_PRESENCE_STATUS_SIZE_MAX]; - s8 comment[SCE_NP_BASIC_PRESENCE_COMMENT_SIZE_MAX]; + char title[SCE_NP_BASIC_PRESENCE_TITLE_SIZE_MAX]; + char status[SCE_NP_BASIC_PRESENCE_STATUS_SIZE_MAX]; + char comment[SCE_NP_BASIC_PRESENCE_COMMENT_SIZE_MAX]; u8 data[SCE_NP_BASIC_MAX_PRESENCE_SIZE]; be_t size; be_t state; @@ -1410,9 +1420,9 @@ struct SceNpBasicPresenceDetails2 { be_t struct_size; be_t state; - s8 title[SCE_NP_BASIC_PRESENCE_TITLE_SIZE_MAX]; - s8 status[SCE_NP_BASIC_PRESENCE_EXTENDED_STATUS_SIZE_MAX]; - s8 comment[SCE_NP_BASIC_PRESENCE_COMMENT_SIZE_MAX]; + char title[SCE_NP_BASIC_PRESENCE_TITLE_SIZE_MAX]; + char status[SCE_NP_BASIC_PRESENCE_EXTENDED_STATUS_SIZE_MAX]; + char comment[SCE_NP_BASIC_PRESENCE_COMMENT_SIZE_MAX]; u8 data[SCE_NP_BASIC_MAX_PRESENCE_SIZE]; be_t size; }; @@ -1420,9 +1430,9 @@ struct SceNpBasicPresenceDetails2 // Country/region code struct SceNpCountryCode { - s8 data[2]; - s8 term; - s8 padding[1]; + char data[2]; + char term; + char padding[1]; }; // Date information @@ -1451,8 +1461,8 @@ struct SceNpScoreGameInfo // Ranking comment structure struct SceNpScoreComment { - s8 data[SCE_NP_SCORE_COMMENT_MAXLEN]; - s8 term[1]; + char data[SCE_NP_SCORE_COMMENT_MAXLEN]; + char term[1]; }; // Ranking information structure @@ -1524,15 +1534,15 @@ struct SceNpScoreNpIdPcId // Basic clan information to be used in raking struct SceNpScoreClanBasicInfo { - s8 clanName[SCE_NP_CLANS_CLAN_NAME_MAX_LENGTH + 1]; - s8 clanTag[SCE_NP_CLANS_CLAN_TAG_MAX_LENGTH + 1]; + char clanName[SCE_NP_CLANS_CLAN_NAME_MAX_LENGTH + 1]; + char clanTag[SCE_NP_CLANS_CLAN_TAG_MAX_LENGTH + 1]; u8 reserved[10]; }; // Clan member information handled in ranking struct SceNpScoreClansMemberDescription { - s8 description[SCE_NP_CLANS_CLAN_DESCRIPTION_MAX_LENGTH + 1]; + char description[SCE_NP_CLANS_CLAN_DESCRIPTION_MAX_LENGTH + 1]; }; // Clan ranking information @@ -1689,12 +1699,22 @@ struct SceNpLobbyId { u8 opt[28]; u8 reserved[8]; + + bool operator<(const SceNpLobbyId& other) const + { + return memcmp(opt, other.opt, sizeof(opt)) < 0; + } }; struct SceNpRoomId { u8 opt[28]; u8 reserved[8]; + + bool operator<(const SceNpRoomId& other) const + { + return memcmp(opt, other.opt, sizeof(opt)) < 0; + } }; struct SceNpMatchingAttr diff --git a/rpcs3/Emu/Cell/Modules/sceNp2.cpp b/rpcs3/Emu/Cell/Modules/sceNp2.cpp index 820fbdf1c0..7809676078 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp2.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp2.cpp @@ -616,9 +616,9 @@ error_code sceNpMatching2CreateServerContext( return CELL_OK; } -error_code sceNpMatching2GetMemoryInfo(vm::ptr memInfo) // TODO +error_code sceNpMatching2GetMemoryInfo(vm::ptr memInfo) { - sceNp2.todo("sceNpMatching2GetMemoryInfo(memInfo=*0x%x)", memInfo); + sceNp2.warning("sceNpMatching2GetMemoryInfo(memInfo=*0x%x)", memInfo); auto& nph = g_fxo->get>(); @@ -627,6 +627,14 @@ error_code sceNpMatching2GetMemoryInfo(vm::ptr memInfo return SCE_NP_MATCHING2_ERROR_NOT_INITIALIZED; } + if (!memInfo) + { + return SCE_NP_MATCHING2_ERROR_INVALID_ARGUMENT; + } + + SceNpMatching2MemoryInfo mem_info = nph.get_memory_info(); + *memInfo = mem_info; + return CELL_OK; } @@ -790,7 +798,7 @@ error_code sceNpMatching2JoinLobby( error_code sceNpMatching2GetRoomMemberDataExternalList(SceNpMatching2ContextId ctxId, vm::cptr reqParam, vm::cptr optParam, vm::ptr assignedReqId) { - sceNp2.todo("sceNpMatching2GetRoomMemberDataExternalList(ctxId=%d, reqParam=*0x%x, optParam=*0x%x, assignedReqId=*0x%x)", ctxId, reqParam, optParam, assignedReqId); + sceNp2.warning("sceNpMatching2GetRoomMemberDataExternalList(ctxId=%d, reqParam=*0x%x, optParam=*0x%x, assignedReqId=*0x%x)", ctxId, reqParam, optParam, assignedReqId); auto& nph = g_fxo->get>(); if (auto res = generic_match2_error_check(nph, ctxId, reqParam); res != CELL_OK) @@ -798,6 +806,13 @@ error_code sceNpMatching2GetRoomMemberDataExternalList(SceNpMatching2ContextId c return res; } + const u32 request_id = nph.get_room_member_data_external_list(ctxId, optParam, reqParam.get_ptr()); + + if (assignedReqId) + { + *assignedReqId = request_id; + } + return CELL_OK; } @@ -1056,7 +1071,7 @@ error_code sceNpMatching2GetRoomMemberDataInternalLocal(SceNpMatching2ContextId error_code sceNpMatching2GetCbQueueInfo(SceNpMatching2ContextId ctxId, vm::ptr queueInfo) { - sceNp2.todo("sceNpMatching2GetCbQueueInfo(ctxId=%d, queueInfo=*0x%x)", ctxId, queueInfo); + sceNp2.warning("sceNpMatching2GetCbQueueInfo(ctxId=%d, queueInfo=*0x%x)", ctxId, queueInfo); auto& nph = g_fxo->get>(); @@ -1065,6 +1080,17 @@ error_code sceNpMatching2GetCbQueueInfo(SceNpMatching2ContextId ctxId, vm::ptrrequestCbQueueLen = 255; + queueInfo->sessionEventCbQueueLen = 255; + queueInfo->sessionMsgCbQueueLen = 255; + return CELL_OK; } @@ -1109,7 +1135,7 @@ error_code sceNpMatching2ContextStartAsync(SceNpMatching2ContextId ctxId, u32 ti { sysutil_register_cb([=, context_callback = ctx->context_callback, context_callback_param = ctx->context_callback_param](ppu_thread& cb_ppu) -> s32 { - context_callback(cb_ppu, ctxId, SCE_NP_MATCHING2_CONTEXT_EVENT_Start, SCE_NP_MATCHING2_EVENT_CAUSE_CONTEXT_ACTION, 0, ctx->context_callback_param); + context_callback(cb_ppu, ctxId, SCE_NP_MATCHING2_CONTEXT_EVENT_Start, SCE_NP_MATCHING2_EVENT_CAUSE_CONTEXT_ACTION, 0, context_callback_param); return 0; }); } @@ -1326,7 +1352,7 @@ error_code sceNpMatching2CreateContext( error_code sceNpMatching2GetSignalingOptParamLocal(SceNpMatching2ContextId ctxId, SceNpMatching2RoomId roomId, vm::ptr signalingOptParam) { - sceNp2.todo("sceNpMatching2GetSignalingOptParamLocal(ctxId=%d, roomId=%d, signalingOptParam=*0x%x)", ctxId, roomId, signalingOptParam); + sceNp2.warning("sceNpMatching2GetSignalingOptParamLocal(ctxId=%d, roomId=%d, signalingOptParam=*0x%x)", ctxId, roomId, signalingOptParam); auto& nph = g_fxo->get>(); @@ -1335,6 +1361,30 @@ error_code sceNpMatching2GetSignalingOptParamLocal(SceNpMatching2ContextId ctxId return SCE_NP_MATCHING2_ERROR_NOT_INITIALIZED; } + if (!ctxId) + { + return SCE_NP_MATCHING2_ERROR_INVALID_CONTEXT_ID; + } + + if (!roomId) + { + return SCE_NP_MATCHING2_ERROR_INVALID_ROOM_ID; + } + + if (!check_match2_context(ctxId)) + { + return SCE_NP_MATCHING2_ERROR_CONTEXT_NOT_FOUND; + } + + const auto [error, signaling_opt_param] = nph.local_get_signaling_opt_param(roomId); + + if (error) + { + return error; + } + + *signalingOptParam = *signaling_opt_param; + return CELL_OK; } @@ -1710,7 +1760,7 @@ error_code sceNpMatching2ContextStop(SceNpMatching2ContextId ctxId) const auto ctx = get_match2_context(ctxId); if (!ctx) - return SCE_NP_MATCHING2_ERROR_INVALID_CONTEXT_ID; + return SCE_NP_MATCHING2_ERROR_CONTEXT_NOT_FOUND; if (!ctx->started.compare_and_swap_test(1, 0)) return SCE_NP_MATCHING2_ERROR_CONTEXT_NOT_STARTED; diff --git a/rpcs3/Emu/Cell/Modules/sceNpClans.cpp b/rpcs3/Emu/Cell/Modules/sceNpClans.cpp index 64ac967d8e..1a9491ae6e 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpClans.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpClans.cpp @@ -144,9 +144,9 @@ error_code sceNpClansCreateRequest(vm::ptr handle, u64 } auto& clans_manager = g_fxo->get(); - + s32 reqId = 0; - SceNpClansError res = clans_manager.client->create_request(&reqId); + const SceNpClansError res = clans_manager.client->create_request(reqId); if (res != SCE_NP_CLANS_SUCCESS) { return res; @@ -167,8 +167,8 @@ error_code sceNpClansDestroyRequest(SceNpClansRequestHandle handle) } auto& clans_manager = g_fxo->get(); - - SceNpClansError res = clans_manager.client->destroy_request(handle); + + const SceNpClansError res = clans_manager.client->destroy_request(handle); if (res != SCE_NP_CLANS_SUCCESS) { return res; @@ -220,7 +220,7 @@ error_code sceNpClansCreateClan(SceNpClansRequestHandle handle, vm::cptr n std::string tag_str; vm::read_string(tag.addr(), SCE_NP_CLANS_CLAN_TAG_MAX_LENGTH, tag_str); - SceNpClansError res = clans_manager.client->create_clan(nph, handle, name_str, tag_str, clanId); + const SceNpClansError res = clans_manager.client->create_clan(nph, handle, name_str, tag_str, clanId); if (res != SCE_NP_CLANS_SUCCESS) { return res; @@ -246,7 +246,7 @@ error_code sceNpClansDisbandClan(SceNpClansRequestHandle handle, SceNpClanId cla auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpClansError res = clans_manager.client->disband_dlan(nph, handle, clanId); + const SceNpClansError res = clans_manager.client->disband_dlan(nph, handle, clanId); if (res != SCE_NP_CLANS_SUCCESS) { return res; @@ -283,13 +283,13 @@ error_code sceNpClansGetClanList(SceNpClansRequestHandle handle, vm::cptr host_clanList(SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX); SceNpClansPagingResult host_pageResult = {}; - SceNpClansError ret = clans_manager.client->get_clan_list(nph, handle, &host_paging, host_clanList, &host_pageResult); + const SceNpClansError ret = clans_manager.client->get_clan_list(nph, handle, host_paging, host_clanList, host_pageResult); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -297,9 +297,9 @@ error_code sceNpClansGetClanList(SceNpClansRequestHandle handle, vm::cptr 0) { - std::memcpy(clanList.get_ptr(), host_clanList, sizeof(SceNpClansEntry) * host_pageResult.count); + std::memcpy(clanList.get_ptr(), host_clanList.data(), sizeof(SceNpClansEntry) * host_pageResult.count); } - std::memcpy(pageResult.get_ptr(), &host_pageResult, sizeof(SceNpClansPagingResult)); + *pageResult = host_pageResult; return CELL_OK; } @@ -383,16 +383,15 @@ error_code sceNpClansSearchByName(SceNpClansRequestHandle handle, vm::cptr host_results(SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX); SceNpClansPagingResult host_pageResult = {}; - SceNpClansError ret = clans_manager.client->clan_search(handle, &host_paging, &host_search, host_results, &host_pageResult); + const SceNpClansError ret = clans_manager.client->clan_search(handle, host_paging, host_search, host_results, host_pageResult); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -400,9 +399,9 @@ error_code sceNpClansSearchByName(SceNpClansRequestHandle handle, vm::cptr 0) { - std::memcpy(results.get_ptr(), host_results, sizeof(SceNpClansClanBasicInfo) * host_pageResult.count); + std::memcpy(results.get_ptr(), host_results.data(), sizeof(SceNpClansClanBasicInfo) * host_pageResult.count); } - std::memcpy(pageResult.get_ptr(), &host_pageResult, sizeof(SceNpClansPagingResult)); + *pageResult = host_pageResult; return CELL_OK; } @@ -425,14 +424,14 @@ error_code sceNpClansGetClanInfo(SceNpClansRequestHandle handle, SceNpClanId cla auto& clans_manager = g_fxo->get(); SceNpClansClanInfo host_info = {}; - - SceNpClansError ret = clans_manager.client->get_clan_info(handle, clanId, &host_info); + + const SceNpClansError ret = clans_manager.client->get_clan_info(handle, clanId, host_info); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; } - - std::memcpy(info.get_ptr(), &host_info, sizeof(SceNpClansClanInfo)); + + *info = host_info; return CELL_OK; } @@ -455,10 +454,9 @@ error_code sceNpClansUpdateClanInfo(SceNpClansRequestHandle handle, SceNpClanId auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpClansUpdatableClanInfo host_info = {}; - std::memcpy(&host_info, info.get_ptr(), sizeof(SceNpClansUpdatableClanInfo)); + const SceNpClansUpdatableClanInfo host_info = *info; - SceNpClansError ret = clans_manager.client->update_clan_info(nph, handle, clanId, &host_info); + const SceNpClansError ret = clans_manager.client->update_clan_info(nph, handle, clanId, host_info); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -495,13 +493,13 @@ error_code sceNpClansGetMemberList(SceNpClansRequestHandle handle, SceNpClanId c SceNpClansPagingRequest host_paging = {}; if (paging) { - std::memcpy(&host_paging, paging.get_ptr(), sizeof(SceNpClansPagingRequest)); + host_paging = *paging; } - SceNpClansMemberEntry host_memList_addr[SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX] = {}; + std::vector host_memList_addr(SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX); SceNpClansPagingResult host_pageResult = {}; - SceNpClansError ret = clans_manager.client->get_member_list(nph, handle, clanId, &host_paging, status, host_memList_addr, &host_pageResult); + const SceNpClansError ret = clans_manager.client->get_member_list(nph, handle, clanId, host_paging, status, host_memList_addr, host_pageResult); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -509,9 +507,9 @@ error_code sceNpClansGetMemberList(SceNpClansRequestHandle handle, SceNpClanId c if (memList && host_pageResult.count > 0) { - std::memcpy(memList.get_ptr(), host_memList_addr, sizeof(SceNpClansMemberEntry) * host_pageResult.count); + std::memcpy(memList.get_ptr(), host_memList_addr.data(), sizeof(SceNpClansMemberEntry) * host_pageResult.count); } - std::memcpy(pageResult.get_ptr(), &host_pageResult, sizeof(SceNpClansPagingResult)); + *pageResult = host_pageResult; return CELL_OK; } @@ -533,18 +531,17 @@ error_code sceNpClansGetMemberInfo(SceNpClansRequestHandle handle, SceNpClanId c auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_npid = {}; - std::memcpy(&host_npid, npid.get_ptr(), sizeof(SceNpId)); + const SceNpId host_npid = *npid; SceNpClansMemberEntry host_memInfo = {}; - SceNpClansError ret = clans_manager.client->get_member_info(nph, handle, clanId, host_npid, &host_memInfo); + const SceNpClansError ret = clans_manager.client->get_member_info(nph, handle, clanId, host_npid, host_memInfo); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; } - std::memcpy(memInfo.get_ptr(), &host_memInfo, sizeof(SceNpClansMemberEntry)); + *memInfo = host_memInfo; return CELL_OK; } @@ -566,10 +563,9 @@ error_code sceNpClansUpdateMemberInfo(SceNpClansRequestHandle handle, SceNpClanI auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpClansUpdatableMemberInfo host_info = {}; - std::memcpy(&host_info, info.get_ptr(), sizeof(SceNpClansUpdatableMemberInfo)); + const SceNpClansUpdatableMemberInfo host_info = *info; - SceNpClansError ret = clans_manager.client->update_member_info(nph, handle, clanId, &host_info); + const SceNpClansError ret = clans_manager.client->update_member_info(nph, handle, clanId, host_info); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -595,10 +591,9 @@ error_code sceNpClansChangeMemberRole(SceNpClansRequestHandle handle, SceNpClanI auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_npid = {}; - std::memcpy(&host_npid, npid.get_ptr(), sizeof(SceNpId)); + const SceNpId host_npid = *npid; - SceNpClansError ret = clans_manager.client->change_member_role(nph, handle, clanId, host_npid, static_cast(role)); + const SceNpClansError ret = clans_manager.client->change_member_role(nph, handle, clanId, host_npid, static_cast(role)); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -650,7 +645,7 @@ error_code sceNpClansJoinClan(SceNpClansRequestHandle handle, SceNpClanId clanId auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpClansError ret = clans_manager.client->join_clan(nph, handle, clanId); + const SceNpClansError ret = clans_manager.client->join_clan(nph, handle, clanId); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -671,7 +666,7 @@ error_code sceNpClansLeaveClan(SceNpClansRequestHandle handle, SceNpClanId clanI auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpClansError ret = clans_manager.client->leave_clan(nph, handle, clanId); + const SceNpClansError ret = clans_manager.client->leave_clan(nph, handle, clanId); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -705,16 +700,15 @@ error_code sceNpClansKickMember(SceNpClansRequestHandle handle, SceNpClanId clan auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_npid = {}; - std::memcpy(&host_npid, npid.get_ptr(), sizeof(SceNpId)); + const SceNpId host_npid = *npid; SceNpClansMessage host_message = {}; if (message) { - std::memcpy(&host_message, message.get_ptr(), sizeof(SceNpClansMessage)); + host_message = *message; } - SceNpClansError ret = clans_manager.client->kick_member(nph, handle, clanId, host_npid, &host_message); + const SceNpClansError ret = clans_manager.client->kick_member(nph, handle, clanId, host_npid, host_message); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -748,16 +742,15 @@ error_code sceNpClansSendInvitation(SceNpClansRequestHandle handle, SceNpClanId auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_npid = {}; - std::memcpy(&host_npid, npid.get_ptr(), sizeof(SceNpId)); + const SceNpId host_npid = *npid; SceNpClansMessage host_message = {}; if (message) { - std::memcpy(&host_message, message.get_ptr(), sizeof(SceNpClansMessage)); + host_message = *message; } - SceNpClansError ret = clans_manager.client->send_invitation(nph, handle, clanId, host_npid, &host_message); + const SceNpClansError ret = clans_manager.client->send_invitation(nph, handle, clanId, host_npid, host_message); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -783,10 +776,9 @@ error_code sceNpClansCancelInvitation(SceNpClansRequestHandle handle, SceNpClanI auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_npid = {}; - std::memcpy(&host_npid, npid.get_ptr(), sizeof(SceNpId)); + const SceNpId host_npid = *npid; - SceNpClansError ret = clans_manager.client->cancel_invitation(nph, handle, clanId, host_npid); + const SceNpClansError ret = clans_manager.client->cancel_invitation(nph, handle, clanId, host_npid); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -818,15 +810,10 @@ error_code sceNpClansSendInvitationResponse(SceNpClansRequestHandle handle, SceN SceNpClansMessage host_message = {}; if (message) { - std::memcpy(&host_message, message.get_ptr(), sizeof(SceNpClansMessage)); + host_message = *message; } - if (message) - { - std::memcpy(&host_message, message.get_ptr(), sizeof(SceNpClansMessage)); - } - - SceNpClansError ret = clans_manager.client->send_invitation_response(nph, handle, clanId, &host_message, accept); + const SceNpClansError ret = clans_manager.client->send_invitation_response(nph, handle, clanId, host_message, accept); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -858,10 +845,10 @@ error_code sceNpClansSendMembershipRequest(SceNpClansRequestHandle handle, u32 c SceNpClansMessage host_message = {}; if (message) { - std::memcpy(&host_message, message.get_ptr(), sizeof(SceNpClansMessage)); + host_message = *message; } - SceNpClansError ret = clans_manager.client->request_membership(nph, handle, clanId, &host_message); + const SceNpClansError ret = clans_manager.client->request_membership(nph, handle, clanId, host_message); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -882,8 +869,7 @@ error_code sceNpClansCancelMembershipRequest(SceNpClansRequestHandle handle, Sce auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpClansError ret = clans_manager.client->cancel_request_membership(nph, handle, clanId); - + const SceNpClansError ret = clans_manager.client->cancel_request_membership(nph, handle, clanId); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -917,16 +903,15 @@ error_code sceNpClansSendMembershipResponse(SceNpClansRequestHandle handle, SceN auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_npid = {}; - std::memcpy(&host_npid, npid.get_ptr(), sizeof(SceNpId)); + const SceNpId host_npid = *npid; SceNpClansMessage host_message = {}; if (message) { - std::memcpy(&host_message, message.get_ptr(), sizeof(SceNpClansMessage)); + host_message = *message; } - SceNpClansError ret = clans_manager.client->send_membership_response(nph, handle, clanId, host_npid, &host_message, allow); + const SceNpClansError ret = clans_manager.client->send_membership_response(nph, handle, clanId, host_npid, host_message, allow); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -963,13 +948,13 @@ error_code sceNpClansGetBlacklist(SceNpClansRequestHandle handle, SceNpClanId cl SceNpClansPagingRequest host_paging = {}; if (paging) { - std::memcpy(&host_paging, paging.get_ptr(), sizeof(SceNpClansPagingRequest)); + host_paging = *paging; } - SceNpClansBlacklistEntry host_blacklist[SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX] = {}; + std::vector host_blacklist(SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX); SceNpClansPagingResult host_pageResult = {}; - SceNpClansError ret = clans_manager.client->get_blacklist(nph, handle, clanId, &host_paging, host_blacklist, &host_pageResult); + const SceNpClansError ret = clans_manager.client->get_blacklist(nph, handle, clanId, host_paging, host_blacklist, host_pageResult); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -977,9 +962,9 @@ error_code sceNpClansGetBlacklist(SceNpClansRequestHandle handle, SceNpClanId cl if (bl && host_pageResult.count > 0) { - std::memcpy(bl.get_ptr(), host_blacklist, sizeof(SceNpClansBlacklistEntry) * host_pageResult.count); + std::memcpy(bl.get_ptr(), host_blacklist.data(), sizeof(SceNpClansBlacklistEntry) * host_pageResult.count); } - std::memcpy(pageResult.get_ptr(), &host_pageResult, sizeof(SceNpClansPagingResult)); + *pageResult = host_pageResult; return CELL_OK; } @@ -1001,10 +986,9 @@ error_code sceNpClansAddBlacklistEntry(SceNpClansRequestHandle handle, SceNpClan auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_member = {}; - std::memcpy(&host_member, member.get_ptr(), sizeof(SceNpId)); + const SceNpId host_member = *member; - SceNpClansError ret = clans_manager.client->add_blacklist_entry(nph, handle, clanId, host_member); + const SceNpClansError ret = clans_manager.client->add_blacklist_entry(nph, handle, clanId, host_member); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -1030,10 +1014,9 @@ error_code sceNpClansRemoveBlacklistEntry(SceNpClansRequestHandle handle, SceNpC auto& nph = g_fxo->get>(); auto& clans_manager = g_fxo->get(); - SceNpId host_member = {}; - std::memcpy(&host_member, member.get_ptr(), sizeof(SceNpId)); + const SceNpId host_member = *member; - SceNpClansError ret = clans_manager.client->remove_blacklist_entry(nph, handle, clanId, host_member); + const SceNpClansError ret = clans_manager.client->remove_blacklist_entry(nph, handle, clanId, host_member); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -1070,13 +1053,13 @@ error_code sceNpClansRetrieveAnnouncements(SceNpClansRequestHandle handle, SceNp SceNpClansPagingRequest host_paging = {}; if (paging) { - std::memcpy(&host_paging, paging.get_ptr(), sizeof(SceNpClansPagingRequest)); + host_paging = *paging; } - SceNpClansMessageEntry host_announcements[SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX] = {}; + std::vector host_announcements(SCE_NP_CLANS_PAGING_REQUEST_PAGE_MAX); SceNpClansPagingResult host_pageResult = {}; - SceNpClansError ret = clans_manager.client->retrieve_announcements(nph, handle, clanId, &host_paging, host_announcements, &host_pageResult); + const SceNpClansError ret = clans_manager.client->retrieve_announcements(nph, handle, clanId, host_paging, host_announcements, host_pageResult); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -1084,9 +1067,9 @@ error_code sceNpClansRetrieveAnnouncements(SceNpClansRequestHandle handle, SceNp if (mlist && host_pageResult.count > 0) { - std::memcpy(mlist.get_ptr(), host_announcements, sizeof(SceNpClansMessageEntry) * host_pageResult.count); + std::memcpy(mlist.get_ptr(), host_announcements.data(), sizeof(SceNpClansMessageEntry) * host_pageResult.count); } - std::memcpy(pageResult.get_ptr(), &host_pageResult, sizeof(SceNpClansPagingResult)); + *pageResult = host_pageResult; return CELL_OK; } @@ -1113,17 +1096,16 @@ error_code sceNpClansPostAnnouncement(SceNpClansRequestHandle handle, SceNpClanI auto& clans_manager = g_fxo->get(); auto& nph = g_fxo->get>(); - SceNpClansMessage host_announcement = {}; - std::memcpy(&host_announcement, message.get_ptr(), sizeof(SceNpClansMessage)); + const SceNpClansMessage host_announcement = *message; SceNpClansMessageData host_data = {}; if (data) { - std::memcpy(&host_data, data.get_ptr(), sizeof(SceNpClansMessageData)); + host_data = *data; } SceNpClansMessageId host_announcementId = 0; - SceNpClansError ret = clans_manager.client->post_announcement(nph, handle, clanId, &host_announcement, &host_data, duration, &host_announcementId); + const SceNpClansError ret = clans_manager.client->post_announcement(nph, handle, clanId, host_announcement, host_data, duration, host_announcementId); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; @@ -1146,7 +1128,7 @@ error_code sceNpClansRemoveAnnouncement(SceNpClansRequestHandle handle, SceNpCla auto& clans_manager = g_fxo->get(); auto& nph = g_fxo->get>(); - SceNpClansError ret = clans_manager.client->delete_announcement(nph, handle, clanId, mId); + const SceNpClansError ret = clans_manager.client->delete_announcement(nph, handle, clanId, mId); if (ret != SCE_NP_CLANS_SUCCESS) { return ret; diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp index 3407778d64..866db860ec 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp @@ -1026,14 +1026,14 @@ error_code sceNpTrophyUnlockTrophy(ppu_thread& ppu, u32 context, u32 handle, s32 auto& trophy_manager = g_fxo->get(); - reader_lock lock(trophy_manager.mtx); + std::scoped_lock lock(trophy_manager.mtx); if (!trophy_manager.is_initialized) { return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED; } - const auto [ctxt, error] = trophy_manager.get_context_ex(context, handle); + const auto [ctxt, error] = trophy_manager.get_context_ex(context, handle, true); if (error) { @@ -1184,9 +1184,9 @@ error_code sceNpTrophyGetTrophyUnlockState(u32 context, u32 handle, vm::ptrGetTrophyUnlockState(id)) - flags->flag_bits[id / 32] |= 1 << (id % 32); + flags->flag_bits[id / 32] |= 1u << (id % 32); else - flags->flag_bits[id / 32] &= ~(1 << (id % 32)); + flags->flag_bits[id / 32] &= ~(1u << (id % 32)); } return CELL_OK; @@ -1529,6 +1529,11 @@ error_code sceNpTrophyGetTrophyIcon(u32 context, u32 handle, s32 trophyId, vm::p return CELL_OK; } +error_code sceNpTrophyNetworkSync() +{ + UNIMPLEMENTED_FUNC(sceNpTrophy); + return CELL_OK; +} DECLARE(ppu_module_manager::sceNpTrophy)("sceNpTrophy", []() { @@ -1553,4 +1558,5 @@ DECLARE(ppu_module_manager::sceNpTrophy)("sceNpTrophy", []() REG_FUNC(sceNpTrophy, sceNpTrophyGetTrophyDetails); REG_FUNC(sceNpTrophy, sceNpTrophyGetTrophyInfo); REG_FUNC(sceNpTrophy, sceNpTrophyGetGameIcon); + REG_FUNC(sceNpTrophy, sceNpTrophyNetworkSync); }); diff --git a/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp b/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp index b8f1341d85..e2f0df9620 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp @@ -65,7 +65,7 @@ struct sce_np_util_manager error_code sceNpUtilBandwidthTestInitStart([[maybe_unused]] ppu_thread& ppu, u32 prio, u32 stack) { - sceNpUtil.todo("sceNpUtilBandwidthTestInitStart(prio=%d, stack=%d)", prio, stack); + sceNpUtil.warning("sceNpUtilBandwidthTestInitStart(prio=%d, stack=%d)", prio, stack); auto& util_manager = g_fxo->get(); std::lock_guard lock(util_manager.mtx); diff --git a/rpcs3/Emu/Cell/PPUAnalyser.cpp b/rpcs3/Emu/Cell/PPUAnalyser.cpp index 56d4398d09..783ed9e477 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.cpp +++ b/rpcs3/Emu/Cell/PPUAnalyser.cpp @@ -2535,7 +2535,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, con // SLDI mnemonic reg_state_t rs = get_reg(op.rs); - if (!rs.shift_left(op.sh32, reg_tag_allocator)) + if (!rs.shift_left(sh, reg_tag_allocator)) { unmap_reg(op.ra); } diff --git a/rpcs3/Emu/Cell/PPUDisAsm.cpp b/rpcs3/Emu/Cell/PPUDisAsm.cpp index 484688ee12..ebfdffb5bc 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.cpp +++ b/rpcs3/Emu/Cell/PPUDisAsm.cpp @@ -330,7 +330,7 @@ void comment_constant(std::string& last_opcode, u64 value, bool print_float = fa // Comment constant formation fmt::append(last_opcode, " #0x%xh", value); - if (print_float && ((value >> 31) <= 1u || (value >> 31) == 0x1'ffff'ffffu)) + if (print_float && ((value >> 31) <= 1u || (value >> 31) == 0x1'ffff'ffffu) && (value > 0x3fffff && (value << 32 >> 32) < 0xffc00000)) { const f32 float_val = std::bit_cast(static_cast(value)); diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index 65ab0fe18d..e95a1542d8 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -314,6 +314,7 @@ static void ppu_initialize_modules(ppu_linkage_info* link, utils::serial* ar = n &ppu_module_manager::libsnd3, &ppu_module_manager::libsynth2, &ppu_module_manager::sceNp, + &ppu_module_manager::sceNpBasicLimited, &ppu_module_manager::sceNp2, &ppu_module_manager::sceNpClans, &ppu_module_manager::sceNpCommerce2, @@ -1003,7 +1004,7 @@ static import_result_t ppu_load_imports(const ppu_module& _module, std: // Check address // TODO: The address of use should be extracted from analyser instead - if (fstub && fstub >= _module.segs[0].addr && fstub <= _module.segs[0].addr + _module.segs[0].size) + if (fstub && fstub >= _module.segs[0].addr && fstub < _module.segs[0].addr + _module.segs[0].size) { nid_to_use_addr.emplace(fnid, fstub); } @@ -1894,7 +1895,7 @@ shared_ptr ppu_load_prx(const ppu_prx_object& elf, bool virtual_load, c } else { - ppu_loader.error("Library %s: PRX library info not found"); + ppu_loader.error("Library: PRX library info not found"); } prx->start.set(prx->specials[0xbc9a0086]); @@ -3191,7 +3192,7 @@ bool ppu_load_rel_exec(const ppu_rel_object& elf) for (const auto& s : elf.shdrs) { - if (s.sh_type != sec_type::sht_progbits) + if (s.sh_type == sec_type::sht_progbits) { memsize = utils::align(memsize + vm::cast(s.sh_size), 128); } diff --git a/rpcs3/Emu/Cell/PPUModule.h b/rpcs3/Emu/Cell/PPUModule.h index fdcd736f38..6171a4faa1 100644 --- a/rpcs3/Emu/Cell/PPUModule.h +++ b/rpcs3/Emu/Cell/PPUModule.h @@ -283,6 +283,7 @@ public: static const ppu_static_module libsnd3; static const ppu_static_module libsynth2; static const ppu_static_module sceNp; + static const ppu_static_module sceNpBasicLimited; static const ppu_static_module sceNp2; static const ppu_static_module sceNpClans; static const ppu_static_module sceNpCommerce2; diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index a9bef5e640..f5d91cc519 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1286,7 +1286,7 @@ extern bool ppu_patch(u32 addr, u32 value) { if (addr % 4) { - ppu_log.fatal("Patch failed at 0x%x: unanligned memory address.", addr); + ppu_log.fatal("Patch failed at 0x%x: unaligned memory address.", addr); return false; } @@ -1364,9 +1364,7 @@ void ppu_thread::dump_regs(std::string& ret, std::any& custom_data) const u32 preferred_cr_field_index = 7; }; - dump_registers_data_t* func_data = nullptr; - - func_data = std::any_cast(&custom_data); + dump_registers_data_t* func_data = std::any_cast(&custom_data); if (!func_data) { @@ -2039,9 +2037,9 @@ std::vector> ppu_thread::dump_callstack_list() const return call_stack_list; } -std::string ppu_thread::dump_misc() const +void ppu_thread::dump_misc(std::string& ret, std::any& custom_data) const { - std::string ret = cpu_thread::dump_misc(); + cpu_thread::dump_misc(ret, custom_data); if (ack_suspend) { @@ -2096,7 +2094,6 @@ std::string ppu_thread::dump_misc() const { ret += '\n'; } - return ret; } void ppu_thread::dump_all(std::string& ret) const @@ -3867,12 +3864,12 @@ extern void ppu_precompile(std::vector& dir_queue, std::vector offs; + for (u32 j = 0; j < hdr.count; j++) { mself_record rec{}; - std::set offs; - if (mself.read(rec) && rec.get_pos(mself.size())) { if (rec.size <= 0x20) diff --git a/rpcs3/Emu/Cell/PPUThread.h b/rpcs3/Emu/Cell/PPUThread.h index 97c705aed5..cf5b91c487 100644 --- a/rpcs3/Emu/Cell/PPUThread.h +++ b/rpcs3/Emu/Cell/PPUThread.h @@ -145,7 +145,7 @@ public: virtual void dump_regs(std::string&, std::any& custom_data) const override; virtual std::string dump_callstack() const override; virtual std::vector> dump_callstack_list() const override; - virtual std::string dump_misc() const override; + virtual void dump_misc(std::string& ret, std::any& custom_data) const override; virtual void dump_all(std::string&) const override; virtual void cpu_task() override final; virtual void cpu_sleep() override; diff --git a/rpcs3/Emu/Cell/PPUTranslator.cpp b/rpcs3/Emu/Cell/PPUTranslator.cpp index 6d4766a947..0205715328 100644 --- a/rpcs3/Emu/Cell/PPUTranslator.cpp +++ b/rpcs3/Emu/Cell/PPUTranslator.cpp @@ -340,7 +340,7 @@ Function* PPUTranslator::GetSymbolResolver(const ppu_module& info) const auto ftype = FunctionType::get(get_type(), { get_type(), // Exec base - m_ir->getPtrTy(), // PPU context + get_type(), // PPU context get_type(), // Segment address (for PRX) get_type(), // Memory base get_type(), // r0 @@ -386,7 +386,7 @@ Function* PPUTranslator::GetSymbolResolver(const ppu_module& info) const auto addr_array = new GlobalVariable(*m_module, addr_array_type, false, GlobalValue::PrivateLinkage, ConstantDataArray::get(m_context, vec_addrs)); // Create an array of function pointers - const auto func_table_type = ArrayType::get(m_ir->getPtrTy(), functions.size()); + const auto func_table_type = ArrayType::get(get_type(), functions.size()); const auto init_func_table = ConstantArray::get(func_table_type, functions); const auto func_table = new GlobalVariable(*m_module, func_table_type, false, GlobalVariable::PrivateLinkage, init_func_table); @@ -413,7 +413,7 @@ Function* PPUTranslator::GetSymbolResolver(const ppu_module& info) const auto func_pc = ZExt(m_ir->CreateLoad(ptr_inst->getResultElementType(), ptr_inst), get_type()); ptr_inst = dyn_cast(m_ir->CreateGEP(func_table->getValueType(), func_table, {m_ir->getInt64(0), index_value})); - assert(ptr_inst->getResultElementType() == m_ir->getPtrTy()); + assert(ptr_inst->getResultElementType() == get_type()); const auto faddr = m_ir->CreateLoad(ptr_inst->getResultElementType(), ptr_inst); const auto pos_32 = m_reloc ? m_ir->CreateAdd(func_pc, m_seg0) : func_pc; @@ -550,11 +550,12 @@ void PPUTranslator::CallFunction(u64 target, Value* indirect) else if (_target >= caddr && _target <= cend) { u32 target_last = static_cast(_target); - std::unordered_set passed_targets{target_last}; // Try to follow unconditional branches as long as there is no infinite loop - while (target_last != _target) + // !! Triggers compilation issues in Asura's Wrath in other parts of the code + // !! See https://github.com/RPCS3/rpcs3/issues/18287 + while (false) { const ppu_opcode_t op{*ensure(m_info.get_ptr(target_last))}; const ppu_itype::type itype = g_ppu_itype.decode(op.opcode); @@ -621,7 +622,7 @@ void PPUTranslator::CallFunction(u64 target, Value* indirect) const auto pos = m_ir->CreateShl(indirect, 1); const auto ptr = m_ir->CreatePtrAdd(m_exec, pos); const auto val = m_ir->CreateLoad(get_type(), ptr); - callee = FunctionCallee(type, m_ir->CreateIntToPtr(val, m_ir->getPtrTy())); + callee = FunctionCallee(type, m_ir->CreateIntToPtr(val, get_type())); // Load new segment address const auto seg_base_ptr = m_ir->CreatePtrAdd(m_exec, m_ir->getInt64(vm::g_exec_addr_seg_offset)); @@ -1304,7 +1305,7 @@ void PPUTranslator::VMADDFP(ppu_opcode_t op) if (!m_use_fma && data == v128{}) { set_vr(op.vd, vec_handle_result(a * c + fsplat(0.f))); - ppu_log.notice("LLVM: VMADDFP with -0 addend at [0x%08x]", m_addr + (m_reloc ? m_reloc->addr : 0)); + ppu_log.notice("LLVM: VMADDFP with +0 addend at [0x%08x]", m_addr + (m_reloc ? m_reloc->addr : 0)); return; } } @@ -1327,7 +1328,11 @@ void PPUTranslator::VMADDFP(ppu_opcode_t op) void PPUTranslator::VMAXFP(ppu_opcode_t op) { const auto [a, b] = get_vrs(op.va, op.vb); +#ifdef ARCH_ARM64 + set_vr(op.vd, vec_handle_result(fmax(a, b))); +#else set_vr(op.vd, vec_handle_result(select(fcmp_ord(a < b) | fcmp_uno(b != b), b, a))); +#endif } void PPUTranslator::VMAXSB(ppu_opcode_t op) @@ -1389,7 +1394,11 @@ void PPUTranslator::VMHRADDSHS(ppu_opcode_t op) void PPUTranslator::VMINFP(ppu_opcode_t op) { const auto [a, b] = get_vrs(op.va, op.vb); +#ifdef ARCH_ARM64 + set_vr(op.vd, vec_handle_result(fmin(a, b))); +#else set_vr(op.vd, vec_handle_result(select(fcmp_ord(a > b) | fcmp_uno(b != b), b, a))); +#endif } void PPUTranslator::VMINSB(ppu_opcode_t op) @@ -3672,9 +3681,7 @@ void PPUTranslator::STVLX(ppu_opcode_t op) const auto addr = op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb); const auto data = pshufb(get_vr(op.vs), build(127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112) + vsplat(trunc(value(addr) & 0xf))); const auto mask = bitcast(splat(0xffff) << trunc(value(addr) & 0xf)); - const auto ptr = value(GetMemory(m_ir->CreateAnd(addr, ~0xfull))); - const auto align = splat(16); - eval(llvm_calli{"llvm.masked.store.v16i8.p0", {data, ptr, align, mask}}); + m_ir->CreateMaskedStore(data.eval(m_ir), GetMemory(m_ir->CreateAnd(addr, ~0xfull)), llvm::Align(16), mask.eval(m_ir)); } void PPUTranslator::STDBRX(ppu_opcode_t op) @@ -3702,9 +3709,7 @@ void PPUTranslator::STVRX(ppu_opcode_t op) const auto addr = op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb); const auto data = pshufb(get_vr(op.vs), build(255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240) + vsplat(trunc(value(addr) & 0xf))); const auto mask = bitcast(trunc(splat(0xffff) << (value(addr) & 0xf) >> 16)); - const auto ptr = value(GetMemory(m_ir->CreateAnd(addr, ~0xfull))); - const auto align = splat(16); - eval(llvm_calli{"llvm.masked.store.v16i8.p0", {data, ptr, align, mask}}); + m_ir->CreateMaskedStore(data.eval(m_ir), GetMemory(m_ir->CreateAnd(addr, ~0xfull)), llvm::Align(16), mask.eval(m_ir)); } void PPUTranslator::STFSUX(ppu_opcode_t op) @@ -5409,7 +5414,7 @@ MDNode* PPUTranslator::CheckBranchProbability(u32 bo) void PPUTranslator::build_interpreter() { #define BUILD_VEC_INST(i) { \ - m_function = llvm::cast(m_module->getOrInsertFunction("op_" #i, get_type(), m_ir->getPtrTy()).getCallee()); \ + m_function = llvm::cast(m_module->getOrInsertFunction("op_" #i, get_type(), get_type()).getCallee()); \ std::fill(std::begin(m_globals), std::end(m_globals), nullptr); \ std::fill(std::begin(m_locals), std::end(m_locals), nullptr); \ IRBuilder<> irb(BasicBlock::Create(m_context, "__entry", m_function)); \ diff --git a/rpcs3/Emu/Cell/SPUAnalyser.h b/rpcs3/Emu/Cell/SPUAnalyser.h index 103c655a9e..1598551c7d 100644 --- a/rpcs3/Emu/Cell/SPUAnalyser.h +++ b/rpcs3/Emu/Cell/SPUAnalyser.h @@ -13,6 +13,7 @@ struct spu_itype static constexpr struct quadrop_tag{} _quadrop{}; // 4-op Instructions static constexpr struct xfloat_tag{} xfloat{}; // Instructions producing xfloat values static constexpr struct zregmod_tag{} zregmod{}; // Instructions not modifying any GPR + static constexpr struct pure_tag{} pure{}; // Instructions that always produce the same values as long as arguments are equal enum class type : unsigned char { @@ -51,22 +52,22 @@ struct spu_itype RDCH, RCHCNT, - BR, // branch_tag first + BR, // branch_tag first, zregmod_tag (2) first BRA, BRNZ, BRZ, BRHNZ, BRHZ, - BRSL, - BRASL, IRET, BI, BISLED, - BISL, BIZ, BINZ, BIHZ, - BIHNZ, // branch_tag last + BIHNZ, // zregmod_tag (2) last + BRSL, + BRASL, + BISL, // branch_tag last ILH, // constant_tag_first ILHU, @@ -158,6 +159,15 @@ struct spu_itype CUFLT, FRDS, // xfloat_tag last + CFLTS, + CFLTU, + FCEQ, + FCMEQ, + FCGT, + FCMGT, // floating_tag last + FSCRWR, + FSCRRD, + DFA, DFS, DFM, @@ -167,20 +177,11 @@ struct spu_itype DFNMA, FESD, - CFLTS, - CFLTU, - FCEQ, - FCMEQ, - FCGT, - FCMGT, - FSCRWR, - FSCRRD, - DFCEQ, DFCMEQ, DFCGT, DFCMGT, - DFTSV, // floating_tag last + DFTSV, SHLH, // shiftrot_tag first SHLHI, @@ -245,13 +246,13 @@ struct spu_itype // Test for branch instruction friend constexpr bool operator &(type value, branch_tag) { - return value >= BR && value <= BIHNZ; + return value >= BR && value <= BISL; } - // Test for floating point instruction + // Test for floating point instruction (32-bit float) friend constexpr bool operator &(type value, floating_tag) { - return value >= FMA && value <= DFTSV; + return value >= FMA && value <= FCMGT; } // Test for 4-op instruction @@ -299,10 +300,18 @@ struct spu_itype // Test for non register-modifying instruction friend constexpr bool operator &(type value, zregmod_tag) { - return value >= HEQ && value <= STQR; + return (value >= HEQ && value <= STQR) || (value >= BR && value <= BIHNZ); + } + + // Test for instructions which always produce the same values as long as arguments and immediate values are equal + friend constexpr bool operator &(type value, pure_tag) + { + return (value >= ILH && value <= CLGTI); } }; +using spu_itype_t = spu_itype::type; + struct spu_iflag { enum @@ -528,6 +537,8 @@ struct spu_iflag } }; +using spu_iflag_t = spu_iflag::flag; + #define NAME(x) static constexpr const char& x = *#x struct spu_iname diff --git a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp index 4d04b13666..53dc0df200 100644 --- a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp @@ -52,6 +52,36 @@ struct span_less template inline constexpr span_less s_span_less{}; +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](spu_recompiler_base::compare_direction arg) + { + switch (arg) + { + case spu_recompiler_base::CMP_SLESS: return "SLT"; + case spu_recompiler_base::CMP_SGREATER: return "SGT"; + case spu_recompiler_base::CMP_EQUAL: return "IEQ"; + case spu_recompiler_base::CMP_LLESS: return "ULT"; + case spu_recompiler_base::CMP_LGREATER: return "UGT"; + case spu_recompiler_base::CMP_SGREATER_EQUAL: return "SGE"; + case spu_recompiler_base::CMP_SLOWER_EQUAL: return "SLE"; + case spu_recompiler_base::CMP_NOT_EQUAL: return "INE"; + case spu_recompiler_base::CMP_LGREATER_EQUAL: return "UGE"; + case spu_recompiler_base::CMP_LLOWER_EQUAL: return "ULE"; + case spu_recompiler_base::CMP_UNKNOWN: + case spu_recompiler_base::CMP_NOT_EQUAL2: + case spu_recompiler_base::CMP_EQUAL2: + default: + { + break; + } + } + + return unknown; + }); +} + // Move 4 args for calling native function from a GHC calling convention function #if defined(ARCH_X64) static u8* move_args_ghc_to_native(u8* raw) @@ -1176,108 +1206,6 @@ void spu_cache::initialize(bool build_existing_cache) if ((g_cfg.core.spu_decoder == spu_decoder_type::asmjit || g_cfg.core.spu_decoder == spu_decoder_type::llvm) && !func_list.empty()) { spu_log.success("SPU Runtime: Built %u functions.", func_list.size()); - - if (g_cfg.core.spu_debug) - { - std::string dump; - dump.reserve(10'000'000); - - std::map, spu_program*, span_less> sorted; - - for (auto&& f : func_list) - { - // Interpret as a byte string - std::span data = {reinterpret_cast(f.data.data()), f.data.size() * sizeof(u32)}; - - sorted[data] = &f; - } - - std::unordered_set depth_n; - - u32 n_max = 0; - - for (auto&& [bytes, f] : sorted) - { - { - sha1_context ctx; - u8 output[20]; - - sha1_starts(&ctx); - sha1_update(&ctx, bytes.data(), bytes.size()); - sha1_finish(&ctx, output); - fmt::append(dump, "\n\t[%s] ", fmt::base57(output)); - } - - u32 depth_m = 0; - - for (auto&& [data, f2] : sorted) - { - u32 depth = 0; - - if (f2 == f) - { - continue; - } - - for (u32 i = 0; i < bytes.size(); i++) - { - if (i < data.size() && data[i] == bytes[i]) - { - depth++; - } - else - { - break; - } - } - - depth_n.emplace(depth); - depth_m = std::max(depth, depth_m); - } - - fmt::append(dump, "c=%06d,d=%06d ", depth_n.size(), depth_m); - - bool sk = false; - - for (u32 i = 0; i < std::min(bytes.size(), std::max(256, depth_m)); i++) - { - if (depth_m == i) - { - dump += '|'; - sk = true; - } - - fmt::append(dump, "%02x", bytes[i]); - - if (i % 4 == 3) - { - if (sk) - { - sk = false; - } - else - { - dump += ' '; - } - - dump += ' '; - } - } - - fmt::append(dump, "\n\t%49s", ""); - - for (u32 i = 0; i < std::min(f->data.size(), std::max(64, utils::aligned_div(depth_m, 4))); i++) - { - fmt::append(dump, "%-10s", g_spu_iname.decode(std::bit_cast>(f->data[i]))); - } - - n_max = std::max(n_max, ::size32(depth_n)); - - depth_n.clear(); - } - - spu_log.notice("SPU Cache Dump (max_c=%d): %s", n_max, dump); - } } // Initialize global cache instance @@ -3029,7 +2957,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s if (g_cfg.core.spu_block_size == spu_block_size_type::safe) { // Stop on special instructions (TODO) - m_targets[pos]; + m_targets[pos].push_back(SPU_LS_SIZE); next_block(); break; } @@ -3050,7 +2978,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s spu_log.error("[0x%x] Invalid interrupt flags (DE)", pos); } - m_targets[pos]; + m_targets[pos].push_back(SPU_LS_SIZE); next_block(); break; } @@ -3083,7 +3011,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s bool is_no_return = false; - if (pos_next >= lsa && pos_next < limit) + if (sl && pos_next >= lsa && pos_next < limit) { const u32 data_next = ls[pos_next / 4]; const auto type_next = g_spu_itype.decode(data_next); @@ -3104,7 +3032,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s is_no_return = is_no_return || (op_next.rb >= 4 && op_next.rb < 10); } - if (type_next & spu_itype::_quadrop && +iflags & +spu_iflag::use_rc) + if (+iflags & +spu_iflag::use_rc) { is_no_return = is_no_return || (op_next.ra >= 4 && op_next.rb < 10); } @@ -3346,6 +3274,12 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s spu_log.notice("[0x%x] At 0x%x: ignoring indirect branch (SYNC)", entry_point, pos); } + if (!(af & vf::is_const)) + { + // Possible unknown target + m_targets[pos].emplace_back(SPU_LS_SIZE); + } + if (type == spu_itype::BI || sl || is_no_return) { if (type == spu_itype::BI || g_cfg.core.spu_block_size == spu_block_size_type::safe || is_no_return) @@ -3410,7 +3344,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s is_no_return = is_no_return || (op_next.rb >= 4 && op_next.rb < 10); } - if (type_next & spu_itype::_quadrop && +iflags & +spu_iflag::use_rc) + if (+iflags & +spu_iflag::use_rc) { is_no_return = is_no_return || (op_next.rc >= 4 && op_next.rc < 10); } @@ -3705,6 +3639,11 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s default: { + if (type & spu_itype::zregmod) + { + break; + } + // Unconst const u32 op_rt = type & spu_itype::_quadrop ? +op.rt4 : +op.rt; m_regmod[pos / 4] = op_rt; @@ -3931,17 +3870,26 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s continue; } + bool removed = false; + for (auto it2 = it->second.begin(); it2 != it->second.end();) { if (*it2 < lsa || *it2 >= limit) { it2 = it->second.erase(it2); + removed = true; continue; } it2++; } + if (removed) + { + it->second.emplace_back(SPU_LS_SIZE); + } + + std::sort(it->second.begin(), it->second.end()); it++; } @@ -3992,7 +3940,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s const auto type = g_spu_itype.decode(op.opcode); - u8 reg_save = 255; + u8 reg_save = s_reg_max; if (type == spu_itype::STQD && op.ra == s_reg_sp && !block.reg_mod[op.rt] && !block.reg_use[op.rt]) { @@ -4012,7 +3960,17 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s // Register reg use only if it happens before reg mod if (!block.reg_mod[reg]) { - block.reg_use.set(reg); + if (type & spu_itype::floating) + { + block.reg_maybe_float.set(reg); + } + + if (type == spu_itype::SHUFB && reg == op.rc) + { + block.reg_maybe_shuffle_mask.set(reg); + } + + block.reg_use[reg]++; if (reg_save != reg && block.reg_save_dom[reg]) { @@ -4029,7 +3987,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s for (u8 reg : {s_reg_mfc_lsa, s_reg_mfc_tag, s_reg_mfc_size}) { if (!block.reg_mod[reg]) - block.reg_use.set(reg); + block.reg_use[reg]++; } } @@ -4083,7 +4041,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s if (i == s_reg_lr || (i >= 2 && i < s_reg_80) || i > s_reg_127) { if (!block.reg_mod[i]) - block.reg_use.set(i); + block.reg_use[i]++; if (!is_tail) { @@ -4960,19 +4918,24 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s return map; }; - struct putllc16_statistics_t + struct stats_t { atomic_t all = 0; atomic_t single = 0; - atomic_t nowrite = 0; std::array, 128> breaking_reason{}; }; - struct rchcnt_statistics_t + struct putllc16_statistics_t : stats_t + { + atomic_t nowrite = 0; + }; + + struct rchcnt_statistics_t : stats_t + { + }; + + struct reduced_statistics_t : stats_t { - atomic_t all = 0; - atomic_t single = 0; - std::array, 128> breaking_reason{}; }; // Pattern structures @@ -5084,6 +5047,8 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s // RDCH/RCHCNT Loop analysis tracker rchcnt_loop_t rchcnt_loop{}; + reduced_loop_t reduced_loop{}; + block_reg_state_iterator(u32 _pc, usz _parent_iterator_index = umax, usz _parent_target_index = 0) noexcept : pc(_pc) , parent_iterator_index(_parent_iterator_index) @@ -5096,6 +5061,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s std::map atomic16_all; // RdAtomicStat location -> atomic loop optimization state std::map rchcnt_loop_all; // RDCH/RCHCNT location -> channel read loop optimization state + std::map reduced_loop_all; std::map getllar_starts; // True for failed loops std::map run_on_block; std::map logged_block; @@ -5104,6 +5070,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s atomic16_t dummy16{}; rchcnt_loop_t dummy_loop{}; + reduced_loop_t dummy_rloop{}; bool likely_putllc_loop = false; bool had_putllc_evaluation = false; @@ -5150,6 +5117,194 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s u32 iterator_id_alloc = 0; + auto get_block_targets = [&](u32 pc) -> std::span + { + if (m_block_info[pc / 4] && m_bbs.count(pc)) + { + return ::at32(m_bbs, pc).targets; + } + + return {}; + }; + + auto get_block_preds = [&](u32 pc) -> std::span + { + if (m_block_info[pc / 4] && m_bbs.count(pc)) + { + return ::at32(m_bbs, pc).preds; + } + + return {}; + }; + + const auto initiate_patterns = [&](block_reg_state_iterator& block_state_it, u32 bpc, bool is_multi_block) + { + // Initiate patterns (that are initiated on block start) + const auto& bb_body = ::at32(m_bbs, bpc); + + bool invalid = bb_body.size <= 2; + bool valid = true; + + u32 expected_sup_conds = 0; + u32 first_pred_of_loop = SPU_LS_SIZE; + + for (u32 pred : get_block_preds(bpc)) + { + if (is_multi_block ? pred >= bpc : pred == bpc) + { + first_pred_of_loop = std::min(pred, first_pred_of_loop); + } + } + + valid = first_pred_of_loop != SPU_LS_SIZE; + + const auto& bb_connect = ::at32(m_bbs, valid ? first_pred_of_loop : bpc); + + invalid = invalid || !valid; + valid = false; + + // Check loop connector block (must jump to block-next or to loop-start) + u32 targets_count = 0; + + for (u32 target : get_block_targets(first_pred_of_loop)) + { + valid = true; + targets_count++; + + if (first_pred_of_loop == bpc) + { + continue; + } + + if (target != bpc) + { + if (target != first_pred_of_loop + bb_connect.size * 4) + { + invalid = true; + } + } + } + + if (targets_count > 2) + { + invalid = true; + } + + const bool is_two_block_loop = targets_count == 1; + + invalid = invalid || !valid; + valid = false; + + // Check loop body block (must jump to last-block or another location) + + for (u32 block_pc = bpc; !invalid;) + { + targets_count = 0; + + const u32 cond_next = block_pc + ::at32(m_bbs, block_pc).size * 4; + valid = false; + + bool is_end = false; + + for (u32 target : get_block_targets(block_pc)) + { + targets_count++; + + if (target == cond_next) + { + // Conditional branch + valid = true; + } + + if (target <= block_pc && target > bpc) + { + // Branch backwards + invalid = true; + } + + if (target == bpc) + { + is_end = true; + } + } + + // if (bpc != block_pc) + // { + // for (u32 pred : get_block_preds(block_pc)) + // { + // if (pred < bpc || pred > first_pred_of_loop + ::at32(m_bbs, first_pred_of_loop).size * 4) + // { + // invalid = true; + // break; + // } + // } + // } + + if (targets_count > 2) + { + invalid = true; + break; + } + + if (cond_next == first_pred_of_loop && is_two_block_loop) + { + valid = true; + break; + } + + if (!valid) + { + break; + } + + if (bpc == first_pred_of_loop || is_end) + { + break; + } + + if (targets_count == 2) + { + expected_sup_conds++; + } + + block_pc = cond_next; + } + + invalid = invalid || !valid; + + if (bb_body.size > 2 && !invalid) + { + // Early filtering of false positives + const spu_opcode_t op{std::bit_cast>(::at32(result.data, (bpc - entry_point) / 4 + bb_body.size - 2))}; + const spu_opcode_t op2{std::bit_cast>(::at32(result.data, (bpc - entry_point) / 4))}; + + switch (g_spu_itype.decode(op.opcode)) + { + case spu_itype::RDCH: invalid = op.ra != SPU_RdDec; break; + case spu_itype::RCHCNT: invalid = true; break; + default: break; + } + + switch (g_spu_itype.decode(op2.opcode)) + { + case spu_itype::RDCH: invalid = invalid || op2.ra != SPU_RdDec; break; + case spu_itype::RCHCNT: invalid = true; break; + default: break; + } + } + + if (valid && !invalid && !reduced_loop_all.count(bpc) && expected_sup_conds == 0) + { + const auto reduced_loop = &block_state_it.reduced_loop; + reduced_loop->discard(); + reduced_loop->active = true; + reduced_loop->loop_pc = bpc; + reduced_loop->loop_end = first_pred_of_loop; + reduced_loop->expected_sup_conds = expected_sup_conds; + reduced_loop->is_two_block_loop = is_two_block_loop; + } + }; + for (u32 wf = 0, wi = 0, wa = entry_point, bpc = wa; wf <= 1;) { const bool is_form_block = wf == 0; @@ -5218,6 +5373,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s auto& vregs = is_form_block ? infos[bpc]->local_state : *true_state_walkby; const auto atomic16 = is_pattern_match ? &::at32(reg_state_it, wi).atomic16 : &dummy16; const auto rchcnt_loop = is_pattern_match ? &::at32(reg_state_it, wi).rchcnt_loop : &dummy_loop; + const auto reduced_loop = &::at32(reg_state_it, wi).reduced_loop; const u32 pos = wa; @@ -5341,10 +5497,71 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s } }; + const auto break_reduced_loop_pattern = [&](u32 cause, reduced_loop_t previous) + { + if (previous.active && previous.loop_pc != SPU_LS_SIZE && reduced_loop_all.count(previous.loop_pc) == 0) + { + g_fxo->get().breaking_reason[cause]++; + + if (!spu_log.notice) + { + return; + } + + previous.active = false; + previous.failed = true; + + reduced_loop_all[previous.loop_pc] = previous; + + std::string break_error = fmt::format("Reduced loop pattern breakage [%x cause=%u] (read_pc=0x%x)", pos, cause, previous.loop_pc); + + const auto values = sort_breakig_reasons(g_fxo->get().breaking_reason); + + std::string tracing = "Top Breaking Reasons:"; + + usz i = 0; + usz fail_count = 0; + bool switched_to_minimal = false; + + for (auto it = values.begin(); it != values.end(); i++, it++) + { + fail_count += it->second; + + if (i >= 12) + { + continue; + } + + if (i < 8 && it->second > 1) + { + fmt::append(tracing, " [cause=%u, n=%d]", it->first, it->second); + } + else + { + if (!std::exchange(switched_to_minimal, true)) + { + fmt::append(tracing, "; More:"); + } + + fmt::append(tracing, " %u", it->first); + } + } + + fmt::append(tracing, " of %d failures", fail_count); + spu_log.notice("%s\n%s", break_error, tracing); + + std::string block_dump; + this->dump(result, block_dump, previous.loop_pc, previous.loop_end + 1); + + spu_log.notice("SPU Block Dump:\n%s", block_dump); + } + }; + const auto break_all_patterns = [&](u32 cause) { break_putllc16(cause, atomic16->discard()); break_channel_pattern(cause, rchcnt_loop->discard()); + break_reduced_loop_pattern(cause, reduced_loop->discard()); }; const auto calculate_absolute_ls_difference = [](u32 addr1, u32 addr2) @@ -5406,16 +5623,6 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s u32 stackframe_pc = SPU_LS_SIZE; usz entry_index = umax; - auto get_block_targets = [&](u32 pc) -> std::span - { - if (m_block_info[pc / 4] && m_bbs.count(pc)) - { - return m_bbs.at(pc).targets; - } - - return {}; - }; - u32 target_pc = SPU_LS_SIZE; bool insert_entry = false; bool is_code_backdoor = false; @@ -5605,7 +5812,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s } } - const u32 previous_pc = m_bbs.at(reg_state_it[stackframe_it].pc).size * 4 + reg_state_it[stackframe_it].pc - 4; + const u32 previous_pc = ::at32(m_bbs, reg_state_it[stackframe_it].pc).size * 4 + reg_state_it[stackframe_it].pc - 4; bool may_return = previous_pc + 4 != entry_point + result.data.size() * 4 && (m_ret_info[(previous_pc / 4) + 1] || m_entry_info[previous_pc / 4]); @@ -5634,6 +5841,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s // Backup analyser information const auto atomic16_info = reg_state_it[stackframe_it].atomic16; const auto rchcnt_loop_info = reg_state_it[stackframe_it].rchcnt_loop; + const auto reduced_loop_info = reg_state_it[stackframe_it].reduced_loop; // Clean from the back possible because it does not affect old indices // Technically should always do a full cleanup at the moment @@ -5659,6 +5867,8 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s spu_log.trace("Emplacing: block_id=%d, pc=0x%x, target_it=%d/%d, new_pc=0x%x (has_it=%d)", reg_state_it[stackframe_it].iterator_id, stackframe_pc, entry_index + 1, target_size, target_pc, atomic16_info.active); auto& next = reg_state_it.emplace_back(target_pc, stackframe_it, 0); + initiate_patterns(next, target_pc, true); + if (!is_code_backdoor) { // Restore analyser information (if not an entry) @@ -5666,6 +5876,9 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s if (previous_pc != rchcnt_loop_info.branch_pc || target_pc == rchcnt_loop_info.branch_target) next.rchcnt_loop = rchcnt_loop_info; + + if (previous_pc + 4 == target_pc && reduced_loop_info.loop_pc != reduced_loop_info.loop_end && reduced_loop_info.active && target_pc <= reduced_loop_info.loop_end) + next.reduced_loop = reduced_loop_info; } else { @@ -5701,15 +5914,30 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s if (!infos.empty()) { - reg_state_it.emplace_back(::at32(infos, entry_point)->pc).iterator_id = iterator_id_alloc++;; + reg_state_it.emplace_back(::at32(infos, entry_point)->pc).iterator_id = iterator_id_alloc++; + + initiate_patterns(reg_state_it.back(), ::at32(infos, entry_point)->pc, true); } } } + const auto prev_wi = wi - 1; + if (prev_wi != umax && ::at32(reg_state_it, prev_wi).reduced_loop.active) + { + const auto reduced_loop = &::at32(reg_state_it, prev_wi).reduced_loop; + + for (const auto& [reg_num, reg] : reduced_loop->regs) + { + + } + } + if (wi < reg_state_it.size()) { wa = ::at32(reg_state_it, wi).pc; bpc = wa; + + initiate_patterns(::at32(reg_state_it, wi), bpc, false); } }; @@ -5834,7 +6062,8 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s if (!is_form_block) { // Call for external code - break_all_patterns(25); + break_putllc16(25, atomic16->discard()); + break_channel_pattern(25, rchcnt_loop->discard()); } } @@ -5859,6 +6088,149 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s const auto op = spu_opcode_t{data}; const auto type = g_spu_itype.decode(data); + if (reduced_loop->active && !(type & spu_itype::zregmod)) + { + const u32 op_rt = type & spu_itype::_quadrop ? +op.rt4 : +op.rt; + + u32 ra = s_reg_max, rb = s_reg_max, rc = s_reg_max; + + if (::at32(m_use_ra, pos / 4)) + { + ra = op.ra; + } + + if (::at32(m_use_rb, pos / 4)) + { + rb = op.rb; + } + + if (::at32(m_use_rc, pos / 4)) + { + rc = op.rc; + } + + bool is_move_register_op = false; + + switch (type) + { + case spu_itype::SHLQBYI: + { + is_move_register_op = op.i7 == 0; + break; + } + // Technically only ORI is needed but I am taking into account possible third-party SPU compilers or hand-written assembly + case spu_itype::ORI: + case spu_itype::ORHI: + case spu_itype::ORBI: + case spu_itype::AI: + case spu_itype::AHI: + case spu_itype::XORI: + case spu_itype::XORHI: + case spu_itype::XORBI: + { + is_move_register_op = op.si10 == 0; + break; + } + case spu_itype::ANDI: + case spu_itype::ANDHI: + case spu_itype::ANDBI: + { + is_move_register_op = op.si10 == -1; + break; + } + default: + { + break; + } + } + + u32 reg_pos = SPU_LS_SIZE; + + auto org = reduced_loop->get_reg(op_rt); + + u32 reg_first = s_reg_max; + + for (u32 reg : {ra, rb, rc}) + { + if (reg != s_reg_max && reg != reg_first) + { + const auto arg = reduced_loop->find_reg(reg); + + if (arg && arg->modified >= 1) + { + reg_first = reg; + + if (reg_first != s_reg_max && !is_move_register_op) + { + // Multiple origins + org.add_instruction_modifier(spu_itype::UNK, op.opcode); + break; + } + } + } + } + + if (reg_first == s_reg_max) + { + org = {}; + + if (!is_move_register_op) + { + org.add_instruction_modifier(type, op.opcode); + } + } + else if (reg_first == rb) + { + std::swap(ra, rb); + } + else if (reg_first == rc) + { + std::swap(ra, rc); + } + + for (u32 reg : {ra, rb, rc}) + { + if (reg != s_reg_max) + { + const auto arg = reduced_loop->find_reg(reg); + + if (arg && arg->regs.count() != 0) + { + if (reg_first == reg) + { + org = *arg; + + if (!is_move_register_op) + { + org.add_instruction_modifier(type, op.opcode); + } + + continue; + } + + org.join_with_this(*arg); + } + else + { + org.add_register_origin(reg); + } + } + } + + if (type & spu_itype::memory || type == spu_itype::RDCH || type == spu_itype::RCHCNT) + { + // Register external origin + org.add_register_origin(s_reg_max); + } + + *ensure(reduced_loop->find_reg(op_rt)) = org; + } + + if (reduced_loop->active && ((type & spu_itype::memory) || type == spu_itype::STOP || type == spu_itype::STOPD)) + { + reduced_loop->is_constant_expression = false; + } + // For debugging if (false && likely_putllc_loop && is_pattern_match) { @@ -5945,12 +6317,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s break; } - if (type == spu_itype::SYNC) - { - // Remember - sync = true; - } - + break_reduced_loop_pattern(19, reduced_loop->discard()); break; } @@ -5958,10 +6325,6 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s case spu_itype::BI: case spu_itype::BISL: case spu_itype::BISLED: - case spu_itype::BIZ: - case spu_itype::BINZ: - case spu_itype::BIHZ: - case spu_itype::BIHNZ: { if (op.e || op.d) { @@ -5977,8 +6340,86 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s break; } + case spu_itype::BR: case spu_itype::BRA: { + if (reduced_loop->active) + { + if (!reduced_loop->is_two_block_loop || !reduced_loop->has_cond_state) + { + break_reduced_loop_pattern(20, reduced_loop->discard()); + break; + } + + for (const auto& [reg_num, reg] : reduced_loop->regs) + { + if (reg.is_loop_dictator(reg_num)) + { + if (reg.is_non_predictable_loop_dictator(reg_num)) + { + //break_reduced_loop_pattern(13, reduced_loop->discard()); + reduced_loop->is_constant_expression = false; + } + + reduced_loop->loop_dicts.set(reg_num); + } + } + + std::array reg_use{}; + std::bitset reg_maybe_float{}; + std::bitset reg_mod{}; + + for (auto it = m_bbs.find(reduced_loop->loop_pc); it != m_bbs.end() && it->first <= bpc; it++) + { + for (u32 i = 0; i < s_reg_max; i++) + { + if (!reg_mod[i]) + { + reg_use[i] += it->second.reg_use[i]; + } + } + + reg_maybe_float |= it->second.reg_maybe_float; + reg_mod |= it->second.reg_mod; + + // Note: update when sup_conds are implemented + if (it->first == bpc && it->first != reduced_loop->loop_pc) + { + reduced_loop->loop_may_update |= it->second.reg_mod; + } + } + + for (u32 i = 0; i < s_reg_max; i++) + { + if (!::at32(reduced_loop->loop_dicts, i)) + { + if (reg_use[i] && reg_mod[i]) + { + reduced_loop->is_constant_expression = false; + reduced_loop->loop_writes.set(i); + reduced_loop->loop_may_update.reset(i); + } + else if (reg_use[i]) + { + reduced_loop->loop_args.set(i); + + if (reg_use[i] >= 3 && reg_maybe_float[i]) + { + reduced_loop->gpr_not_nans.set(i); + } + } + } + else + { + // Cleanup + reduced_loop->loop_may_update.reset(i); + } + } + + reduced_loop_all.emplace(reduced_loop->loop_pc, *reduced_loop); + reduced_loop->discard(); + } + break; } @@ -5988,7 +6429,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s const u32 next_pc = spu_branch_target(pos, 1); const u32 target = spu_branch_target(pos, op.i16); - if (rchcnt_loop->active) + while (rchcnt_loop->active) { const reg_state_t& rt = vregs[op.rt]; @@ -6004,16 +6445,710 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s rchcnt_loop->conditioned = true; rchcnt_loop->branch_pc = pos; rchcnt_loop->branch_target = rchcnt_loop->product_test_negate != (type == spu_itype::BRZ) ? target : next_pc; + } + + break; + } + + [[fallthrough]]; + } + case spu_itype::BRHZ: + case spu_itype::BRHNZ: + + case spu_itype::BIZ: + case spu_itype::BINZ: + case spu_itype::BIHZ: + case spu_itype::BIHNZ: + { + if (type == spu_itype::spu_itype::BIZ || type == spu_itype::BINZ || type == spu_itype::BIHZ || type == spu_itype::BIHNZ) + { + if (op.e || op.d) + { + break_all_patterns(27); break; } } - break; - } - case spu_itype::BR: - case spu_itype::BRHZ: - case spu_itype::BRHNZ: - { + const bool is_u16_jump = type == spu_itype::BRHZ || type == spu_itype::BRHNZ || type == spu_itype::BIHZ || type == spu_itype::BIHNZ; + const bool is_jump_zero = (type == spu_itype::BRZ || type == spu_itype::BRHZ || type == spu_itype::BIZ || type == spu_itype::BIHZ) ^ reduced_loop->is_two_block_loop; + + while (reduced_loop->active) + { + if (reduced_loop->expected_sup_conds) + { + break_reduced_loop_pattern(50, reduced_loop->discard()); + break; + } + + const u32 op_rt = op.rt; + + const auto reg = reduced_loop->find_reg(op_rt); + + if (!reg/* || reg->modified == 0*/) // See special case regarding branch with direct comparison with 0 + { + break_reduced_loop_pattern(1, reduced_loop->discard()); + break; + } + + bool should_have_argument_dictator = false; + bool should_have_argument_increment = false; + bool cond_val_incr_before_cond = false; + bool ends_with_comparison = false; + + bool pattern_ok1 = true; + + switch (reg->mod1_type) + { + case spu_itype::A: + { + should_have_argument_increment = true; + [[fallthrough]]; + } + case spu_itype::AI: + case spu_itype::AHI: + { + cond_val_incr_before_cond = true; + pattern_ok1 = true; + break; + } + case spu_itype::CEQ: + case spu_itype::CEQH: + case spu_itype::CEQB: + case spu_itype::CGT: + case spu_itype::CGTH: + case spu_itype::CGTB: + case spu_itype::CLGT: + case spu_itype::CLGTH: + case spu_itype::CLGTB: + { + ends_with_comparison = true; + should_have_argument_dictator = true; + break; + } + case spu_itype::CEQI: + case spu_itype::CEQHI: + case spu_itype::CEQBI: + case spu_itype::CGTI: + case spu_itype::CGTHI: + case spu_itype::CGTBI: + case spu_itype::CLGTI: + case spu_itype::CLGTHI: + case spu_itype::CLGTBI: + { + ends_with_comparison = true; + pattern_ok1 = true; + break; + } + default: + { + if (reg->modified == 0) + { + // Special case: target may be sourced from another register which would be the loop dictator + break; + } + + pattern_ok1 = false; + break; + } + } + + if (!pattern_ok1) + { + break_reduced_loop_pattern(9, reduced_loop->discard()); + break; + } + + if (reg->modified >= 2) + { + switch (reg->mod2_type) + { + case spu_itype::A: + { + should_have_argument_increment = true; + [[fallthrough]]; + } + case spu_itype::AI: + case spu_itype::AHI: + { + if (cond_val_incr_before_cond) + { + // AI twice + break_reduced_loop_pattern(8, reduced_loop->discard()); + pattern_ok1 = false; + break; + } + + cond_val_incr_before_cond = false; + pattern_ok1 = true; + break; + } + case spu_itype::CEQ: + case spu_itype::CEQH: + case spu_itype::CEQB: + case spu_itype::CGT: + case spu_itype::CGTH: + case spu_itype::CGTB: + case spu_itype::CLGT: + case spu_itype::CLGTH: + case spu_itype::CLGTB: + { + if (!cond_val_incr_before_cond) + { + // Double comparison + break_reduced_loop_pattern(19, reduced_loop->discard()); + pattern_ok1 = false; + break; + } + + pattern_ok1 = true; + ends_with_comparison = true; + should_have_argument_dictator = true; + break; + } + case spu_itype::CEQI: + case spu_itype::CEQHI: + case spu_itype::CEQBI: + case spu_itype::CGTI: + case spu_itype::CGTHI: + case spu_itype::CGTBI: + case spu_itype::CLGTI: + case spu_itype::CLGTHI: + case spu_itype::CLGTBI: + { + if (!cond_val_incr_before_cond) + { + // Double comparison + break_reduced_loop_pattern(19, reduced_loop->discard()); + pattern_ok1 = false; + break; + } + + ends_with_comparison = true; + pattern_ok1 = true; + break; + } + default: + { + pattern_ok1 = false; + break; + } + } + } + + if (!pattern_ok1) + { + break_reduced_loop_pattern(10, reduced_loop->discard()); + break; + } + + bool found_loop_dictator = false; + bool found_loop_argument_for_dictator = false; + u32 null_regs_found = 0; + + for (u32 i = 0; i < reg->regs.size() && reduced_loop->active; i++) + { + if (::at32(reg->regs, i)) + { + if (0) if (i == op_rt || reg->modified == 0) + { + // Special case: direct comparison with zero for 32-bits (the only supported form by SPU) + + if (is_jump_zero) + { + // Infinite or single-time "loop" + break_reduced_loop_pattern(3, reduced_loop->discard()); + break; + } + + if (reg->modified >= 2) + { + break_reduced_loop_pattern(22, reduced_loop->discard()); + break; + } + + reduced_loop->cond_val_mask = u32{umax}; + reduced_loop->cond_val_min = 0; + reduced_loop->cond_val_size = u32{umax}; + + auto comp_reg = i == op_rt ? reg : reduced_loop->find_reg(i); + + if (!comp_reg || !comp_reg->is_predictable_loop_dictator(i)) + { + break_reduced_loop_pattern(4, reduced_loop->discard()); + break; + } + + ensure(reg->modified == 1 || i != op_rt); + + reduced_loop->cond_val_incr = static_cast(comp_reg->IMM); + reduced_loop->cond_val_incr_before_cond = reg->modified == 1; + reduced_loop->cond_val_register_idx = i; + reduced_loop->cond_val_compare = CMP_NOT_EQUAL; + reduced_loop->cond_val_is_immediate = true; + + found_loop_dictator = true; + break; + } + + auto reg_org = reduced_loop->find_reg(i); + u32 reg_index = i; + + if (reg_org && !cond_val_incr_before_cond && reg_org->modified == 0 && reg_org->regs.count() - 1u <= 1u && !::at32(reg_org->regs, i)) + { + for (u32 j = 0; j <= s_reg_127; j++) + { + if (::at32(reg_org->regs, j)) + { + if (const auto reg_found = reduced_loop->find_reg(j)) + { + if (reg_found->modified) + { + reg_org = reg_found; + reg_index = j; + break; + } + } + } + } + } + + if (!reg_org || reg_org->is_null(reg_index)) + { + // if (found_loop_dictator && !reduced_loop->cond_val_incr_is_immediate) + // { + // ensure(reduced_loop->cond_val_incr < s_reg_max); + + // } + // if (!should_have_argument_dictator) + // { + // break_reduced_loop_pattern(11, reduced_loop->discard()); + // break; + // } + + // if (found_loop_argument_for_dictator) + // { + // break_reduced_loop_pattern(6, reduced_loop->discard()); + // break; + // } + + // found_loop_argument_for_dictator = true; + // reduced_loop->cond_val_is_immediate = false; + + // if (found_loop_dictator) + // { + // ensure(i == reduced_loop->cond_val_register_argument_idx); + // } + // else + // { + // reduced_loop->cond_val_register_argument_idx = i; + // } + + // if (found_loop_dictator && reg->regs.count() == 2) + // { + // break; + // } + + null_regs_found++; + continue; + } + + if (found_loop_dictator) + { + break_reduced_loop_pattern(13, reduced_loop->discard()); + break; + } + + found_loop_dictator = true; + + if (!reg_org->is_predictable_loop_dictator(i)) + { + break_reduced_loop_pattern(7, reduced_loop->discard()); + break; + } + + if (reg_index != i && ::at32(reg->regs, reg_index)) + { + // Unimplemented + break_reduced_loop_pattern(30, reduced_loop->discard()); + break; + } + + u32 cond_val_incr = static_cast(reg_org->IMM); + + if (reg_org->mod1_type == spu_itype::AI || reg_org->mod1_type == spu_itype::AHI) + { + reduced_loop->cond_val_incr_is_immediate = true; + reduced_loop->cond_val_incr = static_cast(reg_org->IMM); + } + else if (reg_org->mod1_type == spu_itype::A) + { + reduced_loop->cond_val_incr_is_immediate = false; + + const u32 op_ra = spu_opcode_t{reg_org->IMM}.ra; + const u32 op_rb = spu_opcode_t{reg_org->IMM}.rb; + + if (!(op_ra == reg_index || op_rb == reg_index)) + { + break_reduced_loop_pattern(25, reduced_loop->discard()); + break; + } + + const u32 incr_arg_reg = reg_index == op_ra ? op_rb : op_ra; + + if (!reduced_loop->is_reg_null(incr_arg_reg)) + { + break_reduced_loop_pattern(26, reduced_loop->discard()); + break; + } + + reduced_loop->cond_val_incr = incr_arg_reg; + } + else + { + break_reduced_loop_pattern(28, reduced_loop->discard()); + break; + } + + reduced_loop->cond_val_incr_before_cond = cond_val_incr_before_cond; + + u64 cmp_mask = 0; + compare_direction cmp_direction{}; + + if (!ends_with_comparison) + { + if (is_jump_zero) + { + // Infinite or single-time "loop" + break_reduced_loop_pattern(3, reduced_loop->discard()); + break; + } + + cmp_mask = is_u16_jump ? u16{umax} : u32{umax}; + reduced_loop->cond_val_min = 0; + reduced_loop->cond_val_is_immediate = true; + cmp_direction = CMP_NOT_EQUAL; + } + else if (!should_have_argument_dictator) + { + reduced_loop->cond_val_min = reg->IMM; + reduced_loop->cond_val_is_immediate = true; + + const auto cmp_optype = reg->reverse1_type() == spu_itype::XSBH ? reg->reverse2_type() : reg->reverse1_type(); + + switch (cmp_optype) + { + case spu_itype::CEQI: + case spu_itype::CEQHI: + case spu_itype::CEQBI: + { + cmp_direction = CMP_EQUAL; + break; + } + case spu_itype::CGTI: + case spu_itype::CGTHI: + case spu_itype::CGTBI: + { + cmp_direction = CMP_SGREATER; + break; + } + case spu_itype::CLGTI: + case spu_itype::CLGTHI: + case spu_itype::CLGTBI: + { + cmp_direction = CMP_LGREATER; + break; + } + default: + { + break_reduced_loop_pattern(21, reduced_loop->discard()); + } + } + + switch (cmp_optype) + { + case spu_itype::CEQI: + case spu_itype::CGTI: + case spu_itype::CLGTI: + { + cmp_mask = u32{umax}; + break; + } + case spu_itype::CLGTHI: + case spu_itype::CEQHI: + case spu_itype::CGTHI: + { + cmp_mask = u16{umax}; + break; + } + case spu_itype::CEQBI: + case spu_itype::CGTBI: + case spu_itype::CLGTBI: + { + cmp_mask = u8{umax}; + break; + } + default: break_reduced_loop_pattern(21, reduced_loop->discard()); + } + + if (is_jump_zero) + { + cmp_direction = compare_direction{cmp_direction ^ CMP_NEGATE_FLAG}; + } + + if (cmp_direction == CMP_EQUAL2 || cmp_direction == CMP_NOT_EQUAL2) + { + // Fixup (no sense in remembering the turnaround for euqality comparison) + cmp_direction = compare_direction{cmp_direction & ~CMP_TURNAROUND_FLAG}; + } + } + else + { + const u32 op_ra = spu_opcode_t{reg->IMM}.ra; + const u32 op_rb = spu_opcode_t{reg->IMM}.rb; + + if (!(op_ra == reg_index || op_rb == reg_index)) + { + break_reduced_loop_pattern(20, reduced_loop->discard()); + break; + } + + const auto cmp_optype = reg->reverse1_type() == spu_itype::XSBH ? reg->reverse2_type() : reg->reverse1_type(); + + switch (cmp_optype) + { + case spu_itype::CEQ: + case spu_itype::CEQH: + case spu_itype::CEQB: + { + cmp_direction = CMP_EQUAL; + break; + } + case spu_itype::CGT: + case spu_itype::CGTH: + case spu_itype::CGTB: + { + cmp_direction = CMP_SGREATER; + break; + } + case spu_itype::CLGT: + case spu_itype::CLGTH: + case spu_itype::CLGTB: + { + cmp_direction = CMP_LGREATER; + break; + } + default: ensure(false); + } + + switch (cmp_optype) + { + case spu_itype::CEQ: + case spu_itype::CGT: + case spu_itype::CLGT: + { + cmp_mask = u32{umax}; + break; + } + case spu_itype::CLGTH: + case spu_itype::CEQH: + case spu_itype::CGTH: + { + cmp_mask = u16{umax}; + break; + } + case spu_itype::CEQB: + case spu_itype::CGTB: + case spu_itype::CLGTB: + { + cmp_mask = u8{umax}; + break; + } + default: ensure(false); + } + + if (op_ra != i) + { + // Compare is on the oppsoite direction + // This variation exists only via register mode (due to lack of SPU opcodes) + cmp_direction = compare_direction{cmp_direction ^ CMP_TURNAROUND_FLAG}; + } + + if (is_jump_zero) + { + cmp_direction = compare_direction{cmp_direction ^ CMP_NEGATE_FLAG}; + } + + if (cmp_direction == CMP_EQUAL2 || cmp_direction == CMP_NOT_EQUAL2) + { + // Fixup (no sense in remembering the turnaround for euqality comparison) + cmp_direction = compare_direction{cmp_direction & ~CMP_TURNAROUND_FLAG}; + } + + // The loop dictator is the register that is not the argument + const u32 loop_arg_reg = reg_index == op_ra ? op_rb : op_ra; + const u32 loop_dict_reg = reg_index == op_ra ? op_ra : op_rb; + reduced_loop->cond_val_is_immediate = false; + + if (found_loop_argument_for_dictator) + { + ensure(loop_arg_reg == reduced_loop->cond_val_register_argument_idx); + } + else + { + reduced_loop->cond_val_register_argument_idx = loop_arg_reg; + } + + if (!reduced_loop->is_reg_null(loop_arg_reg)) + { + break_reduced_loop_pattern(27, reduced_loop->discard()); + break; + } + + found_loop_argument_for_dictator = true; + } + + if (cmp_direction == CMP_EQUAL) + { + // Infinite or single-time "loop" + break_reduced_loop_pattern(18, reduced_loop->discard()); + break; + } + + if (cmp_mask == u16{umax} && !is_u16_jump) + { + break_reduced_loop_pattern(14, reduced_loop->discard()); + break; + } + + if (cmp_mask == u8{umax}) + { + bool instructions_ok = false; + + if (is_u16_jump) + { + // If ANDI(0xff) is used, although unlikely, it fine as well for 16-bits + instructions_ok = FN(x == spu_itype::XSBH || x == spu_itype::ANDI)(!cond_val_incr_before_cond ? reg->mod2_type : reg->mod3_type); + } + else + { + instructions_ok = FN(x == spu_itype::ANDI)(!cond_val_incr_before_cond ? reg->mod2_type : reg->mod3_type); + } + + if (!instructions_ok) + { + break_reduced_loop_pattern(15, reduced_loop->discard()); + break; + } + } + + reduced_loop->cond_val_compare = cmp_direction; + reduced_loop->cond_val_mask = cmp_mask; + reduced_loop->cond_val_register_idx = reg_index; + + // if (!should_have_argument_dictator && reg->regs.count() == 1) + // { + // break; + // } + + // if (found_loop_argument_for_dictator && reg->regs.count() == 2) + // { + // break; + // } + } + } + + if (!found_loop_dictator) + { + break_reduced_loop_pattern(16, reduced_loop->discard()); + } + + if (should_have_argument_dictator && !found_loop_argument_for_dictator) + { + break_reduced_loop_pattern(17, reduced_loop->discard()); + } + + if (reduced_loop->active) + { + ensure(reduced_loop->cond_val_register_idx != umax); + + if (reduced_loop->is_two_block_loop) + { + reduced_loop->has_cond_state = true; + break; + } + + for (const auto& [reg_num, reg] : reduced_loop->regs) + { + if (reg.is_loop_dictator(reg_num)) + { + if (reg.is_non_predictable_loop_dictator(reg_num)) + { + //break_reduced_loop_pattern(13, reduced_loop->discard()); + reduced_loop->is_constant_expression = false; + } + + reduced_loop->loop_dicts.set(reg_num); + } + } + + std::array reg_use{}; + std::bitset reg_maybe_float{}; + std::bitset reg_mod{}; + + for (auto it = m_bbs.find(reduced_loop->loop_pc); it != m_bbs.end() && it->first <= bpc; it++) + { + for (u32 i = 0; i < s_reg_max; i++) + { + if (!reg_mod[i]) + { + reg_use[i] += it->second.reg_use[i]; + } + } + + reg_maybe_float |= it->second.reg_maybe_float; + reg_mod |= it->second.reg_mod; + + // Note: update when sup_conds are implemented + if (it->first == bpc && it->first != reduced_loop->loop_pc) + { + reduced_loop->loop_may_update |= it->second.reg_mod; + } + } + + for (u32 i = 0; i < s_reg_max; i++) + { + if (!::at32(reduced_loop->loop_dicts, i)) + { + if (reg_use[i] && reg_mod[i]) + { + reduced_loop->is_constant_expression = false; + reduced_loop->loop_writes.set(i); + reduced_loop->loop_may_update.reset(i); + } + else if (reg_use[i]) + { + reduced_loop->loop_args.set(i); + + if (reg_use[i] >= 3 && reg_maybe_float[i]) + { + reduced_loop->gpr_not_nans.set(i); + } + } + } + else + { + // Cleanup + reduced_loop->loop_may_update.reset(i); + } + } + + reduced_loop_all.emplace(reduced_loop->loop_pc, *reduced_loop); + reduced_loop->discard(); + } + + break; + } + break; } @@ -6026,17 +7161,49 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s case spu_itype::HLGTI: case spu_itype::LNOP: case spu_itype::NOP: - case spu_itype::MTSPR: case spu_itype::FSCRWR: { // Do nothing break; } - + + case spu_itype::MTSPR: + { + break_all_patterns(99); + break; + } + case spu_itype::WRCH: { break_channel_pattern(56, rchcnt_loop->discard()); + if (reduced_loop->active) + { + switch (op.ra) + { + case MFC_EAL: + case MFC_LSA: + case MFC_TagID: + case MFC_Size: + case MFC_EAH: + case SPU_WrDec: + case SPU_WrSRR0: + case SPU_WrEventAck: + case SPU_Set_Bkmk_Tag: + case SPU_PM_Start_Ev: + case SPU_PM_Stop_Ev: + case MFC_WrTagMask: + { + break; + } + default: + { + break_reduced_loop_pattern(18, reduced_loop->discard()); + break; + } + } + } + switch (op.ra) { case MFC_EAL: @@ -6299,6 +7466,14 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s const bool is_read = type == spu_itype::RDCH; bool invalidate = true; + if (!is_read || op.ra != SPU_RdDec) + { + if (reduced_loop->active) + { + break_reduced_loop_pattern(17, reduced_loop->discard()); + } + } + const auto it = rchcnt_loop_all.find(pos); if (it != rchcnt_loop_all.end()) @@ -7208,17 +8383,17 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s u32 ra = s_reg_max, rb = s_reg_max, rc = s_reg_max; - if (m_use_ra.test(pos / 4)) + if (::at32(m_use_ra, pos / 4)) { ra = op.ra; } - if (m_use_rb.test(pos / 4)) + if (::at32(m_use_rb, pos / 4)) { rb = op.rb; } - if (type & spu_itype::_quadrop && m_use_rc.test(pos / 4)) + if (::at32(m_use_rc, pos / 4)) { rc = op.rc; } @@ -7266,6 +8441,11 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s { for (u32 next_target : ::at32(m_targets, pos)) { + if (next_target == SPU_LS_SIZE) + { + continue; + } + add_block(next_target); } @@ -7450,6 +8630,76 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s } } + for (const auto& [loop_pc, pattern] : reduced_loop_all) + { + if (!pattern.active || pattern.loop_pc == SPU_LS_SIZE) + { + continue; + } + + if (inst_attr attr = m_inst_attrs[(loop_pc - entry_point) / 4]; attr == inst_attr::none) + { + const u64 hash = loop_pc / 4 + read_from_ptr>(func_hash.data()); + + add_pattern(inst_attr::reduced_loop, loop_pc - result.entry_point, 0, std::make_shared(pattern)); + + std::string regs = "{"; + + for (const auto& [reg_num, reg] : pattern.regs) + { + if (reg.is_loop_dictator(reg_num)) + { + if (regs.size() != 1) + { + regs += ","; + } + + fmt::append(regs, " r%u", reg_num); + } + } + + for (u32 i = 0; i < s_reg_max; i++) + { + if (::at32(pattern.loop_writes, i)) + { + if (regs.size() != 1) + { + regs += ","; + } + + fmt::append(regs, " r%u-w", i); + } + + if (::at32(pattern.loop_args, i)) + { + if (regs.size() != 1) + { + regs += ","; + } + + fmt::append(regs, " r%u-r", i); + } + + if (::at32(pattern.loop_may_update, i)) + { + if (regs.size() != 1) + { + regs += ","; + } + + fmt::append(regs, " r%u-m", i); + } + } + + regs += " }"; + + spu_log.success("Reduced Loop Pattern Detected! (REGS: %s, DICT: r%d, ARG: %s, Incr: %s (%s), CMP/Size: %s/%u, loop_pc=0x%x, 0x%x-%s)", regs, pattern.cond_val_register_idx + , pattern.cond_val_is_immediate ? fmt::format("0x%x", pattern.cond_val_min) : fmt::format("r%d", pattern.cond_val_register_argument_idx) + , pattern.cond_val_incr_is_immediate ? fmt::format("%d", static_cast(pattern.cond_val_incr)) : fmt::format("r%d", pattern.cond_val_incr), pattern.cond_val_incr_before_cond ? "BEFORE" : "AFTER" + , pattern.cond_val_compare, std::popcount(pattern.cond_val_mask), loop_pc, entry_point, func_hash); + } + } + if (likely_putllc_loop && !had_putllc_evaluation) { spu_log.notice("Likely missed PUTLLC16 patterns. (entry=0x%x)", entry_point); @@ -7460,7 +8710,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s // Blocks starting from 0x0 or invalid instruction won't be compiled, may need special interpreter fallback } - if (!m_patterns.empty()) + if (!m_patterns.empty() && g_cfg.core.spu_debug) { std::string out_dump; dump(result, out_dump); @@ -7483,11 +8733,12 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s return result; } -void spu_recompiler_base::dump(const spu_program& result, std::string& out) +void spu_recompiler_base::dump(const spu_program& result, std::string& out, u32 block_min, u32 block_max) { SPUDisAsm dis_asm(cpu_disasm_mode::dump, reinterpret_cast(result.data.data()), result.lower_bound); std::string hash; + be_t hash_start{}; if (!result.data.empty()) { @@ -7498,19 +8749,28 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out) sha1_update(&ctx, reinterpret_cast(result.data.data()), result.data.size() * 4); sha1_finish(&ctx, output); fmt::append(hash, "%s", fmt::base57(output)); + std::memcpy(&hash_start, output, sizeof(hash_start)); } else { hash = "N/A"; } - fmt::append(out, "========== SPU BLOCK 0x%05x (size %u, %s) ==========\n\n", result.entry_point, result.data.size(), hash); + if (block_min == 0) + { + fmt::append(out, "========== SPU BLOCK 0x%05x (size %u, %s) ==========\n\n", result.entry_point, result.data.size(), hash); + } for (auto& bb : m_bbs) { + if (bb.first < block_min || bb.first >= block_max) + { + continue; + } + if (m_block_info[bb.first / 4]) { - fmt::append(out, "A: [0x%05x] %s\n", bb.first, m_entry_info[bb.first / 4] ? (m_ret_info[bb.first / 4] ? "Chunk" : "Entry") : "Block"); + fmt::append(out, "A: [0x%05x] %s [%s]\n", bb.first, m_entry_info[bb.first / 4] ? (m_ret_info[bb.first / 4] ? "Chunk" : "Entry") : "Block", spu_block_hash{(hash_start & -65536) + bb.first / 4}); fmt::append(out, "\t F: 0x%05x\n", bb.second.func); @@ -8530,9 +9790,9 @@ std::array& block_reg_info::evaluate_start_state(const s return walkby_state; } -void spu_recompiler_base::add_pattern(inst_attr attr, u32 start, u64 info) +void spu_recompiler_base::add_pattern(inst_attr attr, u32 start, u64 info, std::shared_ptr info_ptr) { - m_patterns[start] = pattern_info{info}; + m_patterns[start] = pattern_info{info, info_ptr}; m_inst_attrs[start / 4] = attr; } diff --git a/rpcs3/Emu/Cell/SPUDisAsm.h b/rpcs3/Emu/Cell/SPUDisAsm.h index 0d5862025b..5b1f097393 100644 --- a/rpcs3/Emu/Cell/SPUDisAsm.h +++ b/rpcs3/Emu/Cell/SPUDisAsm.h @@ -903,8 +903,14 @@ public: if (auto [is_const, value] = try_get_const_equal_value_array(+op.ra); is_const) { + if (value % 0x200 != 0) + { + // si10 is overwritten - likely an analysis mistake + return; + } + // Comment constant formation - comment_constant(last_opcode, value | static_cast(op.si10)); + comment_constant(last_opcode, value | static_cast(op.si10), false); } } void ORHI(spu_opcode_t op) @@ -941,8 +947,14 @@ public: if (auto [is_const, value] = try_get_const_equal_value_array(op.ra); is_const) { + if (value % 0x200 != 0) + { + // si10 is overwritten - likely an analysis mistake + return; + } + // Comment constant formation - comment_constant(last_opcode, value + static_cast(op.si10)); + comment_constant(last_opcode, value + static_cast(op.si10), false); } } void AHI(spu_opcode_t op) @@ -963,8 +975,14 @@ public: if (auto [is_const, value] = try_get_const_equal_value_array(op.ra); is_const) { + if (value % 0x200 != 0) + { + // si10 is overwritten - likely an analysis mistake + return; + } + // Comment constant formation - comment_constant(last_opcode, value ^ static_cast(op.si10)); + comment_constant(last_opcode, value ^ static_cast(op.si10), false); } } void XORHI(spu_opcode_t op) diff --git a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp index eb44289320..6837baaa97 100644 --- a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp @@ -60,6 +60,7 @@ const extern spu_decoder g_spu_iflag; #pragma GCC diagnostic pop #endif +#pragma optimize("", off) #ifdef ARCH_ARM64 #include "Emu/CPU/Backends/AArch64/AArch64JIT.h" #endif @@ -132,6 +133,8 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator llvm::MDNode* m_md_unlikely; llvm::MDNode* m_md_likely; + llvm::MDNode* m_md_spu_memory_domain; + llvm::MDNode* m_md_spu_context_domain; struct block_info { @@ -139,7 +142,7 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator spu_recompiler_base::block_info* bb{}; // Current block's entry block - llvm::BasicBlock* block; + llvm::BasicBlock* block{}; // Final block (for PHI nodes, set after completion) llvm::BasicBlock* block_end{}; @@ -150,11 +153,15 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator // Current register values std::array reg{}; + // Opimization: restoring register state for registers that would be rewritten in other blocks + std::array reg_save_and_restore{}; + // PHI nodes created for this block (if any) std::array phi{}; // Store instructions std::array store{}; + bool block_wide_reg_store_elimination = false; // Store reordering/elimination protection std::array store_context_last_id = fill_array(0); // Protects against illegal forward ordering @@ -189,10 +196,13 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator }; // Current block - block_info* m_block; + block_info* m_block = nullptr; // Current function or chunk - function_info* m_finfo; + function_info* m_finfo = nullptr; + + // Reduced Loop Pattern information (if available) + reduced_loop_t* m_reduced_loop_info = nullptr; // All blocks in the current function chunk std::unordered_map> m_blocks; @@ -364,7 +374,7 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator { if (i != s_reg_lr && i != s_reg_sp && (i < s_reg_80 || i > s_reg_127)) { - m_block->reg[i] = m_ir->CreateLoad(get_reg_type(i), init_reg_fixed(i)); + m_block->reg[i] = get_reg_fixed(i, get_reg_type(i)); } } @@ -549,6 +559,40 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator return _ptr(m_thread, ::offset32(offset_args...)); } + template + T* spu_mem_attr(T* inst) + { + if (auto load_inst = llvm::dyn_cast(inst)) + { + load_inst->setMetadata(llvm::LLVMContext::MD_noalias, m_md_spu_context_domain); + load_inst->setMetadata(llvm::LLVMContext::MD_alias_scope, m_md_spu_memory_domain); + } + else if (auto store_inst = llvm::dyn_cast(inst)) + { + store_inst->setMetadata(llvm::LLVMContext::MD_noalias, m_md_spu_context_domain); + store_inst->setMetadata(llvm::LLVMContext::MD_alias_scope, m_md_spu_memory_domain); + } + + return inst; + } + + template + T* spu_context_attr(T* inst) + { + if (auto load_inst = llvm::dyn_cast(inst)) + { + load_inst->setMetadata(llvm::LLVMContext::MD_alias_scope, m_md_spu_context_domain); + load_inst->setMetadata(llvm::LLVMContext::MD_noalias, m_md_spu_memory_domain); + } + else if (auto store_inst = llvm::dyn_cast(inst)) + { + store_inst->setMetadata(llvm::LLVMContext::MD_alias_scope, m_md_spu_context_domain); + store_inst->setMetadata(llvm::LLVMContext::MD_noalias, m_md_spu_memory_domain); + } + + return inst; + } + // Return default register type llvm::Type* get_reg_type(u32 index) { @@ -709,8 +753,14 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator if (!reg) { + if (m_block && m_block->block_wide_reg_store_elimination) + { + fmt::throw_exception("Unexpected load: [%s] at 0x%x (gpr=r%d)", m_hash, m_pos, index); + } + // Load register value if necessary reg = m_finfo && m_finfo->load[index] ? m_finfo->load[index] : m_ir->CreateLoad(get_reg_type(index), init_reg_fixed(index)); + spu_context_attr(reg); } if (reg->getType() == get_type()) @@ -920,6 +970,14 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator if (m_block) { + if (m_block->block_wide_reg_store_elimination) + { + // Don't save registers for the current block iteration + // Affected optimizations: + // 1. Single-block reduced loop + return; + } + // Keep the store's location in history of gpr preservaions m_block->store_context_last_id[index] = m_block->store_context_ctr[index]; m_block->store_context_first_id[index] = std::min(m_block->store_context_first_id[index], m_block->store_context_ctr[index]); @@ -935,7 +993,9 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator } // Write register to the context - _store = m_ir->CreateStore(is_xfloat ? double_to_xfloat(saved_value) : m_ir->CreateBitCast(value, get_reg_type(index)), addr); + _store = m_ir->CreateStore(is_xfloat ? double_to_xfloat(saved_value) : bitcast(value, get_reg_type(index)), addr); + + spu_context_attr(_store); } template @@ -1046,7 +1106,7 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator // Update PC for current or explicitly specified instruction address void update_pc(u32 target = -1) { - m_ir->CreateStore(m_ir->CreateAnd(get_pc(target + 1 ? target : m_pos), 0x3fffc), spu_ptr(&spu_thread::pc))->setVolatile(true); + spu_context_attr(m_ir->CreateStore(m_ir->CreateAnd(get_pc(target + 1 ? target : m_pos), 0x3fffc), spu_ptr(&spu_thread::pc)))->setVolatile(true); } // Call cpu_thread::check_state if necessary and return or continue (full check) @@ -1055,7 +1115,7 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator const auto pstate = spu_ptr(&spu_thread::state); const auto _body = llvm::BasicBlock::Create(m_context, "", m_function); const auto check = llvm::BasicBlock::Create(m_context, "", m_function); - m_ir->CreateCondBr(m_ir->CreateICmpEQ(m_ir->CreateLoad(get_type(), pstate, true), m_ir->getInt32(0)), _body, check, m_md_likely); + m_ir->CreateCondBr(m_ir->CreateICmpEQ(spu_context_attr(m_ir->CreateLoad(get_type(), pstate, true)), m_ir->getInt32(0)), _body, check, m_md_likely); m_ir->SetInsertPoint(check); update_pc(addr); @@ -1066,14 +1126,14 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator if (may_be_unsafe_for_savestate) { - m_ir->CreateStore(m_ir->getInt8(1), spu_ptr(&spu_thread::unsavable))->setVolatile(true); + spu_context_attr(m_ir->CreateStore(m_ir->getInt8(1), spu_ptr(&spu_thread::unsavable)))->setVolatile(true); } m_ir->CreateCall(m_test_state, {m_thread}); if (may_be_unsafe_for_savestate) { - m_ir->CreateStore(m_ir->getInt8(0), spu_ptr(&spu_thread::unsavable))->setVolatile(true); + spu_context_attr(m_ir->CreateStore(m_ir->getInt8(0), spu_ptr(&spu_thread::unsavable)))->setVolatile(true); } m_ir->CreateBr(_body); @@ -1509,6 +1569,16 @@ public: m_md_likely = llvm::MDTuple::get(m_context, {md_name, md_high, md_low}); m_md_unlikely = llvm::MDTuple::get(m_context, {md_name, md_low, md_high}); + const auto domain = llvm::MDNode::getDistinct(m_context, {llvm::MDString::get(m_context, "SPU_mem")}); + const auto scope = llvm::MDNode::get(m_context, {llvm::MDString::get(m_context, "SPU_mem_scope"), domain}); + + m_md_spu_memory_domain = llvm::MDNode::get(m_context, scope); + + const auto domain2 = llvm::MDNode::getDistinct(m_context, {llvm::MDString::get(m_context, "SPU_ctx")}); + const auto scope2 = llvm::MDNode::get(m_context, {llvm::MDString::get(m_context, "SPU_ctx_scope"), domain2}); + + m_md_spu_context_domain = llvm::MDNode::get(m_context, scope2); + // Initialize transform passes clear_transforms(); #ifdef ARCH_ARM64 @@ -1678,7 +1748,7 @@ public: // Emit state check const auto pstate = spu_ptr(&spu_thread::state); - m_ir->CreateCondBr(m_ir->CreateICmpNE(m_ir->CreateLoad(get_type(), pstate), m_ir->getInt32(0)), label_stop, label_test, m_md_unlikely); + m_ir->CreateCondBr(m_ir->CreateICmpNE(spu_context_attr(m_ir->CreateLoad(get_type(), pstate)), m_ir->getInt32(0)), label_stop, label_test, m_md_unlikely); // Emit code check u32 check_iterations = 0; @@ -2059,6 +2129,43 @@ public: bool need_check = false; m_block->bb = &bb; + // [1gJ45f2-0x00a40]: 16.4982% (113258) + // [ZsQTud1-0x0924c]: 6.1202% (42014) + // [ZsQTud1-0x08e54]: 5.6610% (38862) + // [0000000-0x3fffc]: 4.3764% (30043) + // [Zh4tpJM-0x00bcc]: 3.7908% (26023) + // [CFt8hXu-0x063b8]: 3.6177% (24835) + // [8YJCUjv-0x0ad18]: 3.2417% (22254) + // [Try3XHn-0x0f018]: 2.3721% (16284) + // [s6ti9iu-0x07678]: 1.8464% (12675) + // [oyxkAPv-0x0c22c]: 1.7776% (12203) + // [Q0jLqH4-0x00324]: 1.6015% (10994) + static const std::array, 4> to_nop + { + { } + }; + + bool found_block = false; + + for (auto& [hash, pos] : to_nop) + { + if (m_hash.find(hash) <= 2 && baddr == pos) + { + found_block = true; + break; + } + } + + if (found_block) + { + for (u32 i = 0; i < 100; i++) + { + auto value = m_ir->CreateLoad(get_type(), spu_ptr(&spu_thread::last_getllar_lsa)); + auto mod_val = m_ir->CreateFDiv(value, llvm::ConstantFP::get(value->getType(), 1.1 + i)); + m_ir->CreateStore(value, spu_ptr(&spu_thread::last_getllar_lsa)); + } + } + if (!bb.preds.empty()) { // Initialize registers and build PHI nodes if necessary @@ -2160,12 +2267,542 @@ public: } } + if (bb.preds.size() >= 2) + { + if (g_cfg.core.spu_prof || g_cfg.core.spu_debug) + { + m_ir->CreateStore(m_ir->getInt64((m_hash_start & -65536) | (baddr >> 2)), spu_ptr(&spu_thread::block_hash)); + } + } + // State check at the beginning of the chunk if (need_check || (bi == 0 && g_cfg.core.spu_block_size != spu_block_size_type::safe)) { check_state(baddr); } + const bool is_reduced_loop = m_inst_attrs[(baddr - start) / 4] == inst_attr::reduced_loop; + m_reduced_loop_info = is_reduced_loop ? std::static_pointer_cast(ensure(m_patterns.at(baddr - start).info_ptr)).get() : nullptr; + + BasicBlock* block_optimization_phi_parent = nullptr; + const auto block_optimization_inner = is_reduced_loop ? BasicBlock::Create(m_context, fmt::format("b-loop-it-0x%x", m_pos), m_function) : nullptr; + const auto block_optimization_exit_early = is_reduced_loop ? BasicBlock::Create(m_context, fmt::format("b-loop-exit-0x%x", m_pos), m_function) : nullptr; + const auto block_optimization_next = is_reduced_loop ? BasicBlock::Create(m_context, fmt::format("b2-0x%x", m_pos), m_function) : nullptr; + + std::array reduced_loop_phi_nodes{}; + std::array reduced_loop_init_regs{}; + + // Reserve additional iteration for rare case where GPR may not be rewritten after the iteration + // So that it would have to be rewritten by future code + // This avoids using additional PHI connectors + const u32 reserve_iterations = m_reduced_loop_info && m_reduced_loop_info->loop_may_update.count() != 0 ? 3 : 2; + + for (u32 i = 0; i < s_reg_max; i++) + { + if (m_reduced_loop_info && m_reduced_loop_info->loop_may_update.test(i)) + { + m_block->reg_save_and_restore[i] = m_block->reg[i]; + } + } + + auto make_reduced_loop_condition = [&](llvm::BasicBlock* optimization_block, bool is_second_time) + { + llvm::ICmpInst::Predicate compare{}; + + switch (m_reduced_loop_info->cond_val_compare) + { + case CMP_SLESS: compare = ICmpInst::ICMP_SLT; break; + case CMP_SGREATER: compare = ICmpInst::ICMP_SGT; break; + case CMP_EQUAL: compare = ICmpInst::ICMP_EQ; break; + case CMP_LLESS: compare = ICmpInst::ICMP_ULT; break; + case CMP_LGREATER: compare = ICmpInst::ICMP_UGT; break; + case CMP_SGREATER_EQUAL: compare = ICmpInst::ICMP_SGE; break; + case CMP_SLOWER_EQUAL: compare = ICmpInst::ICMP_SLE; break; + case CMP_NOT_EQUAL: compare = ICmpInst::ICMP_NE; break; + case CMP_LGREATER_EQUAL: compare = ICmpInst::ICMP_UGE; break; + case CMP_LLOWER_EQUAL: compare = ICmpInst::ICMP_ULE; break; + { + break; + } + case CMP_UNKNOWN: + case CMP_NOT_EQUAL2: + case CMP_EQUAL2: + default: + { + ensure(false); + break; + } + } + + llvm::Value* loop_dictator_before_adjustment{}; + llvm::Value* loop_dictator_after_adjustment{}; + + spu_opcode_t reg_target{}; + reg_target.rt = static_cast(m_reduced_loop_info->cond_val_register_idx); + + if (reg_target.rt != m_reduced_loop_info->cond_val_register_idx) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Illegal condition register index: 0x%llx", m_reduced_loop_info->cond_val_register_idx); + } + + if (!m_block->reg[reg_target.rt]) + { + m_block->reg[reg_target.rt] = reduced_loop_init_regs[reg_target.rt]; + } + + switch (m_reduced_loop_info->cond_val_mask) + { + case u8{umax}: + { + loop_dictator_before_adjustment = get_scalar(get_vr(reg_target.rt)).eval(m_ir); + break; + } + case u16{umax}: + { + loop_dictator_before_adjustment = get_scalar(get_vr(reg_target.rt)).eval(m_ir); + break; + } + case u32{umax}: + { + loop_dictator_before_adjustment = get_scalar(get_vr(reg_target.rt)).eval(m_ir); + break; + } + case u64{umax}: + { + ensure(false); // TODO + loop_dictator_before_adjustment = get_scalar(get_vr(reg_target.rt)).eval(m_ir); + break; + } + default: + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Illegal condition bit mask: 0x%llx", m_reduced_loop_info->cond_val_mask); + } + } + + const u32 type_bits = std::popcount(m_reduced_loop_info->cond_val_mask); + + llvm::Value* cond_val_incr = nullptr; + + if (m_reduced_loop_info->cond_val_incr_is_immediate) + { + cond_val_incr = m_ir->getIntN(type_bits, m_reduced_loop_info->cond_val_incr & m_reduced_loop_info->cond_val_mask); + } + else + { + spu_opcode_t reg_incr{}; + reg_incr.rt = static_cast(m_reduced_loop_info->cond_val_incr); + + if (reg_incr.rt != m_reduced_loop_info->cond_val_incr) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Illegal increment arguemnt register index: 0x%llx", m_reduced_loop_info->cond_val_incr); + } + switch (m_reduced_loop_info->cond_val_mask) + { + case u8{umax}: + { + cond_val_incr = get_scalar(get_vr(reg_incr.rt)).eval(m_ir); + break; + } + case u16{umax}: + { + cond_val_incr = get_scalar(get_vr(reg_incr.rt)).eval(m_ir); + break; + } + case u32{umax}: + { + cond_val_incr = get_scalar(get_vr(reg_incr.rt)).eval(m_ir); + break; + } + case u64{umax}: + { + ensure(false); // TODO + cond_val_incr = get_scalar(get_vr(reg_incr.rt)).eval(m_ir); + break; + } + } + } + + if (m_reduced_loop_info->cond_val_incr_before_cond && !m_reduced_loop_info->cond_val_incr_before_cond_taken_in_account) + { + loop_dictator_after_adjustment = m_ir->CreateAdd(loop_dictator_before_adjustment, cond_val_incr); + } + else + { + loop_dictator_after_adjustment = loop_dictator_before_adjustment; + } + + llvm::Value* loop_argument = nullptr; + + if (m_reduced_loop_info->cond_val_is_immediate) + { + loop_argument = m_ir->CreateTrunc(m_ir->getInt64(m_reduced_loop_info->cond_val_min & m_reduced_loop_info->cond_val_mask), loop_dictator_before_adjustment->getType()); + } + else + { + spu_opcode_t reg_target2{}; + reg_target2.rt = static_cast(m_reduced_loop_info->cond_val_register_argument_idx); + + if (reg_target2.rt != m_reduced_loop_info->cond_val_register_argument_idx) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Illegal condition arguemnt register index: 0x%llx", m_reduced_loop_info->cond_val_register_argument_idx); + } + + switch (m_reduced_loop_info->cond_val_mask) + { + case u8{umax}: + { + loop_argument = get_scalar(get_vr(reg_target2.rt)).eval(m_ir); + break; + } + case u16{umax}: + { + loop_argument = get_scalar(get_vr(reg_target2.rt)).eval(m_ir); + break; + } + case u32{umax}: + { + loop_argument = get_scalar(get_vr(reg_target2.rt)).eval(m_ir); + break; + } + case u64{umax}: + { + ensure(false); // TODO + loop_argument = get_scalar(get_vr(reg_target2.rt)).eval(m_ir); + break; + } + } + } + + llvm::Value* condition = nullptr; + + if (reserve_iterations == 1) + { + condition = m_ir->CreateICmp(compare, loop_dictator_after_adjustment, loop_argument); + } + // else if ((m_reduced_loop_info->cond_val_compare == CMP_LGREATER || (m_reduced_loop_info->cond_val_compare == CMP_LGREATER_EQUAL && m_reduced_loop_info->cond_val_is_immediate && m_reduced_loop_info->cond_val_incr)) && cond_val_incr->getSExtValue() < 0) + // { + // const auto cond_val_incr_multiplied = m_ir->CreateMul(cond_val_incr, reserve_iterations - 1); + // condition = m_ir->CreateICmp(compare, select(m_ir->CreateICmpUGE(cond_val_incr_multiplied, loop_dictator_after_adjustment), m_ir->CreateAdd(loop_dictator_after_adjustment, cond_val_incr_multiplied), m_ir->getIntN(type_bits, 0)), loop_argument); + // } + else + { + //debugtrap(); + + llvm::Value* prev_it = loop_dictator_after_adjustment; + + for (u32 i = 0; i < reserve_iterations; i++) + { + if (i) + { + prev_it = m_ir->CreateAdd(prev_it, cond_val_incr); + } + + const auto also_cond = m_ir->CreateICmp(compare, prev_it, loop_argument); + condition = condition ? m_ir->CreateAnd(condition, also_cond) : also_cond; + } + } + + if (!is_second_time) + { + for (u32 i = 0, count = 0, prev_i = umax;; i++) + { + const bool is_last = !(count <= 20 && i < s_reg_max); + + if (is_last || m_reduced_loop_info->is_gpr_not_NaN_hint(i)) + { + count++; + + if (prev_i == umax) + { + if (!is_last) + { + prev_i = i; + continue; + } + + break; + } + + auto access_gpr = [&](u32 index) + { + spu_opcode_t op_arg{}; + op_arg.ra = index; + return get_vr(op_arg.ra); + }; + + // OR LSB to convert infinity to NaN + llvm::Value* arg1 = bitcast(access_gpr(prev_i) | splat(1)).eval(m_ir); + llvm::Value* arg2 = is_last ? arg1 : bitcast(access_gpr(i) | splat(1)).eval(m_ir); + + llvm::Value* acc = m_ir->CreateSExt(m_ir->CreateFCmpUNO(arg1, arg2), get_type()); + + // Pattern for PTEST + acc = m_ir->CreateBitCast(acc, get_type()); + + llvm::Value* elem = m_ir->CreateExtractElement(acc, u64{0}); + + for (u64 i = 1; i < 2; i++) + { + elem = m_ir->CreateOr(elem, m_ir->CreateExtractElement(acc, i)); + } + + // Compare result with zero + const auto cond_nans = m_ir->CreateICmpEQ(elem, m_ir->getInt64(0)); + condition = m_ir->CreateAnd(cond_nans, condition); + prev_i = umax; + } + + if (is_last) + { + break; + } + } + + // TODO: Optimze so constant evalatuated cases will not be checked + const bool is_cond_need_runtime_verify = compare == ICmpInst::ICMP_NE && (!m_reduced_loop_info->cond_val_is_immediate || m_reduced_loop_info->cond_val_incr % 2 == 0); + + if (is_cond_need_runtime_verify) + { + // Verify that it is actually possible to finish the loop and it is not an infinite loop + + // First: create a mask of the bits that definitely do not change between iterations (0 results in umax which is accurate here) + const auto no_change_bits = m_ir->CreateAnd(m_ir->CreateNot(cond_val_incr), m_ir->CreateSub(cond_val_incr, m_ir->getIntN(type_bits, 1))); + + // Compare that when the mask applied to both the result and the original value is the same + const auto cond_verify = m_ir->CreateICmpEQ(m_ir->CreateAnd(loop_dictator_after_adjustment, no_change_bits), m_ir->CreateAnd(loop_argument, no_change_bits)); + + // Amend condition + condition = m_ir->CreateAnd(cond_verify, condition); + } + } + + m_ir->CreateCondBr(condition, optimization_block, block_optimization_next); + }; + + if (is_reduced_loop) + { + for (u32 i = 0; i < s_reg_max; i++) + { + llvm::Type* type = g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::accurate && bb.reg_maybe_xf[i] ? get_type() : get_reg_type(i); + + if (i < m_reduced_loop_info->loop_dicts.size() && (m_reduced_loop_info->loop_dicts.test(i) || m_reduced_loop_info->loop_writes.test(i))) + { + // Connect registers which are used and then modified by the block + auto value = m_block->reg[i]; + + if (!value || value->getType() != type) + { + value = get_reg_fixed(i, type); + } + + reduced_loop_init_regs[i] = value; + } + else if (i < m_reduced_loop_info->loop_dicts.size() && m_reduced_loop_info->loop_args.test(i)) + { + // Load registers used as arguments of the loop + if (!m_block->reg[i]) + { + m_block->reg[i] = get_reg_fixed(i, type); + } + } + } + + const auto prev_insert_block = m_ir->GetInsertBlock(); + + block_optimization_phi_parent = prev_insert_block; + + make_reduced_loop_condition(block_optimization_inner, false); + m_ir->SetInsertPoint(block_optimization_inner); + + for (u32 i = 0; i < s_reg_max; i++) + { + if (auto init_val = reduced_loop_init_regs[i]) + { + llvm::Type* type = g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::accurate && bb.reg_maybe_xf[i] ? get_type() : get_reg_type(i); + + const auto _phi = m_ir->CreatePHI(init_val->getType(), 2, fmt::format("reduced_0x%05x_r%u", baddr, i)); + _phi->addIncoming(init_val, prev_insert_block); + + reduced_loop_phi_nodes[i] = _phi; + m_block->reg[i] = _phi; + } + } + + m_block->block_wide_reg_store_elimination = true; + } + + // Instructions emitting optimizations: Loop iteration is not the last + m_pos = baddr; + + // Masked opcodde -> register modification times + std::map>> masked_times; + std::array reg_states{}; + u32 s_reg_state{1}; + + for (u32 iteration_emit = 0; is_reduced_loop; m_pos += 4) + { + if (m_pos != baddr && m_block_info[m_pos / 4] && m_reduced_loop_info->loop_end < m_pos) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Exit(1) too early at 0x%x", m_pos); + } + + if (!(m_pos >= start && m_pos < end)) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Exit(2) too early at 0x%x", m_pos); + } + + if (m_ir->GetInsertBlock()->getTerminator()) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: Exit(3) too early at 0x%x", m_pos); + } + + const u32 op = std::bit_cast>(func.data[(m_pos - start) / 4]); + const auto itype = g_spu_itype.decode(op); + + if (itype & spu_itype::branch) + { + bool branches_back = false; + + for (u32 dest : op_branch_targets(m_pos, spu_opcode_t{op})) + { + branches_back = branches_back || dest == baddr; + } + + if (!branches_back) + { + continue; + } + + iteration_emit++; + + if (iteration_emit < 2) + { + // Reset mpos (with fixup) + m_pos = baddr - 4; + continue; + } + + // Optimization block body + const auto block_inner = m_ir->GetInsertBlock(); + + std::array block_reg_results{}; + + for (u32 i = 0; i < s_reg_max; i++) + { + if (auto phi = reduced_loop_phi_nodes[i]) + { + const auto type = phi->getType() == get_type() ? get_type() : get_reg_type(i); + block_reg_results[i] = ensure(get_reg_fixed(i, type)); + phi->addIncoming(block_reg_results[i], block_inner); + } + } + + ensure(!!m_block->reg[m_reduced_loop_info->cond_val_register_idx]); + make_reduced_loop_condition(block_optimization_inner, true); + m_ir->SetInsertPoint(block_optimization_next); + m_block->block_wide_reg_store_elimination = false; + + for (u32 i = 0; i < s_reg_max; i++) + { + if (const auto loop_value = block_reg_results[i]) + { + const auto phi = m_ir->CreatePHI(loop_value->getType(), 2, fmt::format("redres_0x%05x_r%u", baddr, i)); + + phi->addIncoming(loop_value, block_inner); + phi->addIncoming(reduced_loop_init_regs[i], block_optimization_phi_parent); + m_block->reg[i] = phi; + } + } + + + break; + } + + if (!op) + { + fmt::throw_exception("LLVM: Reduced Loop Pattern: [%s] Unexpected fallthrough to 0x%x (chunk=0x%x, entry=0x%x)", m_hash, m_pos, m_entry, m_function_queue[0]); + } + + const auto [reg_rt, reg_access, masked_op] = op_register_targets(m_pos, spu_opcode_t{op}); + + bool erased = false; + + const auto inst_times = std::array{reg_states[reg_access[0]], reg_states[reg_access[1]], reg_states[reg_access[2]]}; + + // Try to reuse the reult of the previous iteration (if argumnent registers have not been modified) + if (reg_rt < 128 && masked_times.count(masked_op) && masked_times[masked_op].first && m_inst_attrs[(m_pos - start) / 4] == inst_attr::none) + { + auto times = masked_times[masked_op].second; + + bool is_ok = true; + for (u32 regi = 0; regi < 3; regi++) + { + if (reg_access[regi] < 128 && times[regi] != inst_times[regi]) + { + is_ok = false; + } + } + + if (is_ok) + { + m_block->reg[reg_rt] = masked_times[masked_op].first; + erased = true; + } + } + + if (reg_rt < 128) + { + reg_states[reg_rt] = s_reg_state++; + } + + if (erased) + { + continue; + } + + m_next_op = 0; + + masked_times[masked_op] = {}; + + switch (m_inst_attrs[(m_pos - start) / 4]) + { + case inst_attr::putllc0: + { + putllc0_pattern(func, m_patterns.at(m_pos - start).info); + continue; + } + case inst_attr::putllc16: + { + putllc16_pattern(func, m_patterns.at(m_pos - start).info); + continue; + } + case inst_attr::omit: + { + // TODO + continue; + } + default: break; + } + + // Execute recompiler function (TODO) + (this->*decode(op))({op}); + + if (reg_rt < 128 && itype & spu_itype::pure && reg_rt != reg_access[0] && reg_rt != reg_access[1] && reg_rt != reg_access[2]) + { + masked_times[masked_op] = {ensure(m_block->reg[reg_rt]), inst_times}; + } + } + + for (u32 i = 0; i < s_reg_max; i++) + { + if (m_reduced_loop_info && m_reduced_loop_info->loop_may_update.test(i)) + { + m_block->reg[i] = m_block->reg_save_and_restore[i]; + } + } + + m_reduced_loop_info = nullptr; + // Emit instructions for (m_pos = baddr; m_pos >= start && m_pos < end && !m_ir->GetInsertBlock()->getTerminator(); m_pos += 4) { @@ -2632,6 +3269,8 @@ public: m_ir->SetInsertPoint(ins); auto si = llvm::cast(m_ir->Insert(bs->clone())); + spu_context_attr(si); + if (b2->store[i] == nullptr) { // Protect against backwards ordering now @@ -2697,7 +3336,7 @@ public: continue; m_ir->SetInsertPoint(ins); - m_ir->Insert(bs->clone()); + m_ir->Insert(spu_context_attr(bs->clone())); } bs->eraseFromParent(); @@ -2802,12 +3441,9 @@ public: std::string& llvm_log = function_log; raw_string_ostream out(llvm_log); - if (g_cfg.core.spu_debug) - { - fmt::append(llvm_log, "LLVM IR at 0x%x:\n", func.entry_point); - out << *_module; // print IR - out << "\n\n"; - } + fmt::append(llvm_log, "LLVM IR at 0x%x:\n", func.entry_point); + out << *_module; // print IR + out << "\n\n"; if (verifyModule(*_module, &out)) { @@ -2950,7 +3586,7 @@ public: // Create interpreter table const auto if_type = get_ftype(); - m_function_table = new GlobalVariable(*m_module, ArrayType::get(m_ir->getPtrTy(), 1ull << m_interp_magn), true, GlobalValue::InternalLinkage, nullptr); + m_function_table = new GlobalVariable(*m_module, ArrayType::get(get_type(), 1ull << m_interp_magn), true, GlobalValue::InternalLinkage, nullptr); init_luts(); @@ -2994,7 +3630,7 @@ public: m_ir->CreateStore(m_ir->CreateCall(get_intrinsic(Intrinsic::read_register), {rsp_name}), native_sp); // Decode (shift) and load function pointer - const auto first = m_ir->CreateLoad(m_ir->getPtrTy(), m_ir->CreateGEP(m_ir->getPtrTy(), m_interp_table, m_ir->CreateLShr(m_interp_op, 32u - m_interp_magn))); + const auto first = m_ir->CreateLoad(get_type(), m_ir->CreateGEP(get_type(), m_interp_table, m_ir->CreateLShr(m_interp_op, 32u - m_interp_magn))); const auto call0 = m_ir->CreateCall(if_type, first, {m_lsptr, m_thread, m_interp_pc, m_interp_op, m_interp_table, m_interp_7f0, m_interp_regs}); call0->setCallingConv(CallingConv::GHC); m_ir->CreateRetVoid(); @@ -3138,7 +3774,7 @@ public: const auto next_pc = itype & spu_itype::branch ? m_interp_pc : m_interp_pc_next; const auto be32_op = m_ir->CreateLoad(get_type(), _ptr(m_lsptr, m_ir->CreateZExt(next_pc, get_type()))); const auto next_op = m_ir->CreateCall(get_intrinsic(Intrinsic::bswap), {be32_op}); - const auto next_if = m_ir->CreateLoad(m_ir->getPtrTy(), m_ir->CreateGEP(m_ir->getPtrTy(), m_interp_table, m_ir->CreateLShr(next_op, 32u - m_interp_magn))); + const auto next_if = m_ir->CreateLoad(get_type(), m_ir->CreateGEP(get_type(), m_interp_table, m_ir->CreateLShr(next_op, 32u - m_interp_magn))); llvm::cast(next_if)->setVolatile(true); if (!(itype & spu_itype::branch)) @@ -3263,7 +3899,7 @@ public: } } - m_function_table->setInitializer(ConstantArray::get(ArrayType::get(m_ir->getPtrTy(), 1ull << m_interp_magn), iptrs)); + m_function_table->setInitializer(ConstantArray::get(ArrayType::get(get_type(), 1ull << m_interp_magn), iptrs)); m_function_table = nullptr; for (auto& f : *_module) @@ -3274,12 +3910,9 @@ public: std::string llvm_log; raw_string_ostream out(llvm_log); - if (g_cfg.core.spu_debug) - { - fmt::append(llvm_log, "LLVM IR (interpreter):\n"); - out << *_module; // print IR - out << "\n\n"; - } + fmt::append(llvm_log, "LLVM IR (interpreter):\n"); + out << *_module; // print IR + out << "\n\n"; if (verifyModule(*_module, &out)) { @@ -4757,6 +5390,50 @@ public: } const auto a = get_vr(op.ra); + +#ifdef ARCH_ARM64 + // Use dot product instructions with special values to shift then sum results into the preferred slot + if (m_use_dotprod) + { + if (match_vr(op.ra, [&](auto c, auto MP) + { + using VT = typename decltype(MP)::type; + + if (auto [ok, x] = match_expr(c, sext(match]>())); ok) + { + const auto zeroes = splat(0); + + const auto es = zshuffle(bitcast(a), 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 4, 8, 12); + + set_vr(op.rt, sdot(zeroes, es, build( + -0x01, -0x02, -0x04, -0x08, + -0x01, -0x02, -0x04, -0x08, + -0x01, -0x02, -0x04, -0x08, + -0x01, -0x02, -0x04, -0x08 + ))); + return true; + } + return false; + })) + { + return; + } + + const auto zeroes = splat(0); + const auto masked = a & 0x01; + + const auto es = zshuffle(bitcast(masked), 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 4, 8, 12); + + set_vr(op.rt, udot(zeroes, es, build( + 0x01, 0x02, 0x04, 0x08, + 0x01, 0x02, 0x04, 0x08, + 0x01, 0x02, 0x04, 0x08, + 0x01, 0x02, 0x04, 0x08 + ))); + return; + } +#endif + const auto m = zext(bitcast(trunc(a))); set_vr(op.rt, insert(splat(0), 3, eval(m))); } @@ -4772,6 +5449,54 @@ public: } const auto a = get_vr(op.ra); + +#ifdef ARCH_ARM64 + // Use dot product instructions with special values to shift then sum results into the preferred slot + if (m_use_dotprod) + { + if (match_vr(op.ra, [&](auto c, auto MP) + { + using VT = typename decltype(MP)::type; + + if (auto [ok, x] = match_expr(c, sext(match]>())); ok) + { + const auto zeroes = splat(0); + + const auto es = zshuffle(bitcast(a), 16, 16, 16, 16, 16, 16, 16, 16, 0, 2, 4, 6, 8, 10, 12, 14); + + const auto extracted = sdot(zeroes, es, build( + -0x01, -0x02, -0x04, -0x08, + -0x10, -0x20, -0x40, -0x80, + -0x01, -0x02, -0x04, -0x08, + -0x10, -0x20, -0x40, -0x80 + )); + + set_vr(op.rt, addp(zeroes, bitcast(extracted))); + return true; + } + return false; + })) + { + return; + } + + const auto zeroes = splat(0); + const auto masked = a & 0x01; + + const auto es = zshuffle(bitcast(masked), 16, 16, 16, 16, 16, 16, 16, 16, 0, 2, 4, 6, 8, 10, 12, 14); + + const auto extracted = udot(zeroes, es, build( + 0x01, 0x02, 0x04, 0x08, + 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x04, 0x08, + 0x10, 0x20, 0x40, 0x80 + )); + + set_vr(op.rt, addp(zeroes, bitcast(extracted))); + return; + } +#endif + const auto m = zext(bitcast(trunc(a))); set_vr(op.rt, insert(splat(0), 3, eval(m))); } @@ -4780,6 +5505,53 @@ public: { const auto a = get_vr(op.ra); +#ifdef ARCH_ARM64 + // Use dot product instructions with special values to shift then sum results into the preferred slot + if (m_use_dotprod) + { + if (match_vr(op.ra, [&](auto c, auto MP) + { + using VT = typename decltype(MP)::type; + + if (auto [ok, x] = match_expr(c, sext(match]>())); ok) + { + const auto zeroes = splat(0); + + const auto extracted = sdot(zeroes, a, build( + -0x01, -0x02, -0x04, -0x08, + -0x10, -0x20, -0x40, -0x80, + -0x01, -0x02, -0x04, -0x08, + -0x10, -0x20, -0x40, -0x80 + )); + + const auto es = zshuffle(bitcast(extracted), 16, 16, 16, 16, 16, 16, 16, 16, 0, 8, 4, 12, 16, 16, 16, 16); + const auto zeroes16 = splat(0); + set_vr(op.rt, addp(zeroes16, bitcast(es))); + return true; + } + return false; + })) + { + return; + } + + const auto zeroes = splat(0); + const auto masked = a & 0x01; + + const auto extracted = udot(zeroes, masked, build( + 0x01, 0x02, 0x04, 0x08, + 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x04, 0x08, + 0x10, 0x20, 0x40, 0x80 + )); + + const auto es = zshuffle(bitcast(extracted), 16, 16, 16, 16, 16, 16, 16, 16, 0, 8, 4, 12, 16, 16, 16, 16); + const auto zeroes16 = splat(0); + set_vr(op.rt, addp(zeroes16, bitcast(es))); + return; + } +#endif + if (m_use_gfni) { const auto as = zshuffle(a, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); @@ -5311,13 +6083,24 @@ public: return; } +#ifdef ARCH_ARM64 + if (m_use_dotprod) +#else if (m_use_vnni) +#endif { - const auto [a, b] = get_vrs(op.ra, op.rb); const auto zeroes = splat(0); +#ifdef ARCH_ARM64 + const auto [a, b] = get_vrs(op.ra, op.rb); + const auto ones = splat(0x01); + const auto ax = bitcast(udot(zeroes, a, ones)); + const auto bx = bitcast(udot(zeroes, b, ones)); +#else + const auto [a, b] = get_vrs(op.ra, op.rb); const auto ones = splat(0x01010101); const auto ax = bitcast(vpdpbusd(zeroes, a, ones)); const auto bx = bitcast(vpdpbusd(zeroes, b, ones)); +#endif set_vr(op.rt, shuffle2(ax, bx, 0, 8, 2, 10, 4, 12, 6, 14)); return; } @@ -5604,11 +6387,59 @@ public: void CEQI(spu_opcode_t op) { + // CEQHI following a comparison instruction (compare-equal negation) + if (!m_interp_magn && !op.si10 && match_vr(op.ra, [&](auto c, auto MT) + { + using VT = typename decltype(MT)::type; + using VT_HALF = s16[8]; + + if (auto [ok, a, b] = match_expr(c, bitcast(sext(match() == match())) << 16 >> 16); ok && m_block->block_wide_reg_store_elimination) + { + set_vr(op.rt, bitcast(sext(a != b)) << 16 >> 16); + return true; + } + + if (auto [ok, a, b] = match_expr(c, sext(MT == MT)); ok) + { + set_vr(op.rt, sext(a != b)); + return true; + } + + return false; + })) + { + return; + } + set_vr(op.rt, sext(get_vr(op.ra) == get_imm(op.si10))); } void CEQHI(spu_opcode_t op) { + // CEQHI following a comparison instruction (compare-equal negation) + if (!m_interp_magn && !op.si10 && match_vr(op.ra, [&](auto c, auto MT) + { + using VT = typename decltype(MT)::type; + using VT_HALF = s8[16]; + + if (auto [ok, a, b] = match_expr(c, bitcast(sext(match() == match())) << 8 >> 8); ok && m_block->block_wide_reg_store_elimination) + { + set_vr(op.rt, bitcast(sext(a != b)) << 8 >> 8); + return true; + } + + if (auto [ok, a, b] = match_expr(c, sext(match() == match())); ok) + { + set_vr(op.rt, sext(a != b)); + return true; + } + + return false; + })) + { + return; + } + set_vr(op.rt, sext(get_vr(op.ra) == get_imm(op.si10))); } @@ -6185,8 +7016,13 @@ public: return eval(bitcast(min(bitcast(v),splat(0xff7fffff)))); } - value_t clamp_smax(value_t v) + value_t clamp_smax(value_t v, u32 gpr = s_reg_max) { + if (m_reduced_loop_info && gpr < s_reg_max && m_reduced_loop_info->is_gpr_not_NaN_hint(gpr)) + { + return v; + } + if (m_use_avx512) { if (is_input_positive(v)) @@ -6206,16 +7042,6 @@ public: return eval(clamp_positive_smax(clamp_negative_smax(v))); } - // FMA favouring zeros - value_t xmuladd(value_t a, value_t b, value_t c) - { - const auto ma = eval(sext(fcmp_uno(a != fsplat(0.)))); - const auto mb = eval(sext(fcmp_uno(b != fsplat(0.)))); - const auto ca = eval(bitcast(bitcast(a) & mb)); - const auto cb = eval(bitcast(bitcast(b) & ma)); - return eval(fmuladd(ca, cb, c)); - } - // Checks for postive and negative zero, or Denormal (treated as zero) // If sign is +-1 check equality againts all sign bits bool is_spu_float_zero(v128 a, int sign = 0) @@ -6302,12 +7128,6 @@ public: set_vr(op.rt, frsqest(get_vr(op.ra))); } - template - static llvm_calli fcgt(T&& a, U&& b) - { - return {"spu_fcgt", {std::forward(a), std::forward(b)}}; - } - void FCGT(spu_opcode_t op) { if (g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::accurate) @@ -6316,11 +7136,8 @@ public: return; } - register_intrinsic("spu_fcgt", [&](llvm::CallInst* ci) + const auto fcgt = [&](value_t a, value_t b) { - const auto a = value(ci->getOperand(0)); - const auto b = value(ci->getOperand(1)); - const value_t ab[2]{a, b}; std::bitset<2> safe_int_compare(0); @@ -6352,6 +7169,16 @@ public: } } + if (m_reduced_loop_info && m_reduced_loop_info->is_gpr_not_NaN_hint(op.ra)) + { + safe_finite_compare.set(0); + } + + if (m_reduced_loop_info && m_reduced_loop_info->is_gpr_not_NaN_hint(op.rb)) + { + safe_finite_compare.set(1); + } + if (safe_int_compare.any()) { return eval(sext(bitcast(a) > bitcast(b))); @@ -6371,7 +7198,7 @@ public: const auto bi = eval(bitcast(b)); return eval(sext(fcmp_uno(a != b) & select((ai & bi) >= 0, ai > bi, ai < bi))); - }); + }; set_vr(op.rt, fcgt(get_vr(op.ra), get_vr(op.rb))); } @@ -6468,12 +7295,6 @@ public: set_vr(op.rt, fa(get_vr(op.ra), get_vr(op.rb))); } - template - static llvm_calli fs(T&& a, U&& b) - { - return {"spu_fs", {std::forward(a), std::forward(b)}}; - } - void FS(spu_opcode_t op) { if (g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::accurate) @@ -6482,29 +7303,26 @@ public: return; } - register_intrinsic("spu_fs", [&](llvm::CallInst* ci) + const auto fs = [&](value_t a, value_t b) { - const auto a = value(ci->getOperand(0)); - const auto b = value(ci->getOperand(1)); - if (g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::approximate) { - const auto bc = clamp_smax(b); // for #4478 + const auto bc = clamp_smax(b, op.rb); // for #4478 return eval(a - bc); } else { return eval(a - b); } - }); + }; set_vr(op.rt, fs(get_vr(op.ra), get_vr(op.rb))); } - template - static llvm_calli fm(T&& a, U&& b) + template , typename W = llvm_place_stealer_t> + static auto fm(T&& a, U&& b, V&& a_not_nan = match_stealer(), W&& b_not_nan = match_stealer()) { - return llvm_calli{"spu_fm", {std::forward(a), std::forward(b)}}.set_order_equality_hint(1, 1); + return llvm_calli{"spu_fm", {std::forward(a), std::forward(b), a_not_nan, b_not_nan}}.set_order_equality_hint(1, 1, 2, 3); } void FM(spu_opcode_t op) @@ -6519,14 +7337,27 @@ public: { const auto a = value(ci->getOperand(0)); const auto b = value(ci->getOperand(1)); + const bool a_notnan = llvm::cast(ci->getOperand(2))->getZExtValue() != 0; + const bool b_notnan = llvm::cast(ci->getOperand(3))->getZExtValue() != 0; if (g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::approximate) { - if (a.value == b.value) + if (a.value == b.value || (a_notnan && b_notnan)) { return eval(a * b); } + if (a_notnan) + { + const auto ma = sext(fcmp_uno(a != fsplat(0.))); + return eval(bitcast(bitcast(a * b) & ma)); + } + else if (b_notnan) + { + const auto mb = sext(fcmp_uno(b != fsplat(0.))); + return eval(bitcast(bitcast(a * b) & mb)); + } + const auto ma = sext(fcmp_uno(a != fsplat(0.))); const auto mb = sext(fcmp_uno(b != fsplat(0.))); return eval(bitcast(bitcast(a * b) & ma & mb)); @@ -6537,10 +7368,13 @@ public: } }); + const u32 a_notnan = m_reduced_loop_info && m_reduced_loop_info->is_gpr_not_NaN_hint(op.ra) ? 1 : 0; + const u32 b_notnan = m_reduced_loop_info && m_reduced_loop_info->is_gpr_not_NaN_hint(op.rb) ? 1 : 0; + if (op.ra == op.rb && !m_interp_magn) { const auto a = get_vr(op.ra); - set_vr(op.rt, fm(a, a)); + set_vr(op.rt, fm(a, a, splat(a_notnan), splat(a_notnan))); return; } @@ -6579,7 +7413,7 @@ public: } } - set_vr(op.rt, fm(a, b)); + set_vr(op.rt, fm(a, b, splat(a_notnan), splat(b_notnan))); } template @@ -6872,10 +7706,10 @@ public: set_vr(op.rt4, fnms(get_vr(op.ra), get_vr(op.rb), get_vr(op.rc))); } - template - static llvm_calli fma(T&& a, U&& b, V&& c) + template , typename X = llvm_place_stealer_t> + static llvm_calli fma(T&& a, U&& b, V&& c, W&& d = match_stealer(), X&& e = match_stealer()) { - return llvm_calli{"spu_fma", {std::forward(a), std::forward(b), std::forward(c)}}.set_order_equality_hint(1, 1, 0); + return llvm_calli{"spu_fma", {std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e)}}.set_order_equality_hint(1, 1, 2, 3, 4); } template @@ -6894,14 +7728,35 @@ public: return; } + register_intrinsic("spu_fma", [&](llvm::CallInst* ci) { const auto a = value(ci->getOperand(0)); const auto b = value(ci->getOperand(1)); const auto c = value(ci->getOperand(2)); - + const bool a_notnan = llvm::cast(ci->getOperand(3))->getZExtValue() != 0; + const bool b_notnan = llvm::cast(ci->getOperand(4))->getZExtValue() != 0; + if (g_cfg.core.spu_xfloat_accuracy == xfloat_accuracy::approximate) { + if (a.value == b.value || (a_notnan && b_notnan)) + { + return fma32x4(a, b, c); + } + + if (a_notnan) + { + const auto ma = sext(fcmp_uno(a != fsplat(0.))); + const auto cb = bitcast(bitcast(b) & ma); + return fma32x4(a, eval(cb), c); + } + else if (b_notnan) + { + const auto mb = sext(fcmp_uno(b != fsplat(0.))); + const auto ca = bitcast(bitcast(a) & mb); + return fma32x4(eval(ca), b, c); + } + const auto ma = sext(fcmp_uno(a != fsplat(0.))); const auto mb = sext(fcmp_uno(b != fsplat(0.))); const auto ca = bitcast(bitcast(a) & mb); @@ -6950,6 +7805,9 @@ public: const auto [a, b, c] = get_vrs(op.ra, op.rb, op.rc); static const auto MT = match(); + const u32 a_notnan = m_reduced_loop_info && m_reduced_loop_info->is_gpr_not_NaN_hint(op.ra) ? 1 : 0; + const u32 b_notnan = m_reduced_loop_info && m_reduced_loop_info->is_gpr_not_NaN_hint(op.rb) ? 1 : 0; + auto check_sqrt_pattern_for_float = [&](f32 float_value) -> bool { auto match_fnms = [&](f32 float_value) @@ -7145,7 +8003,13 @@ public: spu_log.todo("[%s:0x%05x] Unmatched spu_rsqrte(c) found in FMA", m_hash, m_pos); } - set_vr(op.rt4, fma(a, b, c)); + if (!m_interp_magn && op.ra == op.rb) + { + set_vr(op.rt4, fma(a, a, c, splat(a_notnan), splat(a_notnan))); + return; + } + + set_vr(op.rt4, fma(a, b, c, splat(a_notnan), splat(b_notnan))); } template @@ -7568,13 +8432,13 @@ public: void make_store_ls(value_t addr, value_t data) { const auto bswapped = byteswap(data); - m_ir->CreateStore(bswapped.eval(m_ir), _ptr(m_lsptr, addr.value)); + spu_mem_attr(m_ir->CreateStore(bswapped.eval(m_ir), _ptr(m_lsptr, addr.value))); } auto make_load_ls(value_t addr) { value_t data; - data.value = m_ir->CreateLoad(get_type(), _ptr(m_lsptr, addr.value)); + data.value = spu_mem_attr(m_ir->CreateLoad(get_type(), _ptr(m_lsptr, addr.value))); return byteswap(data); } @@ -7589,12 +8453,18 @@ public: { data._u32[3] %= SPU_LS_SIZE; - if (data._u32[3] % 0x10 == 0) + if (const u32 remainder = data._u32[3] % 0x10; remainder == 0) { value_t addr = eval(splat(data._u32[3]) + zext(extract(pair.second, 3) & 0x3fff0)); make_store_ls(addr, get_vr(op.rt)); return; } + else + { + value_t addr = eval(splat(data._u32[3] - remainder) + zext((extract(pair.second, 3) + remainder) & 0x3fff0)); + make_store_ls(addr, get_vr(op.rt)); + return; + } } } @@ -7613,12 +8483,18 @@ public: { data._u32[3] %= SPU_LS_SIZE; - if (data._u32[3] % 0x10 == 0) + if (const u32 remainder = data._u32[3] % 0x10; remainder == 0) { value_t addr = eval(splat(data._u32[3]) + zext(extract(pair.second, 3) & 0x3fff0)); set_vr(op.rt, make_load_ls(addr)); return; } + else + { + value_t addr = eval(splat(data._u32[3] - remainder) + zext((extract(pair.second, 3) + remainder) & 0x3fff0)); + set_vr(op.rt, make_load_ls(addr)); + return; + } } } @@ -7672,13 +8548,51 @@ public: } } - value_t addr = eval(zext(extract(get_vr(op.ra), 3) & 0x3fff0) + (get_imm(op.si10) << 4)); + const auto a = get_vr(op.ra); + + if (auto [ok, x, y] = match_expr(a, match() + match()); ok) + { + if (auto [ok1, data] = get_const_vector(x.value, m_pos + 1); ok1 && data._u32[3] % 16 == 0) + { + value_t addr = eval(zext(extract(y, 3) & 0x3fff0) + ((get_imm(op.si10) << 4) + splat(data._u32[3] & 0x3fff0))); + make_store_ls(addr, get_vr(op.rt)); + return; + } + + if (auto [ok2, data] = get_const_vector(y.value, m_pos + 2); ok2 && data._u32[3] % 16 == 0) + { + value_t addr = eval(zext(extract(x, 3) & 0x3fff0) + ((get_imm(op.si10) << 4) + splat(data._u32[3] & 0x3fff0))); + make_store_ls(addr, get_vr(op.rt)); + return; + } + } + + value_t addr = eval(zext(extract(a, 3) & 0x3fff0) + (get_imm(op.si10) << 4)); make_store_ls(addr, get_vr(op.rt)); } void LQD(spu_opcode_t op) { - value_t addr = eval(zext(extract(get_vr(op.ra), 3) & 0x3fff0) + (get_imm(op.si10) << 4)); + const auto a = get_vr(op.ra); + + if (auto [ok, x1, y1] = match_expr(a, match() + match()); ok) + { + if (auto [ok1, data] = get_const_vector(x1.value, m_pos + 1); ok1 && data._u32[3] % 16 == 0) + { + value_t addr = eval(zext(extract(y1, 3) & 0x3fff0) + ((get_imm(op.si10) << 4) + splat(data._u32[3] & 0x3fff0))); + set_vr(op.rt, make_load_ls(addr)); + return; + } + + if (auto [ok2, data] = get_const_vector(y1.value, m_pos + 2); ok2 && data._u32[3] % 16 == 0) + { + value_t addr = eval(zext(extract(x1, 3) & 0x3fff0) + ((get_imm(op.si10) << 4) + splat(data._u32[3] & 0x3fff0))); + set_vr(op.rt, make_load_ls(addr)); + return; + } + } + + value_t addr = eval(zext(extract(a, 3) & 0x3fff0) + (get_imm(op.si10) << 4)); set_vr(op.rt, make_load_ls(addr)); } diff --git a/rpcs3/Emu/Cell/SPUOpcodes.h b/rpcs3/Emu/Cell/SPUOpcodes.h index cea4513e3f..42d76792a2 100644 --- a/rpcs3/Emu/Cell/SPUOpcodes.h +++ b/rpcs3/Emu/Cell/SPUOpcodes.h @@ -24,6 +24,20 @@ union spu_opcode_t bf_t i16; // 9..24 bf_t si16; // 9..24, signed bf_t i18; // 7..24 + + // For 16-bit instructions in the context of 32-bits + u32 duplicate_si10() const + { + const u32 _16 = static_cast(static_cast(si10)); + return (_16 << 16) | _16; + } + + // For 8-bit instructions in the context of 32-bits + u32 duplicate_duplicate_si10() const + { + const u32 _8 = static_cast(si10 & 0xff); + return (_8 << 24) | (_8 << 16) | (_8 << 8) | _8; + } }; constexpr u32 spu_branch_target(u32 pc, u32 imm = 0) @@ -42,6 +56,7 @@ constexpr u32 spu_decode(u32 inst) } std::array op_branch_targets(u32 pc, spu_opcode_t op); +std::tuple, u32> op_register_targets(u32 /*pc*/, spu_opcode_t op); // SPU decoder object. D provides functions. T is function pointer type returned. template diff --git a/rpcs3/Emu/Cell/SPURecompiler.h b/rpcs3/Emu/Cell/SPURecompiler.h index 57d842e69d..6c629571d9 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.h +++ b/rpcs3/Emu/Cell/SPURecompiler.h @@ -4,12 +4,24 @@ #include "Utilities/lockless.h" #include "Utilities/address_range.h" #include "SPUThread.h" +#include "SPUAnalyser.h" #include #include #include #include #include +// std::bitset +template + requires requires(std::remove_cvref_t& x, T&& y) { x.count(); x.test(y); x.flip(y); } +[[nodiscard]] constexpr bool at32(CT&& container, T&& index, std::source_location src_loc = std::source_location::current()) +{ + const usz csv = container.size(); + if (csv <= std::forward(index)) [[unlikely]] + fmt::raw_range_error(src_loc, format_object_simplified(index), csv); + return container[std::forward(index)]; +} + // Helper class class spu_cache { @@ -201,6 +213,25 @@ public: __bitset_enum_max }; + enum compare_direction : u32 + { + CMP_TURNAROUND_FLAG = 0x1, + CMP_NEGATE_FLAG = 0x100, + CMP_SLESS = 0, + CMP_SGREATER = CMP_SLESS | CMP_TURNAROUND_FLAG, + CMP_EQUAL, + CMP_EQUAL2 = CMP_EQUAL | CMP_TURNAROUND_FLAG, + CMP_LLESS, + CMP_LGREATER = CMP_LLESS | CMP_TURNAROUND_FLAG, + CMP_SGREATER_EQUAL = CMP_SLESS | CMP_NEGATE_FLAG, + CMP_SLOWER_EQUAL = CMP_SGREATER | CMP_NEGATE_FLAG, + CMP_NOT_EQUAL = CMP_EQUAL | CMP_NEGATE_FLAG, + CMP_NOT_EQUAL2 = CMP_NOT_EQUAL | CMP_TURNAROUND_FLAG, + CMP_LGREATER_EQUAL = CMP_LLESS | CMP_NEGATE_FLAG, + CMP_LLOWER_EQUAL = CMP_LGREATER | CMP_NEGATE_FLAG, + CMP_UNKNOWN, + }; + struct reg_state_t { bs_t flag{+vf::is_null}; @@ -273,6 +304,406 @@ public: static u32 alloc_tag(bool reset = false) noexcept; }; + struct reduced_loop_t + { + bool active = false; // Single block loop detected + bool failed = false; + u32 loop_pc = SPU_LS_SIZE; + u32 loop_end = SPU_LS_SIZE; + + // False: single-block loop + // True: loop with a trailing block of aftermath (iteration update) stuff (like for (u32 i = 0; i < 10; /*update*/ i++)) + bool is_two_block_loop = false; + bool has_cond_state = false; + + // Loop stay-in state requirement + u64 cond_val_mask = umax; + u64 cond_val_min = 0; + u64 cond_val_size = 0; + compare_direction cond_val_compare{}; + u64 cond_val_incr = 0; + bool cond_val_incr_is_immediate = false; + u64 cond_val_register_argument_idx = umax; + u64 cond_val_register_idx = umax; + bool cond_val_incr_before_cond = false; + bool cond_val_incr_before_cond_taken_in_account = false; + bool cond_val_is_immediate = false; + + // Loop attributes + bool is_constant_expression = false; + bool is_secret = false; + + struct supplemental_condition_t + { + u64 immediate_value = umax; + u64 type_size = 0; + compare_direction val_compare{}; + }; + + // Supplemental loop condition: + // Inner conditions that depend on extrnal values (not produced inside the loop) + // all should evaluate to false in order for the optimization to work (at the moment) + // So succeeding can be treated linearly + u64 expected_sup_conds = 0; + u64 current_sup_conds_index = 0; + std::vector sup_conds; + + void take_cond_val_incr_before_cond_into_account() + { + if (cond_val_is_immediate && cond_val_incr_before_cond_taken_in_account && !cond_val_incr_before_cond_taken_in_account) + { + cond_val_min -= cond_val_incr; + cond_val_min &= cond_val_mask; + cond_val_incr_before_cond_taken_in_account = true; + } + } + + std::bitset loop_args; + std::bitset loop_dicts; + std::bitset loop_writes; + std::bitset loop_may_update; + std::bitset gpr_not_nans; + + struct origin_t + { + std::bitset regs{}; + u32 modified = 0; + spu_itype_t mod1_type = spu_itype::UNK; + spu_itype_t mod2_type = spu_itype::UNK; + spu_itype_t mod3_type = spu_itype::UNK; + u32 IMM = 0; + +private: + // Internal, please access using fixed order + spu_itype_t access_type(u32 i) const + { + if (i > modified) + { + return spu_itype::UNK; + } + + switch (i) + { + case 1: return mod1_type; + case 2: return mod2_type; + case 3: return mod3_type; + default: return spu_itype::UNK; + } + + return spu_itype::UNK; + } +public: + + spu_itype_t reverse1_type() + { + return access_type(modified); + } + + spu_itype_t reverse2_type() + { + return access_type(modified - 1); + } + + spu_itype_t reverse3_type() + { + return access_type(modified - 2); + } + + origin_t& join_with_this(const origin_t& rhs) + { + regs |= rhs.regs; + return *this; + } + + origin_t& join_with_this(u32 rhs) + { + regs.set(rhs); + return *this; + } + + origin_t& add_register_origin(u32 reg_val) + { + regs.set(reg_val); + return *this; + } + + bool is_single_reg_access(u32 reg_val) const + { + if (!modified) + { + return true; + } + + return regs.count() == 1 && ::at32(regs, reg_val); + } + + bool is_loop_dictator(u32 reg_val, bool test_predictable = false, bool should_predictable = true) const + { + if (!modified) + { + return false; + } + + if (regs.count() >= 1 && ::at32(regs, reg_val)) + { + if (!test_predictable) + { + return true; + } + + if (modified > 1) + { + return should_predictable ^ true; + } + + switch (mod1_type) + { + case spu_itype::A: + { + if (regs.count() == 2) + { + return should_predictable; + } + + return should_predictable ^ true; + } + case spu_itype::AI: + case spu_itype::AHI: + { + if (IMM && regs.count() == 1) + { + return should_predictable; + } + + return should_predictable ^ true; + } + default: break; + } + + return should_predictable ^ true; + } + + return false; + } + + bool is_predictable_loop_dictator(u32 reg_val) const + { + return is_loop_dictator(reg_val, true, true); + } + + bool is_non_predictable_loop_dictator(u32 reg_val) const + { + return is_loop_dictator(reg_val, true, false); + } + + bool is_null(u32 reg_val) const noexcept + { + if (modified) + { + return false; + } + + if (regs.count() - (::at32(regs, reg_val) ? 1 : 0)) + { + return false; + } + + return true; + } + + origin_t& add_instruction_modifier(spu_itype_t inst_type, u32 imm = 0) + { + if (inst_type == spu_itype::UNK) + { + mod1_type = spu_itype::UNK; + mod2_type = spu_itype::UNK; + mod3_type = spu_itype::UNK; + IMM = umax; + modified = 1; + return *this; + } + + if (modified == 1) + { + if (modified == 3) + { + mod1_type = spu_itype::UNK; + mod2_type = spu_itype::UNK; + mod3_type = spu_itype::UNK; + IMM = umax; + modified = 1; + return *this; + } + + bool is_ok = false; + switch (inst_type) + { + case spu_itype::XSBH: + { + const auto prev_type = modified == 1 ? mod1_type : mod2_type; + is_ok &= mod1_type == spu_itype::CEQB || mod1_type == spu_itype::CEQBI || mod1_type == spu_itype::CGTB || mod1_type == spu_itype::CGTBI || mod1_type == spu_itype::CLGTB || mod1_type == spu_itype::CLGTBI; + break; + } + case spu_itype::ANDI: + { + const auto prev_type = modified == 1 ? mod1_type : mod2_type; + is_ok &= mod1_type == spu_itype::CEQB || mod1_type == spu_itype::CEQBI || mod1_type == spu_itype::CGTB || mod1_type == spu_itype::CGTBI || mod1_type == spu_itype::CLGTB || mod1_type == spu_itype::CLGTBI; + is_ok &= (spu_opcode_t{imm}.si10 & 0xff) == 0xff; + break; + } + case spu_itype::CEQ: + case spu_itype::CEQH: + case spu_itype::CEQB: + case spu_itype::CGT: + case spu_itype::CGTH: + case spu_itype::CGTB: + case spu_itype::CLGT: + case spu_itype::CLGTH: + case spu_itype::CLGTB: + { + is_ok = modified == 1 && (mod1_type == spu_itype::AI || mod1_type == spu_itype::AHI); + IMM = imm; + break; + } + case spu_itype::CEQI: + case spu_itype::CEQHI: + case spu_itype::CEQBI: + case spu_itype::CGTI: + case spu_itype::CGTHI: + case spu_itype::CGTBI: + case spu_itype::CLGTI: + case spu_itype::CLGTHI: + case spu_itype::CLGTBI: + { + is_ok = modified == 1 && (mod1_type == spu_itype::AI || mod1_type == spu_itype::AHI); + IMM = spu_opcode_t{imm}.si10; + break; + } + } + + if (!is_ok) + { + mod1_type = spu_itype::UNK; + mod2_type = spu_itype::UNK; + mod3_type = spu_itype::UNK; + IMM = umax; + modified = 1; + return *this; + } + + (modified == 1 ? mod2_type : mod3_type) = inst_type; + modified++; + return *this; + } + + mod1_type = inst_type; + modified = 1; + + switch (inst_type) + { + case spu_itype::AHI: + { + IMM = spu_opcode_t{imm}.duplicate_si10(); + return *this; + } + case spu_itype::AI: + case spu_itype::ORI: + case spu_itype::XORI: + case spu_itype::ANDI: + + case spu_itype::CEQI: + case spu_itype::CEQHI: + case spu_itype::CEQBI: + case spu_itype::CGTI: + case spu_itype::CGTHI: + case spu_itype::CGTBI: + case spu_itype::CLGTI: + case spu_itype::CLGTHI: + case spu_itype::CLGTBI: + { + IMM = spu_opcode_t{imm}.si10; + return *this; + } + case spu_itype::ILA: + { + IMM = spu_opcode_t{imm}.i18; + return *this; + } + case spu_itype::IOHL: + case spu_itype::ILH: + case spu_itype::ILHU: + { + IMM = spu_opcode_t{imm}.i16; + return *this; + } + default: + { + IMM = imm; + break; + } + } + + return *this; + } + }; + + static origin_t make_reg(u32 reg_val) noexcept + { + origin_t org{}; + org.add_register_origin(reg_val); + return org; + } + + const origin_t* find_reg(u32 reg_val) const noexcept + { + for (auto& pair : regs) + { + if (pair.first == reg_val) + { + return &pair.second; + } + } + + return nullptr; + } + + origin_t* find_reg(u32 reg_val) noexcept + { + return const_cast(std::as_const(*this).find_reg(reg_val)); + } + + bool is_reg_null(u32 reg_val) const noexcept + { + if (const auto reg_found = find_reg(reg_val)) + { + return reg_found->is_null(reg_val); + } + + return true; + } + + bool is_gpr_not_NaN_hint(u32 i) const noexcept + { + return ::at32(gpr_not_nans, i); + } + + origin_t get_reg(u32 reg_val) noexcept + { + const auto org = find_reg(reg_val); + return org ? *org : regs.emplace_back(reg_val, std::remove_reference_t{}).second; + } + + std::vector> regs; + + // Return old state for error reporting + reduced_loop_t discard() + { + const reduced_loop_t old = *this; + *this = reduced_loop_t{}; + return old; + } + }; + protected: spu_runtime* m_spurt{}; @@ -326,8 +757,14 @@ protected: // Set if the initial register value in this block may be xfloat std::bitset reg_maybe_xf{}; - // Bit mask of the registers used (before modified) - std::bitset reg_use{}; + // Set if register is used in floating pont instruction + std::bitset reg_maybe_float{}; + + // Set if register is used as shuffle mask + std::bitset reg_maybe_shuffle_mask{}; + + // Number of times registers are used (before modified) + std::array reg_use{}; // Bit mask of the trivial (u32 x 4) constant value resulting in this block std::bitset reg_const{}; @@ -391,18 +828,23 @@ protected: putllc16, putllc0, rchcnt_loop, + reduced_loop, }; std::vector m_inst_attrs; struct pattern_info { - u64 info; + // Info via integral + u64 info{}; + + // Info via additional erased-typed pointer + std::shared_ptr info_ptr; }; - std::unordered_map m_patterns; + std::map m_patterns; - void add_pattern(inst_attr attr, u32 start, u64 info); + void add_pattern(inst_attr attr, u32 start, u64 info, std::shared_ptr info_ptr = nullptr); private: // For private use @@ -435,7 +877,7 @@ public: spu_program analyse(const be_t* ls, u32 entry_point, std::map>* out_target_list = nullptr); // Print analyser internal state - void dump(const spu_program& result, std::string& out); + void dump(const spu_program& result, std::string& out, u32 block_min = 0, u32 block_max = SPU_LS_SIZE); // Get SPU Runtime spu_runtime& get_runtime() diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 7b70dcdbd2..60e0f99cca 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -164,7 +164,7 @@ void fmt_class_string::format(std::string& out, u64 arg) out.resize(out.size() - 4); // Print chunk address from lowest 16 bits - fmt::append(out, "...chunk-0x%05x", (arg & 0xffff) * 4); + fmt::append(out, "-0x%05x", (arg & 0xffff) * 4); } enum class spu_block_hash_short : u64{}; @@ -495,7 +495,8 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write); extern thread_local u64 g_tls_fault_spu; -const spu_decoder s_spu_itype; +const extern spu_decoder g_spu_itype; +const extern spu_decoder g_spu_iflag; namespace vm { @@ -598,7 +599,7 @@ std::array op_branch_targets(u32 pc, spu_opcode_t op) { std::array res{spu_branch_target(pc + 4), umax}; - switch (const auto type = s_spu_itype.decode(op.opcode)) + switch (const auto type = g_spu_itype.decode(op.opcode)) { case spu_itype::BR: case spu_itype::BRA: @@ -639,6 +640,54 @@ std::array op_branch_targets(u32 pc, spu_opcode_t op) return res; } +std::tuple, u32> op_register_targets(u32 /*pc*/, spu_opcode_t op) +{ + std::tuple, u32> result{u32{umax}, std::array{128, 128, 128}, op.opcode}; + + const auto type = g_spu_itype.decode(op.opcode); + + if (type & spu_itype::zregmod) + { + std::get<2>(result) = 0; + return result; + } + + std::get<0>(result) = type & spu_itype::_quadrop ? op.rt4 : op.rt; + + spu_opcode_t op_masked = op; + + if (type & spu_itype::_quadrop) + { + op_masked.rt4 = 0; + } + else + { + op_masked.rt = 0; + } + + std::get<2>(result) = op_masked.opcode; + + if (auto iflags = g_spu_iflag.decode(op.opcode)) + { + if (+iflags & +spu_iflag::use_ra) + { + std::get<1>(result)[0] = op.ra; + } + + if (+iflags & +spu_iflag::use_rb) + { + std::get<1>(result)[1] = op.rb; + } + + if (+iflags & +spu_iflag::use_rc) + { + std::get<1>(result)[2] = op.rc; + } + } + + return result; +} + void spu_int_ctrl_t::set(u64 ints) { // leave only enabled interrupts @@ -988,7 +1037,7 @@ std::vector> spu_thread::dump_callstack_list() const passed[i / 4] = true; const spu_opcode_t op{_ref(i)}; - const auto type = s_spu_itype.decode(op.opcode); + const auto type = g_spu_itype.decode(op.opcode); if (start == 0 && type == spu_itype::STQD && op.ra == 1u && op.rt == 0u) { @@ -1090,11 +1139,62 @@ std::vector> spu_thread::dump_callstack_list() const return call_stack_list; } -std::string spu_thread::dump_misc() const +void spu_thread::dump_misc(std::string& ret, std::any& custom_data) const { - std::string ret = cpu_thread::dump_misc(); + cpu_thread::dump_misc(ret, custom_data); - fmt::append(ret, "Block Weight: %u (Retreats: %u)", block_counter, block_failure); + struct dump_misc_data_t + { + u32 cpu_id = umax; + u64 last_read_time = umax; + u64 last_block_counter = umax; + u64 update_count = 0; + + std::pair update(u64 current_block_counter, u64 current_timestamp = get_system_time()) + { + const u64 diff_time = current_timestamp <= last_read_time ? 0 : current_timestamp - last_read_time; + const u64 diff_block = current_block_counter <= last_block_counter ? 0 : current_block_counter - last_block_counter; + + if (last_read_time == umax || update_count >= 1000) + { + last_read_time = current_timestamp; + last_block_counter = current_block_counter; + update_count = 0; + } + else if (diff_time >= 100000 && diff_block >= 100) + { + // Update values to measure rate (but not fully so rate can be measured later) + last_read_time += diff_time / 10 * 9; + last_block_counter += diff_block / 10 * 9; + update_count++; + } + + return {diff_time, diff_block}; + } + }; + + dump_misc_data_t* func_data = std::any_cast(&custom_data); + + if (!func_data) + { + custom_data.reset(); + custom_data = std::make_any(); + func_data = ensure(std::any_cast(&custom_data)); + } + + if (func_data->cpu_id != this->id) + { + *func_data = {}; + func_data->cpu_id = this->id; + } + + const u64 current_block_counter = atomic_storage::load(block_counter); + + const auto [diff_time, diff_block] = func_data->update(current_block_counter); + + const u64 rate_of_diff = diff_block ? std::max(1, utils::rational_mul(diff_block, 1'000'000, std::max(diff_time, 1))) : 0; + + fmt::append(ret, "Block Weight: log10(%u/second): %.1f (Retreats: %u)", rate_of_diff, std::log10(std::max(rate_of_diff, 10)), block_failure); if (u64 hash = atomic_storage::load(block_hash)) { @@ -1145,8 +1245,6 @@ std::string spu_thread::dump_misc() const break; } } - - return ret; } void spu_thread::cpu_on_stop() @@ -3761,7 +3859,7 @@ bool spu_thread::is_exec_code(u32 addr, std::span ls_ptr, u32 base_add const u32 addr0 = spu_branch_target(addr); const spu_opcode_t op{read_from_ptr>(ls_ptr, addr0 - base_addr)}; - const auto type = s_spu_itype.decode(op.opcode); + const auto type = g_spu_itype.decode(op.opcode); if (type == spu_itype::UNK || !op.opcode) { @@ -3907,7 +4005,7 @@ bool spu_thread::is_exec_code(u32 addr, std::span ls_ptr, u32 base_add // Test the validity of a single instruction of the optional target // This function can't be too slow and is unlikely to improve results by a great deal const u32 op0 = read_from_ptr>(ls_ptr, route_pc - base_addr); - const spu_itype::type type0 = s_spu_itype.decode(op0); + const spu_itype::type type0 = g_spu_itype.decode(op0); if (type0 == spu_itype::UNK || !op0) { @@ -6878,7 +6976,7 @@ spu_exec_object spu_thread::capture_memory_as_elf(std::span>(all_data, pc0 - 4); // Try to find function entry (if they are placed sequentially search for BI $LR of previous function) - if (!op || op == 0x35000000u || s_spu_itype.decode(op) == spu_itype::UNK) + if (!op || op == 0x35000000u || g_spu_itype.decode(op) == spu_itype::UNK) { if (is_exec_code(pc0, { all_data.data(), SPU_LS_SIZE })) break; diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index 9596f7b006..889d6f291c 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -630,7 +630,7 @@ public: virtual void dump_regs(std::string&, std::any& custom_data) const override; virtual std::string dump_callstack() const override; virtual std::vector> dump_callstack_list() const override; - virtual std::string dump_misc() const override; + virtual void dump_misc(std::string& ret, std::any& custom_data) const override; virtual void cpu_task() override final; virtual void cpu_on_stop() override; virtual void cpu_return() override; diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index 3b923e8c41..dbe11039e7 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -2219,6 +2219,28 @@ void lv2_obj::prepare_for_sleep(cpu_thread& cpu) cpu_counter::remove(&cpu); } +ppu_thread* lv2_obj::get_running_ppu(u32 index) +{ + usz thread_count = g_cfg.core.ppu_threads; + + if (index >= thread_count) + { + return nullptr; + } + + auto target = atomic_storage::load(g_ppu); + + for (usz cur = 0; target; target = atomic_storage::load(target->next_ppu), cur++) + { + if (cur == index) + { + return target; + } + } + + return nullptr; +} + void lv2_obj::notify_all() noexcept { for (auto cpu : g_to_notify) diff --git a/rpcs3/Emu/Cell/lv2/sys_cond.cpp b/rpcs3/Emu/Cell/lv2/sys_cond.cpp index 401ed3bd66..f66146ae01 100644 --- a/rpcs3/Emu/Cell/lv2/sys_cond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_cond.cpp @@ -59,6 +59,7 @@ CellError lv2_cond::on_id_create() if (!mutex) { _mutex = static_cast>(ensure(idm::get_unlocked(mtx_id))); + mutex = static_cast(_mutex.get()); } // Defer function diff --git a/rpcs3/Emu/Cell/lv2/sys_config.cpp b/rpcs3/Emu/Cell/lv2/sys_config.cpp index 0179a6b7f2..54cb2d6ce8 100644 --- a/rpcs3/Emu/Cell/lv2/sys_config.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_config.cpp @@ -174,20 +174,28 @@ bool lv2_config_service_listener::check_service(const lv2_config_service& servic return true; } -bool lv2_config_service_listener::notify(const shared_ptr& event) -{ - service_events.emplace_back(event); - return event->notify(); -} - bool lv2_config_service_listener::notify(const shared_ptr& service) { - if (!check_service(*service)) - return false; + { + std::lock_guard lock(mutex_service_events); - // Create service event and notify queue! - const auto event = lv2_config_service_event::create(handle, service, *this); - return notify(event); + if (!check_service(*service)) + return false; + + // Create service event and notify queue! + const auto event = lv2_config_service_event::create(handle, service, *this); + service_events.emplace_back(event); + + if (!event->notify()) + { + // If we fail to deliver the event to the queue just clean the event up or it'll hold the listener alive forever + g_fxo->get().remove_service_event(event->id); + service_events.pop_back(); + return false; + } + } + + return true; } void lv2_config_service_listener::notify_all() @@ -267,7 +275,7 @@ void lv2_config_service_event::write(sys_config_service_event_t *dst) const { const auto registered = service->is_registered(); - dst->service_listener_handle = listener.get_id(); + dst->service_listener_handle = listener_id; dst->registered = registered; dst->service_id = service->id; dst->user_id = service->user_id; @@ -346,7 +354,7 @@ error_code sys_config_get_service_event(u32 config_hdl, u32 event_id, vm::ptrget().find_event(event_id); - if (!event) + if (!event || event->handle != cfg) { return CELL_ESRCH; } diff --git a/rpcs3/Emu/Cell/lv2/sys_config.h b/rpcs3/Emu/Cell/lv2/sys_config.h index 0804671141..aaf4c6f5d0 100644 --- a/rpcs3/Emu/Cell/lv2/sys_config.h +++ b/rpcs3/Emu/Cell/lv2/sys_config.h @@ -296,11 +296,10 @@ private: // The service listener owns the service events - service events will not be freed as long as their corresponding listener exists // This has been confirmed to be the case in realhw + shared_mutex mutex_service_events; std::vector> service_events; shared_ptr handle; - bool notify(const shared_ptr& event); - public: const sys_config_service_id service_id; const u64 min_verbosity; @@ -370,14 +369,14 @@ public: // This has been confirmed to be the case in realhw const shared_ptr handle; const shared_ptr service; - const lv2_config_service_listener& listener; + const u32 listener_id; // Constructors (should not be used directly) lv2_config_service_event(shared_ptr _handle, shared_ptr _service, const lv2_config_service_listener& _listener) noexcept : id(get_next_id()) , handle(std::move(_handle)) , service(std::move(_service)) - , listener(_listener) + , listener_id(_listener.get_id()) { } diff --git a/rpcs3/Emu/Cell/lv2/sys_dbg.cpp b/rpcs3/Emu/Cell/lv2/sys_dbg.cpp index 27fa51b148..eb04cff61b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_dbg.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_dbg.cpp @@ -105,7 +105,7 @@ error_code sys_dbg_write_process_memory(s32 pid, u32 address, u32 size, vm::cptr i += op_size; } - if (!is_exec || i >= end) + if ((!is_exec || i >= end) && exec_update_size > 0) { // Commit executable data update // The read memory is also super ptr so memmove can work correctly on all implementations diff --git a/rpcs3/Emu/Cell/lv2/sys_event.cpp b/rpcs3/Emu/Cell/lv2/sys_event.cpp index 8b3de14bf7..c5fa15cf55 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event.cpp @@ -170,8 +170,7 @@ CellError lv2_event_queue::send(lv2_event event, bool* notified_thread, lv2_even { if (auto cpu = get_current_cpu_thread()) { - cpu->state += cpu_flag::again; - cpu->state += cpu_flag::exit; + cpu->state += cpu_flag::again + cpu_flag::exit; } sys_event.warning("Ignored event!"); @@ -309,6 +308,15 @@ error_code sys_event_queue_destroy(ppu_thread& ppu, u32 equeue_id, s32 mode) return CELL_EBUSY; } + for (auto cpu = head; cpu; cpu = cpu->get_next_cpu()) + { + if (cpu->state & cpu_flag::again) + { + ppu.state += cpu_flag::again; + return CELL_EAGAIN; + } + } + if (!queue.events.empty()) { // Copy events for logging, does not empty @@ -321,17 +329,6 @@ error_code sys_event_queue_destroy(ppu_thread& ppu, u32 equeue_id, s32 mode) { qlock.unlock(); } - else - { - for (auto cpu = head; cpu; cpu = cpu->get_next_cpu()) - { - if (cpu->state & cpu_flag::again) - { - ppu.state += cpu_flag::again; - return CELL_EAGAIN; - } - } - } return {}; }); @@ -621,7 +618,7 @@ error_code sys_event_port_create(cpu_thread& cpu, vm::ptr eport_id, s32 por sys_event.warning("sys_event_port_create(eport_id=*0x%x, port_type=%d, name=0x%llx)", eport_id, port_type, name); - if (port_type != SYS_EVENT_PORT_LOCAL && port_type != 3) + if (port_type != SYS_EVENT_PORT_LOCAL && port_type != SYS_EVENT_PORT_IPC) { sys_event.error("sys_event_port_create(): unknown port type (%d)", port_type); return CELL_EINVAL; @@ -675,8 +672,9 @@ error_code sys_event_port_connect_local(cpu_thread& cpu, u32 eport_id, u32 equeu std::lock_guard lock(id_manager::g_mutex); const auto port = idm::check_unlocked(eport_id); + auto queue = idm::get_unlocked(equeue_id); - if (!port || !idm::check_unlocked(equeue_id)) + if (!port || !queue) { return CELL_ESRCH; } @@ -691,7 +689,7 @@ error_code sys_event_port_connect_local(cpu_thread& cpu, u32 eport_id, u32 equeu return CELL_EISCONN; } - port->queue = idm::get_unlocked(equeue_id); + port->queue = std::move(queue); return CELL_OK; } diff --git a/rpcs3/Emu/Cell/lv2/sys_event.h b/rpcs3/Emu/Cell/lv2/sys_event.h index 6c43798a30..8364361e6c 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event.h +++ b/rpcs3/Emu/Cell/lv2/sys_event.h @@ -7,7 +7,6 @@ #include class cpu_thread; -class spu_thrread; // Event Queue Type enum : u32 diff --git a/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp b/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp index c28efaf711..89a6c42ac5 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp @@ -19,6 +19,22 @@ lv2_event_flag::lv2_event_flag(utils::serial& ar) ar(pattern); } +// Always set result +struct sys_event_store_result +{ + vm::ptr ptr; + u64 val = 0; + + ~sys_event_store_result() noexcept + { + if (ptr) + { + cpu_thread::get_current()->check_state(); + *ptr = val; + } + } +}; + std::function lv2_event_flag::load(utils::serial& ar) { return load_func(make_shared(stx::exact_t(ar))); @@ -120,21 +136,7 @@ error_code sys_event_flag_wait(ppu_thread& ppu, u32 id, u64 bitptn, u32 mode, vm ppu.gpr[5] = mode; ppu.gpr[6] = 0; - // Always set result - struct store_result - { - vm::ptr ptr; - u64 val = 0; - - ~store_result() noexcept - { - if (ptr) - { - cpu_thread::get_current()->check_state(); - *ptr = val; - } - } - } store{result}; + sys_event_store_result store{result}; if (!lv2_event_flag::check_mode(mode)) { @@ -273,21 +275,7 @@ error_code sys_event_flag_trywait(ppu_thread& ppu, u32 id, u64 bitptn, u32 mode, sys_event_flag.trace("sys_event_flag_trywait(id=0x%x, bitptn=0x%llx, mode=0x%x, result=*0x%x)", id, bitptn, mode, result); - // Always set result - struct store_result - { - vm::ptr ptr; - u64 val = 0; - - ~store_result() noexcept - { - if (ptr) - { - cpu_thread::get_current()->check_state(); - *ptr = val; - } - } - } store{result}; + sys_event_store_result store{result}; if (!lv2_event_flag::check_mode(mode)) { @@ -556,8 +544,6 @@ error_code sys_event_flag_get(ppu_thread& ppu, u32 id, vm::ptr flags) return +flag.pattern; }); - ppu.check_state(); - if (!flag) { if (flags) *flags = 0; @@ -569,6 +555,8 @@ error_code sys_event_flag_get(ppu_thread& ppu, u32 id, vm::ptr flags) return CELL_EFAULT; } + ppu.check_state(); + *flags = flag.ret; return CELL_OK; } diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index 92fc21b747..2534f6a8c1 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -140,6 +140,32 @@ bool verify_mself(const fs::file& mself_file) return true; } +// TODO: May not be thread-safe (or even, process-safe) +bool has_non_directory_components(std::string_view path) +{ + std::string path0{path}; + + while (true) + { + const std::string sub_path = fs::get_parent_dir(path0); + + if (sub_path.size() >= path0.size()) + { + break; + } + + fs::stat_t stat{}; + if (fs::get_stat(sub_path, stat)) + { + return !stat.is_directory; + } + + path0 = std::move(sub_path); + } + + return false; +} + lv2_fs_mount_info_map::lv2_fs_mount_info_map() { for (auto mp = &g_mp_sys_dev_root; mp; mp = mp->next) // Scan and keep track of pre-mounted devices @@ -382,10 +408,12 @@ lv2_fs_object::lv2_fs_object(utils::serial& ar, bool) u64 lv2_file::op_read(const fs::file& file, vm::ptr buf, u64 size, u64 opt_pos) { - if (u64 region = buf.addr() >> 28, region_end = (buf.addr() & 0xfff'ffff) + (size & 0xfff'ffff); region == region_end && ((region >> 28) == 0 || region >= 0xC)) + if (u64 region = buf.addr() >> 28, region_end = (buf.addr() + size) >> 28; + size < u32{umax} && region == region_end && (region == 0 || region == 0xD) && vm::check_addr(buf.addr(), vm::page_writable, static_cast(size))) { // Optimize reads from safe memory - return (opt_pos == umax ? file.read(buf.get_ptr(), size) : file.read_at(opt_pos, buf.get_ptr(), size)); + const auto buf_ptr = vm::get_super_ptr(buf.addr()); + return (opt_pos == umax ? file.read(buf_ptr, size) : file.read_at(opt_pos, buf_ptr, size)); } // Copy data from intermediate buffer (avoid passing vm pointer to a native API) @@ -412,6 +440,14 @@ u64 lv2_file::op_read(const fs::file& file, vm::ptr buf, u64 size, u64 opt u64 lv2_file::op_write(const fs::file& file, vm::cptr buf, u64 size) { + if (u64 region = buf.addr() >> 28, region_end = (buf.addr() + size) >> 28; + size < u32{umax} && region == region_end && (region == 0 || region == 0xD) && vm::check_addr(buf.addr(), vm::page_readable, static_cast(size))) + { + // Optimize writes from safe memory + const auto buf_ptr = vm::get_super_ptr(buf.addr()); + return file.write(buf_ptr, size); + } + // Copy data to intermediate buffer (avoid passing vm pointer to a native API) std::vector local_buf(std::min(size, 65536)); @@ -889,11 +925,18 @@ lv2_file::open_raw_result_t lv2_file::open_raw(const std::string& local_path, s3 switch (auto error = fs::g_tls_error) { + case fs::error::notdir: return {CELL_ENOTDIR}; case fs::error::noent: return {CELL_ENOENT}; - default: sys_fs.error("lv2_file::open(): unknown error %s", error); - } + default: + { + if (has_non_directory_components(local_path)) + { + return {CELL_ENOTDIR}; + } - return {CELL_EIO}; + fmt::throw_exception("unknown error %s", error); + } + } } if (flags & CELL_FS_O_MSELF && !verify_mself(file)) @@ -1035,7 +1078,7 @@ lv2_file::open_result_t lv2_file::open(std::string_view vpath, s32 flags, s32 mo error_code sys_fs_open(ppu_thread& ppu, vm::cptr path, s32 flags, vm::ptr fd, s32 mode, vm::cptr arg, u64 size) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_open(path=%s, flags=%#o, fd=*0x%x, mode=%#o, arg=*0x%x, size=0x%llx)", path, flags, fd, mode, arg, size); @@ -1083,7 +1126,7 @@ error_code sys_fs_open(ppu_thread& ppu, vm::cptr path, s32 flags, vm::ptr< error_code sys_fs_read(ppu_thread& ppu, u32 fd, vm::ptr buf, u64 nbytes, vm::ptr nread) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.trace("sys_fs_read(fd=%d, buf=*0x%x, nbytes=0x%llx, nread=*0x%x)", fd, buf, nbytes, nread); @@ -1156,7 +1199,7 @@ error_code sys_fs_read(ppu_thread& ppu, u32 fd, vm::ptr buf, u64 nbytes, v error_code sys_fs_write(ppu_thread& ppu, u32 fd, vm::cptr buf, u64 nbytes, vm::ptr nwrite) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.trace("sys_fs_write(fd=%d, buf=*0x%x, nbytes=0x%llx, nwrite=*0x%x)", fd, buf, nbytes, nwrite); @@ -1238,7 +1281,7 @@ error_code sys_fs_write(ppu_thread& ppu, u32 fd, vm::cptr buf, u64 nbytes, error_code sys_fs_close(ppu_thread& ppu, u32 fd) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); const auto file = idm::get_unlocked(fd); @@ -1314,7 +1357,7 @@ error_code sys_fs_close(ppu_thread& ppu, u32 fd) error_code sys_fs_opendir(ppu_thread& ppu, vm::cptr path, vm::ptr fd) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_opendir(path=%s, fd=*0x%x)", path, fd); @@ -1364,8 +1407,12 @@ error_code sys_fs_opendir(ppu_thread& ppu, vm::cptr path, vm::ptr fd) } default: { - sys_fs.error("sys_fs_opendir(): unknown error %s", error); - return {CELL_EIO, path}; + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } + + fmt::throw_exception("unknown error %s", error); } } } @@ -1391,7 +1438,8 @@ error_code sys_fs_opendir(ppu_thread& ppu, vm::cptr path, vm::ptr fd) // Add additional entries for split file candidates (while ends with .66600) while (mp.mp != &g_mp_sys_dev_hdd1 && data.back().name.ends_with(".66600")) { - data.emplace_back(data.back()).name.resize(data.back().name.size() - 6); + fs::dir_entry copy = data.back(); + data.emplace_back(copy).name.resize(copy.name.size() - 6); } } @@ -1433,7 +1481,7 @@ error_code sys_fs_opendir(ppu_thread& ppu, vm::cptr path, vm::ptr fd) error_code sys_fs_readdir(ppu_thread& ppu, u32 fd, vm::ptr dir, vm::ptr nread) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_readdir(fd=%d, dir=*0x%x, nread=*0x%x)", fd, dir, nread); @@ -1490,7 +1538,7 @@ error_code sys_fs_readdir(ppu_thread& ppu, u32 fd, vm::ptr dir, vm error_code sys_fs_closedir(ppu_thread& ppu, u32 fd) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_closedir(fd=%d)", fd); @@ -1504,7 +1552,6 @@ error_code sys_fs_closedir(ppu_thread& ppu, u32 fd) error_code sys_fs_stat(ppu_thread& ppu, vm::cptr path, vm::ptr sb) { - ppu.state += cpu_flag::wait; lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_stat(path=%s, sb=*0x%x)", path, sb); @@ -1548,6 +1595,10 @@ error_code sys_fs_stat(ppu_thread& ppu, vm::cptr path, vm::ptr { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: + { + return { CELL_ENOTDIR, path}; + } case fs::error::noent: { // Try to analyse split file (TODO) @@ -1587,8 +1638,12 @@ error_code sys_fs_stat(ppu_thread& ppu, vm::cptr path, vm::ptr } default: { - sys_fs.error("sys_fs_stat(): unknown error %s", error); - return {CELL_EIO, path}; + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } + + fmt::throw_exception("unknown error %s", error); } } } @@ -1618,7 +1673,7 @@ error_code sys_fs_stat(ppu_thread& ppu, vm::cptr path, vm::ptr error_code sys_fs_fstat(ppu_thread& ppu, u32 fd, vm::ptr sb) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_fstat(fd=%d, sb=*0x%x)", fd, sb); @@ -1673,7 +1728,7 @@ error_code sys_fs_link(ppu_thread&, vm::cptr from, vm::cptr to) error_code sys_fs_mkdir(ppu_thread& ppu, vm::cptr path, s32 mode) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_mkdir(path=%s, mode=%#o)", path, mode); @@ -1714,6 +1769,10 @@ error_code sys_fs_mkdir(ppu_thread& ppu, vm::cptr path, s32 mode) { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: + { + return { CELL_ENOTDIR, path}; + } case fs::error::noent: { return {mp == &g_mp_sys_dev_hdd1 ? sys_fs.warning : sys_fs.error, CELL_ENOENT, path}; @@ -1722,10 +1781,16 @@ error_code sys_fs_mkdir(ppu_thread& ppu, vm::cptr path, s32 mode) { return {sys_fs.warning, CELL_EEXIST, path}; } - default: sys_fs.error("sys_fs_mkdir(): unknown error %s", error); - } + default: + { + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } - return {CELL_EIO, path}; // ??? + fmt::throw_exception("unknown error %s", error); + } + } } sys_fs.notice("sys_fs_mkdir(): directory %s created", path); @@ -1734,7 +1799,7 @@ error_code sys_fs_mkdir(ppu_thread& ppu, vm::cptr path, s32 mode) error_code sys_fs_rename(ppu_thread& ppu, vm::cptr from, vm::cptr to) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_rename(from=%s, to=%s)", from, to); @@ -1785,12 +1850,19 @@ error_code sys_fs_rename(ppu_thread& ppu, vm::cptr from, vm::cptr to { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: return {CELL_ENOTDIR, from}; case fs::error::noent: return {CELL_ENOENT, from}; case fs::error::exist: return {CELL_EEXIST, to}; - default: sys_fs.error("sys_fs_rename(): unknown error %s", error); - } + default: + { + if (has_non_directory_components(local_from)) + { + return {CELL_ENOTDIR, from}; + } - return {CELL_EIO, from}; // ??? + fmt::throw_exception("unknown error %s", error); + } + } } sys_fs.notice("sys_fs_rename(): %s renamed to %s", from, to); @@ -1799,7 +1871,7 @@ error_code sys_fs_rename(ppu_thread& ppu, vm::cptr from, vm::cptr to error_code sys_fs_rmdir(ppu_thread& ppu, vm::cptr path) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_rmdir(path=%s)", path); @@ -1840,12 +1912,19 @@ error_code sys_fs_rmdir(ppu_thread& ppu, vm::cptr path) { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: return {CELL_ENOTDIR, path}; case fs::error::noent: return {CELL_ENOENT, path}; case fs::error::notempty: return {CELL_ENOTEMPTY, path}; - default: sys_fs.error("sys_fs_rmdir(): unknown error %s", error); - } + default: + { + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } - return {CELL_EIO, path}; // ??? + fmt::throw_exception("unknown error %s", error); + } + } } sys_fs.notice("sys_fs_rmdir(): directory %s removed", path); @@ -1854,7 +1933,7 @@ error_code sys_fs_rmdir(ppu_thread& ppu, vm::cptr path) error_code sys_fs_unlink(ppu_thread& ppu, vm::cptr path) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_unlink(path=%s)", path); @@ -1896,14 +1975,24 @@ error_code sys_fs_unlink(ppu_thread& ppu, vm::cptr path) { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: + { + return { CELL_ENOTDIR, path }; + } case fs::error::noent: { return {mp == &g_mp_sys_dev_hdd1 ? sys_fs.warning : sys_fs.error, CELL_ENOENT, path}; } - default: sys_fs.error("sys_fs_unlink(): unknown error %s", error); - } + default: + { + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } - return {CELL_EIO, path}; // ??? + fmt::throw_exception("unknown error %s", error); + } + } } sys_fs.notice("sys_fs_unlink(): file %s deleted", path); @@ -1919,7 +2008,7 @@ error_code sys_fs_access(ppu_thread&, vm::cptr path, s32 mode) error_code sys_fs_fcntl(ppu_thread& ppu, u32 fd, u32 op, vm::ptr _arg, u32 _size) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.trace("sys_fs_fcntl(fd=%d, op=0x%x, arg=*0x%x, size=0x%x)", fd, op, _arg, _size); @@ -2148,6 +2237,7 @@ error_code sys_fs_fcntl(ppu_thread& ppu, u32 fd, u32 op, vm::ptr _arg, u32 sys_fs.notice("sys_fs_fcntl(0xc0000006): %s", vpath); // Check only mountpoint + vpath = vpath.substr(0, vpath.find_first_of('\0')); vpath = vpath.substr(0, vpath.find_first_of("/", 1)); // Some mountpoints seem to be handled specially @@ -2591,7 +2681,7 @@ error_code sys_fs_fcntl(ppu_thread& ppu, u32 fd, u32 op, vm::ptr _arg, u32 error_code sys_fs_lseek(ppu_thread& ppu, u32 fd, s64 offset, s32 whence, vm::ptr pos) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.trace("sys_fs_lseek(fd=%d, offset=0x%llx, whence=0x%x, pos=*0x%x)", fd, offset, whence, pos); @@ -2621,10 +2711,8 @@ error_code sys_fs_lseek(ppu_thread& ppu, u32 fd, s64 offset, s32 whence, vm::ptr switch (auto error = fs::g_tls_error) { case fs::error::inval: return {CELL_EINVAL, "fd=%u, offset=0x%x, whence=%d", fd, offset, whence}; - default: sys_fs.error("sys_fs_lseek(): unknown error %s", error); + default: fmt::throw_exception("unknown error %s", error); } - - return CELL_EIO; // ??? } lock.unlock(); @@ -2636,8 +2724,6 @@ error_code sys_fs_lseek(ppu_thread& ppu, u32 fd, s64 offset, s32 whence, vm::ptr error_code sys_fs_fdatasync(ppu_thread& ppu, u32 fd) { - ppu.state += cpu_flag::wait; - sys_fs.trace("sys_fs_fdadasync(fd=%d)", fd); const auto file = idm::get_unlocked(fd); @@ -2662,8 +2748,6 @@ error_code sys_fs_fdatasync(ppu_thread& ppu, u32 fd) error_code sys_fs_fsync(ppu_thread& ppu, u32 fd) { - ppu.state += cpu_flag::wait; - sys_fs.trace("sys_fs_fsync(fd=%d)", fd); const auto file = idm::get_unlocked(fd); @@ -2688,7 +2772,7 @@ error_code sys_fs_fsync(ppu_thread& ppu, u32 fd) error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4, vm::ptr out_flags) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_fget_block_size(fd=%d, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x, out_flags=*0x%x)", fd, sector_size, block_size, arg4, out_flags); @@ -2712,7 +2796,7 @@ error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_s error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr path, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_get_block_size(path=%s, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x)", path, sector_size, block_size, arg4); @@ -2744,10 +2828,16 @@ error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr path, vm::ptr(ppu.test_stopped()); @@ -2762,7 +2852,7 @@ error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr path, vm::ptr path, u64 size) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_truncate(path=%s, size=0x%llx)", path, size); @@ -2798,14 +2888,24 @@ error_code sys_fs_truncate(ppu_thread& ppu, vm::cptr path, u64 size) { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: + { + return { CELL_ENOTDIR, path}; + } case fs::error::noent: { return {mp == &g_mp_sys_dev_hdd1 ? sys_fs.warning : sys_fs.error, CELL_ENOENT, path}; } - default: sys_fs.error("sys_fs_truncate(): unknown error %s", error); - } + default: + { + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } - return {CELL_EIO, path}; // ??? + fmt::throw_exception("unknown error %s", error); + } + } } return CELL_OK; @@ -2813,7 +2913,7 @@ error_code sys_fs_truncate(ppu_thread& ppu, vm::cptr path, u64 size) error_code sys_fs_ftruncate(ppu_thread& ppu, u32 fd, u64 size) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_ftruncate(fd=%d, size=0x%llx)", fd, size); @@ -2851,10 +2951,11 @@ error_code sys_fs_ftruncate(ppu_thread& ppu, u32 fd, u64 size) switch (auto error = fs::g_tls_error) { case fs::error::ok: - default: sys_fs.error("sys_fs_ftruncate(): unknown error %s", error); + default: + { + fmt::throw_exception("unknown error %s", error); + } } - - return CELL_EIO; // ??? } return CELL_OK; @@ -2900,18 +3001,14 @@ error_code sys_fs_chmod(ppu_thread&, vm::cptr path, s32 mode) { switch (auto error = fs::g_tls_error) { + case fs::error::notdir: + { + return { CELL_ENOTDIR, path}; + } case fs::error::noent: { // Try to locate split files - for (u32 i = 66601; i <= 66699; i++) - { - if (mp != &g_mp_sys_dev_hdd1 && !fs::get_stat(fmt::format("%s.%u", local_path, i), info) && !info.is_directory) - { - break; - } - } - if (fs::get_stat(local_path + ".66600", info) && !info.is_directory) { break; @@ -2921,8 +3018,12 @@ error_code sys_fs_chmod(ppu_thread&, vm::cptr path, s32 mode) } default: { - sys_fs.error("sys_fs_chmod(): unknown error %s", error); - return {CELL_EIO, path}; + if (has_non_directory_components(local_path)) + { + return { CELL_ENOTDIR, path }; + } + + fmt::throw_exception("unknown error %s", error); } } } @@ -2939,7 +3040,6 @@ error_code sys_fs_chown(ppu_thread&, vm::cptr path, s32 uid, s32 gid) error_code sys_fs_disk_free(ppu_thread& ppu, vm::cptr path, vm::ptr total_free, vm::ptr avail_free) { - ppu.state += cpu_flag::wait; lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_disk_free(path=%s total_free=*0x%x avail_free=*0x%x)", path, total_free, avail_free); @@ -3018,7 +3118,7 @@ error_code sys_fs_disk_free(ppu_thread& ppu, vm::cptr path, vm::ptr t error_code sys_fs_utime(ppu_thread& ppu, vm::cptr path, vm::cptr timep) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_utime(path=%s, timep=*0x%x)", path, timep); sys_fs.warning("** actime=%u, modtime=%u", timep->actime, timep->modtime); @@ -3055,14 +3155,24 @@ error_code sys_fs_utime(ppu_thread& ppu, vm::cptr path, vm::cptr info, u64 error_code sys_fs_newfs(ppu_thread& ppu, vm::cptr dev_name, vm::cptr file_system, s32 unk1, vm::cptr str1) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_newfs(dev_name=%s, file_system=%s, unk1=0x%x, str1=%s)", dev_name, file_system, unk1, str1); @@ -3263,7 +3373,7 @@ error_code sys_fs_newfs(ppu_thread& ppu, vm::cptr dev_name, vm::cptr error_code sys_fs_mount(ppu_thread& ppu, vm::cptr dev_name, vm::cptr file_system, vm::cptr path, s32 unk1, s32 prot, s32 unk2, vm::cptr str1, u32 str_len) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_mount(dev_name=%s, file_system=%s, path=%s, unk1=0x%x, prot=%d, unk3=0x%x, str1=%s, str_len=%d)", dev_name, file_system, path, unk1, prot, unk2, str1, str_len); @@ -3366,7 +3476,7 @@ error_code sys_fs_mount(ppu_thread& ppu, vm::cptr dev_name, vm::cptr error_code sys_fs_unmount(ppu_thread& ppu, vm::cptr path, s32 unk1, s32 force) { - ppu.state += cpu_flag::wait; + lv2_obj::sleep(ppu); sys_fs.warning("sys_fs_unmount(path=%s, unk1=0x%x, force=%d)", path, unk1, force); diff --git a/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp b/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp index 26ffbc2696..55fd7cb885 100644 --- a/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp @@ -67,7 +67,6 @@ u32 sys_gamepad_ycon_is_gem(vm::ptr in, vm::ptr out) // syscall(621,packet_id,u8 *in,u8 *out) Talk:LV2_Functions_and_Syscalls#Syscall_621_.280x26D.29 gamepad_if usage u32 sys_gamepad_ycon_if(u8 packet_id, vm::ptr in, vm::ptr out) { - switch (packet_id) { case 0: diff --git a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp index 43bfb308ba..ebe4dfc07c 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp @@ -487,6 +487,8 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id { ensure(cond.unqueue(cond.sq, &ppu)); ppu.state += cpu_flag::again; + cond.lwmutex_waiters--; + mutex->lwcond_waiters--; return; } diff --git a/rpcs3/Emu/Cell/lv2/sys_memory.cpp b/rpcs3/Emu/Cell/lv2/sys_memory.cpp index 6110d7d4d5..0f6fb09865 100644 --- a/rpcs3/Emu/Cell/lv2/sys_memory.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_memory.cpp @@ -15,6 +15,18 @@ LOG_CHANNEL(sys_memory); // static shared_mutex s_memstats_mtx; +// This struct is for reduced logging repetition +struct last_reported_memory_stats +{ + struct inner_body + { + u32 prev_total = umax; + u32 prev_avail = umax; + }; + + atomic_t body{}; +}; + lv2_memory_container::lv2_memory_container(u32 size, bool from_idm) noexcept : size(size) , id{from_idm ? idm::last_id() : SYS_MEMORY_CONTAINER_ID_INVALID} @@ -313,8 +325,6 @@ error_code sys_memory_get_user_memory_size(cpu_thread& cpu, vm::ptrget(); @@ -332,6 +342,22 @@ error_code sys_memory_get_user_memory_size(cpu_thread& cpu, vm::ptrget().body.exchange(now); + + if (now.prev_total != out.total_user_memory || now.prev_avail != out.available_user_memory) + { + // Log on change + sys_memory.warning("sys_memory_get_user_memory_size(mem_info=*0x%x): Avail=0x%x, Total=0x%x", mem_info, out.available_user_memory, out.total_user_memory); + } + else + { + sys_memory.trace("sys_memory_get_user_memory_size(mem_info=*0x%x): Avail=0x%x, Total=0x%x", mem_info, out.available_user_memory, out.total_user_memory); + } + cpu.check_state(); *mem_info = out; return CELL_OK; diff --git a/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp b/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp index d7b66adfd8..0723564a5e 100644 --- a/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp @@ -333,7 +333,7 @@ error_code sys_mmapper_allocate_shared_memory_ext(ppu_thread& ppu, u64 ipc_key, } } - if (flags & ~SYS_MEMORY_PAGE_SIZE_MASK) + if (flags & ~SYS_MEMORY_GRANULARITY_MASK) { return CELL_EINVAL; } @@ -401,6 +401,11 @@ error_code sys_mmapper_allocate_shared_memory_from_container_ext(ppu_thread& ppu sys_mmapper.todo("sys_mmapper_allocate_shared_memory_from_container_ext(ipc_key=0x%x, size=0x%x, flags=0x%x, cid=0x%x, entries=*0x%x, entry_count=0x%x, mem_id=*0x%x)", ipc_key, size, flags, cid, entries, entry_count, mem_id); + if (size == 0) + { + return CELL_EALIGN; + } + switch (flags & SYS_MEMORY_PAGE_SIZE_MASK) { case SYS_MEMORY_PAGE_SIZE_1M: @@ -546,8 +551,7 @@ error_code sys_mmapper_free_address(ppu_thread& ppu, u32 addr) // If a memory block is freed, remove it from page notification table. auto& pf_entries = g_fxo->get(); - std::lock_guard lock(pf_entries.mutex); - + std::unique_lock lock(pf_entries.mutex); auto ind_to_remove = pf_entries.entries.begin(); for (; ind_to_remove != pf_entries.entries.end(); ++ind_to_remove) { @@ -558,7 +562,11 @@ error_code sys_mmapper_free_address(ppu_thread& ppu, u32 addr) } if (ind_to_remove != pf_entries.entries.end()) { + u32 port_id = ind_to_remove->port_id; pf_entries.entries.erase(ind_to_remove); + lock.unlock(); + sys_event_port_disconnect(ppu, port_id); + sys_event_port_destroy(ppu, port_id); } return CELL_OK; @@ -826,7 +834,6 @@ error_code sys_mmapper_enable_page_fault_notification(ppu_thread& ppu, u32 start vm::var port_id(0); error_code res = sys_event_port_create(ppu, port_id, SYS_EVENT_PORT_LOCAL, SYS_MEMORY_PAGE_FAULT_EVENT_KEY); - sys_event_port_connect_local(ppu, *port_id, event_queue_id); if (res + 0u == CELL_EAGAIN) { @@ -834,6 +841,8 @@ error_code sys_mmapper_enable_page_fault_notification(ppu_thread& ppu, u32 start return CELL_EAGAIN; } + sys_event_port_connect_local(ppu, *port_id, event_queue_id); + auto& pf_entries = g_fxo->get(); std::unique_lock lock(pf_entries.mutex); diff --git a/rpcs3/Emu/Cell/lv2/sys_mutex.cpp b/rpcs3/Emu/Cell/lv2/sys_mutex.cpp index e6c96ffd64..9f436ae4d3 100644 --- a/rpcs3/Emu/Cell/lv2/sys_mutex.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_mutex.cpp @@ -85,7 +85,7 @@ error_code sys_mutex_create(ppu_thread& ppu, vm::ptr mutex_id, vm::ptr(_attr.pshared, _attr.ipc_key, _attr.flags, [&]() + if (auto error = lv2_obj::create(_attr.pshared, ipc_key, _attr.flags, [&]() { return make_shared( _attr.protocol, diff --git a/rpcs3/Emu/Cell/lv2/sys_mutex.h b/rpcs3/Emu/Cell/lv2/sys_mutex.h index f82f913399..c4fe04ce2a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_mutex.h +++ b/rpcs3/Emu/Cell/lv2/sys_mutex.h @@ -173,7 +173,11 @@ struct lv2_mutex final : lv2_obj if (sq == data.sq) { - atomic_storage::release(control.raw().owner, res->id); + if (cpu_flag::again - res->state) + { + atomic_storage::release(control.raw().owner, res->id); + } + return false; } diff --git a/rpcs3/Emu/Cell/lv2/sys_net.cpp b/rpcs3/Emu/Cell/lv2/sys_net.cpp index 827a4c98f2..a860d43b12 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net.cpp @@ -563,37 +563,34 @@ error_code sys_net_bnet_connect(ppu_thread& ppu, s32 s, vm::ptr(-SYS_NET_EINTR)) + if (state & cpu_flag::signal) { - return -SYS_NET_EINTR; + break; } - if (result) - { - if (result < 0) - { - return sys_net_error{result}; - } + ppu.state.wait(state); + } - return not_an_error(result); + if (ppu.gpr[3] == static_cast(-SYS_NET_EINTR)) + { + return -SYS_NET_EINTR; + } + + if (result) + { + if (result < 0) + { + return sys_net_error{result}; } + + return not_an_error(result); } return CELL_OK; @@ -992,7 +989,7 @@ error_code sys_net_bnet_sendto(ppu_thread& ppu, s32 s, vm::cptr buf, u32 l fmt::throw_exception("sys_net_bnet_sendto(s=%d): unknown flags (0x%x)", flags); } - if (addr && addrlen < 8) + if (addr && addrlen < sizeof(sys_net_sockaddr)) { sys_net.error("sys_net_bnet_sendto(s=%d): bad addrlen (%u)", s, addrlen); return -SYS_NET_EINVAL; @@ -1295,7 +1292,7 @@ error_code sys_net_bnet_poll(ppu_thread& ppu, vm::ptr fds, s32 n if (auto sock = idm::check_unlocked(fds_buf[i].fd)) { - signaled += sock->poll(fds_buf[i], _fds[i]); + sock->poll(fds_buf[i], _fds[i]); #ifdef _WIN32 connecting[i] = sock->is_connecting(); #endif @@ -1303,7 +1300,6 @@ error_code sys_net_bnet_poll(ppu_thread& ppu, vm::ptr fds, s32 n else { fds_buf[i].revents |= SYS_NET_POLLNVAL; - signaled++; } } @@ -1536,9 +1532,9 @@ error_code sys_net_bnet_select(ppu_thread& ppu, s32 nfds, vm::ptr select(bs_t selected, pollfd& native_pfd) = 0; error_code abort_socket(s32 flags); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp index d420f23cc8..b422db814b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp @@ -551,12 +551,14 @@ std::tuple lv2_socket_native::getsockopt(s32 } case SYS_NET_IP_TTLCHK: { - sys_net.error("sys_net_bnet_getsockopt(IPPROTO_IP, SYS_NET_IP_TTLCHK): stubbed option"); + out_val._int = min_ttl; + out_len = sizeof(s32); return {CELL_OK, out_val, out_len}; } case SYS_NET_IP_MAXTTL: { - sys_net.error("sys_net_bnet_getsockopt(IPPROTO_IP, SYS_NET_IP_MAXTTL): stubbed option"); + out_val._int = max_ttl; + out_len = sizeof(s32); return {CELL_OK, out_val, out_len}; } case SYS_NET_IP_DONTFRAG: @@ -834,13 +836,13 @@ s32 lv2_socket_native::setsockopt(s32 level, s32 optname, const std::vector& } case SYS_NET_IP_TTLCHK: { - sys_net.error("sys_net_bnet_setsockopt(s=%d, IPPROTO_IP): Stubbed option (0x%x) (SYS_NET_IP_TTLCHK)", lv2_id, optname); - break; + min_ttl = native_int; + return {}; } case SYS_NET_IP_MAXTTL: { - sys_net.error("sys_net_bnet_setsockopt(s=%d, IPPROTO_IP): Stubbed option (0x%x) (SYS_NET_IP_MAXTTL)", lv2_id, optname); - break; + max_ttl = native_int; + return {}; } case SYS_NET_IP_DONTFRAG: { @@ -910,7 +912,7 @@ std::optional, sys_net_sockaddr>> lv2_socket_nat { auto& nph = g_fxo->get>(); const auto packet = dnshook.get_dns_packet(lv2_id); - ensure(packet.size() < len); + ensure(packet.size() <= len); memcpy(res_buf.data(), packet.data(), packet.size()); native_addr.ss_family = AF_INET; (reinterpret_cast<::sockaddr_in*>(&native_addr))->sin_port = std::bit_cast>(53); // htons(53) @@ -1069,18 +1071,20 @@ std::optional lv2_socket_native::sendmsg(s32 flags, const sys_net_msghdr& m return {-SYS_NET_ECONNRESET}; } + std::vector buf_copy; for (int i = 0; i < msg.msg_iovlen; i++) { auto iov_base = msg.msg_iov[i].iov_base; const u32 len = msg.msg_iov[i].iov_len; - const std::vector buf_copy(vm::_ptr(iov_base.addr()), vm::_ptr(iov_base.addr()) + len); + const auto* src = vm::_ptr(iov_base.addr()); + buf_copy.insert(buf_copy.end(), src, src + len); + } - native_result = ::send(native_socket, reinterpret_cast(buf_copy.data()), ::narrow(buf_copy.size()), native_flags); + native_result = ::send(native_socket, reinterpret_cast(buf_copy.data()), ::narrow(buf_copy.size()), native_flags); - if (native_result >= 0) - { - return {native_result}; - } + if (native_result >= 0) + { + return {native_result}; } result = get_last_error(!so_nbio && (flags & SYS_NET_MSG_DONTWAIT) == 0); @@ -1143,14 +1147,14 @@ s32 lv2_socket_native::shutdown(s32 how) return -get_last_error(false); } -s32 lv2_socket_native::poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) +void lv2_socket_native::poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) { // Check for fake packet for dns interceptions auto& dnshook = g_fxo->get(); if (sn_pfd.events & SYS_NET_POLLIN && dnshook.is_dns(sn_pfd.fd) && dnshook.is_dns_queue(sn_pfd.fd)) { sn_pfd.revents |= SYS_NET_POLLIN; - return 1; + return; } if (sn_pfd.events & ~(SYS_NET_POLLIN | SYS_NET_POLLOUT | SYS_NET_POLLERR)) { @@ -1167,8 +1171,6 @@ s32 lv2_socket_native::poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) { native_pfd.events |= POLLOUT; } - - return 0; } std::tuple lv2_socket_native::select(bs_t selected, pollfd& native_pfd) @@ -1232,16 +1234,16 @@ bool lv2_socket_native::is_socket_connected() return false; } - fd_set readfds, writefds; - struct timeval timeout{0, 0}; // Zero timeout + pollfd pfd{}; + pfd.fd = native_socket; + pfd.events = POLLIN | POLLOUT; - FD_ZERO(&readfds); - FD_ZERO(&writefds); - FD_SET(native_socket, &readfds); - FD_SET(native_socket, &writefds); - - // Use select to check for readability and writability - const int result = ::select(1, &readfds, &writefds, NULL, &timeout); + // Use poll to check for readability and writability +#ifdef _WIN32 + const int result = WSAPoll(&pfd, 1, 0); +#else + const int result = ::poll(&pfd, 1, 0); +#endif if (result < 0) { @@ -1250,5 +1252,5 @@ bool lv2_socket_native::is_socket_connected() } // Socket is connected if it's readable or writable - return FD_ISSET(native_socket, &readfds) || FD_ISSET(native_socket, &writefds); + return (pfd.revents & (POLLIN | POLLOUT)) != 0; } diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h index cf07dfcb76..af9e6a57b7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h @@ -50,7 +50,7 @@ public: std::optional sendto(s32 flags, const std::vector& buf, std::optional opt_sn_addr, bool is_lock = true) override; std::optional sendmsg(s32 flags, const sys_net_msghdr& msg, bool is_lock = true) override; - s32 poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; + void poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; std::tuple select(bs_t selected, pollfd& native_pfd) override; bool is_socket_connected(); @@ -70,6 +70,10 @@ private: s32 so_reuseaddr = 0; s32 so_reuseport = 0; #endif + // Those values come from FreeBSD + s32 min_ttl = 1; + s32 max_ttl = 64; + u16 bound_port = 0; bool feign_tcp_conn_failure = false; // Savestate load related }; diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp index 67cefe3e3e..903752085b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.cpp @@ -364,7 +364,7 @@ s32 lv2_socket_p2p::shutdown([[maybe_unused]] s32 how) return CELL_OK; } -s32 lv2_socket_p2p::poll(sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) +void lv2_socket_p2p::poll(sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) { std::lock_guard lock(mutex); ensure(vport); @@ -381,8 +381,6 @@ s32 lv2_socket_p2p::poll(sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native { sn_pfd.revents |= SYS_NET_POLLOUT; } - - return sn_pfd.revents ? 1 : 0; } std::tuple lv2_socket_p2p::select(bs_t selected, [[maybe_unused]] pollfd& native_pfd) diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.h b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.h index b8fadb3d53..ec6c1d8b31 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2p.h @@ -30,7 +30,7 @@ public: void close() override; s32 shutdown(s32 how) override; - s32 poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; + void poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; std::tuple select(bs_t selected, pollfd& native_pfd) override; void handle_new_data(sys_net_sockaddr_in_p2p p2p_addr, std::vector p2p_data); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp index c0790a2e33..cb59557458 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp @@ -112,7 +112,6 @@ public: // reply is late, increases rtt auto& msg = it->second; - const auto addr = msg.dst_addr.sin_addr.s_addr; rtt_info rtt = rtts[msg.sock_id]; // Only increases rtt once per loop(in case a big number of packets are sent at once) if (!rtt_increased.count(msg.sock_id)) @@ -120,7 +119,7 @@ public: rtt.num_retries += 1; // Increases current rtt by 10% rtt.rtt_time += (rtt.rtt_time / 10); - rtts[addr] = rtt; + rtts[msg.sock_id] = rtt; rtt_increased.emplace(msg.sock_id); } @@ -625,7 +624,7 @@ std::tuple, sys_net_sockaddr> lv2_socket_p2ps: sys_net_sockaddr ps3_addr{}; auto* paddr = reinterpret_cast(&ps3_addr); - lv2_socket_p2ps* sock_client = reinterpret_cast(idm::check_unlocked(p2ps_client)); + auto sock_client = static_cast>(idm::get_unlocked(p2ps_client)); { std::lock_guard lock(sock_client->mutex); paddr->sin_family = SYS_NET_AF_INET; @@ -986,7 +985,7 @@ s32 lv2_socket_p2ps::shutdown([[maybe_unused]] s32 how) return CELL_OK; } -s32 lv2_socket_p2ps::poll(sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) +void lv2_socket_p2ps::poll(sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) { std::lock_guard lock(mutex); sys_net.trace("[P2PS] poll checking for 0x%X", sn_pfd.events); @@ -1003,14 +1002,7 @@ s32 lv2_socket_p2ps::poll(sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& nativ { sn_pfd.revents |= SYS_NET_POLLOUT; } - - if (sn_pfd.revents) - { - return 1; - } } - - return 0; } std::tuple lv2_socket_p2ps::select(bs_t selected, [[maybe_unused]] pollfd& native_pfd) diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.h b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.h index 8158138936..ac23528d57 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.h @@ -89,7 +89,7 @@ public: void close() override; s32 shutdown(s32 how) override; - s32 poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; + void poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; std::tuple select(bs_t selected, pollfd& native_pfd) override; private: diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp index 6e74bd512f..39ae39e5b5 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp @@ -134,10 +134,9 @@ s32 lv2_socket_raw::shutdown([[maybe_unused]] s32 how) return {}; } -s32 lv2_socket_raw::poll([[maybe_unused]] sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) +void lv2_socket_raw::poll([[maybe_unused]] sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) { LOG_ONCE(raw_poll, "lv2_socket_raw::poll"); - return {}; } std::tuple lv2_socket_raw::select([[maybe_unused]] bs_t selected, [[maybe_unused]] pollfd& native_pfd) diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.h b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.h index 01b7255884..a03339354f 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.h @@ -32,6 +32,6 @@ public: void close() override; s32 shutdown(s32 how) override; - s32 poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; + void poll(sys_net_pollfd& sn_pfd, pollfd& native_pfd) override; std::tuple select(bs_t selected, pollfd& native_pfd) override; }; diff --git a/rpcs3/Emu/Cell/lv2/sys_net/nt_p2p_port.cpp b/rpcs3/Emu/Cell/lv2/sys_net/nt_p2p_port.cpp index 61039c7856..67be0df63b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/nt_p2p_port.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/nt_p2p_port.cpp @@ -249,8 +249,9 @@ bool nt_p2p_port::recv_data() auto& bound_sockets = ::at32(bound_p2p_vports, dst_vport); - for (const auto sock_id : bound_sockets) + for (auto it = bound_sockets.begin(); it != bound_sockets.end();) { + s32 sock_id = *it; const auto sock = idm::check(sock_id, [&](lv2_socket& sock) { ensure(sock.get_type() == SYS_NET_SOCK_DGRAM_P2P); @@ -262,12 +263,17 @@ bool nt_p2p_port::recv_data() if (!sock) { sys_net.error("Socket %d found in bound_p2p_vports didn't exist!", sock_id); - bound_sockets.erase(sock_id); + it = bound_sockets.erase(it); if (bound_sockets.empty()) { bound_p2p_vports.erase(dst_vport); + break; } } + else + { + it++; + } } return true; diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index e2463ca101..f26b650346 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -305,6 +305,7 @@ error_code sys_ppu_thread_detach(ppu_thread& ppu, u32 thread_id) { // Join and notify thread (it is detached from IDM now so it must be done explicitly now) *ptr = thread_state::finished; + return CELL_OK; } return result; diff --git a/rpcs3/Emu/Cell/lv2/sys_prx.cpp b/rpcs3/Emu/Cell/lv2/sys_prx.cpp index 046d19c48e..6f930e79dd 100644 --- a/rpcs3/Emu/Cell/lv2/sys_prx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_prx.cpp @@ -63,8 +63,8 @@ extern const std::map g_prx_list { "libcelpenc.sprx", 0 }, { "libddpdec.sprx", 0 }, { "libdivxdec.sprx", 0 }, - { "libdmux.sprx", 0 }, - { "libdmuxpamf.sprx", 0 }, + { "libdmux.sprx", 1 }, + { "libdmuxpamf.sprx", 1 }, { "libdtslbrdec.sprx", 0 }, { "libfiber.sprx", 0 }, { "libfont.sprx", 0 }, @@ -899,7 +899,7 @@ error_code _sys_prx_register_library(ppu_thread& ppu, vm::ptr library) { for (u32 lib_addr = prx.exports_start, index = 0; lib_addr < prx.exports_end; index++, lib_addr += vm::read8(lib_addr) ? vm::read8(lib_addr) : sizeof_lib) { - if (std::memcpy(vm::base(lib_addr), mem_copy.data(), sizeof_lib) == 0) + if (std::memcmp(vm::base(lib_addr), mem_copy.data(), sizeof_lib) == 0) { atomic_storage::release(prx.m_external_loaded_flags[index], true); return true; diff --git a/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp b/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp index 2ba15b1146..29a1fa3501 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp @@ -46,14 +46,14 @@ namespace rsxaudio_ringbuf_reader static void set_timestamp(rsxaudio_shmem::ringbuf_t& ring_buf, u64 timestamp) { const s32 entry_idx_raw = (ring_buf.read_idx + ring_buf.rw_max_idx - (ring_buf.rw_max_idx > 2) - 1) % ring_buf.rw_max_idx; - const s32 entry_idx = std::clamp(entry_idx_raw, 0, SYS_RSXAUDIO_RINGBUF_SZ); + const s32 entry_idx = std::clamp(entry_idx_raw, 0, SYS_RSXAUDIO_RINGBUF_SZ - 1); ring_buf.entries[entry_idx].timestamp = convert_to_timebased_time(timestamp); } static std::tuple update_status(rsxaudio_shmem::ringbuf_t& ring_buf) { - const s32 read_idx = std::clamp(ring_buf.read_idx, 0, SYS_RSXAUDIO_RINGBUF_SZ); + const s32 read_idx = std::clamp(ring_buf.read_idx, 0, SYS_RSXAUDIO_RINGBUF_SZ - 1); if ((ring_buf.entries[read_idx].valid & 1) == 0U) { @@ -61,7 +61,7 @@ namespace rsxaudio_ringbuf_reader } const s32 entry_idx_raw = (ring_buf.read_idx + ring_buf.rw_max_idx - (ring_buf.rw_max_idx > 2)) % ring_buf.rw_max_idx; - const s32 entry_idx = std::clamp(entry_idx_raw, 0, SYS_RSXAUDIO_RINGBUF_SZ); + const s32 entry_idx = std::clamp(entry_idx_raw, 0, SYS_RSXAUDIO_RINGBUF_SZ - 1); ring_buf.entries[read_idx].valid = 0; ring_buf.queue_notify_idx = (ring_buf.queue_notify_idx + 1) % ring_buf.queue_notify_step; @@ -72,7 +72,7 @@ namespace rsxaudio_ringbuf_reader static std::pair get_addr(const rsxaudio_shmem::ringbuf_t& ring_buf) { - const s32 read_idx = std::clamp(ring_buf.read_idx, 0, SYS_RSXAUDIO_RINGBUF_SZ); + const s32 read_idx = std::clamp(ring_buf.read_idx, 0, SYS_RSXAUDIO_RINGBUF_SZ - 1); if (ring_buf.entries[read_idx].valid & 1) { @@ -1392,9 +1392,9 @@ void rsxaudio_backend_thread::operator()() return; } - static rsxaudio_state ra_state{}; - static emu_audio_cfg emu_cfg{}; - static bool backend_failed = false; + rsxaudio_state ra_state{}; + emu_audio_cfg emu_cfg{}; + bool backend_failed = false; for (;;) { @@ -2018,7 +2018,7 @@ void rsxaudio_periodic_tmr::cancel_timer_unlocked() { const u64 flag = 1; const auto wr_res = write(cancel_event, &flag, sizeof(flag)); - ensure(wr_res == sizeof(flag) || wr_res == -EAGAIN); + ensure(wr_res == sizeof(flag) || errno == EAGAIN); } #elif defined(BSD) || defined(__APPLE__) handle[TIMER_ID].flags = (handle[TIMER_ID].flags & ~EV_ENABLE) | EV_DISABLE; diff --git a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp index c2abd40284..e60d4895cc 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp @@ -441,6 +441,8 @@ error_code sys_rwlock_wlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout) continue; } + ppu.state += cpu_flag::wait; + std::lock_guard lock(rwlock->mutex); if (!rwlock->unqueue(rwlock->wq, &ppu)) diff --git a/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp b/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp index 7440cf2def..b6ca578977 100644 --- a/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp @@ -72,7 +72,7 @@ error_code sys_semaphore_create(ppu_thread& ppu, vm::ptr sem_id, vm::ptr(ppu.test_stopped()); + ppu.check_state(); *sem_id = idm::last_id(); return CELL_OK; @@ -358,7 +358,7 @@ error_code sys_semaphore_get_value(ppu_thread& ppu, u32 sem_id, vm::ptr cou return CELL_EFAULT; } - static_cast(ppu.test_stopped()); + ppu.check_state(); *count = sema.ret; return CELL_OK; diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index 3665efcd0a..ff4294a24f 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -437,7 +437,7 @@ struct spu_limits_t raw_spu_count += spu_thread::g_raw_spu_ctr; // physical_spus_count >= spu_limit returns EBUSY, not EINVAL! - if (spu_limit + raw_limit > 6 || raw_spu_count > raw_limit || physical_spus_count >= spu_limit || physical_spus_count > spu_limit || controllable_spu_count > spu_limit) + if (spu_limit + raw_limit > 6 || raw_spu_count > raw_limit || physical_spus_count >= spu_limit || controllable_spu_count > spu_limit) { return false; } diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp index 2c4b1282fd..725adbcfc3 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ss.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -24,7 +24,7 @@ struct lv2_update_manager // For example, 4.90 should be converted to 0x4900000000000 std::erase(version_str, '.'); - if (std::from_chars(version_str.data(), version_str.data() + version_str.size(), system_sw_version, 16).ec != std::errc{}) + if (std::from_chars(version_str.data(), version_str.data() + version_str.size(), system_sw_version, 16).ec == std::errc{}) system_sw_version <<= 40; else system_sw_version = 0; @@ -79,6 +79,7 @@ struct lv2_update_manager if (malloc_set.count(addr)) { + malloc_set.erase(addr); return vm::dealloc(addr, vm::main); } diff --git a/rpcs3/Emu/Cell/lv2/sys_sync.h b/rpcs3/Emu/Cell/lv2/sys_sync.h index 0aff5e1e7a..6d55f4b1f0 100644 --- a/rpcs3/Emu/Cell/lv2/sys_sync.h +++ b/rpcs3/Emu/Cell/lv2/sys_sync.h @@ -453,6 +453,7 @@ public: // Can be called before the actual sleep call in order to move it out of mutex scope static void prepare_for_sleep(cpu_thread& cpu); + static ppu_thread* get_running_ppu(u32 index); struct notify_all_t { diff --git a/rpcs3/Emu/Cell/lv2/sys_time.cpp b/rpcs3/Emu/Cell/lv2/sys_time.cpp index 539bb9dedf..a71a11ba31 100644 --- a/rpcs3/Emu/Cell/lv2/sys_time.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_time.cpp @@ -118,6 +118,7 @@ static int clock_gettime(int clk_id, struct timespec* tp) #ifndef _WIN32 +#include #include static struct timespec start_time = []() diff --git a/rpcs3/Emu/Cell/lv2/sys_uart.cpp b/rpcs3/Emu/Cell/lv2/sys_uart.cpp index 67e91b97a0..0049b60ffe 100644 --- a/rpcs3/Emu/Cell/lv2/sys_uart.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_uart.cpp @@ -1531,9 +1531,11 @@ private: } }(); + if (sce_idx == umax) + return PS3AV_STATUS_INVALID_VIDEO_PARAM; + const video_sce_param &sce_param = sce_param_arr[sce_idx]; - if (sce_idx == umax || - video_head_cfg.video_head > PS3AV_HEAD_B_ANALOG || + if (video_head_cfg.video_head > PS3AV_HEAD_B_ANALOG || video_head_cfg.video_order > 1 || video_head_cfg.video_format > 16 || video_head_cfg.video_out_format > 16 || diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp index 78183293e7..dca61f3be8 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp @@ -14,6 +14,7 @@ #include "Emu/Cell/timers.hpp" #include "Emu/Io/usb_device.h" +#include "Emu/Io/usb_microphone.h" #include "Emu/Io/usb_vfs.h" #include "Emu/Io/Skylander.h" #include "Emu/Io/Infinity.h" @@ -137,6 +138,7 @@ public: const std::array& get_new_location(); void connect_usb_device(std::shared_ptr dev, bool update_usb_devices = false); void disconnect_usb_device(std::shared_ptr dev, bool update_usb_devices = false); + void reconnect_usb_device(u32 assigned_number); // Map of devices actively handled by the ps3(device_id, device) std::map>> handled_devices; @@ -184,6 +186,9 @@ private: // Music devices {0x1415, 0x0000, 0x0000, "Singstar Microphone", nullptr, nullptr}, // {0x1415, 0x0020, 0x0020, "SingStar Microphone Wireless", nullptr, nullptr}, // TODO: verifiy + // {0x12ba, 0x00f0, 0x00f0, "Bandfuse USB Guitar Adapter", nullptr, nullptr}, + // {0x28aa, 0x0001, 0x0001, "Bandfuse USB Microphone", nullptr, nullptr}, + // {0x046d, 0x0a03, 0x0a03, "Logitech Microphone", nullptr, nullptr}, {0x12BA, 0x00FF, 0x00FF, "Rocksmith Guitar Adapter", nullptr, nullptr}, {0x12BA, 0x0100, 0x0100, "Guitar Hero Guitar", nullptr, nullptr}, @@ -205,19 +210,23 @@ private: {0x1BAD, 0x3430, 0x343F, "Harmonix Button Guitar - Wii", nullptr, nullptr}, {0x1BAD, 0x3530, 0x353F, "Harmonix Real Guitar - Wii", nullptr, nullptr}, - //Top Shot Elite controllers + // Top Shot Elite controllers {0x12BA, 0x04A0, 0x04A0, "Top Shot Elite", nullptr, nullptr}, {0x12BA, 0x04A1, 0x04A1, "Top Shot Fearmaster", nullptr, nullptr}, {0x12BA, 0x04B0, 0x04B0, "Rapala Fishing Rod", nullptr, nullptr}, - // GT5 Wheels&co + // Wheels #ifdef HAVE_SDL3 {0x046D, 0xC283, 0xC29B, "lgFF_c283_c29b", &usb_device_logitech_g27::get_num_emu_devices, &usb_device_logitech_g27::make_instance}, #else {0x046D, 0xC283, 0xC29B, "lgFF_c283_c29b", nullptr, nullptr}, #endif + {0x046D, 0xCA03, 0xCA03, "lgFF_ca03_ca03", nullptr, nullptr}, + {0x044F, 0xB652, 0xB652, "Thrustmaster FGT FFB old", nullptr, nullptr}, {0x044F, 0xB653, 0xB653, "Thrustmaster RGT FFB Pro", nullptr, nullptr}, + {0x044F, 0xB654, 0xB654, "Thrustmaster FGT FFB", nullptr, nullptr}, + {0x044F, 0xb655, 0xb655, "Thrustmaster FGT Rumble 3-in-1", nullptr, nullptr}, {0x044F, 0xB65A, 0xB65A, "Thrustmaster F430", nullptr, nullptr}, {0x044F, 0xB65D, 0xB65D, "Thrustmaster FFB", nullptr, nullptr}, {0x044F, 0xB65E, 0xB65E, "Thrustmaster TRS", nullptr, nullptr}, @@ -225,7 +234,6 @@ private: // GT6 {0x2833, 0x0001, 0x0001, "Oculus", nullptr, nullptr}, - {0x046D, 0xCA03, 0xCA03, "lgFF_ca03_ca03", nullptr, nullptr}, // Buzz controllers {0x054C, 0x1000, 0x1040, "buzzer0", &usb_device_buzz::get_num_emu_devices, &usb_device_buzz::make_instance}, @@ -239,14 +247,15 @@ private: // uDraw GameTablet {0x20D6, 0xCB17, 0xCB17, "uDraw GameTablet", nullptr, nullptr}, - // DVB-T + // TV Tuners {0x1415, 0x0003, 0x0003, "PlayTV SCEH-0036", nullptr, nullptr}, + // {0x054c, 0x04b2, 0x04b2, "Torne CECH-ZD1 J", nullptr, nullptr}, // PSP Devices {0x054C, 0x01C8, 0x01C8, "PSP Type A", nullptr, nullptr}, {0x054C, 0x01C9, 0x01C9, "PSP Type B", nullptr, nullptr}, {0x054C, 0x01CA, 0x01CA, "PSP Type C", nullptr, nullptr}, - {0x054C, 0x01CB, 0x01CB, "PSP Type D", nullptr, nullptr}, + {0x054C, 0x01CB, 0x01CB, "PSP Type D", nullptr, nullptr}, // UsbPspCm {0x054C, 0x02D2, 0x02D2, "PSP Slim", nullptr, nullptr}, // 0x0900: "H050 USJ(C) PCB rev00", 0x0910: "USIO PCB rev00" @@ -261,9 +270,6 @@ private: // Tony Hawk RIDE Skateboard {0x12BA, 0x0400, 0x0400, "Tony Hawk RIDE Skateboard Controller", nullptr, nullptr}, - // PSP in UsbPspCm mode - {0x054C, 0x01CB, 0x01CB, "UsbPspcm", nullptr, nullptr}, - // Sony Stereo Headsets {0x12BA, 0x0032, 0x0032, "Wireless Stereo Headset", nullptr, nullptr}, {0x12BA, 0x0042, 0x0042, "Wireless Stereo Headset", nullptr, nullptr}, @@ -548,6 +554,22 @@ usb_handler_thread::usb_handler_thread() } } + switch (g_cfg.audio.microphone_type) + { + case microphone_handler::null: + break; + case microphone_handler::standard: + usb_devices.push_back(std::make_shared(0, get_new_location(), MicType::Logitech)); + break; + case microphone_handler::real_singstar: + case microphone_handler::singstar: + usb_devices.push_back(std::make_shared(0, get_new_location(), MicType::SingStar)); + break; + case microphone_handler::rocksmith: + usb_devices.push_back(std::make_shared(0, get_new_location(), MicType::Rocksmith)); + break; + } + for (int i = 0; i < 8; i++) // Add VFS USB mass storage devices (/dev_usbXXX) to the USB device list { const auto usb_info = g_cfg_vfs.get_device(g_cfg_vfs.dev_usb, fmt::format("/dev_usb%03d", i)); @@ -636,6 +658,8 @@ void usb_handler_thread::operator()() // Process asynchronous requests that are pending libusb_handle_events_timeout_completed(ctx, &lusb_tv, nullptr); + u64 delay = 1'000; + // Process fake transfers if (!fake_transfers.empty()) { @@ -650,6 +674,13 @@ void usb_handler_thread::operator()() if (transfer->expected_time > timestamp) { + const u64 diff_time = transfer->expected_time - timestamp; + + if (diff_time < delay) + { + delay = diff_time; + } + ++it; continue; } @@ -668,7 +699,7 @@ void usb_handler_thread::operator()() if (handled_devices.empty()) thread_ctrl::wait_for(500'000); else - thread_ctrl::wait_for(1'000); + thread_ctrl::wait_for(delay); } } @@ -878,7 +909,9 @@ std::pair usb_handler_thread::get_free_transfer() u32 transfer_id = get_free_transfer_id(); auto& transfer = get_transfer(transfer_id); - transfer.busy = true; + + libusb_transfer* const transfer_buf = transfer.transfer; + transfer = {.transfer_id = transfer_id, .transfer = transfer_buf, .busy = true}; return {transfer_id, transfer}; } @@ -960,6 +993,21 @@ void usb_handler_thread::disconnect_usb_device(std::shared_ptr dev, } } +void usb_handler_thread::reconnect_usb_device(u32 assigned_number) +{ + std::lock_guard lock(mutex); + ensure(assigned_number != 0); + for (const auto& dev : usb_devices) + { + if (dev->assigned_number == assigned_number) + { + disconnect_usb_device(dev, false); + connect_usb_device(dev, false); + break; + } + } +} + void connect_usb_controller(u8 index, input::product_type type) { auto usbh = g_fxo->try_get>(); @@ -1046,6 +1094,16 @@ void connect_usb_controller(u8 index, input::product_type type) } } +void reconnect_usb(u32 assigned_number) +{ + auto usbh = g_fxo->try_get>(); + if (!usbh) + { + return; + } + usbh->reconnect_usb_device(assigned_number); +} + void handle_hotplug_event(bool connected) { if (auto usbh = g_fxo->try_get>()) @@ -1091,7 +1149,7 @@ error_code sys_usbd_finalize(ppu_thread& ppu, u32 handle) // Forcefully awake all waiters while (auto cpu = lv2_obj::schedule(usbh.sq, SYS_SYNC_FIFO)) { - // Special ternimation signal value + // Special termination signal value cpu->gpr[4] = 4; cpu->gpr[5] = 0; cpu->gpr[6] = 0; @@ -1115,11 +1173,15 @@ error_code sys_usbd_get_device_list(ppu_thread& ppu, u32 handle, vm::ptr - u32 i_tocopy = std::min(max_devices, ::size32(usbh.handled_devices)); + const u32 i_tocopy = std::min(max_devices, ::size32(usbh.handled_devices)); + u32 index = 0; - for (u32 index = 0; index < i_tocopy; index++) + for (const auto& [_, device] : usbh.handled_devices) { - device_list[index] = usbh.handled_devices[index].first; + if (index == i_tocopy) + break; + + device_list[index++] = device.first; } return not_an_error(i_tocopy); @@ -1351,7 +1413,7 @@ error_code sys_usbd_receive_event(ppu_thread& ppu, u32 handle, vm::ptr arg1 if (is_stopped(state)) { - std::lock_guard lock(usbh.mutex); + std::lock_guard lock(usbh.mutex_sq); for (auto cpu = +usbh.sq; cpu; cpu = cpu->next_cpu) { @@ -1443,7 +1505,7 @@ error_code sys_usbd_transfer_data(ppu_thread& ppu, u32 handle, u32 id_pipe, vm:: case LIBUSB_REQUEST_SET_CONFIGURATION: { pipe.device->set_configuration(static_cast(+request->wValue)); - pipe.device->set_interface(0); + pipe.device->set_interface(0, 0); break; } default: break; @@ -1486,7 +1548,7 @@ error_code sys_usbd_isochronous_transfer_data(ppu_thread& ppu, u32 handle, u32 i { ppu.state += cpu_flag::wait; - sys_usbd.todo("sys_usbd_isochronous_transfer_data(handle=0x%x, id_pipe=0x%x, iso_request=*0x%x)", handle, id_pipe, iso_request); + sys_usbd.trace("sys_usbd_isochronous_transfer_data(handle=0x%x, id_pipe=0x%x, iso_request=*0x%x)", handle, id_pipe, iso_request); auto& usbh = g_fxo->get>(); @@ -1500,8 +1562,21 @@ error_code sys_usbd_isochronous_transfer_data(ppu_thread& ppu, u32 handle, u32 i const auto& pipe = usbh.get_pipe(id_pipe); auto&& [transfer_id, transfer] = usbh.get_free_transfer(); + transfer.iso_request.buf = iso_request->buf; + transfer.iso_request.start_frame = iso_request->start_frame; + transfer.iso_request.num_packets = iso_request->num_packets; + for (u32 index = 0; index < iso_request->num_packets; index++) + { + transfer.iso_request.packets[index] = iso_request->packets[index]; + } + pipe.device->isochronous_transfer(&transfer); + if (transfer.fake) + { + usbh.push_fake_transfer(&transfer); + } + // returns an identifier specific to the transfer return not_an_error(transfer_id); } @@ -1516,7 +1591,7 @@ error_code sys_usbd_get_transfer_status(ppu_thread& ppu, u32 handle, u32 id_tran std::lock_guard lock(usbh.mutex); - if (!usbh.is_init) + if (!usbh.is_init || id_transfer >= MAX_SYS_USBD_TRANSFERS) return CELL_EINVAL; const auto status = usbh.get_transfer_status(id_transfer); @@ -1530,13 +1605,13 @@ error_code sys_usbd_get_isochronous_transfer_status(ppu_thread& ppu, u32 handle, { ppu.state += cpu_flag::wait; - sys_usbd.todo("sys_usbd_get_isochronous_transfer_status(handle=0x%x, id_transfer=0x%x, unk1=0x%x, request=*0x%x, result=*0x%x)", handle, id_transfer, unk1, request, result); + sys_usbd.trace("sys_usbd_get_isochronous_transfer_status(handle=0x%x, id_transfer=0x%x, unk1=0x%x, request=*0x%x, result=*0x%x)", handle, id_transfer, unk1, request, result); auto& usbh = g_fxo->get>(); std::lock_guard lock(usbh.mutex); - if (!usbh.is_init) + if (!usbh.is_init || id_transfer >= MAX_SYS_USBD_TRANSFERS) return CELL_EINVAL; const auto status = usbh.get_isochronous_transfer_status(id_transfer); diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.h b/rpcs3/Emu/Cell/lv2/sys_usbd.h index a2fd911e35..45e9214e82 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.h +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.h @@ -56,7 +56,7 @@ struct UsbDeviceRequest struct UsbDeviceIsoRequest { - vm::ptr buf; + vm::bptr buf; be_t start_frame; be_t num_packets; be_t packets[8]; @@ -89,4 +89,5 @@ error_code sys_usbd_register_extra_ldd(ppu_thread& ppu, u32 handle, vm::cptr s_product, u16 slen_product); void connect_usb_controller(u8 index, input::product_type); +void reconnect_usb(u32 assigned_number); void handle_hotplug_event(bool connected); diff --git a/rpcs3/Emu/Cell/lv2/sys_vm.cpp b/rpcs3/Emu/Cell/lv2/sys_vm.cpp index 2a224d2339..49337cf223 100644 --- a/rpcs3/Emu/Cell/lv2/sys_vm.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_vm.cpp @@ -97,7 +97,7 @@ error_code sys_vm_memory_map(ppu_thread& ppu, u64 vsize, u64 psize, u32 cid, u64 // Look for unmapped space if (const auto area = vm::find_map(0x10000000, 0x10000000, 2 | (flag & SYS_MEMORY_PAGE_SIZE_MASK))) { - sys_vm.warning("sys_vm_memory_map(): Found VM 0x%x area (vsize=0x%x)", addr, vsize); + sys_vm.warning("sys_vm_memory_map(): Found VM 0x%x area (vsize=0x%x)", area->addr, vsize); // Alloc all memory (shall not fail) ensure(area->alloc(static_cast(vsize))); diff --git a/rpcs3/Emu/GameInfo.h b/rpcs3/Emu/GameInfo.h index 3efca1410a..da8b2638ba 100644 --- a/rpcs3/Emu/GameInfo.h +++ b/rpcs3/Emu/GameInfo.h @@ -8,6 +8,7 @@ struct GameInfo std::string path; std::string icon_path; std::string movie_path; + std::string audio_path; std::string name; std::string serial; diff --git a/rpcs3/Emu/Io/Dimensions.cpp b/rpcs3/Emu/Io/Dimensions.cpp index e80a64c0c9..84a604a86e 100644 --- a/rpcs3/Emu/Io/Dimensions.cpp +++ b/rpcs3/Emu/Io/Dimensions.cpp @@ -700,8 +700,3 @@ void usb_device_dimensions::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoi break; } } - -void usb_device_dimensions::isochronous_transfer(UsbTransfer* transfer) -{ - usb_device_emulated::isochronous_transfer(transfer); -} diff --git a/rpcs3/Emu/Io/Dimensions.h b/rpcs3/Emu/Io/Dimensions.h index e2bfbd1e7f..d25fb8ed2e 100644 --- a/rpcs3/Emu/Io/Dimensions.h +++ b/rpcs3/Emu/Io/Dimensions.h @@ -76,7 +76,6 @@ public: void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override; void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override; - void isochronous_transfer(UsbTransfer* transfer) override; protected: std::queue> m_queries; diff --git a/rpcs3/Emu/Io/GameTablet.cpp b/rpcs3/Emu/Io/GameTablet.cpp index 4c2330d908..1d0fcf24fe 100644 --- a/rpcs3/Emu/Io/GameTablet.cpp +++ b/rpcs3/Emu/Io/GameTablet.cpp @@ -229,6 +229,9 @@ void usb_device_gametablet::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endp case CELL_PAD_CTRL_LEFT: left = true; break; + case CELL_PAD_CTRL_PS: + gt.btn_ps |= 1; + break; default: break; } @@ -249,9 +252,6 @@ void usb_device_gametablet::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endp case CELL_PAD_CTRL_TRIANGLE: gt.btn_triangle |= 1; break; - case CELL_PAD_CTRL_PS: - gt.btn_ps |= 1; - break; default: break; } diff --git a/rpcs3/Emu/Io/KamenRider.cpp b/rpcs3/Emu/Io/KamenRider.cpp index aaa4836f08..df7b86a07f 100644 --- a/rpcs3/Emu/Io/KamenRider.cpp +++ b/rpcs3/Emu/Io/KamenRider.cpp @@ -39,7 +39,7 @@ kamen_rider_figure& rider_gate::get_figure_by_uid(const std::array uid) return figures[7]; } -void rider_gate::get_blank_response(u8 command, u8 sequence, std::array& reply_buf) +void rider_gate::get_blank_response(std::array& reply_buf, u8 command, u8 sequence) { reply_buf = {0x55, 0x02, command, sequence}; reply_buf[4] = generate_checksum(reply_buf, 4); @@ -93,7 +93,7 @@ void rider_gate::query_block(std::array& reply_buf, u8 command, u8 seque reply_buf[21] = generate_checksum(reply_buf, 21); } -void rider_gate::write_block(std::array& replyBuf, u8 command, u8 sequence, const u8* uid, u8 sector, u8 block, const u8* to_write_buf) +void rider_gate::write_block(std::array& reply_buf, u8 command, u8 sequence, const u8* uid, u8 sector, u8 block, const u8* to_write_buf) { std::lock_guard lock(kamen_mutex); @@ -108,7 +108,7 @@ void rider_gate::write_block(std::array& replyBuf, u8 command, u8 sequen } } - get_blank_response(command, sequence, replyBuf); + get_blank_response(reply_buf, command, sequence); } std::optional> rider_gate::pop_added_removed_response() @@ -190,11 +190,50 @@ u8 rider_gate::load_figure(const std::array& buf, fs::file in_f usb_device_kamen_rider::usb_device_kamen_rider(const std::array& location) : usb_device_emulated(location) { - device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, UsbDeviceDescriptor{0x200, 0x0, 0x0, 0x0, 0x40, 0x0E6F, 0x200A, 0x100, 0x1, 0x2, 0x3, 0x1}); - auto& config0 = device.add_node(UsbDescriptorNode(USB_DESCRIPTOR_CONFIG, UsbDeviceConfiguration{0x29, 0x1, 0x1, 0x0, 0x80, 0xFA})); - config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, UsbDeviceInterface{0x0, 0x0, 0x2, 0x3, 0x0, 0x0, 0x0})); - config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, UsbDeviceEndpoint{0x81, 0x3, 0x40, 0x1})); - config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, UsbDeviceEndpoint{0x1, 0x3, 0x40, 0x1})); + device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, UsbDeviceDescriptor{ + .bcdUSB = 0x0200, + .bDeviceClass = 0x00, + .bDeviceSubClass = 0x00, + .bDeviceProtocol = 0x00, + .bMaxPacketSize0 = 0x40, + .idVendor = 0x0E6F, + .idProduct = 0x200A, + .bcdDevice = 0x0100, + .iManufacturer = 0x01, + .iProduct = 0x02, + .iSerialNumber = 0x03, + .bNumConfigurations = 0x01}); + auto& config0 = device.add_node(UsbDescriptorNode(USB_DESCRIPTOR_CONFIG, UsbDeviceConfiguration{ + .wTotalLength = 0x0029, + .bNumInterfaces = 0x01, + .bConfigurationValue = 0x01, + .iConfiguration = 0x00, + .bmAttributes = 0x80, + .bMaxPower = 0xFA})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, UsbDeviceInterface{ + .bInterfaceNumber = 0x00, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x02, + .bInterfaceClass = 0x03, + .bInterfaceSubClass = 0x00, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_HID, UsbDeviceHID{ + .bcdHID = 0x0100, + .bCountryCode = 0x00, + .bNumDescriptors = 0x01, + .bDescriptorType = 0x22, + .wDescriptorLength = 0x001d})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, UsbDeviceEndpoint{ + .bEndpointAddress = 0x81, + .bmAttributes = 0x03, + .wMaxPacketSize = 0x0040, + .bInterval = 0x1})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, UsbDeviceEndpoint{ + .bEndpointAddress = 0x01, + .bmAttributes = 0x03, + .wMaxPacketSize = 0x0040, + .bInterval = 0x1})); } usb_device_kamen_rider::~usb_device_kamen_rider() @@ -227,7 +266,7 @@ void usb_device_kamen_rider::interrupt_transfer(u32 buf_size, u8* buf, u32 endpo if (endpoint == 0x81) { // Respond after FF command - transfer->expected_time = get_timestamp() + 1000; + transfer->expected_time = get_timestamp() + 22000; std::optional> response = g_ridergate.pop_added_removed_response(); if (response) { @@ -246,6 +285,7 @@ void usb_device_kamen_rider::interrupt_transfer(u32 buf_size, u8* buf, u32 endpo } else if (endpoint == 0x01) { + transfer->expected_time = get_timestamp() + 10; const u8 command = buf[2]; const u8 sequence = buf[3]; @@ -261,7 +301,7 @@ void usb_device_kamen_rider::interrupt_transfer(u32 buf_size, u8* buf, u32 endpo case 0xC0: case 0xC3: // Color Commands { - g_ridergate.get_blank_response(command, sequence, q_result); + g_ridergate.get_blank_response(q_result, command, sequence); break; } case 0xD0: // Tag List diff --git a/rpcs3/Emu/Io/KamenRider.h b/rpcs3/Emu/Io/KamenRider.h index 0e30024b06..6c4bea29ee 100644 --- a/rpcs3/Emu/Io/KamenRider.h +++ b/rpcs3/Emu/Io/KamenRider.h @@ -18,11 +18,11 @@ struct kamen_rider_figure class rider_gate { public: - void get_blank_response(u8 command, u8 sequence, std::array& reply_buf); - void wake_rider_gate(std::array& replyBuf, u8 command, u8 sequence); - void get_list_tags(std::array& replyBuf, u8 command, u8 sequence); - void query_block(std::array& replyBuf, u8 command, u8 sequence, const u8* uid, u8 sector, u8 block); - void write_block(std::array& replyBuf, u8 command, u8 sequence, const u8* uid, u8 sector, u8 block, const u8* to_write_buf); + void get_blank_response(std::array& reply_buf, u8 command, u8 sequence); + void wake_rider_gate(std::array& reply_buf, u8 command, u8 sequence); + void get_list_tags(std::array& reply_buf, u8 command, u8 sequence); + void query_block(std::array& reply_buf, u8 command, u8 sequence, const u8* uid, u8 sector, u8 block); + void write_block(std::array& reply_buf, u8 command, u8 sequence, const u8* uid, u8 sector, u8 block, const u8* to_write_buf); std::optional> pop_added_removed_response(); bool remove_figure(u8 position); diff --git a/rpcs3/Emu/Io/LogitechG27.cpp b/rpcs3/Emu/Io/LogitechG27.cpp index 5503c606fc..3f07e92560 100644 --- a/rpcs3/Emu/Io/LogitechG27.cpp +++ b/rpcs3/Emu/Io/LogitechG27.cpp @@ -17,29 +17,287 @@ #include "Input/pad_thread.h" #include "Input/sdl_instance.h" -LOG_CHANNEL(logitech_g27_log, "LOGIG27"); +LOG_CHANNEL(logitech_g27_log, "logitech_g27"); + +#pragma pack(push, 1) +struct DFEX_data +{ + u8 square : 1; + u8 cross : 1; + u8 circle : 1; + u8 triangle : 1; + u8 l1 : 1; // Left_paddle + u8 r1 : 1; // Right_paddle + u8 l2 : 1; + u8 r2 : 1; + + u8 select : 1; // Share + u8 start : 1; // Options + u8 l3 : 1; + u8 r3 : 1; + u8 ps : 1; + u8 : 3; + + u8 dpad; // 00=N, 01=NE, 02=E, 03=SW, 04=S, 05=SW, 06=W, 07=NW, 08=IDLE + u8 steering; // 00=Left, ff=Right + u8 brake_throttle; // 00=ThrottlePressed, 7f=BothReleased/BothPressed, ff=BrakePressed + u8 const1; + u8 const2; + u32 : 32; + u32 : 32; + u16 : 16; + u8 brake; // 00=Released, ff=Pressed + u8 throttle; // 00=Released, ff=Pressed + u32 : 32; + u32 : 32; +}; + +struct DFP_data +{ + u16 steering : 14; // 0000=Left, 1fff=Mid, 3fff=Right + u16 cross: 1; + u16 square : 1; + + u8 circle : 1; + u8 triangle : 1; + u8 r1 : 1; // Right_paddle + u8 l1 : 1; // Left_paddle + u8 r2 : 1; + u8 l2 : 1; + u8 select : 1; // Share + u8 start : 1; // Options + + u8 r3 : 1; + u8 l3 : 1; + u8 r3_2 : 1; + u8 l3_2 : 1; + u8 dpad : 4; // 0=N, 1=NE, 2=E, 3=SW, 4=S, 5=SW, 6=W, 7=NW, 8=IDLE + + u8 brake_throttle; // 00=ThrottlePressed, 7f=BothReleased/BothPressed, ff=BrakePressed + u8 throttle; // 00=Pressed, ff=Released + u8 brake; // 00=Pressed, ff=Released + + u8 pedals_attached : 1; + u8 powered : 1; + u8 : 1; + u8 self_check_done : 1; + u8 set1 : 1; // always set + u8 : 3; +}; + +struct DFGT_data +{ + u8 dpad : 4; // 0=N, 1=NE, 2=E, 3=SW, 4=S, 5=SW, 6=W, 7=NW, 8=IDLE + u8 cross: 1; + u8 square : 1; + u8 circle : 1; + u8 triangle : 1; + + u8 r1 : 1; // Right_paddle + u8 l1 : 1; // Left_paddle + u8 r2 : 1; + u8 l2 : 1; + u8 select : 1; // Share + u8 start : 1; // Options + u8 r3 : 1; + u8 l3 : 1; + + u8 : 2; + u8 dial_center : 1; + u8 plus : 1; + u8 dial_cw : 1; + u8 dial_ccw : 1; + u8 minus : 1; + u8 : 1; + + u8 ps : 1; + u8 pedals_attached : 1; + u8 powered : 1; + u8 self_check_done : 1; + u8 set1 : 1; + u8 : 1; + u8 set2 : 1; + u8 : 1; + + u16 steering : 14; // 0000=Left, 1fff=Mid, 3fff=Right + u16 : 2; + u8 throttle; // 00=Pressed, ff=Released + u8 brake; // 00=Pressed, ff=Released +}; + +struct G25_data +{ + u8 dpad : 4; // 0=N, 1=NE, 2=E, 3=SW, 4=S, 5=SW, 6=W, 7=NW, 8=IDLE + u8 cross: 1; + u8 square : 1; + u8 circle : 1; + u8 triangle : 1; + + u8 r1 : 1; // Right_paddle + u8 l1 : 1; // Left_paddle + u8 r2 : 1; // + dial_center + u8 l2 : 1; + u8 select : 1; // Share + u8 start : 1; // Options + u8 r3 : 1; // + dial_cw + plus + u8 l3 : 1; // + dial_ccw + minus + + u8 gear1 : 1; + u8 gear2 : 1; + u8 gear3 : 1; + u8 gear4 : 1; + u8 gear5 : 1; + u8 gear6 : 1; + u8 gearR : 1; + u8 : 1; + + u16 pedals_detached : 1; + u16 powered : 1; + u16 steering : 14; // 0000=Left, 1fff=Mid, 3fff=Right + + u8 throttle; // 00=Pressed, ff=Released + u8 brake; // 00=Pressed, ff=Released + u8 clutch; // 00=Pressed, ff=Released + + u8 shifter_x; // 30=left(1,2), 7a=middle(3,4), b2=right(5,6) + u8 shifter_y; // 32=bottom(2,4,6), b7=top(1,3,5) + + u8 shifter_attached : 1; + u8 set1 : 1; + u8 : 1; + u8 shifter_pressed : 1; + u8 : 4; +}; + +struct G27_data +{ + u8 dpad : 4; // 0=N, 1=NE, 2=E, 3=SW, 4=S, 5=SW, 6=W, 7=NW, 8=IDLE + u8 cross: 1; + u8 square : 1; + u8 circle : 1; + u8 triangle : 1; + + u8 r1 : 1; // Right_paddle + u8 l1 : 1; // Left_paddle + u8 r2 : 1; + u8 l2 : 1; + u8 select : 1; // Share + u8 start : 1; // Options + u8 r3 : 1; // + dial_center + u8 l3 : 1; + + u8 gear1 : 1; + u8 gear2 : 1; + u8 gear3 : 1; + u8 gear4 : 1; + u8 gear5 : 1; + u8 gear6 : 1; + u8 dial_cw : 1; + u8 dial_ccw : 1; + + u16 plus : 1; + u16 minus : 1; + u16 steering : 14; // 0000=Left, 1fff=Mid, 3fff=Right + + u8 throttle; // 00=Pressed, ff=Released + u8 brake; // 00=Pressed, ff=Released + u8 clutch; // 00=Pressed, ff=Released + + u8 shifter_x; // 30=left(1,2), 7a=middle(3,4), b2=right(5,6) + u8 shifter_y; // 32=bottom(2,4,6), b7=top(1,3,5) + + u8 gearR : 1; + u8 pedals_detached : 1; + u8 powered : 1; + u8 shifter_attached : 1; + u8 set1 : 1; + u8 : 1; + u8 shifter_pressed : 1; + u8 range : 1; +}; +#pragma pack(pop) + +static const std::map>> s_logitech_personality = { +{ + logitech_personality::driving_force_ex, + { + UsbDeviceDescriptor{0x0200, 0x00, 0x00, 0x00, 0x10, 0x046D, 0xC294, 0x1350, 0x01, 0x02, 0x00, 0x01}, + {0x09, 0x02, 0x29, 0x00, 0x01, 0x01, 0x04, 0x80, 0x31, 0x09, 0x04, 0x00, 0x00, 0x02, 0x03, 0x00, + 0x00, 0x00, 0x09, 0x21, 0x00, 0x01, 0x21, 0x01, 0x22, 0x9D, 0x00, 0x07, 0x05, 0x81, 0x03, 0x40, + 0x00, 0x0A, 0x07, 0x05, 0x01, 0x03, 0x10, 0x00, 0x0A} + } +}, +{ + logitech_personality::driving_force_pro, + { + UsbDeviceDescriptor{0x0200, 0x00, 0x00, 0x00, 0x10, 0x046D, 0xC298, 0x1350, 0x01, 0x02, 0x00, 0x01}, + {0x09, 0x02, 0x29, 0x00, 0x01, 0x01, 0x04, 0x80, 0x31, 0x09, 0x04, 0x00, 0x00, 0x02, 0x03, 0x00, + 0x00, 0x00, 0x09, 0x21, 0x00, 0x01, 0x21, 0x01, 0x22, 0x61, 0x00, 0x07, 0x05, 0x81, 0x03, 0x08, + 0x00, 0x0A, 0x07, 0x05, 0x01, 0x03, 0x08, 0x00, 0x0A} + } +}, +{ + logitech_personality::g25, + { + UsbDeviceDescriptor{0x0200, 0x00, 0x00, 0x00, 0x10, 0x046D, 0xC299, 0x1350, 0x01, 0x02, 0x00, 0x01}, + {0x09, 0x02, 0x29, 0x00, 0x01, 0x01, 0x04, 0x80, 0x31, 0x09, 0x04, 0x00, 0x00, 0x02, 0x03, 0x00, + 0x00, 0x00, 0x09, 0x21, 0x11, 0x01, 0x21, 0x01, 0x22, 0x6F, 0x00, 0x07, 0x05, 0x81, 0x03, 0x10, + 0x00, 0x02, 0x07, 0x05, 0x01, 0x03, 0x10, 0x00, 0x02} + } +}, +{ + logitech_personality::driving_force_gt, + { + UsbDeviceDescriptor{0x0200, 0x00, 0x00, 0x00, 0x10, 0x046D, 0xC29A, 0x1350, 0x00, 0x02, 0x00, 0x01}, + {0x09, 0x02, 0x29, 0x00, 0x01, 0x01, 0x00, 0x80, 0x31, 0x09, 0x04, 0x00, 0x00, 0x02, 0x03, 0x00, + 0x00, 0xFE, 0x09, 0x21, 0x11, 0x01, 0x21, 0x01, 0x22, 0x73, 0x00, 0x07, 0x05, 0x81, 0x03, 0x10, + 0x00, 0x02, 0x07, 0x05, 0x01, 0x03, 0x10, 0x00, 0x02} + } +}, +{ + logitech_personality::g27, + { + UsbDeviceDescriptor{0x0200, 0x00, 0x00, 0x00, 0x10, 0x046D, 0xC29B, 0x1350, 0x01, 0x02, 0x00, 0x01}, + {0x09, 0x02, 0x29, 0x00, 0x01, 0x01, 0x04, 0x80, 0x31, 0x09, 0x04, 0x00, 0x00, 0x02, 0x03, 0x00, + 0x00, 0x00, 0x09, 0x21, 0x11, 0x01, 0x21, 0x01, 0x22, 0x85, 0x00, 0x07, 0x05, 0x81, 0x03, 0x10, + 0x00, 0x02, 0x07, 0x05, 0x01, 0x03, 0x10, 0x00, 0x02} + } +} +}; // ref: https://github.com/libsdl-org/SDL/issues/7941, need to use SDL_HAPTIC_STEERING_AXIS for some windows drivers -static const SDL_HapticDirection STEERING_DIRECTION = +static constexpr SDL_HapticDirection STEERING_DIRECTION = { .type = SDL_HAPTIC_STEERING_AXIS, .dir = {0, 0, 0} }; -usb_device_logitech_g27::usb_device_logitech_g27(u32 controller_index, const std::array& location) - : usb_device_emulated(location), m_controller_index(controller_index) +void usb_device_logitech_g27::set_personality(logitech_personality personality, bool reconnect) { - device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, UsbDeviceDescriptor{0x0200, 0, 0, 0, 16, 0x046d, 0xc29b, 0x1350, 1, 2, 0, 1}); + m_personality = personality; + device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, ::at32(s_logitech_personality, personality).first); // parse the raw response like with passthrough device - static constexpr u8 raw_config[] = {0x9, 0x2, 0x29, 0x0, 0x1, 0x1, 0x4, 0x80, 0x31, 0x9, 0x4, 0x0, 0x0, 0x2, 0x3, 0x0, 0x0, 0x0, 0x9, 0x21, 0x11, 0x1, 0x21, 0x1, 0x22, 0x85, 0x0, 0x7, 0x5, 0x81, 0x3, 0x10, 0x0, 0x2, 0x7, 0x5, 0x1, 0x3, 0x10, 0x0, 0x2}; + const u8* raw_config = ::at32(s_logitech_personality, personality).second.data(); auto& conf = device.add_node(UsbDescriptorNode(raw_config[0], raw_config[1], &raw_config[2])); - for (unsigned int index = raw_config[0]; index < sizeof(raw_config);) + for (unsigned int index = raw_config[0]; index < raw_config[2];) { conf.add_node(UsbDescriptorNode(raw_config[index], raw_config[index + 1], &raw_config[index + 2])); index += raw_config[index]; } + if (reconnect) + { + reconnect_usb(assigned_number); + } +} + +usb_device_logitech_g27::usb_device_logitech_g27(u32 controller_index, const std::array& location) + : usb_device_emulated(location), m_controller_index(controller_index) +{ + set_personality(logitech_personality::driving_force_ex); + m_default_spring_effect.type = SDL_HAPTIC_SPRING; m_default_spring_effect.condition.direction = STEERING_DIRECTION; m_default_spring_effect.condition.length = SDL_HAPTIC_INFINITY; @@ -63,7 +321,14 @@ usb_device_logitech_g27::usb_device_logitech_g27(u32 controller_index, const std while (thread_ctrl::state() != thread_state::aborting) { sdl_refresh(); - thread_ctrl::wait_for(5'000'000); + thread_ctrl::wait_for(1'000'000); + + std::unique_lock lock(g_cfg_logitech_g27.m_mutex); + if (logitech_personality::invalid != m_next_personality && m_personality != m_next_personality) + { + set_personality(m_next_personality, true); + m_next_personality = logitech_personality::invalid; + } } }); } @@ -115,7 +380,7 @@ u16 usb_device_logitech_g27::get_num_emu_devices() void usb_device_logitech_g27::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) { - logitech_g27_log.todo("control transfer bmRequestType %02x, bRequest %02x, wValue %04x, wIndex %04x, wLength %04x, %s", bmRequestType, bRequest, wValue, wIndex, wLength, fmt::buf_to_hexstring(buf, buf_size)); + logitech_g27_log.notice("control transfer bmRequestType %02x, bRequest %02x, wValue %04x, wIndex %04x, wLength %04x, %s", bmRequestType, bRequest, wValue, wIndex, wLength, fmt::buf_to_hexstring(buf, buf_size)); usb_device_emulated::control_transfer(bmRequestType, bRequest, wValue, wIndex, wLength, buf_size, buf, transfer); } @@ -194,9 +459,11 @@ static inline logitech_g27_sdl_mapping get_runtime_mapping() convert_mapping(cfg.dial_clockwise, mapping.dial_clockwise); convert_mapping(cfg.dial_anticlockwise, mapping.dial_anticlockwise); + convert_mapping(cfg.dial_center, mapping.dial_center); convert_mapping(cfg.select, mapping.select); - convert_mapping(cfg.pause, mapping.pause); + convert_mapping(cfg.start, mapping.start); + convert_mapping(cfg.ps, mapping.ps); convert_mapping(cfg.shifter_1, mapping.shifter_1); convert_mapping(cfg.shifter_2, mapping.shifter_2); @@ -205,7 +472,6 @@ static inline logitech_g27_sdl_mapping get_runtime_mapping() convert_mapping(cfg.shifter_5, mapping.shifter_5); convert_mapping(cfg.shifter_6, mapping.shifter_6); convert_mapping(cfg.shifter_r, mapping.shifter_r); - convert_mapping(cfg.shifter_press, mapping.shifter_press); return mapping; } @@ -467,6 +733,50 @@ static u8 hat_components_to_logitech_g27_hat(bool up, bool down, bool left, bool return sdl_hat_to_logitech_g27_hat(sdl_hat); } +static std::pair shifter_to_coord_xy(bool shifter_1, bool shifter_2, bool shifter_3, bool shifter_4, + bool shifter_5, bool shifter_6, bool shifter_r) +{ + // rough analog values recorded in https://github.com/RPCS3/rpcs3/pull/17199#issuecomment-2883934412 + constexpr u8 coord_center = 0x80; + constexpr u8 coord_top = 0xb7; + constexpr u8 coord_bottom = 0x32; + constexpr u8 coord_left = 0x30; + constexpr u8 coord_right = 0xb3; + constexpr u8 coord_right_reverse = 0xaa; + if (shifter_1) + { + return {coord_left, coord_top}; + } + else if (shifter_2) + { + return {coord_left, coord_bottom}; + } + else if (shifter_3) + { + return {coord_center, coord_top}; + } + else if (shifter_4) + { + return {coord_center, coord_bottom}; + } + else if (shifter_5) + { + return {coord_right, coord_top}; + } + else if (shifter_6) + { + return {coord_right, coord_bottom}; + } + else if (shifter_r) + { + return {coord_right_reverse, coord_bottom}; + } + else + { + return {coord_center, coord_center}; + } +} + static bool fetch_sdl_as_button(SDL_Joystick* joystick, const sdl_mapping& mapping) { switch (mapping.type) @@ -574,7 +884,7 @@ static s16 fetch_sdl_as_axis(SDL_Joystick* joystick, const sdl_mapping& mapping) return 0; } -static s16 fetch_sdl_axis_avg(std::map>& joysticks, const sdl_mapping& mapping) +static s16 fetch_sdl_axis_avg(const std::map>& joysticks, const sdl_mapping& mapping) { constexpr s16 MAX = 0x7FFF; constexpr s16 MIN = -0x8000; @@ -600,7 +910,7 @@ static s16 fetch_sdl_axis_avg(std::map>& joystic return std::clamp(sdl_joysticks_total_value / static_cast(joysticks_of_type->second.size()), MIN, MAX); } -static bool sdl_to_logitech_g27_button(std::map>& joysticks, const sdl_mapping& mapping) +static bool sdl_to_logitech_g27_button(const std::map>& joysticks, const sdl_mapping& mapping) { auto joysticks_of_type = joysticks.find(mapping.device_type_id); if (joysticks_of_type == joysticks.end()) @@ -621,29 +931,232 @@ static bool sdl_to_logitech_g27_button(std::map> return pressed; } -static u16 sdl_to_logitech_g27_steering(std::map>& joysticks, const sdl_mapping& mapping) +static u16 sdl_to_logitech_g27_steering(const std::map>& joysticks, const sdl_mapping& mapping) { const s16 avg = fetch_sdl_axis_avg(joysticks, mapping); const u16 unsigned_avg = avg + 0x8000; return unsigned_avg * (0xFFFF >> 2) / 0xFFFF; } -static u8 sdl_to_logitech_g27_pedal(std::map>& joysticks, const sdl_mapping& mapping) +static u8 sdl_to_logitech_g27_pedal(const std::map>& joysticks, const sdl_mapping& mapping) { const s16 avg = fetch_sdl_axis_avg(joysticks, mapping); const u16 unsigned_avg = avg + 0x8000; return unsigned_avg * 0xFF / 0xFFFF; } -static inline void set_bit(u8* buf, int bit_num, bool set) +void usb_device_logitech_g27::transfer_dfex(u32 buf_size, u8* buf, UsbTransfer* transfer) const { - const int byte_num = bit_num / 8; - bit_num %= 8; - const u8 mask = 1 << bit_num; - if (set) - buf[byte_num] = buf[byte_num] | mask; - else - buf[byte_num] = buf[byte_num] & (~mask); + DFEX_data data{}; + ensure(buf_size >= sizeof(data)); + transfer->expected_count = sizeof(data); + + const std::lock_guard lock(m_sdl_handles_mutex); + data.square = sdl_to_logitech_g27_button(m_joysticks, m_mapping.square); + data.cross = sdl_to_logitech_g27_button(m_joysticks, m_mapping.cross); + data.circle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.circle); + data.triangle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.triangle); + data.l1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_down); + data.r1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_up); + data.l2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l2); + data.r2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r2); + data.select = sdl_to_logitech_g27_button(m_joysticks, m_mapping.select); + data.start = sdl_to_logitech_g27_button(m_joysticks, m_mapping.start); + data.l3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l3); + data.r3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r3); + data.dpad = hat_components_to_logitech_g27_hat( + sdl_to_logitech_g27_button(m_joysticks, m_mapping.up), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.down), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.left), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.right) + ); + data.steering = sdl_to_logitech_g27_steering(m_joysticks, m_mapping.steering) >> 6; + data.brake_throttle = 0x7f; + data.const1 = 0x7f; + data.const2 = 0x7f; + data.brake = 0xff - sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.brake); + data.throttle = 0xff - sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.throttle); + std::memcpy(buf, &data, sizeof(data)); +} + +void usb_device_logitech_g27::transfer_dfp(u32 buf_size, u8* buf, UsbTransfer* transfer) const +{ + DFP_data data{}; + ensure(buf_size >= sizeof(data)); + transfer->expected_count = sizeof(data); + + const std::lock_guard lock(m_sdl_handles_mutex); + data.steering = sdl_to_logitech_g27_steering(m_joysticks, m_mapping.steering); + data.cross = sdl_to_logitech_g27_button(m_joysticks, m_mapping.cross); + data.square = sdl_to_logitech_g27_button(m_joysticks, m_mapping.square); + data.circle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.circle); + data.triangle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.triangle); + data.r1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_up); + data.l1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_down); + data.r2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r2); + data.l2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l2); + data.select = sdl_to_logitech_g27_button(m_joysticks, m_mapping.select); + data.start = sdl_to_logitech_g27_button(m_joysticks, m_mapping.start); + data.r3 = data.r3_2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r3); + data.l3 = data.l3_2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l3); + data.dpad = hat_components_to_logitech_g27_hat( + sdl_to_logitech_g27_button(m_joysticks, m_mapping.up), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.down), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.left), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.right) + ); + data.brake_throttle = 0x7f; + data.throttle = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.throttle); + data.brake = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.brake); + data.pedals_attached = 1; + data.powered = 1; + data.self_check_done = 1; + data.set1 = 1; + std::memcpy(buf, &data, sizeof(data)); +} + +void usb_device_logitech_g27::transfer_dfgt(u32 buf_size, u8* buf, UsbTransfer* transfer) const +{ + DFGT_data data{}; + ensure(buf_size >= sizeof(data)); + transfer->expected_count = sizeof(data); + + const std::lock_guard lock(m_sdl_handles_mutex); + data.dpad = hat_components_to_logitech_g27_hat( + sdl_to_logitech_g27_button(m_joysticks, m_mapping.up), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.down), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.left), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.right) + ); + data.cross = sdl_to_logitech_g27_button(m_joysticks, m_mapping.cross); + data.square = sdl_to_logitech_g27_button(m_joysticks, m_mapping.square); + data.circle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.circle); + data.triangle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.triangle); + data.r1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_up); + data.l1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_down); + data.r2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r2); + data.l2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l2); + data.select = sdl_to_logitech_g27_button(m_joysticks, m_mapping.select); + data.start = sdl_to_logitech_g27_button(m_joysticks, m_mapping.start); + data.r3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r3); + data.l3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l3); + data.dial_center = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_center); + data.plus = sdl_to_logitech_g27_button(m_joysticks, m_mapping.plus); + data.dial_cw = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_clockwise); + data.dial_ccw = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_anticlockwise); + data.minus = sdl_to_logitech_g27_button(m_joysticks, m_mapping.minus); + data.ps = sdl_to_logitech_g27_button(m_joysticks, m_mapping.ps); + data.pedals_attached = 1; + data.powered = 1; + data.self_check_done = 1; + data.set1 = 1; + data.set2 = 1; + data.steering = sdl_to_logitech_g27_steering(m_joysticks, m_mapping.steering); + data.throttle = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.throttle); + data.brake = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.brake); + std::memcpy(buf, &data, sizeof(data)); +} + +void usb_device_logitech_g27::transfer_g25(u32 buf_size, u8* buf, UsbTransfer* transfer) const +{ + G25_data data{}; + ensure(buf_size >= sizeof(data)); + transfer->expected_count = sizeof(data); + + const std::lock_guard lock(m_sdl_handles_mutex); + data.dpad = hat_components_to_logitech_g27_hat( + sdl_to_logitech_g27_button(m_joysticks, m_mapping.up), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.down), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.left), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.right) + ); + data.cross = sdl_to_logitech_g27_button(m_joysticks, m_mapping.cross); + data.square = sdl_to_logitech_g27_button(m_joysticks, m_mapping.square); + data.circle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.circle); + data.triangle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.triangle); + data.r1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_up); + data.l1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_down); + data.r2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r2); + data.l2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l2); + data.select = sdl_to_logitech_g27_button(m_joysticks, m_mapping.select); + data.start = sdl_to_logitech_g27_button(m_joysticks, m_mapping.start); + data.r3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r3); + data.l3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l3); + data.gear1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_1); + data.gear2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_2); + data.gear3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_3); + data.gear4 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_4); + data.gear5 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_5); + data.gear6 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_6); + data.gearR = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_r); + data.pedals_detached = 0; + data.powered = 1; + data.steering = sdl_to_logitech_g27_steering(m_joysticks, m_mapping.steering); + data.throttle = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.throttle); + data.brake = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.brake); + data.clutch = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.clutch); + auto [shifter_x, shifter_y] = shifter_to_coord_xy(data.gear1, data.gear2, + data.gear3, data.gear4, data.gear5, data.gear6, data.gearR); + data.shifter_x = shifter_x; + data.shifter_y = shifter_y; + data.shifter_attached = 1; + data.set1 = 1; + data.shifter_pressed = data.gearR; + std::memcpy(buf, &data, sizeof(data)); +} + +void usb_device_logitech_g27::transfer_g27(u32 buf_size, u8* buf, UsbTransfer* transfer) const +{ + G27_data data{}; + ensure(buf_size >= sizeof(data)); + transfer->expected_count = sizeof(data); + + const std::lock_guard lock(m_sdl_handles_mutex); + data.dpad = hat_components_to_logitech_g27_hat( + sdl_to_logitech_g27_button(m_joysticks, m_mapping.up), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.down), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.left), + sdl_to_logitech_g27_button(m_joysticks, m_mapping.right) + ); + data.cross = sdl_to_logitech_g27_button(m_joysticks, m_mapping.cross); + data.square = sdl_to_logitech_g27_button(m_joysticks, m_mapping.square); + data.circle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.circle); + data.triangle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.triangle); + data.r1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_up); + data.l1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_down); + data.r2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r2); + data.l2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l2); + data.select = sdl_to_logitech_g27_button(m_joysticks, m_mapping.select); + data.start = sdl_to_logitech_g27_button(m_joysticks, m_mapping.start); + data.r3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r3); + data.l3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l3); + data.gear1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_1); + data.gear2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_2); + data.gear3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_3); + data.gear4 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_4); + data.gear5 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_5); + data.gear6 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_6); + const bool shifter_r = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_r); + data.dial_cw = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_clockwise); + data.dial_ccw = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_anticlockwise); + data.plus = sdl_to_logitech_g27_button(m_joysticks, m_mapping.plus); + data.minus = sdl_to_logitech_g27_button(m_joysticks, m_mapping.minus); + data.steering = sdl_to_logitech_g27_steering(m_joysticks, m_mapping.steering); + data.throttle = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.throttle); + data.brake = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.brake); + data.clutch = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.clutch); + auto [shifter_x, shifter_y] = shifter_to_coord_xy(data.gear1, data.gear2, + data.gear3, data.gear4, data.gear5, data.gear6, shifter_r); + data.shifter_x = shifter_x; + data.shifter_y = shifter_y; + data.gearR = shifter_r; + data.pedals_detached = 0; + data.powered = 1; + data.shifter_attached = 1; + data.set1 = 1; + data.shifter_pressed = shifter_r; + data.range = (m_wheel_range > 360); + std::memcpy(buf, &data, sizeof(data)); } void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) @@ -655,168 +1168,31 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp if (endpoint & (1 << 7)) { - if (buf_size < 11) - { - logitech_g27_log.error("Not populating input buffer with a buffer of the size of %u", buf_size); - return; - } - - ensure(buf_size >= 11); memset(buf, 0, buf_size); - - transfer->expected_count = 11; - sdl_instance::get_instance().pump_events(); - // Fetch input states from SDL - m_sdl_handles_mutex.lock(); - const u16 steering = sdl_to_logitech_g27_steering(m_joysticks, m_mapping.steering); - const u8 throttle = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.throttle); - const u8 brake = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.brake); - const u8 clutch = sdl_to_logitech_g27_pedal(m_joysticks, m_mapping.clutch); - const bool shift_up = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_up); - const bool shift_down = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shift_down); - - const bool up = sdl_to_logitech_g27_button(m_joysticks, m_mapping.up); - const bool down = sdl_to_logitech_g27_button(m_joysticks, m_mapping.down); - const bool left = sdl_to_logitech_g27_button(m_joysticks, m_mapping.left); - const bool right = sdl_to_logitech_g27_button(m_joysticks, m_mapping.right); - - const bool triangle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.triangle); - const bool cross = sdl_to_logitech_g27_button(m_joysticks, m_mapping.cross); - const bool square = sdl_to_logitech_g27_button(m_joysticks, m_mapping.square); - const bool circle = sdl_to_logitech_g27_button(m_joysticks, m_mapping.circle); - - const bool l2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l2); - const bool l3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.l3); - const bool r2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r2); - const bool r3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.r3); - - const bool plus = sdl_to_logitech_g27_button(m_joysticks, m_mapping.plus); - const bool minus = sdl_to_logitech_g27_button(m_joysticks, m_mapping.minus); - - const bool dial_clockwise = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_clockwise); - const bool dial_anticlockwise = sdl_to_logitech_g27_button(m_joysticks, m_mapping.dial_anticlockwise); - - const bool select = sdl_to_logitech_g27_button(m_joysticks, m_mapping.select); - const bool pause = sdl_to_logitech_g27_button(m_joysticks, m_mapping.pause); - - const bool shifter_1 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_1); - const bool shifter_2 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_2); - const bool shifter_3 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_3); - const bool shifter_4 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_4); - const bool shifter_5 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_5); - const bool shifter_6 = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_6); - const bool shifter_r = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_r); - const bool shifter_press = sdl_to_logitech_g27_button(m_joysticks, m_mapping.shifter_press); - m_sdl_handles_mutex.unlock(); - - // populate buffer - buf[0] = hat_components_to_logitech_g27_hat(up, down, left, right); - set_bit(buf, 8, shift_up); - set_bit(buf, 9, shift_down); - - set_bit(buf, 7, triangle); - set_bit(buf, 4, cross); - set_bit(buf, 5, square); - set_bit(buf, 6, circle); - - set_bit(buf, 11, l2); - set_bit(buf, 15, l3); - set_bit(buf, 10, r2); - set_bit(buf, 14, r3); - - set_bit(buf, 22, dial_clockwise); - set_bit(buf, 23, dial_anticlockwise); - - set_bit(buf, 24, plus); - set_bit(buf, 25, minus); - - set_bit(buf, 12, select); - set_bit(buf, 13, pause); - - set_bit(buf, 16, shifter_1); - set_bit(buf, 17, shifter_2); - set_bit(buf, 18, shifter_3); - set_bit(buf, 19, shifter_4); - set_bit(buf, 20, shifter_5); - set_bit(buf, 21, shifter_6); - set_bit(buf, 80, shifter_r); - - // calibrated, unsure - set_bit(buf, 82, true); - // shifter connected - set_bit(buf, 83, true); - /* - * shifter pressed/down bit - * mechanical references: - * - G29 shifter mechanical explanation https://youtu.be/d7qCn3o8K98?t=1124 - * - same mechanism on the G27 https://youtu.be/rdjejtIfkVA?t=760 - * - same mechanism on the G25 https://youtu.be/eCyt_4luwF0?t=130 - * on healthy G29/G27/G25 shifters, shifter is mechnically kept pressed in reverse, the bit should be set - * the shifter_press mapping alone captures instead a shifter press without going into reverse, ie. neutral press, just in case there are games using it for input - */ - set_bit(buf, 86, shifter_press | shifter_r); - - buf[3] = (steering << 2) | buf[3]; - buf[4] = steering >> 6; - buf[5] = throttle; - buf[6] = brake; - buf[7] = clutch; - - // rough analog values recorded in https://github.com/RPCS3/rpcs3/pull/17199#issuecomment-2883934412 - // buf[8] shifter x - // buf[9] shifter y - constexpr u8 shifter_coord_center = 0x80; - constexpr u8 shifter_coord_top = 0xb7; - constexpr u8 shifter_coord_bottom = 0x32; - constexpr u8 shifter_coord_left = 0x30; - constexpr u8 shifter_coord_right = 0xb3; - constexpr u8 shifter_coord_right_reverse = 0xaa; - if (shifter_1) + switch (m_personality) { - buf[8] = shifter_coord_left; - buf[9] = shifter_coord_top; - } - else if (shifter_2) - { - buf[8] = shifter_coord_left; - buf[9] = shifter_coord_bottom; - } - else if (shifter_3) - { - buf[8] = shifter_coord_center; - buf[9] = shifter_coord_top; - } - else if (shifter_4) - { - buf[8] = shifter_coord_center; - buf[9] = shifter_coord_bottom; - } - else if (shifter_5) - { - buf[8] = shifter_coord_right; - buf[9] = shifter_coord_top; - } - else if (shifter_6) - { - buf[8] = shifter_coord_right; - buf[9] = shifter_coord_bottom; - } - else if (shifter_r) - { - buf[8] = shifter_coord_right_reverse; - buf[9] = shifter_coord_bottom; - } - else - { - buf[8] = shifter_coord_center; - buf[9] = shifter_coord_center; + case logitech_personality::driving_force_ex: + transfer_dfex(buf_size, buf, transfer); + break; + case logitech_personality::driving_force_pro: + transfer_dfp(buf_size, buf, transfer); + break; + case logitech_personality::g25: + transfer_g25(buf_size, buf, transfer); + break; + case logitech_personality::driving_force_gt: + transfer_dfgt(buf_size, buf, transfer); + break; + case logitech_personality::g27: + transfer_g27(buf_size, buf, transfer); + break; + case logitech_personality::invalid: + fmt::throw_exception("unreachable"); } - buf[10] = buf[10] | (m_wheel_range > 360 ? 0x90 : 0x10); - - // logitech_g27_log.error("%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], buf[8], buf[9], buf[10]); + // logitech_g27_log.error("dev=%d, ep in : %s", static_cast(m_personality), fmt::buf_to_hexstring(buf, buf_size)); return; } @@ -831,8 +1207,7 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp transfer->expected_count = buf_size; - // logitech_g27_log.error("%02x %02x %02x %02x %02x %02x %02x", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); - // printf("%02x %02x %02x %02x %02x %02x %02x\n", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); + // logitech_g27_log.error("ep out : %s", fmt::buf_to_hexstring(buf, buf_size)); // TODO maybe force clipping from cfg @@ -843,9 +1218,44 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp switch (buf[1]) { case 0x01: + case 0x09: + case 0x10: { - // Change to DFP - logitech_g27_log.error("Drive Force Pro mode switch command ignored"); + // Change device mode + u8 cmd = buf[1]; + u8 arg = buf[2]; + if (buf[8] == 0xf8) // we have 2 commands back to back + { + cmd = buf[9]; + arg = buf[10]; + } + + m_next_personality = logitech_personality::invalid; + if (cmd == 0x09 && arg == 0x04) + m_next_personality = logitech_personality::g27; + else if (cmd == 0x09 && arg == 0x03) + m_next_personality = logitech_personality::driving_force_gt; + else if ((cmd == 0x09 && arg == 0x02) || cmd == 0x10) + m_next_personality = logitech_personality::g25; + else if ((cmd == 0x09 && arg == 0x01) || cmd == 0x01) + m_next_personality = logitech_personality::driving_force_pro; + else if (cmd == 0x09 && arg == 0x00) + m_next_personality = logitech_personality::driving_force_ex; + + if (logitech_personality limit = static_cast(g_cfg_logitech_g27.compatibility_limit.get()); + limit < m_next_personality) + { + m_next_personality = limit; + } + + logitech_g27_log.success("Change device mode : buf=[%s], cmd=0x%x, arg=0x%x, lim=%d -> pers=%d(%s)", + fmt::buf_to_hexstring(buf, buf_size), cmd, arg, g_cfg_logitech_g27.compatibility_limit.get(), + static_cast(m_next_personality), + m_next_personality == logitech_personality::g27 ? "G27" + : m_next_personality == logitech_personality::driving_force_gt ? "Driving Force GT" + : m_next_personality == logitech_personality::g25 ? "G25" + : m_next_personality == logitech_personality::driving_force_pro ? "Driving Force Pro" + : m_next_personality == logitech_personality::driving_force_ex ? "Driving Force EX" : "Invalid"); break; } case 0x02: @@ -862,24 +1272,12 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp m_wheel_range = 900; break; } - case 0x09: - { - // Change device mode - logitech_g27_log.error("Change device mode to %d %s detaching command ignored", buf[2], buf[3] ? "with" : "without"); - break; - } case 0x0a: { // Revert indentity logitech_g27_log.error("Revert device identity after reset %s command ignored", buf[2] ? "enable" : "disable"); break; } - case 0x10: - { - // Switch to G25 with detach - logitech_g27_log.error("Switch to G25 with detach command ignored"); - break; - } case 0x11: { // Switch to G25 without detach @@ -1077,8 +1475,8 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp new_effect.condition.direction = STEERING_DIRECTION; new_effect.condition.length = SDL_HAPTIC_INFINITY; const u16 saturation = logitech_g27_clip_to_saturation(buf[4]); - const u16 deadband = 2 * 0xFFFF / 255; - s16 center = 0; + constexpr u16 deadband = 2 * 0xFFFF / 255; + constexpr s16 center = 0; s16 left_coeff = 0; s16 right_coeff = 0; if (buf[1] == 0x03) @@ -1343,7 +1741,7 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp { if (!SDL_RunHapticEffect(m_haptic_handle, m_effect_slots[i].effect_id, 1)) { - logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s\n", m_effect_slots[i].last_effect.type, i, SDL_GetError()); + logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s", m_effect_slots[i].last_effect.type, i, SDL_GetError()); } } else @@ -1387,14 +1785,14 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp { if (!SDL_RunHapticEffect(m_haptic_handle, m_effect_slots[i].effect_id, 1)) { - logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s\n", m_effect_slots[i].last_effect.type, i, SDL_GetError()); + logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s", m_effect_slots[i].last_effect.type, i, SDL_GetError()); } } else { if (!SDL_StopHapticEffect(m_haptic_handle, m_effect_slots[i].effect_id)) { - logitech_g27_log.error("Failed stopping sdl effect %d on slot %d, %s\n", m_effect_slots[i].last_effect.type, i, SDL_GetError()); + logitech_g27_log.error("Failed stopping sdl effect %d on slot %d, %s", m_effect_slots[i].last_effect.type, i, SDL_GetError()); } } } @@ -1415,11 +1813,11 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp { if (cmd == 0x02) { - logitech_g27_log.error("Tried to play effect slot %d but it was never uploaded\n", i); + logitech_g27_log.error("Tried to play effect slot %d but it was never uploaded", i); } else { - logitech_g27_log.error("Tried to stop effect slot %d but it was never uploaded\n", i); + logitech_g27_log.error("Tried to stop effect slot %d but it was never uploaded", i); } } } diff --git a/rpcs3/Emu/Io/LogitechG27.h b/rpcs3/Emu/Io/LogitechG27.h index 52735a253d..ccb2f58908 100644 --- a/rpcs3/Emu/Io/LogitechG27.h +++ b/rpcs3/Emu/Io/LogitechG27.h @@ -16,6 +16,16 @@ #include #include +enum class logitech_personality +{ + driving_force_ex, + driving_force_pro, + g25, + driving_force_gt, + g27, + invalid, +}; + enum class logitech_g27_ffb_state { inactive, @@ -28,10 +38,7 @@ struct logitech_g27_ffb_slot logitech_g27_ffb_state state = logitech_g27_ffb_state::inactive; u64 last_update = 0; SDL_HapticEffect last_effect {}; - - // TODO switch to SDL_HapticEffectID when it becomes available in a future SDL release - // Match the return of SDL_CreateHapticEffect for now - int effect_id = -1; + SDL_HapticEffectID effect_id = -1; }; struct sdl_mapping @@ -83,9 +90,11 @@ struct logitech_g27_sdl_mapping sdl_mapping dial_clockwise {}; sdl_mapping dial_anticlockwise {}; + sdl_mapping dial_center {}; sdl_mapping select {}; - sdl_mapping pause {}; + sdl_mapping start {}; + sdl_mapping ps {}; sdl_mapping shifter_1 {}; sdl_mapping shifter_2 {}; @@ -94,7 +103,6 @@ struct logitech_g27_sdl_mapping sdl_mapping shifter_5 {}; sdl_mapping shifter_6 {}; sdl_mapping shifter_r {}; - sdl_mapping shifter_press {}; }; class usb_device_logitech_g27 : public usb_device_emulated @@ -112,13 +120,21 @@ public: private: void sdl_refresh(); + void set_personality(logitech_personality personality, bool reconnect = false); + void transfer_dfex(u32 buf_size, u8* buf, UsbTransfer* transfer) const; + void transfer_dfp(u32 buf_size, u8* buf, UsbTransfer* transfer) const; + void transfer_dfgt(u32 buf_size, u8* buf, UsbTransfer* transfer) const; + void transfer_g25(u32 buf_size, u8* buf, UsbTransfer* transfer) const; + void transfer_g27(u32 buf_size, u8* buf, UsbTransfer* transfer) const; u32 m_controller_index = 0; + logitech_personality m_personality = logitech_personality::invalid; + logitech_personality m_next_personality = logitech_personality::invalid; logitech_g27_sdl_mapping m_mapping {}; bool m_reverse_effects = false; - std::mutex m_sdl_handles_mutex; + mutable std::mutex m_sdl_handles_mutex; SDL_Joystick* m_led_joystick_handle = nullptr; SDL_Haptic* m_haptic_handle = nullptr; std::map> m_joysticks; diff --git a/rpcs3/Emu/Io/LogitechG27Config.h b/rpcs3/Emu/Io/LogitechG27Config.h index 82a2e89dea..1a46a0fcc2 100644 --- a/rpcs3/Emu/Io/LogitechG27Config.h +++ b/rpcs3/Emu/Io/LogitechG27Config.h @@ -96,9 +96,11 @@ public: emulated_logitech_g27_mapping dial_clockwise{this, "dial_clockwise", 0, sdl_mapping_type::button, 21, hat_component::none, false}; emulated_logitech_g27_mapping dial_anticlockwise{this, "dial_anticlockwise", 0, sdl_mapping_type::button, 22, hat_component::none, false}; + emulated_logitech_g27_mapping dial_center{this, "dial_center", 0, sdl_mapping_type::button, 23, hat_component::none, false}; emulated_logitech_g27_mapping select{this, "select", 0, sdl_mapping_type::button, 8, hat_component::none, false}; - emulated_logitech_g27_mapping pause{this, "pause", 0, sdl_mapping_type::button, 9, hat_component::none, false}; + emulated_logitech_g27_mapping start{this, "pause", 0, sdl_mapping_type::button, 9, hat_component::none, false}; + emulated_logitech_g27_mapping ps{this, "ps", 0, sdl_mapping_type::button, 24, hat_component::none, false}; emulated_logitech_g27_mapping shifter_1{this, "shifter_1", 0, sdl_mapping_type::button, 3, hat_component::none, false}; emulated_logitech_g27_mapping shifter_2{this, "shifter_2", 0, sdl_mapping_type::button, 0, hat_component::none, false}; @@ -107,9 +109,9 @@ public: emulated_logitech_g27_mapping shifter_5{this, "shifter_5", 0, sdl_mapping_type::hat, 0, hat_component::up, false}; emulated_logitech_g27_mapping shifter_6{this, "shifter_6", 0, sdl_mapping_type::hat, 0, hat_component::down, false}; emulated_logitech_g27_mapping shifter_r{this, "shifter_r", 0, sdl_mapping_type::hat, 0, hat_component::left, false}; - emulated_logitech_g27_mapping shifter_press{this, "shifter_press", 0, sdl_mapping_type::hat, 0, hat_component::right, false}; cfg::_bool reverse_effects{this, "reverse_effects", false}; + cfg::uint<0, 4> compatibility_limit{this, "compatibility_limit", 4}; cfg::uint<0, 0xFFFFFFFFFFFFFFFF> ffb_device_type_id{this, "ffb_device_type_id", 0}; cfg::uint<0, 0xFFFFFFFFFFFFFFFF> led_device_type_id{this, "led_device_type_id", 0}; diff --git a/rpcs3/Emu/Io/MouseHandler.cpp b/rpcs3/Emu/Io/MouseHandler.cpp index 9fd37463cd..7c4edcb449 100644 --- a/rpcs3/Emu/Io/MouseHandler.cpp +++ b/rpcs3/Emu/Io/MouseHandler.cpp @@ -33,12 +33,12 @@ void MouseHandlerBase::save(utils::serial& ar) bool MouseHandlerBase::is_time_for_update(double elapsed_time_ms) { - steady_clock::time_point now = steady_clock::now(); - const double elapsed_ms = (now - last_update).count() / 1'000'000.; + const steady_clock::time_point now = steady_clock::now(); + const double elapsed_ms = (now - m_last_update).count() / 1'000'000.; if (elapsed_ms > elapsed_time_ms) { - last_update = now; + m_last_update = now; return true; } return false; diff --git a/rpcs3/Emu/Io/MouseHandler.h b/rpcs3/Emu/Io/MouseHandler.h index 6a77f44d0e..4b31a6a60d 100644 --- a/rpcs3/Emu/Io/MouseHandler.h +++ b/rpcs3/Emu/Io/MouseHandler.h @@ -128,7 +128,7 @@ class MouseHandlerBase protected: MouseInfo m_info{}; std::vector m_mice; - steady_clock::time_point last_update{}; + steady_clock::time_point m_last_update{}; bool is_time_for_update(double elapsed_time_ms = 10.0); // 4-10 ms, let's use 10 for now diff --git a/rpcs3/Emu/Io/PadHandler.cpp b/rpcs3/Emu/Io/PadHandler.cpp index d25ba1379c..ccd81d2805 100644 --- a/rpcs3/Emu/Io/PadHandler.cpp +++ b/rpcs3/Emu/Io/PadHandler.cpp @@ -11,26 +11,49 @@ PadHandlerBase::PadHandlerBase(pad_handler type) : m_type(type) { } -std::set PadHandlerBase::narrow_set(const std::set& src) +std::vector> PadHandlerBase::find_key_combos(const std::unordered_map& map, const std::string& cfg_string) { - if (src.empty()) - return {}; + std::vector> key_codes; - std::set dst; - for (const u64& s : src) + const std::vector combos = cfg_pad::get_combos(cfg_string); + + for (const pad::combo& combo : combos) { - dst.insert(::narrow(s)); + std::set keys = find_key_codes(map, combo); + + if (!keys.empty()) + { + key_codes.push_back(std::move(keys)); + } } - return dst; + + return key_codes; +} + +std::set PadHandlerBase::find_key_codes(const std::unordered_map& map, const pad::combo& combo) +{ + std::set key_codes; + + for (const std::string& button_name : combo.buttons()) + { + for (const auto& [code, name] : map) + { + if (button_name == name) + { + key_codes.insert(code); + break; + } + } + } + + return key_codes; } -// Get new multiplied value based on the multiplier s32 PadHandlerBase::MultipliedInput(s32 raw_value, s32 multiplier) { return (multiplier * raw_value) / 100; } -// Get new scaled value between 0 and range based on its minimum and maximum f32 PadHandlerBase::ScaledInput(f32 raw_value, f32 minimum, f32 maximum, f32 deadzone, f32 range) { if (deadzone > 0 && deadzone > minimum) @@ -46,7 +69,6 @@ f32 PadHandlerBase::ScaledInput(f32 raw_value, f32 minimum, f32 maximum, f32 dea return range * val; } -// Get new scaled value between -range and range based on its minimum and maximum f32 PadHandlerBase::ScaledAxisInput(f32 raw_value, f32 minimum, f32 maximum, f32 deadzone, f32 range) { // convert [min, max] to [0, 1] @@ -79,7 +101,6 @@ f32 PadHandlerBase::ScaledAxisInput(f32 raw_value, f32 minimum, f32 maximum, f32 return (2.0f * range * val) - range; } -// Get normalized trigger value based on the range defined by a threshold u16 PadHandlerBase::NormalizeTriggerInput(u16 value, u32 threshold) const { if (value <= threshold || threshold >= trigger_max) @@ -90,8 +111,6 @@ u16 PadHandlerBase::NormalizeTriggerInput(u16 value, u32 threshold) const return static_cast(ScaledInput(static_cast(value), static_cast(trigger_min), static_cast(trigger_max), static_cast(threshold))); } -// normalizes a directed input, meaning it will correspond to a single "button" and not an axis with two directions -// the input values must lie in 0+ u16 PadHandlerBase::NormalizeDirectedInput(s32 raw_value, s32 threshold, s32 maximum) const { if (threshold >= maximum || maximum <= 0 || raw_value < 0) @@ -114,9 +133,6 @@ u16 PadHandlerBase::NormalizeStickInput(u16 raw_value, s32 threshold, s32 multip return static_cast(ScaledInput(static_cast(scaled_value), 0.0f, static_cast(thumb_max), static_cast(threshold))); } -// This function normalizes stick deadzone based on the DS3's deadzone, which is ~13% (default of anti deadzone) -// X and Y is expected to be in (-255) to 255 range, deadzone should be in terms of thumb stick range -// return is new x and y values in 0-255 range std::tuple PadHandlerBase::NormalizeStickDeadzone(s32 inX, s32 inY, u32 deadzone, u32 anti_deadzone) const { f32 X = inX / 255.0f; @@ -150,28 +166,21 @@ std::tuple PadHandlerBase::NormalizeStickDeadzone(s32 inX, s32 inY, u3 return std::tuple(ConvertAxis(X), ConvertAxis(Y)); } -// get clamped value between 0 and 255 u16 PadHandlerBase::Clamp0To255(f32 input) { return static_cast(std::clamp(input, 0.0f, 255.0f)); } -// get clamped value between 0 and 1023 u16 PadHandlerBase::Clamp0To1023(f32 input) { return static_cast(std::clamp(input, 0.0f, 1023.0f)); } -// input has to be [-1,1]. result will be [0,255] u16 PadHandlerBase::ConvertAxis(f32 value) { return static_cast((value + 1.0) * (255.0 / 2.0)); } -// The DS3, (and i think xbox controllers) give a 'square-ish' type response, so that the corners will give (almost)max x/y instead of the ~30x30 from a perfect circle -// using a simple scale/sensitivity increase would *work* although it eats a chunk of our usable range in exchange -// this might be the best for now, in practice it seems to push the corners to max of 20x20, with a squircle_factor of ~4000 -// This function assumes inX and inY is already in 0-255 void PadHandlerBase::ConvertToSquirclePoint(u16& inX, u16& inY, u32 squircle_factor) { if (!squircle_factor) @@ -219,7 +228,7 @@ pad_capabilities PadHandlerBase::get_capabilities(const std::string& /*pad_id*/) .has_rumble = b_has_rumble, .has_accel = b_has_motion, .has_gyro = b_has_motion, - .has_pressure_sensitivity = b_has_pressure_intensity_button + .has_pressure_intensity_button = b_has_pressure_intensity_button }; } @@ -243,7 +252,7 @@ cfg_pad* PadHandlerBase::get_config(const std::string& pad_id) return nullptr; } -PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::string& pad_id, const pad_callback& callback, const pad_fail_callback& fail_callback, gui_call_type call_type, const std::vector& /*buttons*/) +PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::string& pad_id, const pad_callback& callback, const pad_fail_callback& fail_callback, gui_call_type call_type, const std::vector& buttons) { if (call_type == gui_call_type::blacklist) blacklist.clear(); @@ -284,12 +293,9 @@ PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::stri // Check for each button in our list if its corresponding (maybe remapped) button or axis was pressed. // Return the new value if the button was pressed (aka. its value was bigger than 0 or the defined threshold) - // Get all the legally pressed buttons and use the one with highest value (prioritize first) - struct - { - u16 value = 0; - std::string name; - } pressed_button{}; + // Get all the legally pressed buttons. We only accept one value per stick though, otherwise it will get messy. + std::map pressed_buttons; + std::array, 2> pressed_sticks{}; for (const auto& [keycode, name] : button_list) { @@ -306,7 +312,9 @@ PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::stri } const bool is_trigger = get_is_left_trigger(device, keycode) || get_is_right_trigger(device, keycode); - const bool is_stick = !is_trigger && (get_is_left_stick(device, keycode) || get_is_right_stick(device, keycode)); + const bool is_left_stick = !is_trigger && get_is_left_stick(device, keycode); + const bool is_right_stick = !is_trigger && !is_left_stick && get_is_right_stick(device, keycode); + const bool is_stick = is_left_stick || is_right_stick; const bool is_touch_motion = !is_trigger && !is_stick && get_is_touch_pad_motion(device, keycode); const bool is_button = !is_trigger && !is_stick && !is_touch_motion; @@ -324,9 +332,27 @@ PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::stri const u16 diff = value > min_value ? value - min_value : 0; - if (diff > button_press_threshold && value > pressed_button.value) + if (diff > button_press_threshold) { - pressed_button = { .value = value, .name = name }; + if (is_left_stick) + { + if (pressed_sticks[0].second < value) + { + pressed_sticks[0] = { name, value }; + } + } + else if (is_right_stick) + { + if (pressed_sticks[1].second < value) + { + pressed_sticks[1] = { name, value }; + } + } + else + { + u16& pressed_value = pressed_buttons[name]; + pressed_value = std::max(pressed_value, value); + } } } } @@ -345,14 +371,11 @@ PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::stri if (callback) { - pad_preview_values preview_values = get_preview_values(data); + pad_preview_values preview_values = get_preview_values(data, buttons); pad_capabilities capabilities = get_capabilities(pad_id); const u32 battery_level = get_battery_level(pad_id); - if (pressed_button.value > 0) - callback(pressed_button.value, pressed_button.name, pad_id, battery_level, std::move(preview_values), std::move(capabilities)); - else - callback(0, "", pad_id, battery_level, std::move(preview_values), std::move(capabilities)); + callback(std::move(pressed_buttons), std::move(pressed_sticks), pad_id, battery_level, std::move(preview_values), std::move(capabilities)); } return status; @@ -412,7 +435,7 @@ void PadHandlerBase::convert_stick_values(u16& x_out, u16& y_out, s32 x_in, s32 } // Update the pad button values based on their type and thresholds. With this you can use axis or triggers as buttons or vice versa -void PadHandlerBase::TranslateButtonPress(const std::shared_ptr& device, u64 keyCode, bool& pressed, u16& val, bool use_stick_multipliers, bool ignore_stick_threshold, bool ignore_trigger_threshold) +void PadHandlerBase::TranslateButtonPress(const std::shared_ptr& device, u32 keyCode, bool& pressed, u16& val, bool use_stick_multipliers, bool ignore_stick_threshold, bool ignore_trigger_threshold) { if (!device || !device->config) { @@ -476,7 +499,7 @@ bool PadHandlerBase::bindPadToDevice(std::shared_ptr pad) return false; } - std::array, button::button_count> mapping = get_mapped_key_codes(pad_device, config); + std::array>, button::button_count> mapping = get_mapped_key_codes(pad_device, config); u32 pclass_profile = 0x0; u32 capabilities = CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE | CELL_PAD_CAPABILITY_HP_ANALOG_STICK | CELL_PAD_CAPABILITY_ACTUATOR | CELL_PAD_CAPABILITY_SENSOR_MODE; @@ -566,69 +589,58 @@ bool PadHandlerBase::bindPadToDevice(std::shared_ptr pad) return true; } -std::array, PadHandlerBase::button::button_count> PadHandlerBase::get_mapped_key_codes(const std::shared_ptr& device, const cfg_pad* cfg) +std::array>, PadHandlerBase::button::button_count> PadHandlerBase::get_mapped_key_codes(const std::shared_ptr& device, const cfg_pad* cfg) { - std::array, button::button_count> mapping{}; + std::array>, button::button_count> mapping{}; if (!device || !cfg) return mapping; - device->trigger_code_left = FindKeyCodes(button_list, cfg->l2); - device->trigger_code_right = FindKeyCodes(button_list, cfg->r2); - device->axis_code_left[0] = FindKeyCodes(button_list, cfg->ls_left); - device->axis_code_left[1] = FindKeyCodes(button_list, cfg->ls_right); - device->axis_code_left[2] = FindKeyCodes(button_list, cfg->ls_down); - device->axis_code_left[3] = FindKeyCodes(button_list, cfg->ls_up); - device->axis_code_right[0] = FindKeyCodes(button_list, cfg->rs_left); - device->axis_code_right[1] = FindKeyCodes(button_list, cfg->rs_right); - device->axis_code_right[2] = FindKeyCodes(button_list, cfg->rs_down); - device->axis_code_right[3] = FindKeyCodes(button_list, cfg->rs_up); + mapping[button::up] = find_key_combos(button_list, cfg->up); + mapping[button::down] = find_key_combos(button_list, cfg->down); + mapping[button::left] = find_key_combos(button_list, cfg->left); + mapping[button::right] = find_key_combos(button_list, cfg->right); + mapping[button::cross] = find_key_combos(button_list, cfg->cross); + mapping[button::square] = find_key_combos(button_list, cfg->square); + mapping[button::circle] = find_key_combos(button_list, cfg->circle); + mapping[button::triangle] = find_key_combos(button_list, cfg->triangle); + mapping[button::start] = find_key_combos(button_list, cfg->start); + mapping[button::select] = find_key_combos(button_list, cfg->select); + mapping[button::l1] = find_key_combos(button_list, cfg->l1); + mapping[button::l2] = find_key_combos(button_list, cfg->l2); + mapping[button::l3] = find_key_combos(button_list, cfg->l3); + mapping[button::r1] = find_key_combos(button_list, cfg->r1); + mapping[button::r2] = find_key_combos(button_list, cfg->r2); + mapping[button::r3] = find_key_combos(button_list, cfg->r3); + mapping[button::ls_left] = find_key_combos(button_list, cfg->ls_left); + mapping[button::ls_right] = find_key_combos(button_list, cfg->ls_right); + mapping[button::ls_down] = find_key_combos(button_list, cfg->ls_down); + mapping[button::ls_up] = find_key_combos(button_list, cfg->ls_up); + mapping[button::rs_left] = find_key_combos(button_list, cfg->rs_left); + mapping[button::rs_right] = find_key_combos(button_list, cfg->rs_right); + mapping[button::rs_down] = find_key_combos(button_list, cfg->rs_down); + mapping[button::rs_up] = find_key_combos(button_list, cfg->rs_up); + mapping[button::ps] = find_key_combos(button_list, cfg->ps); - mapping[button::up] = FindKeyCodes(button_list, cfg->up); - mapping[button::down] = FindKeyCodes(button_list, cfg->down); - mapping[button::left] = FindKeyCodes(button_list, cfg->left); - mapping[button::right] = FindKeyCodes(button_list, cfg->right); - mapping[button::cross] = FindKeyCodes(button_list, cfg->cross); - mapping[button::square] = FindKeyCodes(button_list, cfg->square); - mapping[button::circle] = FindKeyCodes(button_list, cfg->circle); - mapping[button::triangle] = FindKeyCodes(button_list, cfg->triangle); - mapping[button::start] = FindKeyCodes(button_list, cfg->start); - mapping[button::select] = FindKeyCodes(button_list, cfg->select); - mapping[button::l1] = FindKeyCodes(button_list, cfg->l1); - mapping[button::l2] = narrow_set(device->trigger_code_left); - mapping[button::l3] = FindKeyCodes(button_list, cfg->l3); - mapping[button::r1] = FindKeyCodes(button_list, cfg->r1); - mapping[button::r2] = narrow_set(device->trigger_code_right); - mapping[button::r3] = FindKeyCodes(button_list, cfg->r3); - mapping[button::ls_left] = narrow_set(device->axis_code_left[0]); - mapping[button::ls_right] = narrow_set(device->axis_code_left[1]); - mapping[button::ls_down] = narrow_set(device->axis_code_left[2]); - mapping[button::ls_up] = narrow_set(device->axis_code_left[3]); - mapping[button::rs_left] = narrow_set(device->axis_code_right[0]); - mapping[button::rs_right] = narrow_set(device->axis_code_right[1]); - mapping[button::rs_down] = narrow_set(device->axis_code_right[2]); - mapping[button::rs_up] = narrow_set(device->axis_code_right[3]); - mapping[button::ps] = FindKeyCodes(button_list, cfg->ps); - - mapping[button::skateboard_ir_nose] = FindKeyCodes(button_list, cfg->ir_nose); - mapping[button::skateboard_ir_tail] = FindKeyCodes(button_list, cfg->ir_tail); - mapping[button::skateboard_ir_left] = FindKeyCodes(button_list, cfg->ir_left); - mapping[button::skateboard_ir_right] = FindKeyCodes(button_list, cfg->ir_right); - mapping[button::skateboard_tilt_left] = FindKeyCodes(button_list, cfg->tilt_left); - mapping[button::skateboard_tilt_right] = FindKeyCodes(button_list, cfg->tilt_right); + mapping[button::skateboard_ir_nose] = find_key_combos(button_list, cfg->ir_nose); + mapping[button::skateboard_ir_tail] = find_key_combos(button_list, cfg->ir_tail); + mapping[button::skateboard_ir_left] = find_key_combos(button_list, cfg->ir_left); + mapping[button::skateboard_ir_right] = find_key_combos(button_list, cfg->ir_right); + mapping[button::skateboard_tilt_left] = find_key_combos(button_list, cfg->tilt_left); + mapping[button::skateboard_tilt_right] = find_key_combos(button_list, cfg->tilt_right); if (b_has_pressure_intensity_button) { - mapping[button::pressure_intensity_button] = FindKeyCodes(button_list, cfg->pressure_intensity_button); + mapping[button::pressure_intensity_button] = find_key_combos(button_list, cfg->pressure_intensity_button); } if (b_has_analog_limiter_button) { - mapping[button::analog_limiter_button] = FindKeyCodes(button_list, cfg->analog_limiter_button); + mapping[button::analog_limiter_button] = find_key_combos(button_list, cfg->analog_limiter_button); } if (b_has_orientation) { - mapping[button::orientation_reset_button] = FindKeyCodes(button_list, cfg->orientation_reset_button); + mapping[button::orientation_reset_button] = find_key_combos(button_list, cfg->orientation_reset_button); } return mapping; @@ -660,30 +672,46 @@ void PadHandlerBase::get_mapping(const pad_ensemble& binding) bool pressed{}; u16 value{}; - for (u32 code : button.m_key_codes) + // The DS3 Button is considered pressed if any configured button combination is pressed + for (const std::set& combo : button.m_key_combos) { - bool press{}; - u16 val = button_values[code]; + bool combo_pressed = !combo.empty(); + u16 combo_val = 0; - TranslateButtonPress(device, code, press, val, analog_limiter_enabled); - - if (press) + // The button combination is only considered pressed if all the buttons are pressed + for (u32 code : combo) { + bool btn_pressed{}; + u16 btn_val = button_values[code]; + TranslateButtonPress(device, code, btn_pressed, btn_val, analog_limiter_enabled); + + if (btn_pressed == false) + { + combo_pressed = false; + break; + } + // Modify pressure if necessary if the button was pressed if (adjust_pressure) { - val = pad->m_pressure_intensity; + btn_val = pad->m_pressure_intensity; } else if (pressure_intensity_deadzone > 0) { // Ignore triggers, since they have their own deadzones if (!get_is_left_trigger(device, code) && !get_is_right_trigger(device, code)) { - val = NormalizeDirectedInput(val, pressure_intensity_deadzone, 255); + btn_val = NormalizeDirectedInput(btn_val, pressure_intensity_deadzone, 255); } } - value = std::max(value, val); + // Take minimum combo value. Otherwise we will always end up with the max value in case an actual button is part of the combo. + combo_val = (combo_val == 0) ? btn_val : std::min(combo_val, btn_val); + } + + if (combo_pressed) + { + value = std::max(value, combo_val); pressed = value > 0; } } @@ -702,31 +730,44 @@ void PadHandlerBase::get_mapping(const pad_ensemble& binding) u16 val_min{}; u16 val_max{}; - // m_key_codes_min are the mapped keys for left or down - for (u32 key_min : pad->m_sticks[i].m_key_codes_min) + // The DS3 Stick direction is considered pressed if any configured button combination is pressed + const auto get_stick_val = [this, &device, &button_values, &pressed, analog_limiter_enabled](const std::vector>& combos, u16& value) { - u16 val = button_values[key_min]; - - TranslateButtonPress(device, key_min, pressed, val, analog_limiter_enabled, true); - - if (pressed) + for (const std::set& combo : combos) { - val_min = std::max(val_min, val); + bool combo_pressed = !combo.empty(); + u16 combo_val = 0; + + for (u32 key_min : combo) + { + bool btn_pressed{}; + u16 btn_val = button_values[key_min]; + + TranslateButtonPress(device, key_min, btn_pressed, btn_val, analog_limiter_enabled, true); + + if (btn_pressed == false) + { + combo_pressed = false; + break; + } + + // Take minimum combo value. Otherwise we will always end up with the max value in case an actual button is part of the combo. + combo_val = (combo_val == 0) ? btn_val : std::min(combo_val, btn_val); + } + + if (combo_pressed) + { + value = std::max(value, combo_val); + pressed = value > 0; + } } - } + }; - // m_key_codes_max are the mapped keys for right or up - for (u32 key_max : pad->m_sticks[i].m_key_codes_max) - { - u16 val = button_values[key_max]; + // m_key_combos_min are the mapped keys for left or down + get_stick_val(pad->m_sticks[i].m_key_combos_min, val_min); - TranslateButtonPress(device, key_max, pressed, val, analog_limiter_enabled, true); - - if (pressed) - { - val_max = std::max(val_max, val); - } - } + // m_key_combos_max are the mapped keys for right or up + get_stick_val(pad->m_sticks[i].m_key_combos_max, val_max); // cancel out opposing values and get the resulting difference stick_val[i] = val_max - val_min; diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index a27e0bcc50..0f38f0cb3b 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -36,10 +36,6 @@ public: u8 small_motor{0}; bool new_output_data{true}; steady_clock::time_point last_output; - std::set trigger_code_left{}; - std::set trigger_code_right{}; - std::array, 4> axis_code_left{}; - std::array, 4> axis_code_right{}; struct color { @@ -90,16 +86,16 @@ struct pad_capabilities bool has_rumble = false; bool has_accel = false; bool has_gyro = false; - bool has_pressure_sensitivity = false; + bool has_pressure_intensity_button = true; }; using pad_preview_values = std::array; -using pad_callback = std::function; +using pad_callback = std::function&& /*pressed_buttons*/, std::array, 2>&& /*pressed_sticks*/, std::string /*pad_name*/, u32 /*battery_level*/, pad_preview_values&&, pad_capabilities&&)>; using pad_fail_callback = std::function; using motion_preview_values = std::array; -using motion_callback = std::function; -using motion_fail_callback = std::function; +using motion_callback = std::function; +using motion_fail_callback = std::function; class PadHandlerBase { @@ -196,76 +192,11 @@ protected: std::shared_ptr m_pad_for_pad_settings; - static std::set narrow_set(const std::set& src); + // Search an unordered map for a string value and return the found combos + static std::vector> find_key_combos(const std::unordered_map& map, const std::string& cfg_string); - // Search an unordered map for a string value and return found keycode - template - static std::set FindKeyCodes(const std::unordered_map& map, const cfg::string& cfg_string, bool fallback = true) - { - std::set key_codes; - - const std::string& def = cfg_string.def; - const std::vector names = cfg_pad::get_buttons(cfg_string.to_string()); - T def_code = umax; - - for (const std::string& nam : names) - { - for (const auto& [code, name] : map) - { - if (name == nam) - { - key_codes.insert(static_cast(code)); - } - - if (fallback && name == def) - def_code = static_cast(code); - } - } - - if (!key_codes.empty()) - { - return key_codes; - } - - if (fallback) - { - if (!names.empty()) - input_log.error("FindKeyCode for [name = %s] returned with [def_code = %d] for [def = %s]", cfg_string.to_string(), def_code, def); - - if (def_code != umax) - { - return { def_code }; - } - } - - return {}; - } - - // Search an unordered map for a string value and return found keycode - template - static std::set FindKeyCodes(const std::unordered_map& map, const std::vector& names) - { - std::set key_codes; - - for (const std::string& name : names) - { - for (const auto& [code, nam] : map) - { - if (nam == name) - { - key_codes.insert(static_cast(code)); - break; - } - } - } - - if (!key_codes.empty()) - { - return key_codes; - } - - return {}; - } + // Search an unordered map for a combo and return the found key codes + static std::set find_key_codes(const std::unordered_map& map, const pad::combo& combo); // Get normalized trigger value based on the range defined by a threshold u16 NormalizeTriggerInput(u16 value, u32 threshold) const; @@ -274,7 +205,7 @@ protected: // the input values must lie in 0+ u16 NormalizeDirectedInput(s32 raw_value, s32 threshold, s32 maximum) const; - // This function normalizes stick deadzone based on the DS3's deadzone, which is ~13% + // This function normalizes stick deadzone based on the DS3's deadzone, which is ~13% (default of anti deadzone) // X and Y is expected to be in (-255) to 255 range, deadzone should be in terms of thumb stick range // return is new x and y values in 0-255 range std::tuple NormalizeStickDeadzone(s32 inX, s32 inY, u32 deadzone, u32 anti_deadzone) const; @@ -284,10 +215,10 @@ public: // Get new multiplied value based on the multiplier static s32 MultipliedInput(s32 raw_value, s32 multiplier); - // Get new scaled value between 0 and 255 based on its minimum and maximum + // Get new scaled value between 0 and range based on its minimum and maximum static f32 ScaledInput(f32 raw_value, f32 minimum, f32 maximum, f32 deadzone, f32 range = 255.0f); - // Get new scaled value between -255 and 255 based on its minimum and maximum + // Get new scaled value between -range and range based on its minimum and maximum static f32 ScaledAxisInput(f32 raw_value, f32 minimum, f32 maximum, f32 deadzone, f32 range = 255.0f); // get clamped value between 0 and 255 @@ -301,7 +232,7 @@ public: // The DS3, (and i think xbox controllers) give a 'square-ish' type response, so that the corners will give (almost)max x/y instead of the ~30x30 from a perfect circle // using a simple scale/sensitivity increase would *work* although it eats a chunk of our usable range in exchange - // this might be the best for now, in practice it seems to push the corners to max of 20x20, with a squircle_factor of 8000 + // this might be the best for now, in practice it seems to push the corners to max of 20x20, with a squircle_factor of ~4000 // This function assumes inX and inY is already in 0-255 static void ConvertToSquirclePoint(u16& inX, u16& inY, u32 squircle_factor); @@ -375,23 +306,23 @@ public: private: virtual std::shared_ptr get_device(const std::string& /*device*/) { return nullptr; } - virtual bool get_is_left_trigger(const std::shared_ptr& /*device*/, u64 /*keyCode*/) { return false; } - virtual bool get_is_right_trigger(const std::shared_ptr& /*device*/, u64 /*keyCode*/) { return false; } - virtual bool get_is_left_stick(const std::shared_ptr& /*device*/, u64 /*keyCode*/) { return false; } - virtual bool get_is_right_stick(const std::shared_ptr& /*device*/, u64 /*keyCode*/) { return false; } - virtual bool get_is_touch_pad_motion(const std::shared_ptr& /*device*/, u64 /*keyCode*/) { return false; } + virtual bool get_is_left_trigger(const std::shared_ptr& /*device*/, u32 /*keyCode*/) { return false; } + virtual bool get_is_right_trigger(const std::shared_ptr& /*device*/, u32 /*keyCode*/) { return false; } + virtual bool get_is_left_stick(const std::shared_ptr& /*device*/, u32 /*keyCode*/) { return false; } + virtual bool get_is_right_stick(const std::shared_ptr& /*device*/, u32 /*keyCode*/) { return false; } + virtual bool get_is_touch_pad_motion(const std::shared_ptr& /*device*/, u32 /*keyCode*/) { return false; } virtual PadHandlerBase::connection update_connection(const std::shared_ptr& /*device*/) { return connection::disconnected; } virtual void get_extended_info(const pad_ensemble& /*binding*/) {} virtual void apply_pad_data(const pad_ensemble& /*binding*/) {} - virtual std::unordered_map get_button_values(const std::shared_ptr& /*device*/) { return {}; } - virtual pad_preview_values get_preview_values(const std::unordered_map& /*data*/) { return {}; } + virtual std::unordered_map get_button_values(const std::shared_ptr& /*device*/) { return {}; } + virtual pad_preview_values get_preview_values(const std::unordered_map& /*data*/, const std::vector& /*buttons*/){ return {}; } void get_orientation(const pad_ensemble& binding) const; protected: - virtual std::array, PadHandlerBase::button::button_count> get_mapped_key_codes(const std::shared_ptr& device, const cfg_pad* cfg); + virtual std::array>, PadHandlerBase::button::button_count> get_mapped_key_codes(const std::shared_ptr& device, const cfg_pad* cfg); virtual void get_mapping(const pad_ensemble& binding); - void TranslateButtonPress(const std::shared_ptr& device, u64 keyCode, bool& pressed, u16& val, bool use_stick_multipliers, bool ignore_stick_threshold = false, bool ignore_trigger_threshold = false); + void TranslateButtonPress(const std::shared_ptr& device, u32 keyCode, bool& pressed, u16& val, bool use_stick_multipliers, bool ignore_stick_threshold = false, bool ignore_trigger_threshold = false); void init_configs(); cfg_pad* get_config(const std::string& pad_id); diff --git a/rpcs3/Emu/Io/RB3MidiGuitar.cpp b/rpcs3/Emu/Io/RB3MidiGuitar.cpp index 9895722638..1d6d10bb76 100644 --- a/rpcs3/Emu/Io/RB3MidiGuitar.cpp +++ b/rpcs3/Emu/Io/RB3MidiGuitar.cpp @@ -265,7 +265,16 @@ void usb_device_rb3_midi_guitar::parse_midi_message(u8* msg, usz size) // read strings if (size == 8 && msg[0] == 0xF0 && msg[4] == 0x05) { - button_state.string_velocities[msg[5] - 1] = msg[6]; + // if the velocity remains the same, the game does not know that you've just played a string + u8& velocity = ::at32(button_state.string_velocities, msg[5] - 1); + if (msg[6] != 0 && msg[6] == velocity) + { + velocity = msg[6] ^ 1; // to be sure to change the velocity + } + else + { + velocity = msg[6]; + } } // read buttons diff --git a/rpcs3/Emu/Io/TopShotElite.cpp b/rpcs3/Emu/Io/TopShotElite.cpp index c241fe1ed4..ed4042fdaa 100644 --- a/rpcs3/Emu/Io/TopShotElite.cpp +++ b/rpcs3/Emu/Io/TopShotElite.cpp @@ -219,7 +219,7 @@ void usb_device_topshotelite::control_transfer(u8 bmRequestType, u8 bRequest, u1 extern bool is_input_allowed(); -static void set_sensor_pos(struct TopShotElite_data* ts, s32 led_lx, s32 led_ly, s32 led_rx, s32 led_ry, s32 detect_l, s32 detect_r) +static void set_sensor_pos(TopShotElite_data* ts, s32 led_lx, s32 led_ly, s32 led_rx, s32 led_ry, s32 detect_l, s32 detect_r) { ts->led_lx_hi = led_lx >> 2; ts->led_lx_lo = led_lx & 0x3; @@ -250,7 +250,7 @@ void usb_device_topshotelite::interrupt_transfer(u32 buf_size, u8* buf, u32 /*en transfer->expected_result = HC_CC_NOERR; transfer->expected_time = get_timestamp() + 4000; - struct TopShotElite_data ts{}; + TopShotElite_data ts{}; ts.dpad = Dpad_None; ts.stick_lx = ts.stick_ly = ts.stick_rx = ts.stick_ry = 0x7f; if (m_mode) @@ -274,7 +274,7 @@ void usb_device_topshotelite::interrupt_transfer(u32 buf_size, u8* buf, u32 /*en if (m_controller_index >= g_cfg_topshotelite.players.size()) { - topshotelite_log.warning("Top Shot Fearmaster controllers are only supported for Player1 to Player%d", g_cfg_topshotelite.players.size()); + topshotelite_log.warning("Top Shot Elite controllers are only supported for Player1 to Player%d", g_cfg_topshotelite.players.size()); prepare_data(&ts, buf); return; } diff --git a/rpcs3/Emu/Io/TopShotFearmaster.cpp b/rpcs3/Emu/Io/TopShotFearmaster.cpp index eed7ade977..12d56b921c 100644 --- a/rpcs3/Emu/Io/TopShotFearmaster.cpp +++ b/rpcs3/Emu/Io/TopShotFearmaster.cpp @@ -247,7 +247,7 @@ static int get_heartrate_sensor_value(u8 heartrate) return sensor_data[heartrate - 30]; } -static void set_sensor_pos(struct TopShotFearmaster_data* ts, s32 led_lx, s32 led_ly, s32 led_rx, s32 led_ry, s32 detect_l, s32 detect_r) +static void set_sensor_pos(TopShotFearmaster_data* ts, s32 led_lx, s32 led_ly, s32 led_rx, s32 led_ry, s32 detect_l, s32 detect_r) { ts->led_lx_hi = led_lx >> 2; ts->led_lx_lo = led_lx & 0x3; @@ -278,7 +278,7 @@ void usb_device_topshotfearmaster::interrupt_transfer(u32 buf_size, u8* buf, u32 transfer->expected_result = HC_CC_NOERR; transfer->expected_time = get_timestamp() + 4000; - struct TopShotFearmaster_data ts{}; + TopShotFearmaster_data ts{}; ts.dpad = Dpad_None; ts.stick_lx = ts.stick_ly = ts.stick_rx = ts.stick_ry = 0x7f; if (m_mode) diff --git a/rpcs3/Emu/Io/camera_config.cpp b/rpcs3/Emu/Io/camera_config.cpp index f498de72b1..4016447321 100644 --- a/rpcs3/Emu/Io/camera_config.cpp +++ b/rpcs3/Emu/Io/camera_config.cpp @@ -36,32 +36,38 @@ void cfg_camera::save() const } } -cfg_camera::camera_setting cfg_camera::get_camera_setting(std::string_view camera, bool& success) +cfg_camera::camera_setting cfg_camera::get_camera_setting(std::string_view handler, std::string_view camera, bool& success) { - camera_setting setting; - const std::string value = cameras.get_value(camera); + camera_setting setting {}; + const std::string value = cameras.get_value(fmt::format("%s-%s", handler, camera)); success = !value.empty(); if (success) { - setting.from_string(cameras.get_value(camera)); + setting.from_string(value); } return setting; } -void cfg_camera::set_camera_setting(const std::string& camera, const camera_setting& setting) +void cfg_camera::set_camera_setting(std::string_view handler, std::string_view camera, const camera_setting& setting) { + if (handler.empty()) + { + camera_log.error("String '%s' cannot be used as handler key.", handler); + return; + } + if (camera.empty()) { camera_log.error("String '%s' cannot be used as camera key.", camera); return; } - cameras.set_value(camera, setting.to_string()); + cameras.set_value(fmt::format("%s-%s", handler, camera), setting.to_string()); } std::string cfg_camera::camera_setting::to_string() const { - return fmt::format("%d,%d,%f,%f,%d", width, height, min_fps, max_fps, format); + return fmt::format("%d,%d,%f,%f,%d,%d", width, height, min_fps, max_fps, format, colorspace); } void cfg_camera::camera_setting::from_string(std::string_view text) @@ -102,16 +108,19 @@ void cfg_camera::camera_setting::from_string(std::string_view text) return true; }; - if (!to_integer(::at32(list, 0), width) || - !to_integer(::at32(list, 1), height) || - !to_double(::at32(list, 2), min_fps) || - !to_double(::at32(list, 3), max_fps) || - !to_integer(::at32(list, 4), format)) + usz pos = 0; + if (!to_integer(::at32(list, pos++), width) || + !to_integer(::at32(list, pos++), height) || + !to_double(::at32(list, pos++), min_fps) || + !to_double(::at32(list, pos++), max_fps) || + !to_integer(::at32(list, pos++), format) || + !to_integer(::at32(list, pos++), colorspace)) { width = 0; height = 0; min_fps = 0; max_fps = 0; format = 0; + colorspace = 0; } } diff --git a/rpcs3/Emu/Io/camera_config.h b/rpcs3/Emu/Io/camera_config.h index 1c576e32c1..862d87dd63 100644 --- a/rpcs3/Emu/Io/camera_config.h +++ b/rpcs3/Emu/Io/camera_config.h @@ -15,18 +15,20 @@ struct cfg_camera final : cfg::node double min_fps = 0; double max_fps = 0; int format = 0; + int colorspace = 0; - static constexpr u32 member_count = 5; + static constexpr u32 member_count = 6; std::string to_string() const; void from_string(std::string_view text); }; - camera_setting get_camera_setting(std::string_view camera, bool& success); - void set_camera_setting(const std::string& camera, const camera_setting& setting); + + camera_setting get_camera_setting(std::string_view handler, std::string_view camera, bool& success); + void set_camera_setting(std::string_view handler, std::string_view camera, const camera_setting& setting); const std::string path; - cfg::map_entry cameras{ this, "Cameras" }; // : ,,,, + cfg::map_entry cameras{ this, "Cameras" }; // : ,,,,, }; extern cfg_camera g_cfg_camera; diff --git a/rpcs3/Emu/Io/pad_config.cpp b/rpcs3/Emu/Io/pad_config.cpp index 937626076e..7d042bddbc 100644 --- a/rpcs3/Emu/Io/pad_config.cpp +++ b/rpcs3/Emu/Io/pad_config.cpp @@ -5,30 +5,103 @@ extern std::string g_input_config_override; -std::vector cfg_pad::get_buttons(std::string_view str) +std::vector cfg_pad::get_combos(std::string_view button_string) { - std::vector vec = fmt::split(str, {","}); + if (button_string.empty()) + return {}; - // Handle special case: string contains separator itself as configured value - if (str == "," || str.find(",,") != umax) + // Handle special case: string contains separator itself as configured value (it's why I don't use fmt::split here) + const auto split = [](std::string_view str, char sep) { - vec.push_back(","); + std::set buttons; + bool was_sep = true; + usz btn_start = 0ULL; + usz i = 0ULL; + + for (; i < str.size(); i++) + { + const char c = str[i]; + + if (c == sep) + { + if (!was_sep) + { + was_sep = true; + buttons.insert(std::string(str.substr(btn_start, i - btn_start))); + continue; + } + } + + if (was_sep) + { + was_sep = false; + btn_start = i; + } + + if (i == (str.size() - 1)) + { + buttons.insert(std::string(str.substr(btn_start, i - btn_start + 1))); + } + } + + return buttons; + }; + + std::vector combos; + + // Get all combos (seperated by ',') + const std::set combo_strings = split(button_string, ','); + + for (const std::string& combo_string : combo_strings) + { + // Get all keys for this combo (seperated by '&') + std::set combo = split(combo_string, '&'); + if (!combo.empty()) + { + combos.push_back(pad::combo{std::move(combo)}); + } } - // Remove duplicates - std::sort(vec.begin(), vec.end()); - vec.erase(std::unique(vec.begin(), vec.end()), vec.end()); - - return vec; + return combos; } -std::string cfg_pad::get_buttons(std::vector vec) +std::string cfg_pad::get_button_string(std::vector& combos) { - // Remove duplicates - std::sort(vec.begin(), vec.end()); - vec.erase(std::unique(vec.begin(), vec.end()), vec.end()); + std::vector combo_strings; - return fmt::merge(vec, ","); + // Remove duplicates + std::sort(combos.begin(), combos.end()); + combos.erase(std::unique(combos.begin(), combos.end()), combos.end()); + + for (const pad::combo& combo : combos) + { + // Merge all keys for this combo (seperated by '&') + combo_strings.push_back(combo.to_string()); + } + + // Merge combos (seperated by ',') + return fmt::merge(combo_strings, ","); +} + +std::string cfg_pad::make_button_string(const std::unordered_map& button_list, const std::vector>& button_combos) +{ + std::vector combos; + + for (const std::set& button_combo : button_combos) + { + if (button_combo.empty()) continue; + + pad::combo combo {}; + + for (u32 button : button_combo) + { + combo.add_button(::at32(button_list, button)); + } + + combos.push_back(std::move(combo)); + } + + return get_button_string(combos); } u8 cfg_pad::get_motor_speed(VibrateMotor& motor, f32 multiplier) const diff --git a/rpcs3/Emu/Io/pad_config.h b/rpcs3/Emu/Io/pad_config.h index 7dd4bd6323..86779c0859 100644 --- a/rpcs3/Emu/Io/pad_config.h +++ b/rpcs3/Emu/Io/pad_config.h @@ -5,10 +5,47 @@ #include "Utilities/Config.h" #include +#include namespace pad { constexpr static std::string_view keyboard_device_name = "Keyboard"; + + struct combo + { + public: + combo() = default; + combo(std::set buttons) : m_buttons(std::move(buttons)) {} + + const std::set& buttons() const + { + return m_buttons; + } + + void add_button(const std::string& button) + { + if (button.empty()) return; + m_buttons.insert(button); + } + + std::string to_string() const + { + return fmt::merge(m_buttons, "&"); + } + + bool operator==(const combo& other) const + { + return m_buttons == other.m_buttons; + } + + bool operator<(const combo& other) const + { + return m_buttons < other.m_buttons; + } + + private: + std::set m_buttons; + }; } struct cfg_sensor final : cfg::node @@ -25,8 +62,9 @@ struct cfg_pad final : cfg::node cfg_pad() {}; cfg_pad(node* owner, const std::string& name) : cfg::node(owner, name) {} - static std::vector get_buttons(std::string_view str); - static std::string get_buttons(std::vector vec); + static std::vector get_combos(std::string_view button_string); + static std::string get_button_string(std::vector& combos); + static std::string make_button_string(const std::unordered_map& button_list, const std::vector>& button_combos); u8 get_motor_speed(VibrateMotor& motor, f32 multiplier) const; u8 get_large_motor_speed(std::array& motors) const; diff --git a/rpcs3/Emu/Io/pad_types.cpp b/rpcs3/Emu/Io/pad_types.cpp index ad3369a7a7..d5ef26f0d7 100644 --- a/rpcs3/Emu/Io/pad_types.cpp +++ b/rpcs3/Emu/Io/pad_types.cpp @@ -203,7 +203,7 @@ bool Pad::get_analog_limiter_button_active(bool is_toggle_mode, u32 player_id) const Button& analog_limiter_button = m_buttons[m_analog_limiter_button_index]; - if (analog_limiter_button.m_key_codes.empty()) + if (analog_limiter_button.m_key_combos.empty()) { // Active by default if no button was assigned return true; diff --git a/rpcs3/Emu/Io/pad_types.h b/rpcs3/Emu/Io/pad_types.h index 5fd9c8973a..d2b1535a1a 100644 --- a/rpcs3/Emu/Io/pad_types.h +++ b/rpcs3/Emu/Io/pad_types.h @@ -386,18 +386,18 @@ struct Button u16 m_value = 0; bool m_pressed = false; - std::set m_key_codes{}; + std::vector> m_key_combos; - u16 m_actual_value = 0; // only used in keyboard_pad_handler - bool m_analog = false; // only used in keyboard_pad_handler - bool m_trigger = false; // only used in keyboard_pad_handler - std::map m_pressed_keys{}; // only used in keyboard_pad_handler + u16 m_actual_value = 0; // only used in keyboard_pad_handler + bool m_analog = false; // only used in keyboard_pad_handler + bool m_trigger = false; // only used in keyboard_pad_handler + std::map m_pressed_keys; // only used in keyboard_pad_handler Button(){} - Button(u32 offset, std::set key_codes, u32 outKeyCode) + Button(u32 offset, std::vector> key_combos, u32 outKeyCode) : m_offset(offset) , m_outKeyCode(outKeyCode) - , m_key_codes(std::move(key_codes)) + , m_key_combos(std::move(key_combos)) { if (offset == CELL_PAD_BTN_OFFSET_DIGITAL1) { @@ -426,17 +426,19 @@ struct AnalogStick u32 m_offset = 0; u16 m_value = 128; - std::set m_key_codes_min{}; - std::set m_key_codes_max{}; + std::vector> m_key_combos_min; + std::vector> m_key_combos_max; - std::map m_pressed_keys_min{}; // only used in keyboard_pad_handler - std::map m_pressed_keys_max{}; // only used in keyboard_pad_handler + std::map m_pressed_keys_min; // only used in keyboard_pad_handler + std::map m_pressed_keys_max; // only used in keyboard_pad_handler + std::map m_pressed_combos_min; // only used in keyboard_pad_handler + std::map m_pressed_combos_max; // only used in keyboard_pad_handler AnalogStick() {} - AnalogStick(u32 offset, std::set key_codes_min, std::set key_codes_max) + AnalogStick(u32 offset, std::vector> key_combos_min, std::vector> key_combos_max) : m_offset(offset) - , m_key_codes_min(std::move(key_codes_min)) - , m_key_codes_max(std::move(key_codes_max)) + , m_key_combos_min(std::move(key_combos_min)) + , m_key_combos_max(std::move(key_combos_max)) {} }; diff --git a/rpcs3/Emu/Io/ps_move_data.cpp b/rpcs3/Emu/Io/ps_move_data.cpp index 0a167eed39..bf35f26a19 100644 --- a/rpcs3/Emu/Io/ps_move_data.cpp +++ b/rpcs3/Emu/Io/ps_move_data.cpp @@ -24,34 +24,34 @@ void ps_move_data::reset_sensors() angaccel_world = {}; } +ps_move_data::vect<3> ps_move_data::rotate_vector(const vect<4>& q, const vect<3>& v) +{ + const auto cross = [](const vect<3>& a, const vect<3>& b) + { + return vect<3>({ + a.y() * b.z() - a.z() * b.y(), + a.z() * b.x() - a.x() * b.z(), + a.x() * b.y() - a.y() * b.x() + }); + }; + + // q = (x, y, z, w) + const vect<3> q_vec({q.x(), q.y(), q.z()}); + + // t = 2 * cross(q_vec, v) + const vect<3> t = cross(q_vec, v) * 2.0f; + + // v' = v + w * t + cross(q_vec, t) + const vect<3> v_prime = v + t * q.w() + cross(q_vec, t); + + return v_prime; +} + void ps_move_data::update_orientation(f32 delta_time) { if (!delta_time) return; - // Rotate vector v by quaternion q - const auto rotate_vector = [](const vect<4>& q, const vect<3>& v) - { - const vect<4> qv({0.0f, v.x(), v.y(), v.z()}); - const vect<4> q_inv({q.w(), -q.x(), -q.y(), -q.z()}); - - // t = q * v - vect<4> t; - t.w() = -q.x() * qv.x() - q.y() * qv.y() - q.z() * qv.z(); - t.x() = q.w() * qv.x() + q.y() * qv.z() - q.z() * qv.y(); - t.y() = q.w() * qv.y() - q.x() * qv.z() + q.z() * qv.x(); - t.z() = q.w() * qv.z() + q.x() * qv.y() - q.y() * qv.x(); - - // r = t * q_inv - vect<4> r; - r.w() = -t.x() * q_inv.x() - t.y() * q_inv.y() - t.z() * q_inv.z(); - r.x() = t.w() * q_inv.x() + t.y() * q_inv.z() - t.z() * q_inv.y(); - r.y() = t.w() * q_inv.y() - t.x() * q_inv.z() + t.z() * q_inv.x(); - r.z() = t.w() * q_inv.z() + t.x() * q_inv.y() - t.y() * q_inv.x(); - - return vect<3>({r.x(), r.y(), r.z()}); - }; - if constexpr (use_imu_for_velocity) { // Gravity in world frame diff --git a/rpcs3/Emu/Io/ps_move_data.h b/rpcs3/Emu/Io/ps_move_data.h index 1ae30f5c66..2470e47e8c 100644 --- a/rpcs3/Emu/Io/ps_move_data.h +++ b/rpcs3/Emu/Io/ps_move_data.h @@ -15,6 +15,26 @@ struct ps_move_data template const T& operator[](I i) const { return data[i]; } + vect operator*(f32 s) const + { + vect result = *this; + for (int i = 0; i < Size; ++i) + { + result[i] *= s; + } + return result; + } + + vect operator+(const vect& other) const + { + vect result = *this; + for (int i = 0; i < Size; ++i) + { + result[i] += other[i]; + } + return result; + } + T x() const requires (Size >= 1) { return data[0]; } T y() const requires (Size >= 2) { return data[1]; } T z() const requires (Size >= 3) { return data[2]; } @@ -72,4 +92,7 @@ struct ps_move_data void reset_sensors(); void update_orientation(f32 delta_time); void update_velocity(u64 timestamp, be_t pos_world[4]); + + // Rotate vector v by quaternion q + static vect<3> rotate_vector(const vect<4>& q, const vect<3>& v); }; diff --git a/rpcs3/Emu/Io/recording_config.h b/rpcs3/Emu/Io/recording_config.h index 127d24015f..ef73149f5e 100644 --- a/rpcs3/Emu/Io/recording_config.h +++ b/rpcs3/Emu/Io/recording_config.h @@ -13,13 +13,13 @@ struct cfg_recording final : cfg::node node_video(cfg::node* _this) : cfg::node(_this, "Video") {} cfg::uint<0, 60> framerate{this, "Framerate", 30}; - cfg::uint<0, 7680> width{this, "Width", 1280}; - cfg::uint<0, 4320> height{this, "Height", 720}; + cfg::uint<640, 7680> width{this, "Width", 1280}; + cfg::uint<360, 4320> height{this, "Height", 720}; cfg::uint<0, 192> pixel_format{this, "AVPixelFormat", 0}; // AVPixelFormat::AV_PIX_FMT_YUV420P cfg::uint<0, 0xFFFF> video_codec{this, "AVCodecID", 12}; // AVCodecID::AV_CODEC_ID_MPEG4 - cfg::uint<0, 25000000> video_bps{this, "Video Bitrate", 4000000}; - cfg::uint<0, 5> max_b_frames{this, "Max B-Frames", 2}; - cfg::uint<0, 20> gop_size{this, "Group of Pictures Size", 12}; + cfg::uint<1'000'000, 60'000'000> video_bps{this, "Video Bitrate", 4'000'000}; + cfg::uint<0, 3> max_b_frames{this, "Max B-Frames", 2}; + cfg::uint<1, 120> gop_size{this, "Group of Pictures Size", 30}; } video{ this }; @@ -28,7 +28,7 @@ struct cfg_recording final : cfg::node node_audio(cfg::node* _this) : cfg::node(_this, "Audio") {} cfg::uint<0x10000, 0x17000> audio_codec{this, "AVCodecID", 86018}; // AVCodecID::AV_CODEC_ID_AAC - cfg::uint<0, 25000000> audio_bps{this, "Audio Bitrate", 320000}; + cfg::uint<64'000, 320'000> audio_bps{this, "Audio Bitrate", 192'000}; } audio{ this }; diff --git a/rpcs3/Emu/Io/usb_device.cpp b/rpcs3/Emu/Io/usb_device.cpp index 9291805a8c..e78b836595 100644 --- a/rpcs3/Emu/Io/usb_device.cpp +++ b/rpcs3/Emu/Io/usb_device.cpp @@ -40,9 +40,10 @@ bool usb_device::set_configuration(u8 cfg_num) return true; } -bool usb_device::set_interface(u8 int_num) +bool usb_device::set_interface(u8 int_num, u8 alt_num) { current_interface = int_num; + current_altsetting = alt_num; return true; } @@ -141,9 +142,9 @@ bool usb_device_passthrough::set_configuration(u8 cfg_num) return (libusb_set_configuration(lusb_handle, cfg_num) == LIBUSB_SUCCESS); }; -bool usb_device_passthrough::set_interface(u8 int_num) +bool usb_device_passthrough::set_interface(u8 int_num, u8 alt_num) { - usb_device::set_interface(int_num); + usb_device::set_interface(int_num, alt_num); return (libusb_claim_interface(lusb_handle, int_num) == LIBUSB_SUCCESS); } @@ -290,7 +291,7 @@ void usb_device_emulated::control_transfer(u8 bmRequestType, u8 bRequest, u16 wV case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_INTERFACE: // 0x01 switch (bRequest) { - case LIBUSB_REQUEST_SET_INTERFACE: usb_device::set_interface(::narrow(wIndex)); break; + case LIBUSB_REQUEST_SET_INTERFACE: usb_device::set_interface(::narrow(wIndex), ::narrow(wValue)); break; default: sys_usbd.error("Unhandled control transfer(0x%02x): 0x%02x", bmRequestType, bRequest); break; } break; diff --git a/rpcs3/Emu/Io/usb_device.h b/rpcs3/Emu/Io/usb_device.h index 3d60bd36b0..8cd053efe2 100644 --- a/rpcs3/Emu/Io/usb_device.h +++ b/rpcs3/Emu/Io/usb_device.h @@ -86,6 +86,54 @@ struct UsbDeviceHID le_t wDescriptorLength; }; +struct UsbAudioInputTerminal +{ + u8 bDescriptorSubtype; + u8 bTerminalID; + le_t wTerminalType; + u8 bAssocTerminal; + u8 bNrChannels; + le_t wChannelConfig; + u8 iChannelNames; + u8 iTerminal; +}; + +struct UsbAudioOutputTerminal +{ + u8 bDescriptorSubtype; + u8 bTerminalID; + le_t wTerminalType; + u8 bAssocTerminal; + u8 bSourceID; + u8 iTerminal; +}; + +struct UsbAudioInterface +{ + u8 bDescriptorSubtype; + u8 bTerminalLink; + u8 bDelay; + le_t wFormatTag; +}; + +struct UsbAudioEndpoint +{ + u8 bEndpointAddress; + u8 bmAttributes; + le_t wMaxPacketSize; + u8 bInterval; + u8 bRefresh; + u8 bSynchAddress; +}; + +struct UsbAudioStreamingEndpoint +{ + u8 bDescriptorSubtype; + u8 bmAttributes; + u8 bLockDelayUnits; + le_t wLockDelay; +}; + struct UsbTransfer { u32 assigned_number = 0; @@ -183,7 +231,7 @@ public: virtual u32 get_configuration(u8* buf); virtual bool set_configuration(u8 cfg_num); - virtual bool set_interface(u8 int_num); + virtual bool set_interface(u8 int_num, u8 alt_num); virtual void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) = 0; virtual void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) = 0; @@ -198,6 +246,7 @@ public: protected: u8 current_config = 1; u8 current_interface = 0; + u8 current_altsetting = 0; std::array location{}; protected: @@ -214,7 +263,7 @@ public: void read_descriptors() override; u32 get_configuration(u8* buf) override; bool set_configuration(u8 cfg_num) override; - bool set_interface(u8 int_num) override; + bool set_interface(u8 int_num, u8 alt_num) override; void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override; void interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) override; void isochronous_transfer(UsbTransfer* transfer) override; diff --git a/rpcs3/Emu/Io/usb_microphone.cpp b/rpcs3/Emu/Io/usb_microphone.cpp new file mode 100644 index 0000000000..39bf45d91d --- /dev/null +++ b/rpcs3/Emu/Io/usb_microphone.cpp @@ -0,0 +1,690 @@ +#include "stdafx.h" +#include "Emu/system_config.h" +#include "Emu/IdManager.h" +#include "Emu/Io/usb_microphone.h" +#include "Emu/Cell/lv2/sys_usbd.h" +#include "Emu/Cell/Modules/cellMic.h" +#include "Input/pad_thread.h" + +LOG_CHANNEL(usb_mic_log); + +usb_device_mic::usb_device_mic(u32 controller_index, const std::array& location, MicType mic_type) + : usb_device_emulated(location) + , m_controller_index(controller_index) + , m_mic_type(mic_type) + , m_sample_rate(8000) + , m_volume(0, 0) +{ + switch (mic_type) + { + case MicType::SingStar: + { + device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, + UsbDeviceDescriptor { + .bcdUSB = 0x0110, + .bDeviceClass = 0x00, + .bDeviceSubClass = 0x00, + .bDeviceProtocol = 0x00, + .bMaxPacketSize0 = 0x08, + .idVendor = 0x1415, + .idProduct = 0x0000, + .bcdDevice = 0x0001, + .iManufacturer = 0x01, + .iProduct = 0x02, + .iSerialNumber = 0x00, + .bNumConfigurations = 0x01}); + auto& config0 = device.add_node(UsbDescriptorNode(USB_DESCRIPTOR_CONFIG, + UsbDeviceConfiguration { + .wTotalLength = 0x00b1, + .bNumInterfaces = 0x02, + .bConfigurationValue = 0x01, + .iConfiguration = 0x00, + .bmAttributes = 0x80, + .bMaxPower = 0x2d})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x00, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x01, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + + static constexpr u8 audio_if0_header[] = { + 0x09, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x01, // bDescriptorSubtype (CS_INTERFACE -> HEADER) + 0x00, 0x01, // bcdADC 1.00 + 0x28, 0x00, // wTotalLength 36 + 0x01, // binCollection 0x01 + 0x01, // baInterfaceNr 1 + }; + config0.add_node(UsbDescriptorNode(audio_if0_header[0], audio_if0_header[1], &audio_if0_header[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInputTerminal { + .bDescriptorSubtype = 0x02, // INPUT_TERMINAL + .bTerminalID = 0x01, + .wTerminalType = 0x0201, // Microphone + .bAssocTerminal = 0x02, + .bNrChannels = 0x02, + .wChannelConfig = 0x0003, + .iChannelNames = 0x00, + .iTerminal = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioOutputTerminal { + .bDescriptorSubtype = 0x03, // OUTPUT_TERMINAL + .bTerminalID = 0x02, + .wTerminalType = 0x0101, // USB Streaming + .bAssocTerminal = 0x01, + .bSourceID = 0x03, + .iTerminal = 0x00})); + + static constexpr u8 audio_if0_feature[] = { + 0x0A, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x06, // bDescriptorSubtype (CS_INTERFACE -> FEATURE_UNIT) + 0x03, // bUnitID + 0x01, // bSourceID + 0x01, // bControlSize 1 + 0x01, 0x02, // bmaControls[0] (Mute,Volume) + 0x02, 0x00, // bmaControls[1] (Volume,None) + }; + config0.add_node(UsbDescriptorNode(audio_if0_feature[0], audio_if0_feature[1], &audio_if0_feature[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x01, + .bNumEndpoints = 0x01, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInterface { + .bDescriptorSubtype = 0x01, // AS_GENERAL + .bTerminalLink = 0x02, + .bDelay = 0x01, + .wFormatTag = 0x0001})); + + static constexpr u8 audio_if1_alt1_type[] = { + 0x17, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x02, // bDescriptorSubtype (CS_INTERFACE -> FORMAT_TYPE) + 0x01, // bFormatType 1 + 0x01, // bNrChannels (Mono) + 0x02, // bSubFrameSize 2 + 0x10, // bBitResolution 16 + 0x05, // bSamFreqType 5 + 0x40, 0x1F, 0x00, // tSamFreq[1] 8000 Hz + 0x11, 0x2B, 0x00, // tSamFreq[2] 11025 Hz + 0x22, 0x56, 0x00, // tSamFreq[3] 22050 Hz + 0x44, 0xAC, 0x00, // tSamFreq[4] 44100 Hz + 0x80, 0xBB, 0x00, // tSamFreq[5] 48000 Hz + }; + config0.add_node(UsbDescriptorNode(audio_if1_alt1_type[0], audio_if1_alt1_type[1], &audio_if1_alt1_type[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, + UsbAudioEndpoint { + .bEndpointAddress = 0x81, + .bmAttributes = 0x05, + .wMaxPacketSize = 0x0064, + .bInterval = 0x01, + .bRefresh = 0x00, + .bSynchAddress = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT_ASI, + UsbAudioStreamingEndpoint { + .bDescriptorSubtype = 0x01, // EP_GENERAL + .bmAttributes = 0x01, // Sampling Freq Control + .bLockDelayUnits = 0x00, + .wLockDelay = 0x0000})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x02, + .bNumEndpoints = 0x01, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInterface { + .bDescriptorSubtype = 0x01, // AS_GENERAL + .bTerminalLink = 0x02, + .bDelay = 0x01, + .wFormatTag = 0x0001})); + + static constexpr u8 audio_if1_alt2_type[] = { + 0x17, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x02, // bDescriptorSubtype (CS_INTERFACE -> FORMAT_TYPE) + 0x01, // bFormatType 1 + 0x02, // bNrChannels (Stereo) + 0x02, // bSubFrameSize 2 + 0x10, // bBitResolution 16 + 0x05, // bSamFreqType 5 + 0x40, 0x1F, 0x00, // tSamFreq[1] 8000 Hz + 0x11, 0x2B, 0x00, // tSamFreq[2] 11025 Hz + 0x22, 0x56, 0x00, // tSamFreq[3] 22050 Hz + 0x44, 0xAC, 0x00, // tSamFreq[4] 44100 Hz + 0x80, 0xBB, 0x00, // tSamFreq[5] 48000 Hz + }; + config0.add_node(UsbDescriptorNode(audio_if1_alt2_type[0], audio_if1_alt2_type[1], &audio_if1_alt2_type[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, + UsbAudioEndpoint { + .bEndpointAddress = 0x81, + .bmAttributes = 0x05, + .wMaxPacketSize = 0x00c8, + .bInterval = 0x01, + .bRefresh = 0x00, + .bSynchAddress = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT_ASI, + UsbAudioStreamingEndpoint { + .bDescriptorSubtype = 0x01, // EP_GENERAL + .bmAttributes = 0x01, // Sampling Freq Control + .bLockDelayUnits = 0x00, + .wLockDelay = 0x0000})); + + add_string("Nam Tai E&E Products Ltd."); + add_string("USBMIC Serial# 012345678"); + break; + } + case MicType::Logitech: + { + device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, + UsbDeviceDescriptor { + .bcdUSB = 0x0200, + .bDeviceClass = 0x00, + .bDeviceSubClass = 0x00, + .bDeviceProtocol = 0x00, + .bMaxPacketSize0 = 0x08, + .idVendor = 0x046d, + .idProduct = 0x0a03, + .bcdDevice = 0x0102, + .iManufacturer = 0x01, + .iProduct = 0x02, + .iSerialNumber = 0x00, + .bNumConfigurations = 0x01}); + auto& config0 = device.add_node(UsbDescriptorNode(USB_DESCRIPTOR_CONFIG, + UsbDeviceConfiguration { + .wTotalLength = 0x0079, + .bNumInterfaces = 0x02, + .bConfigurationValue = 0x01, + .iConfiguration = 0x03, + .bmAttributes = 0x80, + .bMaxPower = 0x1e})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x00, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x01, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + + static constexpr u8 audio_if0_header[] = { + 0x09, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x01, // bDescriptorSubtype (CS_INTERFACE -> HEADER) + 0x00, 0x01, // bcdADC 1.00 + 0x27, 0x00, // wTotalLength 39 + 0x01, // binCollection 0x01 + 0x01, // baInterfaceNr 1 + }; + config0.add_node(UsbDescriptorNode(audio_if0_header[0], audio_if0_header[1], &audio_if0_header[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInputTerminal { + .bDescriptorSubtype = 0x02, // INPUT_TERMINAL + .bTerminalID = 0x0d, + .wTerminalType = 0x0201, // Microphone + .bAssocTerminal = 0x00, + .bNrChannels = 0x01, + .wChannelConfig = 0x0000, + .iChannelNames = 0x00, + .iTerminal = 0x00})); + static constexpr u8 audio_if0_feature[] = { + 0x09, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x06, // bDescriptorSubtype (CS_INTERFACE -> FEATURE_UNIT) + 0x02, // bUnitID + 0x0d, // bSourceID + 0x01, // bControlSize 1 + 0x03, // bmaControls[0] (Mute,Volume) + 0x00, // bmaControls[1] (None) + 0x00, // iFeature + }; + config0.add_node(UsbDescriptorNode(audio_if0_feature[0], audio_if0_feature[1], &audio_if0_feature[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioOutputTerminal { + .bDescriptorSubtype = 0x03, // OUTPUT_TERMINAL + .bTerminalID = 0x0a, + .wTerminalType = 0x0101, // USB Streaming + .bAssocTerminal = 0x00, + .bSourceID = 0x02, + .iTerminal = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x01, + .bNumEndpoints = 0x01, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInterface { + .bDescriptorSubtype = 0x01, // AS_GENERAL + .bTerminalLink = 0x0a, + .bDelay = 0x00, + .wFormatTag = 0x0001})); + + static constexpr u8 audio_if1_alt1_type[] = { + 0x17, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x02, // bDescriptorSubtype (CS_INTERFACE -> FORMAT_TYPE) + 0x01, // bFormatType 1 + 0x01, // bNrChannels (Mono) + 0x02, // bSubFrameSize 2 + 0x10, // bBitResolution 16 + 0x05, // bSamFreqType 5 + 0x40, 0x1F, 0x00, // tSamFreq[1] 8000 Hz + 0x11, 0x2B, 0x00, // tSamFreq[2] 11025 Hz + 0x22, 0x56, 0x00, // tSamFreq[4] 22050 Hz + 0x44, 0xAC, 0x00, // tSamFreq[6] 44100 Hz + 0x80, 0xBB, 0x00, // tSamFreq[7] 48000 Hz + }; + config0.add_node(UsbDescriptorNode(audio_if1_alt1_type[0], audio_if1_alt1_type[1], &audio_if1_alt1_type[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, + UsbAudioEndpoint { + .bEndpointAddress = 0x84, + .bmAttributes = 0x0d, + .wMaxPacketSize = 0x0060, + .bInterval = 0x01, + .bRefresh = 0x00, + .bSynchAddress = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT_ASI, + UsbAudioStreamingEndpoint { + .bDescriptorSubtype = 0x01, // EP_GENERAL + .bmAttributes = 0x01, // Sampling Freq Control + .bLockDelayUnits = 0x02, + .wLockDelay = 0x0001})); + + add_string("Logitech"); + add_string("Logitech USB Microphone"); + break; + } + case MicType::Rocksmith: + { + device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, + UsbDeviceDescriptor { + .bcdUSB = 0x0110, + .bDeviceClass = 0x00, + .bDeviceSubClass = 0x00, + .bDeviceProtocol = 0x00, + .bMaxPacketSize0 = 0x10, + .idVendor = 0x12ba, + .idProduct = 0x00ff, + .bcdDevice = 0x0100, + .iManufacturer = 0x01, + .iProduct = 0x02, + .iSerialNumber = 0x00, + .bNumConfigurations = 0x01}); + auto& config0 = device.add_node(UsbDescriptorNode(USB_DESCRIPTOR_CONFIG, + UsbDeviceConfiguration { + .wTotalLength = 0x0098, + .bNumInterfaces = 0x03, + .bConfigurationValue = 0x01, + .iConfiguration = 0x00, + .bmAttributes = 0x80, + .bMaxPower = 0x32})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x00, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x01, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + + static constexpr u8 audio_if0_header[] = { + 0x09, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x01, // bDescriptorSubtype (CS_INTERFACE -> HEADER) + 0x00, 0x01, // bcdADC 1.00 + 0x27, 0x00, // wTotalLength 39 + 0x01, // binCollection 0x01 + 0x01, // baInterfaceNr 1 + }; + config0.add_node(UsbDescriptorNode(audio_if0_header[0], audio_if0_header[1], &audio_if0_header[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInputTerminal { + .bDescriptorSubtype = 0x02, // INPUT_TERMINAL + .bTerminalID = 0x02, + .wTerminalType = 0x0201, // Microphone + .bAssocTerminal = 0x00, + .bNrChannels = 0x01, + .wChannelConfig = 0x0001, + .iChannelNames = 0x00, + .iTerminal = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioOutputTerminal { + .bDescriptorSubtype = 0x03, // OUTPUT_TERMINAL + .bTerminalID = 0x07, + .wTerminalType = 0x0101, // USB Streaming + .bAssocTerminal = 0x00, + .bSourceID = 0x0a, + .iTerminal = 0x00})); + + static constexpr u8 audio_if0_feature[] = { + 0x09, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x06, // bDescriptorSubtype (CS_INTERFACE -> FEATURE_UNIT) + 0x0a, // bUnitID + 0x02, // bSourceID + 0x01, // bControlSize 1 + 0x03, // bmaControls[0] (Mute,Volume) + 0x00, // bmaControls[1] (None) + 0x00, // iFeature + }; + config0.add_node(UsbDescriptorNode(audio_if0_feature[0], audio_if0_feature[1], &audio_if0_feature[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x01, + .bAlternateSetting = 0x01, + .bNumEndpoints = 0x01, + .bInterfaceClass = 0x01, + .bInterfaceSubClass = 0x02, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ACI, + UsbAudioInterface { + .bDescriptorSubtype = 0x01, // AS_GENERAL + .bTerminalLink = 0x07, + .bDelay = 0x01, + .wFormatTag = 0x0001})); + + static constexpr u8 audio_if1_alt1_type[] = { + 0x1d, // bLength + 0x24, // bDescriptorType (See Next Line) + 0x02, // bDescriptorSubtype (CS_INTERFACE -> FORMAT_TYPE) + 0x01, // bFormatType 1 + 0x01, // bNrChannels (Mono) + 0x02, // bSubFrameSize 2 + 0x10, // bBitResolution 16 + 0x07, // bSamFreqType 5 + 0x40, 0x1F, 0x00, // tSamFreq[1] 8000 Hz + 0x11, 0x2B, 0x00, // tSamFreq[2] 11025 Hz + 0x80, 0x3e, 0x00, // tSamFreq[3] 16000 Hz + 0x22, 0x56, 0x00, // tSamFreq[4] 22050 Hz + 0x00, 0x7d, 0x00, // tSamFreq[5] 32000 Hz + 0x44, 0xAC, 0x00, // tSamFreq[6] 44100 Hz + 0x80, 0xBB, 0x00, // tSamFreq[7] 48000 Hz + }; + config0.add_node(UsbDescriptorNode(audio_if1_alt1_type[0], audio_if1_alt1_type[1], &audio_if1_alt1_type[2])); + + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, + UsbAudioEndpoint { + .bEndpointAddress = 0x82, + .bmAttributes = 0x0d, + .wMaxPacketSize = 0x0064, + .bInterval = 0x01, + .bRefresh = 0x00, + .bSynchAddress = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT_ASI, + UsbAudioStreamingEndpoint { + .bDescriptorSubtype = 0x01, // EP_GENERAL + .bmAttributes = 0x01, // Sampling Freq Control + .bLockDelayUnits = 0x00, + .wLockDelay = 0x0000})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_INTERFACE, + UsbDeviceInterface { + .bInterfaceNumber = 0x02, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x01, + .bInterfaceClass = 0x03, + .bInterfaceSubClass = 0x00, + .bInterfaceProtocol = 0x00, + .iInterface = 0x00})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_HID, + UsbDeviceHID { + .bcdHID = 0x0111, + .bCountryCode = 0x00, + .bNumDescriptors = 0x01, + .bDescriptorType = 0x22, + .wDescriptorLength = 0x001a})); + config0.add_node(UsbDescriptorNode(USB_DESCRIPTOR_ENDPOINT, + UsbDeviceEndpoint { + .bEndpointAddress = 0x87, + .bmAttributes = 0x03, + .wMaxPacketSize = 0x0010, + .bInterval = 0x01})); + + add_string("Hercules."); + add_string("Rocksmith USB Guitar Adapter"); + break; + } + } +} + +std::shared_ptr usb_device_mic::make_singstar(u32 controller_index, const std::array& location) +{ + return std::make_shared(controller_index, location, MicType::SingStar); +} + +std::shared_ptr usb_device_mic::make_logitech(u32 controller_index, const std::array& location) +{ + return std::make_shared(controller_index, location, MicType::Logitech); +} + +std::shared_ptr usb_device_mic::make_rocksmith(u32 controller_index, const std::array& location) +{ + return std::make_shared(controller_index, location, MicType::Rocksmith); +} + +u16 usb_device_mic::get_num_emu_devices() +{ + return 1; +} + +void usb_device_mic::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) +{ + transfer->fake = true; + transfer->expected_count = buf_size; + transfer->expected_result = HC_CC_NOERR; + transfer->expected_time = get_timestamp() + 1000; + + switch (bmRequestType) + { + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE: // 0x21 + switch (bRequest) + { + case SET_CUR: + { + ensure(buf_size >= 2); + const u8 ch = wValue & 0xff; + if (ch == 0) + { + m_volume[0] = (buf[1] << 8) | buf[0]; + m_volume[1] = (buf[1] << 8) | buf[0]; + usb_mic_log.notice("Set Cur Volume[%d]: 0x%04x (%d dB)", ch, m_volume[0], m_volume[0] / 256); + } + else if (ch == 1) + { + m_volume[0] = (buf[1] << 8) | buf[0]; + usb_mic_log.notice("Set Cur Volume[%d]: 0x%04x (%d dB)", ch, m_volume[0], m_volume[0] / 256); + } + else if (ch == 2) + { + m_volume[1] = (buf[1] << 8) | buf[0]; + usb_mic_log.notice("Set Cur Volume[%d]: 0x%04x (%d dB)", ch, m_volume[1], m_volume[1] / 256); + } + break; + } + default: + usb_mic_log.error("Unhandled Request: 0x%02X/0x%02X", bmRequestType, bRequest); + break; + } + break; + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_ENDPOINT: // 0x22 + switch (bRequest) + { + case SET_CUR: + ensure(buf_size >= 3); + m_sample_rate = (buf[2] << 16) | (buf[1] << 8) | buf[0]; + usb_mic_log.notice("Set Sample Rate: %d", m_sample_rate); + break; + default: + usb_mic_log.error("Unhandled Request: 0x%02X/0x%02X", bmRequestType, bRequest); + break; + } + break; + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE: // 0xa1 + switch (bRequest) + { + case GET_CUR: + { + ensure(buf_size >= 2); + const u8 ch = wValue & 0xff; + if (ch == 2) + { + buf[0] = (m_volume[1] ) & 0xff; + buf[1] = (m_volume[1] >> 8) & 0xff; + usb_mic_log.notice("Get Cur Volume[%d]: 0x%04x (%d dB)", ch, m_volume[1], m_volume[1] / 256); + } + else + { + buf[0] = (m_volume[0] ) & 0xff; + buf[1] = (m_volume[0] >> 8) & 0xff; + usb_mic_log.notice("Get Cur Volume[%d]: 0x%04x (%d dB)", ch, m_volume[0], m_volume[0] / 256); + } + break; + } + case GET_MIN: + { + ensure(buf_size >= 2); + constexpr s16 minVol = -256; + buf[0] = (minVol ) & 0xff; + buf[1] = (minVol >> 8) & 0xff; + usb_mic_log.notice("Get Min Volume: 0x%04x (%d dB)", minVol, minVol / 256); + break; + } + case GET_MAX: + { + ensure(buf_size >= 2); + constexpr s16 maxVol = 256; + buf[0] = (maxVol ) & 0xff; + buf[1] = (maxVol >> 8) & 0xff; + usb_mic_log.notice("Get Max Volume: 0x%04x (%d dB)", maxVol, maxVol / 256); + break; + } + default: + usb_mic_log.error("Unhandled Request: 0x%02X/0x%02X", bmRequestType, bRequest); + break; + } + break; + case 0U /*silences warning*/ | LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_ENDPOINT: // 0xa2 + switch (bRequest) + { + case GET_CUR: + ensure(buf_size >= 3); + buf[0] = (m_sample_rate ) & 0xff; + buf[1] = (m_sample_rate >> 8) & 0xff; + buf[2] = (m_sample_rate >> 16) & 0xff; + usb_mic_log.notice("Get Sample Rate: %d", m_sample_rate); + break; + default: + usb_mic_log.error("Unhandled Request: 0x%02X/0x%02X", bmRequestType, bRequest); + break; + } + break; + default: + usb_device_emulated::control_transfer(bmRequestType, bRequest, wValue, wIndex, wLength, buf_size, buf, transfer); + break; + } + + usb_mic_log.trace("control_transfer: req=0x%02X/0x%02X, val=0x%02x, idx=0x%02x, len=0x%02x, [%s]", + bmRequestType, bRequest, wValue, wIndex, wLength, fmt::buf_to_hexstring(buf, buf_size)); +} + +void usb_device_mic::isochronous_transfer(UsbTransfer* transfer) +{ + transfer->fake = true; + transfer->expected_count = 0; + transfer->expected_result = HC_CC_NOERR; + transfer->expected_time = get_timestamp() + 1000; + + const bool stereo = (m_mic_type == MicType::SingStar && current_altsetting == 2); + + auto& mic_thr = g_fxo->get(); + const std::lock_guard lock(mic_thr.mutex); + if (!mic_thr.init) + { + usb_mic_log.notice("mic init"); + mic_thr.load_config_and_init(); + mic_thr.init = 1; + } + if (!mic_thr.check_device(0)) + { + usb_mic_log.notice("mic check"); + } + microphone_device& device = ::at32(mic_thr.mic_list, 0); + if (!device.is_opened()) + { + usb_mic_log.notice("mic open"); + device.open_microphone(CELLMIC_SIGTYPE_RAW, m_sample_rate, m_sample_rate, stereo ? 2 : 1); + } + if (!device.is_started()) + { + usb_mic_log.notice("mic start"); + device.start_microphone(); + } + + u8* buf = static_cast(transfer->iso_request.buf.get_ptr()); + for (u32 index = 0; index < transfer->iso_request.num_packets; index++) + { + const u16 inlen = transfer->iso_request.packets[index] >> 4; + ensure(inlen >= (stereo ? 192 : 96)); + const u32 outlen = device.read_raw(buf, stereo ? 192 : 96); + buf += outlen; + transfer->iso_request.packets[index] = (outlen & 0xFFF) << 4; + usb_mic_log.trace(" isochronous_transfer: dev=%d, buf=0x%x, start=0x%x, pks=0x%x idx=0x%x, inlen=0x%x, outlen=0x%x", + static_cast(m_mic_type), transfer->iso_request.buf, transfer->iso_request.start_frame, transfer->iso_request.num_packets, index, inlen, outlen); + } +} diff --git a/rpcs3/Emu/Io/usb_microphone.h b/rpcs3/Emu/Io/usb_microphone.h new file mode 100644 index 0000000000..d8819a099b --- /dev/null +++ b/rpcs3/Emu/Io/usb_microphone.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Emu/Io/usb_device.h" + +enum class MicType +{ + SingStar, + Logitech, + Rocksmith, +}; + +enum +{ + SET_CUR = 0x01, + GET_CUR = 0x81, + SET_MIN = 0x02, + GET_MIN = 0x82, + SET_MAX = 0x03, + GET_MAX = 0x83, +}; + +class usb_device_mic : public usb_device_emulated +{ +public: + usb_device_mic(u32 controller_index, const std::array& location, MicType mic_type); + + static std::shared_ptr make_singstar(u32 controller_index, const std::array& location); + static std::shared_ptr make_logitech(u32 controller_index, const std::array& location); + static std::shared_ptr make_rocksmith(u32 controller_index, const std::array& location); + static u16 get_num_emu_devices(); + + void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override; + void isochronous_transfer(UsbTransfer* transfer) override; + +private: + u32 m_controller_index; + MicType m_mic_type; + u32 m_sample_rate; + s16 m_volume[2]; +}; diff --git a/rpcs3/Emu/NP/clans_client.cpp b/rpcs3/Emu/NP/clans_client.cpp index 7883901476..c529d5ea38 100644 --- a/rpcs3/Emu/NP/clans_client.cpp +++ b/rpcs3/Emu/NP/clans_client.cpp @@ -128,18 +128,12 @@ void fmt_class_string::format(std::string& out, u64 arg namespace clan { - struct curl_memory - { - char* response; - size_t size; - }; - size_t clans_client::curl_write_callback(void* data, size_t size, size_t nmemb, void* clientp) { - size_t realsize = size * nmemb; + const size_t realsize = size * nmemb; std::vector* mem = static_cast*>(clientp); - size_t old_size = mem->size(); + const size_t old_size = mem->size(); mem->resize(old_size + realsize); memcpy(mem->data() + old_size, data, realsize); @@ -169,11 +163,11 @@ namespace clan CURL* curl = nullptr; // TODO: this was arbitrarily chosen -- see if there's a real amount - static const u32 SCE_NP_CLANS_MAX_CTX_NUM = 16; - - static const u32 id_base = 0xA001; - static const u32 id_step = 1; - static const u32 id_count = SCE_NP_CLANS_MAX_CTX_NUM; + static constexpr u32 SCE_NP_CLANS_MAX_CTX_NUM = 16; + + static constexpr u32 id_base = 0xA001; + static constexpr u32 id_step = 1; + static constexpr u32 id_count = SCE_NP_CLANS_MAX_CTX_NUM; SAVESTATE_INIT_POS(55); }; @@ -187,7 +181,7 @@ namespace clan idm::clear(); } - SceNpClansError clans_client::create_request(s32* req_id) + SceNpClansError clans_client::create_request(s32& req_id) { if (!g_cfg.net.clans_enabled) { @@ -201,14 +195,14 @@ namespace clan return SceNpClansError::SCE_NP_CLANS_ERROR_EXCEEDS_MAX; } - auto ctx = idm::get_unlocked(id); + const auto ctx = idm::get_unlocked(id); if (!ctx || !ctx->curl) { idm::remove(id); return SceNpClansError::SCE_NP_CLANS_ERROR_NOT_INITIALIZED; } - *req_id = id; + req_id = id; return SceNpClansError::SCE_NP_CLANS_SUCCESS; } @@ -221,7 +215,7 @@ namespace clan return SceNpClansError::SCE_NP_CLANS_ERROR_INVALID_ARGUMENT; } - SceNpClansError clans_client::send_request(u32 req_id, ClanRequestAction action, ClanManagerOperationType op_type, pugi::xml_document* xml_body, pugi::xml_document* out_response) + SceNpClansError clans_client::send_request(u32 req_id, ClanRequestAction action, ClanManagerOperationType op_type, const pugi::xml_document& xml_body, pugi::xml_document& out_response) { auto ctx = idm::get_unlocked(req_id); @@ -231,20 +225,20 @@ namespace clan CURL* curl = ctx->curl; ClanRequestType req_type = ClanRequestType::FUNC; - pugi::xml_node clan = xml_body->child("clan"); + const pugi::xml_node clan = xml_body.child("clan"); if (clan && clan.child("ticket")) { req_type = ClanRequestType::SEC; } - std::string host = g_cfg_clans.get_host(); - std::string protocol = g_cfg_clans.get_use_https() ? "https" : "http"; - std::string url = fmt::format("%s://%s/clan_manager_%s/%s/%s", protocol, host, op_type, req_type, action); + const std::string host = g_cfg_clans.get_host(); + const std::string protocol = g_cfg_clans.get_use_https() ? "https" : "http"; + const std::string url = fmt::format("%s://%s/clan_manager_%s/%s/%s", protocol, host, op_type, req_type, action); std::ostringstream oss; - xml_body->save(oss, "\t", 8U); + xml_body.save(oss, "\t", 8U); - std::string xml = oss.str(); + const std::string xml = oss.str(); char err_buf[CURL_ERROR_SIZE]; err_buf[0] = '\0'; @@ -264,11 +258,10 @@ namespace clan curl_easy_setopt(curl, CURLOPT_POSTFIELDS, xml.c_str()); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, xml.size()); - CURLcode res = curl_easy_perform(curl); + const CURLcode res = curl_easy_perform(curl); if (res != CURLE_OK) { - out_response = nullptr; clan_log.error("curl_easy_perform() failed: %s", curl_easy_strerror(res)); clan_log.error("Error buffer: %s", err_buf); return SCE_NP_CLANS_ERROR_BAD_REQUEST; @@ -276,22 +269,22 @@ namespace clan response_buffer.push_back('\0'); - pugi::xml_parse_result xml_res = out_response->load_string(response_buffer.data()); + const pugi::xml_parse_result xml_res = out_response.load_string(response_buffer.data()); if (!xml_res) { clan_log.error("XML parsing failed: %s", xml_res.description()); return SCE_NP_CLANS_ERROR_BAD_RESPONSE; } - pugi::xml_node clan_result = out_response->child("clan"); + const pugi::xml_node clan_result = out_response.child("clan"); if (!clan_result) return SCE_NP_CLANS_ERROR_BAD_RESPONSE; - pugi::xml_attribute result = clan_result.attribute("result"); + const pugi::xml_attribute result = clan_result.attribute("result"); if (!result) return SCE_NP_CLANS_ERROR_BAD_RESPONSE; - std::string result_str = result.as_string(); + const std::string result_str = result.as_string(); if (result_str != "00") return static_cast(0x80022800 | std::stoul(result_str, nullptr, 16)); @@ -331,16 +324,16 @@ namespace clan std::vector ticket_bytes(1024); uint32_t ticket_size = UINT32_MAX; - Base64_Encode_NoNl(clan_ticket.data(), clan_ticket.size(), ticket_bytes.data(), &ticket_size); - std::string ticket_str = std::string(reinterpret_cast(ticket_bytes.data()), ticket_size); + Base64_Encode_NoNl(clan_ticket.data(), static_cast(clan_ticket.size()), ticket_bytes.data(), &ticket_size); + const std::string ticket_str = std::string(reinterpret_cast(ticket_bytes.data()), ticket_size); return ticket_str; } #pragma region Outgoing API Requests - SceNpClansError clans_client::get_clan_list(np::np_handler& nph, u32 req_id, SceNpClansPagingRequest* paging, SceNpClansEntry* clan_list, SceNpClansPagingResult* page_result) + SceNpClansError clans_client::get_clan_list(np::np_handler& nph, u32 req_id, const SceNpClansPagingRequest& paging, std::vector& clan_list, SceNpClansPagingResult& page_result) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -348,47 +341,47 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); - clan.append_child("start").text().set(paging->startPos); - clan.append_child("max").text().set(paging->max); + clan.append_child("start").text().set(paging.startPos); + clan.append_child("max").text().set(paging.max); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetClanList, ClanManagerOperationType::VIEW, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetClanList, ClanManagerOperationType::VIEW, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node list = clan_result.child("list"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node list = clan_result.child("list"); - pugi::xml_attribute results = list.attribute("results"); - uint32_t results_count = results.as_uint(); + const pugi::xml_attribute results = list.attribute("results"); + const uint32_t results_count = results.as_uint(); - pugi::xml_attribute total = list.attribute("total"); - uint32_t total_count = total.as_uint(); + const pugi::xml_attribute total = list.attribute("total"); + const uint32_t total_count = total.as_uint(); int i = 0; for (pugi::xml_node info = list.child("info"); info; info = info.next_sibling("info"), i++) { - pugi::xml_attribute id = info.attribute("id"); - uint32_t clan_id = id.as_uint(); + const pugi::xml_attribute id = info.attribute("id"); + const uint32_t clan_id = id.as_uint(); - pugi::xml_node name = info.child("name"); - std::string name_str = name.text().as_string(); + const pugi::xml_node name = info.child("name"); + const std::string name_str = name.text().as_string(); - pugi::xml_node tag = info.child("tag"); - std::string tag_str = tag.text().as_string(); + const pugi::xml_node tag = info.child("tag"); + const std::string tag_str = tag.text().as_string(); - pugi::xml_node role = info.child("role"); - int32_t role_int = role.text().as_uint(); + const pugi::xml_node role = info.child("role"); + const int32_t role_int = role.text().as_uint(); - pugi::xml_node status = info.child("status"); - uint32_t status_int = status.text().as_uint(); + const pugi::xml_node status = info.child("status"); + const uint32_t status_int = status.text().as_uint(); - pugi::xml_node onlinename = info.child("onlinename"); - std::string onlinename_str = onlinename.text().as_string(); + const pugi::xml_node onlinename = info.child("onlinename"); + const std::string onlinename_str = onlinename.text().as_string(); - pugi::xml_node members = info.child("members"); - uint32_t members_int = members.text().as_uint(); + const pugi::xml_node members = info.child("members"); + const uint32_t members_int = members.text().as_uint(); SceNpClansEntry entry = SceNpClansEntry{ .info = SceNpClansClanBasicInfo{ @@ -402,41 +395,41 @@ namespace clan .status = static_cast(status_int)}; strcpy_trunc(entry.info.name, name_str); - strcpy_trunc(entry.info.tag, tag_str); + strcpy_trunc(entry.info.tag, tag_str); - clan_list[i] = entry; + ::at32(clan_list, i) = std::move(entry); i++; } - *page_result = SceNpClansPagingResult{ + page_result = SceNpClansPagingResult{ .count = results_count, .total = total_count}; return SCE_NP_CLANS_SUCCESS; } - SceNpClansError clans_client::get_clan_info(u32 req_id, SceNpClanId clan_id, SceNpClansClanInfo* clan_info) + SceNpClansError clans_client::get_clan_info(u32 req_id, SceNpClanId clan_id, SceNpClansClanInfo& clan_info) { pugi::xml_document doc = pugi::xml_document(); pugi::xml_node clan = doc.append_child("clan"); clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetClanInfo, ClanManagerOperationType::VIEW, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetClanInfo, ClanManagerOperationType::VIEW, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node info = clan_result.child("info"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node info = clan_result.child("info"); - std::string name_str = info.child("name").text().as_string(); - std::string tag_str = info.child("tag").text().as_string(); - uint32_t members_int = info.child("members").text().as_uint(); - std::string date_created_str = info.child("date-created").text().as_string(); - std::string description_str = info.child("description").text().as_string(); + const std::string name_str = info.child("name").text().as_string(); + const std::string tag_str = info.child("tag").text().as_string(); + const uint32_t members_int = info.child("members").text().as_uint(); + const std::string date_created_str = info.child("date-created").text().as_string(); + const std::string description_str = info.child("description").text().as_string(); - *clan_info = SceNpClansClanInfo{ + clan_info = SceNpClansClanInfo{ .info = SceNpClansClanBasicInfo{ .clanId = clan_id, .numMembers = members_int, @@ -447,16 +440,16 @@ namespace clan .description = "", }}; - strcpy_trunc(clan_info->info.name, name_str); - strcpy_trunc(clan_info->info.tag, tag_str); - strcpy_trunc(clan_info->updatable.description, description_str); + strcpy_trunc(clan_info.info.name, name_str); + strcpy_trunc(clan_info.info.tag, tag_str); + strcpy_trunc(clan_info.updatable.description, description_str); return SCE_NP_CLANS_SUCCESS; } - SceNpClansError clans_client::get_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMemberEntry* mem_info) + SceNpClansError clans_client::get_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMemberEntry& mem_info) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -464,22 +457,22 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetMemberInfo, ClanManagerOperationType::VIEW, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetMemberInfo, ClanManagerOperationType::VIEW, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node member_info = clan_result.child("info"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node member_info = clan_result.child("info"); - pugi::xml_attribute member_jid = member_info.attribute("jid"); - std::string member_jid_str = member_jid.as_string(); - std::string member_username = fmt::split(member_jid_str, {"@"})[0]; + const pugi::xml_attribute member_jid = member_info.attribute("jid"); + const std::string member_jid_str = member_jid.as_string(); + const std::string member_username = fmt::split(member_jid_str, {"@"})[0]; SceNpId member_npid; if (strncmp(member_username.c_str(), nph.get_npid().handle.data, 16) == 0) @@ -491,18 +484,18 @@ namespace clan np::string_to_npid(member_username, member_npid); } - pugi::xml_node role = member_info.child("role"); - uint32_t role_int = role.text().as_uint(); + const pugi::xml_node role = member_info.child("role"); + const uint32_t role_int = role.text().as_uint(); - pugi::xml_node status = member_info.child("status"); - uint32_t status_int = status.text().as_uint(); + const pugi::xml_node status = member_info.child("status"); + const uint32_t status_int = status.text().as_uint(); - pugi::xml_node description = member_info.child("description"); - std::string description_str = description.text().as_string(); + const pugi::xml_node description = member_info.child("description"); + const std::string description_str = description.text().as_string(); - *mem_info = SceNpClansMemberEntry + mem_info = SceNpClansMemberEntry { - .npid = member_npid, + .npid = std::move(member_npid), .role = static_cast(role_int), .status = static_cast(status_int), .updatable = SceNpClansUpdatableMemberInfo{ @@ -510,47 +503,47 @@ namespace clan } }; - strcpy_trunc(mem_info->updatable.description, description_str); + strcpy_trunc(mem_info.updatable.description, description_str); return SCE_NP_CLANS_SUCCESS; } - SceNpClansError clans_client::get_member_list(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansPagingRequest* paging, SceNpClansMemberStatus /*status*/, SceNpClansMemberEntry* mem_list, SceNpClansPagingResult* page_result) - { - std::string ticket = get_clan_ticket(nph); + SceNpClansError clans_client::get_member_list(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansPagingRequest& paging, SceNpClansMemberStatus /*status*/, std::vector& mem_list, SceNpClansPagingResult& page_result) + { + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; - pugi::xml_document doc = pugi::xml_document(); + pugi::xml_document doc = pugi::xml_document(); pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - clan.append_child("start").text().set(paging->startPos); - clan.append_child("max").text().set(paging->max); + clan.append_child("start").text().set(paging.startPos); + clan.append_child("max").text().set(paging.max); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetMemberList, ClanManagerOperationType::VIEW, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetMemberList, ClanManagerOperationType::VIEW, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node list = clan_result.child("list"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node list = clan_result.child("list"); - pugi::xml_attribute results = list.attribute("results"); - uint32_t results_count = results.as_uint(); + const pugi::xml_attribute results = list.attribute("results"); + const uint32_t results_count = results.as_uint(); - pugi::xml_attribute total = list.attribute("total"); - uint32_t total_count = total.as_uint(); - - int i = 0; - for (pugi::xml_node member_info = list.child("info"); member_info; member_info = member_info.next_sibling("info")) - { - std::string member_jid = member_info.attribute("jid").as_string(); - std::string member_username = fmt::split(member_jid, {"@"})[0]; + const pugi::xml_attribute total = list.attribute("total"); + const uint32_t total_count = total.as_uint(); + + int i = 0; + for (pugi::xml_node member_info = list.child("info"); member_info; member_info = member_info.next_sibling("info")) + { + const std::string member_jid = member_info.attribute("jid").as_string(); + const std::string member_username = fmt::split(member_jid, {"@"})[0]; SceNpId member_npid; - if (strncmp(member_username.c_str(), nph.get_npid().handle.data, 16) == 0) + if (strncmp(member_username.c_str(), nph.get_npid().handle.data, SCE_NET_NP_ONLINEID_MAX_LENGTH) == 0) { member_npid = nph.get_npid(); } @@ -559,67 +552,67 @@ namespace clan np::string_to_npid(member_username, member_npid); } - uint32_t role_int = member_info.child("role").text().as_uint(); - uint32_t status_int = member_info.child("status").text().as_uint(); - std::string description_str = member_info.child("description").text().as_string(); + const uint32_t role_int = member_info.child("role").text().as_uint(); + const uint32_t status_int = member_info.child("status").text().as_uint(); + const std::string description_str = member_info.child("description").text().as_string(); - SceNpClansMemberEntry entry = SceNpClansMemberEntry - { - .npid = member_npid, - .role = static_cast(role_int), - .status = static_cast(status_int), - }; + SceNpClansMemberEntry entry = SceNpClansMemberEntry + { + .npid = std::move(member_npid), + .role = static_cast(role_int), + .status = static_cast(status_int), + }; strcpy_trunc(entry.updatable.description, description_str); - - mem_list[i] = entry; - i++; - } - *page_result = SceNpClansPagingResult - { + ::at32(mem_list, i) = std::move(entry); + i++; + } + + page_result = SceNpClansPagingResult + { .count = results_count, .total = total_count - }; + }; return SCE_NP_CLANS_SUCCESS; } - SceNpClansError clans_client::get_blacklist(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansPagingRequest* paging, SceNpClansBlacklistEntry* bl, SceNpClansPagingResult* page_result) - { - std::string ticket = get_clan_ticket(nph); + SceNpClansError clans_client::get_blacklist(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansPagingRequest& paging, std::vector& bl, SceNpClansPagingResult& page_result) + { + const std::string ticket = get_clan_ticket(nph); - pugi::xml_document doc = pugi::xml_document(); - pugi::xml_node clan = doc.append_child("clan"); - clan.append_child("ticket").text().set(ticket.c_str()); - clan.append_child("id").text().set(clan_id); - clan.append_child("start").text().set(paging->startPos); - clan.append_child("max").text().set(paging->max); + pugi::xml_document doc = pugi::xml_document(); + pugi::xml_node clan = doc.append_child("clan"); + clan.append_child("ticket").text().set(ticket.c_str()); + clan.append_child("id").text().set(clan_id); + clan.append_child("start").text().set(paging.startPos); + clan.append_child("max").text().set(paging.max); - pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetBlacklist, ClanManagerOperationType::VIEW, &doc, &response); + pugi::xml_document response = pugi::xml_document(); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::GetBlacklist, ClanManagerOperationType::VIEW, doc, response); - if (clan_res != SCE_NP_CLANS_SUCCESS) - return clan_res; + if (clan_res != SCE_NP_CLANS_SUCCESS) + return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node list = clan_result.child("list"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node list = clan_result.child("list"); - pugi::xml_attribute results = list.attribute("results"); - uint32_t results_count = results.as_uint(); + const pugi::xml_attribute results = list.attribute("results"); + const uint32_t results_count = results.as_uint(); - pugi::xml_attribute total = list.attribute("total"); - uint32_t total_count = total.as_uint(); + const pugi::xml_attribute total = list.attribute("total"); + const uint32_t total_count = total.as_uint(); - int i = 0; - for (pugi::xml_node member = list.child("entry"); member; member = member.next_sibling("entry")) - { - pugi::xml_node member_jid = member.child("jid"); - std::string member_jid_str = member_jid.text().as_string(); - std::string member_username = fmt::split(member_jid_str, {"@"})[0]; + int i = 0; + for (pugi::xml_node member = list.child("entry"); member; member = member.next_sibling("entry")) + { + const pugi::xml_node member_jid = member.child("jid"); + const std::string member_jid_str = member_jid.text().as_string(); + const std::string member_username = fmt::split(member_jid_str, {"@"})[0]; SceNpId member_npid = {}; - if (strncmp(member_username.c_str(), nph.get_npid().handle.data, 16) == 0) + if (strncmp(member_username.c_str(), nph.get_npid().handle.data, SCE_NET_NP_ONLINEID_MAX_LENGTH) == 0) { member_npid = nph.get_npid(); } @@ -628,27 +621,27 @@ namespace clan np::string_to_npid(member_username.c_str(), member_npid); } - SceNpClansBlacklistEntry entry = SceNpClansBlacklistEntry - { - .entry = member_npid, - }; + SceNpClansBlacklistEntry entry = SceNpClansBlacklistEntry + { + .entry = std::move(member_npid), + }; - bl[i] = entry; - i++; - } + ::at32(bl, i) = std::move(entry); + i++; + } - *page_result = SceNpClansPagingResult - { - .count = results_count, - .total = total_count - }; + page_result = SceNpClansPagingResult + { + .count = results_count, + .total = total_count + }; - return SCE_NP_CLANS_SUCCESS; - } + return SCE_NP_CLANS_SUCCESS; + } - SceNpClansError clans_client::add_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id) + SceNpClansError clans_client::add_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -657,14 +650,14 @@ namespace clan clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::RecordBlacklistEntry, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::RecordBlacklistEntry, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::remove_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id) + SceNpClansError clans_client::remove_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id) { std::string ticket = get_clan_ticket(nph); if (ticket.empty()) @@ -674,50 +667,50 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::DeleteBlacklistEntry, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::DeleteBlacklistEntry, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::clan_search(u32 req_id, SceNpClansPagingRequest* paging, SceNpClansSearchableName* search, SceNpClansClanBasicInfo* clan_list, SceNpClansPagingResult* page_result) + SceNpClansError clans_client::clan_search(u32 req_id, const SceNpClansPagingRequest& paging, const SceNpClansSearchableName& search, std::vector& clan_list, SceNpClansPagingResult& page_result) { pugi::xml_document doc = pugi::xml_document(); - pugi::xml_node clan = doc.append_child("clan"); - clan.append_child("start").text().set(paging->startPos); - clan.append_child("max").text().set(paging->max); + pugi::xml_node clan = doc.append_child("clan"); + clan.append_child("start").text().set(paging.startPos); + clan.append_child("max").text().set(paging.max); pugi::xml_node filter = clan.append_child("filter"); pugi::xml_node name = filter.append_child("name"); - - std::string op_name = fmt::format("%s", static_cast(static_cast(search->nameSearchOp))); + + const std::string op_name = fmt::format("%s", static_cast(static_cast(search.nameSearchOp))); name.append_attribute("op").set_value(op_name.c_str()); - name.append_attribute("value").set_value(search->name); + name.append_attribute("value").set_value(search.name); - pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::ClanSearch, ClanManagerOperationType::VIEW, &doc, &response); + pugi::xml_document response = pugi::xml_document(); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::ClanSearch, ClanManagerOperationType::VIEW, doc, response); - if (clan_res != SCE_NP_CLANS_SUCCESS) - return clan_res; + if (clan_res != SCE_NP_CLANS_SUCCESS) + return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node list = clan_result.child("list"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node list = clan_result.child("list"); - pugi::xml_attribute results = list.attribute("results"); - uint32_t results_count = results.as_uint(); + const pugi::xml_attribute results = list.attribute("results"); + const uint32_t results_count = results.as_uint(); - pugi::xml_attribute total = list.attribute("total"); - uint32_t total_count = total.as_uint(); + const pugi::xml_attribute total = list.attribute("total"); + const uint32_t total_count = total.as_uint(); - int i = 0; - for (pugi::xml_node node = list.child("info"); node; node = node.next_sibling("info")) - { - uint32_t clan_id = node.attribute("id").as_uint(); - std::string name_str = node.child("name").text().as_string(); - std::string tag_str = node.child("tag").text().as_string(); - uint32_t members_int = node.child("members").text().as_uint(); + int i = 0; + for (pugi::xml_node node = list.child("info"); node; node = node.next_sibling("info")) + { + const uint32_t clan_id = node.attribute("id").as_uint(); + const std::string name_str = node.child("name").text().as_string(); + const std::string tag_str = node.child("tag").text().as_string(); + const uint32_t members_int = node.child("members").text().as_uint(); SceNpClansClanBasicInfo entry = SceNpClansClanBasicInfo { @@ -731,22 +724,22 @@ namespace clan strcpy_trunc(entry.name, name_str); strcpy_trunc(entry.tag, tag_str); - clan_list[i] = entry; - i++; - } + ::at32(clan_list, i) = std::move(entry); + i++; + } - *page_result = SceNpClansPagingResult - { - .count = results_count, - .total = total_count - }; + page_result = SceNpClansPagingResult + { + .count = results_count, + .total = total_count + }; - return SCE_NP_CLANS_SUCCESS; + return SCE_NP_CLANS_SUCCESS; } SceNpClansError clans_client::create_clan(np::np_handler& nph, u32 req_id, std::string_view name, std::string_view tag, vm::ptr clan_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -758,14 +751,14 @@ namespace clan clan.append_child("tag").text().set(tag.data()); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::CreateClan, ClanManagerOperationType::UPDATE, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::CreateClan, ClanManagerOperationType::UPDATE, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_attribute id = clan_result.attribute("id"); - uint32_t clan_id_int = id.as_uint(); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_attribute id = clan_result.attribute("id"); + const uint32_t clan_id_int = id.as_uint(); *clan_id = clan_id_int; @@ -774,7 +767,7 @@ namespace clan SceNpClansError clans_client::disband_dlan(np::np_handler& nph, u32 req_id, SceNpClanId clan_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -784,7 +777,7 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::DisbandClan, ClanManagerOperationType::UPDATE, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::DisbandClan, ClanManagerOperationType::UPDATE, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; @@ -792,9 +785,9 @@ namespace clan return SCE_NP_CLANS_SUCCESS; } - SceNpClansError clans_client::request_membership(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage* /*message*/) + SceNpClansError clans_client::request_membership(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage& /*message*/) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -804,12 +797,12 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::RequestMembership, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::RequestMembership, ClanManagerOperationType::UPDATE, doc, response); } SceNpClansError clans_client::cancel_request_membership(np::np_handler& nph, u32 req_id, SceNpClanId clan_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -819,12 +812,12 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::CancelRequestMembership, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::CancelRequestMembership, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::send_membership_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMessage* /*message*/, b8 allow) + SceNpClansError clans_client::send_membership_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMessage& /*message*/, b8 allow) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -832,17 +825,17 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, allow ? ClanRequestAction::AcceptMembershipRequest : ClanRequestAction::DeclineMembershipRequest, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, allow ? ClanRequestAction::AcceptMembershipRequest : ClanRequestAction::DeclineMembershipRequest, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::send_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMessage* /*message*/) + SceNpClansError clans_client::send_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMessage& /*message*/) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -850,17 +843,17 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::SendInvitation, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::SendInvitation, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::cancel_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id) + SceNpClansError clans_client::cancel_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -868,17 +861,17 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::CancelInvitation, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::CancelInvitation, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::send_invitation_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage* /*message*/, b8 accept) + SceNpClansError clans_client::send_invitation_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage& /*message*/, b8 accept) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -888,12 +881,12 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, accept ? ClanRequestAction::AcceptInvitation : ClanRequestAction::DeclineInvitation, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, accept ? ClanRequestAction::AcceptInvitation : ClanRequestAction::DeclineInvitation, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::update_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansUpdatableMemberInfo* info) + SceNpClansError clans_client::update_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansUpdatableMemberInfo& info) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -903,36 +896,36 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_node role = clan.append_child("onlinename"); - role.text().set(nph.get_npid().handle.data); + role.text().set(np::npid_to_string(nph.get_npid()).c_str()); pugi::xml_node description = clan.append_child("description"); - description.text().set(info->description); - + description.text().set(info.description); + pugi::xml_node status = clan.append_child("bin-attr1"); byte bin_attr_1[SCE_NP_CLANS_MEMBER_BINARY_ATTRIBUTE1_MAX_SIZE * 2 + 1] = {0}; uint32_t bin_attr_1_size = UINT32_MAX; - Base64_Encode_NoNl(info->binAttr1, info->binData1Size, bin_attr_1, &bin_attr_1_size); + Base64_Encode_NoNl(info.binAttr1, info.binData1Size, bin_attr_1, &bin_attr_1_size); if (bin_attr_1_size == UINT32_MAX) return SCE_NP_CLANS_ERROR_INVALID_ARGUMENT; - - // `reinterpret_cast` used to let the compiler select the correct overload of `set` + + // `reinterpret_cast` used to let the compiler select the correct overload of `set` status.text().set(reinterpret_cast(bin_attr_1)); pugi::xml_node allow_msg = clan.append_child("allow-msg"); - allow_msg.text().set(static_cast(info->allowMsg)); + allow_msg.text().set(static_cast(info.allowMsg)); pugi::xml_node size = clan.append_child("size"); - size.text().set(info->binData1Size); + size.text().set(info.binData1Size); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::UpdateMemberInfo, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::UpdateMemberInfo, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::update_clan_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansUpdatableClanInfo* info) + SceNpClansError clans_client::update_clan_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansUpdatableClanInfo& info) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -944,15 +937,15 @@ namespace clan // TODO: implement binary and integer attributes (not implemented in server yet) pugi::xml_node description = clan.append_child("description"); - description.text().set(info->description); + description.text().set(info.description); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::UpdateClanInfo, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::UpdateClanInfo, ClanManagerOperationType::UPDATE, doc, response); } SceNpClansError clans_client::join_clan(np::np_handler& nph, u32 req_id, SceNpClanId clan_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -962,12 +955,12 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::JoinClan, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::JoinClan, ClanManagerOperationType::UPDATE, doc, response); } SceNpClansError clans_client::leave_clan(np::np_handler& nph, u32 req_id, SceNpClanId clan_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -977,12 +970,12 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::LeaveClan, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::LeaveClan, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::kick_member(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMessage* /*message*/) + SceNpClansError clans_client::kick_member(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMessage& /*message*/) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -990,17 +983,17 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::KickMember, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::KickMember, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::change_member_role(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMemberRole role) + SceNpClansError clans_client::change_member_role(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMemberRole role) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -1008,20 +1001,20 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - - std::string jid_str = fmt::format(JID_FORMAT, np_id.handle.data); - clan.append_child("jid").text().set(jid_str.c_str()); + + const std::string jid_str = fmt::format(JID_FORMAT, np::npid_to_string(np_id)); + clan.append_child("jid").text().set(jid_str.c_str()); pugi::xml_node role_node = clan.append_child("role"); role_node.text().set(static_cast(role)); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::ChangeMemberRole, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::ChangeMemberRole, ClanManagerOperationType::UPDATE, doc, response); } - SceNpClansError clans_client::retrieve_announcements(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansPagingRequest* paging, SceNpClansMessageEntry* announcements, SceNpClansPagingResult* page_result) + SceNpClansError clans_client::retrieve_announcements(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansPagingRequest& paging, std::vector& announcements, SceNpClansPagingResult& page_result) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -1029,39 +1022,39 @@ namespace clan pugi::xml_node clan = doc.append_child("clan"); clan.append_child("ticket").text().set(ticket.c_str()); clan.append_child("id").text().set(clan_id); - clan.append_child("start").text().set(paging->startPos); - clan.append_child("max").text().set(paging->max); + clan.append_child("start").text().set(paging.startPos); + clan.append_child("max").text().set(paging.max); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::RetrieveAnnouncements, ClanManagerOperationType::VIEW, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::RetrieveAnnouncements, ClanManagerOperationType::VIEW, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node list = clan_result.child("list"); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node list = clan_result.child("list"); - pugi::xml_attribute results = list.attribute("results"); - uint32_t results_count = results.as_uint(); + const pugi::xml_attribute results = list.attribute("results"); + const uint32_t results_count = results.as_uint(); - pugi::xml_attribute total = list.attribute("total"); - uint32_t total_count = total.as_uint(); + const pugi::xml_attribute total = list.attribute("total"); + const uint32_t total_count = total.as_uint(); int i = 0; for (pugi::xml_node node = list.child("msg-info"); node; node = node.next_sibling("msg-info")) { - pugi::xml_attribute id = node.attribute("id"); - uint32_t msg_id = id.as_uint(); + const pugi::xml_attribute id = node.attribute("id"); + const uint32_t msg_id = id.as_uint(); - std::string subject_str = node.child("subject").text().as_string(); - std::string msg_str = node.child("msg").text().as_string(); - std::string author_jid = node.child("jid").text().as_string(); - std::string msg_date = node.child("msg-date").text().as_string(); + const std::string subject_str = node.child("subject").text().as_string(); + const std::string msg_str = node.child("msg").text().as_string(); + const std::string author_jid = node.child("jid").text().as_string(); + const std::string msg_date = node.child("msg-date").text().as_string(); SceNpId author_npid; - std::string author_username = fmt::split(author_jid, {"@"})[0]; + const std::string author_username = fmt::split(author_jid, {"@"})[0]; - if (strncmp(author_username.c_str(), nph.get_npid().handle.data, 16) == 0) + if (strncmp(author_username.c_str(), nph.get_npid().handle.data, SCE_NET_NP_ONLINEID_MAX_LENGTH) == 0) { author_npid = nph.get_npid(); } @@ -1079,18 +1072,18 @@ namespace clan .subject = "", .body = "", }, - .npid = author_npid, + .npid = std::move(author_npid), .postedBy = clan_id, }; strcpy_trunc(entry.message.subject, subject_str); strcpy_trunc(entry.message.body, msg_str); - announcements[i] = entry; + ::at32(announcements, i) = std::move(entry); i++; } - *page_result = SceNpClansPagingResult + page_result = SceNpClansPagingResult { .count = results_count, .total = total_count @@ -1099,9 +1092,9 @@ namespace clan return SCE_NP_CLANS_SUCCESS; } - SceNpClansError clans_client::post_announcement(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage* announcement, SceNpClansMessageData* /*data*/, u32 duration, SceNpClansMessageId* msg_id) + SceNpClansError clans_client::post_announcement(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansMessage& announcement, const SceNpClansMessageData& /*data*/, u32 duration, SceNpClansMessageId& msg_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -1111,30 +1104,30 @@ namespace clan clan.append_child("id").text().set(clan_id); pugi::xml_node subject = clan.append_child("subject"); - subject.text().set(announcement->subject); + subject.text().set(announcement.subject); pugi::xml_node msg = clan.append_child("msg"); - msg.text().set(announcement->body); + msg.text().set(announcement.body); pugi::xml_node expire_date = clan.append_child("expire-date"); expire_date.text().set(duration); pugi::xml_document response = pugi::xml_document(); - SceNpClansError clan_res = send_request(req_id, ClanRequestAction::PostAnnouncement, ClanManagerOperationType::UPDATE, &doc, &response); + const SceNpClansError clan_res = send_request(req_id, ClanRequestAction::PostAnnouncement, ClanManagerOperationType::UPDATE, doc, response); if (clan_res != SCE_NP_CLANS_SUCCESS) return clan_res; - pugi::xml_node clan_result = response.child("clan"); - pugi::xml_node msg_id_node = clan_result.child("id"); - *msg_id = msg_id_node.text().as_uint(); + const pugi::xml_node clan_result = response.child("clan"); + const pugi::xml_node msg_id_node = clan_result.child("id"); + msg_id = msg_id_node.text().as_uint(); return SCE_NP_CLANS_SUCCESS; } SceNpClansError clans_client::delete_announcement(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessageId announcement_id) { - std::string ticket = get_clan_ticket(nph); + const std::string ticket = get_clan_ticket(nph); if (ticket.empty()) return SCE_NP_CLANS_ERROR_SERVICE_UNAVAILABLE; @@ -1145,7 +1138,7 @@ namespace clan clan.append_child("msg-id").text().set(announcement_id); pugi::xml_document response = pugi::xml_document(); - return send_request(req_id, ClanRequestAction::DeleteAnnouncement, ClanManagerOperationType::UPDATE, &doc, &response); + return send_request(req_id, ClanRequestAction::DeleteAnnouncement, ClanManagerOperationType::UPDATE, doc, response); } } #pragma endregion diff --git a/rpcs3/Emu/NP/clans_client.h b/rpcs3/Emu/NP/clans_client.h index 68ed4a1cf1..d56fb4bbb9 100644 --- a/rpcs3/Emu/NP/clans_client.h +++ b/rpcs3/Emu/NP/clans_client.h @@ -25,15 +25,15 @@ namespace clan }; enum class ClanSearchFilterOperator : u8 - { - Equal, - NotEqual, - GreaterThan, - GreaterThanOrEqual, - LessThan, - LessThanOrEqual, - Like, - }; + { + Equal, + NotEqual, + GreaterThan, + GreaterThanOrEqual, + LessThan, + LessThanOrEqual, + Like, + }; enum class ClanRequestAction { @@ -70,9 +70,8 @@ namespace clan { private: - static size_t curl_write_callback(void* data, size_t size, size_t nmemb, void* clientp); - SceNpClansError send_request(u32 reqId, ClanRequestAction action, ClanManagerOperationType type, pugi::xml_document* xml_body, pugi::xml_document* out_response); + SceNpClansError send_request(u32 reqId, ClanRequestAction action, ClanManagerOperationType type, const pugi::xml_document& xml_body, pugi::xml_document& out_response); /// @brief Forge and get a V2.1 Ticket for clan operations std::string get_clan_ticket(np::np_handler& nph); @@ -81,43 +80,43 @@ namespace clan clans_client(); ~clans_client(); - SceNpClansError create_request(s32* req_id); + SceNpClansError create_request(s32& req_id); SceNpClansError destroy_request(u32 req_id); - SceNpClansError clan_search(u32 req_id, SceNpClansPagingRequest* paging, SceNpClansSearchableName* search, SceNpClansClanBasicInfo* clan_list, SceNpClansPagingResult* page_result); + SceNpClansError clan_search(u32 req_id, const SceNpClansPagingRequest& paging, const SceNpClansSearchableName& search, std::vector& clan_list, SceNpClansPagingResult& page_result); SceNpClansError create_clan(np::np_handler& nph, u32 req_id, std::string_view name, std::string_view tag, vm::ptr clan_id); SceNpClansError disband_dlan(np::np_handler& nph, u32 req_id, SceNpClanId clan_id); - SceNpClansError get_clan_list(np::np_handler& nph, u32 req_id, SceNpClansPagingRequest* paging, SceNpClansEntry* clan_list, SceNpClansPagingResult* page_result); - SceNpClansError get_clan_info(u32 req_id, SceNpClanId clan_id, SceNpClansClanInfo* clan_info); + SceNpClansError get_clan_list(np::np_handler& nph, u32 req_id, const SceNpClansPagingRequest&, std::vector& clan_list, SceNpClansPagingResult& page_result); + SceNpClansError get_clan_info(u32 req_id, SceNpClanId clan_id, SceNpClansClanInfo& clan_info); - SceNpClansError get_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMemberEntry* mem_info); - SceNpClansError get_member_list(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansPagingRequest* paging, SceNpClansMemberStatus status, SceNpClansMemberEntry* mem_list, SceNpClansPagingResult* page_result); + SceNpClansError get_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMemberEntry& mem_info); + SceNpClansError get_member_list(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansPagingRequest& paging, SceNpClansMemberStatus status, std::vector& mem_list, SceNpClansPagingResult& page_result); - SceNpClansError get_blacklist(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansPagingRequest* paging, SceNpClansBlacklistEntry* bl, SceNpClansPagingResult* page_result); - SceNpClansError add_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id); - SceNpClansError remove_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id); + SceNpClansError get_blacklist(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansPagingRequest& paging, std::vector& bl, SceNpClansPagingResult& page_result); + SceNpClansError add_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id); + SceNpClansError remove_blacklist_entry(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id); - SceNpClansError request_membership(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage* message); + SceNpClansError request_membership(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage& message); SceNpClansError cancel_request_membership(np::np_handler& nph, u32 req_id, SceNpClanId clan_id); - SceNpClansError send_membership_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMessage* message, b8 allow); + SceNpClansError send_membership_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMessage& message, b8 allow); - SceNpClansError send_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMessage* message); - SceNpClansError cancel_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id); - SceNpClansError send_invitation_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage* message, b8 accept); + SceNpClansError send_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMessage& message); + SceNpClansError cancel_invitation(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id); + SceNpClansError send_invitation_response(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage& message, b8 accept); SceNpClansError join_clan(np::np_handler& nph, u32 req_id, SceNpClanId clan_id); SceNpClansError leave_clan(np::np_handler& nph, u32 req_id, SceNpClanId clan_id); - SceNpClansError update_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansUpdatableMemberInfo* info); - SceNpClansError update_clan_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansUpdatableClanInfo* info); + SceNpClansError update_member_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansUpdatableMemberInfo& info); + SceNpClansError update_clan_info(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansUpdatableClanInfo& info); - SceNpClansError kick_member(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMessage* message); - SceNpClansError change_member_role(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpId np_id, SceNpClansMemberRole role); + SceNpClansError kick_member(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMessage& message); + SceNpClansError change_member_role(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpId& np_id, SceNpClansMemberRole role); - SceNpClansError retrieve_announcements(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansPagingRequest* paging, SceNpClansMessageEntry* announcements, SceNpClansPagingResult* page_result); - SceNpClansError post_announcement(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessage* announcement, SceNpClansMessageData* data, u32 duration, SceNpClansMessageId* announcement_id); + SceNpClansError retrieve_announcements(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansPagingRequest& paging, std::vector& announcements, SceNpClansPagingResult& page_result); + SceNpClansError post_announcement(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, const SceNpClansMessage& announcement, const SceNpClansMessageData& data, u32 duration, SceNpClansMessageId& announcement_id); SceNpClansError delete_announcement(np::np_handler& nph, u32 req_id, SceNpClanId clan_id, SceNpClansMessageId announcement_id); }; } // namespace clan diff --git a/rpcs3/Emu/NP/fb_helpers.cpp b/rpcs3/Emu/NP/fb_helpers.cpp deleted file mode 100644 index 100c3e864c..0000000000 --- a/rpcs3/Emu/NP/fb_helpers.cpp +++ /dev/null @@ -1,650 +0,0 @@ -#include "stdafx.h" -#include "Emu/Cell/lv2/sys_process.h" -#include "fb_helpers.h" - -LOG_CHANNEL(rpcn_log, "rpcn"); - -namespace np -{ - void BinAttr_to_SceNpMatching2BinAttr(event_data& edata, const BinAttr* bin_attr, SceNpMatching2BinAttr* binattr_info) - { - binattr_info->id = bin_attr->id(); - binattr_info->size = bin_attr->data()->size(); - auto* ptr = edata.allocate(binattr_info->size, binattr_info->ptr); - for (flatbuffers::uoffset_t i = 0; i < bin_attr->data()->size(); i++) - { - ptr[i] = bin_attr->data()->Get(i); - } - } - - void BinAttrs_to_SceNpMatching2BinAttrs(event_data& edata, const flatbuffers::Vector>* fb_attr, SceNpMatching2BinAttr* binattr_info) - { - for (flatbuffers::uoffset_t i = 0; i < fb_attr->size(); i++) - { - auto cur_fb_attr = fb_attr->Get(i); - auto cur_binattr = binattr_info + i; - - BinAttr_to_SceNpMatching2BinAttr(edata, cur_fb_attr, cur_binattr); - } - } - - void RoomMemberBinAttrInternal_to_SceNpMatching2RoomMemberBinAttrInternal(event_data& edata, const RoomMemberBinAttrInternal* fb_attr, SceNpMatching2RoomMemberBinAttrInternal* binattr_info) - { - binattr_info->updateDate.tick = fb_attr->updateDate(); - BinAttr_to_SceNpMatching2BinAttr(edata, fb_attr->data(), &binattr_info->data); - } - - void RoomBinAttrInternal_to_SceNpMatching2RoomBinAttrInternal(event_data& edata, const BinAttrInternal* fb_attr, SceNpMatching2RoomBinAttrInternal* binattr_info) - { - binattr_info->updateDate.tick = fb_attr->updateDate(); - binattr_info->updateMemberId = fb_attr->updateMemberId(); - BinAttr_to_SceNpMatching2BinAttr(edata, fb_attr->data(), &binattr_info->data); - } - - void RoomGroup_to_SceNpMatching2RoomGroup(const RoomGroup* fb_group, SceNpMatching2RoomGroup* sce_group) - { - sce_group->groupId = fb_group->groupId(); - sce_group->withPassword = fb_group->withPassword(); - sce_group->withLabel = fb_group->label() ? 1 : 0; - if (fb_group->label()) - { - for (flatbuffers::uoffset_t l_index = 0; l_index < fb_group->label()->size(); l_index++) - { - sce_group->label.data[l_index] = fb_group->label()->Get(l_index); - } - } - sce_group->slotNum = fb_group->slotNum(); - sce_group->curGroupMemberNum = fb_group->curGroupMemberNum(); - } - - void RoomGroups_to_SceNpMatching2RoomGroups(const flatbuffers::Vector>* fb_groups, SceNpMatching2RoomGroup* sce_groups) - { - for (flatbuffers::uoffset_t i = 0; i < fb_groups->size(); i++) - { - const auto* fb_group = fb_groups->Get(i); - SceNpMatching2RoomGroup* sce_group = &sce_groups[i]; - RoomGroup_to_SceNpMatching2RoomGroup(fb_group, sce_group); - } - } - - void UserInfo_to_SceNpUserInfo(const UserInfo* user, SceNpUserInfo* user_info) - { - if (const auto npid = user->npId(); npid) - { - std::memcpy(user_info->userId.handle.data, npid->c_str(), std::min(16, npid->size())); - } - - if (const auto online_name = user->onlineName(); online_name) - { - std::memcpy(user_info->name.data, online_name->c_str(), std::min(48, online_name->size())); - } - - if (const auto avatar_url = user->avatarUrl(); avatar_url) - { - std::memcpy(user_info->icon.data, avatar_url->c_str(), std::min(127, avatar_url->size())); - } - } - - void UserInfo_to_SceNpUserInfo2(event_data& edata, const UserInfo* user, SceNpUserInfo2* user_info, bool include_onlinename, bool include_avatarurl) - { - if (user->npId()) - std::memcpy(user_info->npId.handle.data, user->npId()->c_str(), std::min(16, user->npId()->size())); - - if (include_onlinename && user->onlineName()) - { - auto* ptr = edata.allocate(sizeof(SceNpOnlineName), user_info->onlineName); - std::memcpy(ptr->data, user->onlineName()->c_str(), std::min(48, user->onlineName()->size())); - } - if (include_avatarurl && user->avatarUrl()) - { - auto* ptr = edata.allocate(sizeof(SceNpAvatarUrl), user_info->avatarUrl); - std::memcpy(ptr->data, user->avatarUrl()->c_str(), std::min(127, user->avatarUrl()->size())); - } - } - - void RoomDataExternal_to_SceNpMatching2RoomDataExternal(event_data& edata, const RoomDataExternal* room, SceNpMatching2RoomDataExternal* room_info, bool include_onlinename, bool include_avatarurl) - { - room_info->serverId = room->serverId(); - room_info->worldId = room->worldId(); - room_info->lobbyId = room->lobbyId(); - room_info->roomId = room->roomId(); - room_info->maxSlot = room->maxSlot(); - room_info->curMemberNum = room->curMemberNum(); - room_info->passwordSlotMask = room->passwordSlotMask(); - - s32 sdk_ver; - process_get_sdk_version(process_getpid(), sdk_ver); - - // Structure changed in sdk 3.3.0 - if (sdk_ver >= 0x330000) - { - room_info->publicSlotNum = room->publicSlotNum(); - room_info->privateSlotNum = room->privateSlotNum(); - room_info->openPublicSlotNum = room->openPublicSlotNum(); - room_info->openPrivateSlotNum = room->openPrivateSlotNum(); - } - else - { - room_info->publicSlotNum = 0; - room_info->privateSlotNum = 0; - room_info->openPublicSlotNum = 0; - room_info->openPrivateSlotNum = 0; - } - - if (auto owner = room->owner()) - { - auto* ptr_owner = edata.allocate(sizeof(SceNpUserInfo2), room_info->owner); - UserInfo_to_SceNpUserInfo2(edata, owner, ptr_owner, include_onlinename, include_avatarurl); - } - - if (room->roomGroup() && room->roomGroup()->size() != 0) - { - room_info->roomGroupNum = room->roomGroup()->size(); - auto* ptr_groups = edata.allocate(sizeof(SceNpMatching2RoomGroup) * room_info->roomGroupNum, room_info->roomGroup); - RoomGroups_to_SceNpMatching2RoomGroups(room->roomGroup(), ptr_groups); - } - - room_info->flagAttr = room->flagAttr(); - - if (room->roomSearchableIntAttrExternal() && room->roomSearchableIntAttrExternal()->size() != 0) - { - room_info->roomSearchableIntAttrExternalNum = room->roomSearchableIntAttrExternal()->size(); - auto* ptr_int_attr = edata.allocate(sizeof(SceNpMatching2IntAttr) * room_info->roomSearchableIntAttrExternalNum, room_info->roomSearchableIntAttrExternal); - for (flatbuffers::uoffset_t a_index = 0; a_index < room->roomSearchableIntAttrExternal()->size(); a_index++) - { - auto fb_int_attr = room->roomSearchableIntAttrExternal()->Get(a_index); - ptr_int_attr[a_index].id = fb_int_attr->id(); - ptr_int_attr[a_index].num = fb_int_attr->num(); - } - } - - if (room->roomSearchableBinAttrExternal() && room->roomSearchableBinAttrExternal()->size() != 0) - { - room_info->roomSearchableBinAttrExternalNum = room->roomSearchableBinAttrExternal()->size(); - auto* ptr_bin_attr = edata.allocate(sizeof(SceNpMatching2BinAttr) * room_info->roomSearchableBinAttrExternalNum, room_info->roomSearchableBinAttrExternal); - BinAttrs_to_SceNpMatching2BinAttrs(edata, room->roomSearchableBinAttrExternal(), ptr_bin_attr); - } - - if (room->roomBinAttrExternal() && room->roomBinAttrExternal()->size() != 0) - { - room_info->roomBinAttrExternalNum = room->roomBinAttrExternal()->size(); - auto* ptr_bin_attr = edata.allocate(sizeof(SceNpMatching2BinAttr) * room_info->roomBinAttrExternalNum, room_info->roomBinAttrExternal); - BinAttrs_to_SceNpMatching2BinAttrs(edata, room->roomBinAttrExternal(), ptr_bin_attr); - } - } - - void SearchRoomResponse_to_SceNpMatching2SearchRoomResponse(event_data& edata, const SearchRoomResponse* resp, SceNpMatching2SearchRoomResponse* search_resp) - { - search_resp->range.size = resp->rooms() ? resp->rooms()->size() : 0; - search_resp->range.startIndex = resp->startIndex(); - search_resp->range.total = resp->total(); - - SceNpMatching2RoomDataExternal* prev_room = nullptr; - for (flatbuffers::uoffset_t i = 0; i < search_resp->range.size; i++) - { - auto* fb_room = resp->rooms()->Get(i); - SceNpMatching2RoomDataExternal* cur_room; - cur_room = edata.allocate(sizeof(SceNpMatching2RoomDataExternal), (i > 0) ? prev_room->next : search_resp->roomDataExternal); - RoomDataExternal_to_SceNpMatching2RoomDataExternal(edata, fb_room, cur_room, true, true); - prev_room = cur_room; - } - } - - void GetRoomDataExternalListResponse_to_SceNpMatching2GetRoomDataExternalListResponse(event_data& edata, const GetRoomDataExternalListResponse* resp, SceNpMatching2GetRoomDataExternalListResponse* get_resp, bool include_onlinename, bool include_avatarurl) - { - get_resp->roomDataExternalNum = resp->rooms() ? resp->rooms()->size() : 0; - - SceNpMatching2RoomDataExternal* prev_room = nullptr; - for (flatbuffers::uoffset_t i = 0; i < get_resp->roomDataExternalNum; i++) - { - auto* fb_room = resp->rooms()->Get(i); - SceNpMatching2RoomDataExternal* cur_room; - - cur_room = edata.allocate(sizeof(SceNpMatching2RoomDataExternal), (i > 0) ? prev_room->next : get_resp->roomDataExternal); - - RoomDataExternal_to_SceNpMatching2RoomDataExternal(edata, fb_room, cur_room, include_onlinename, include_avatarurl); - prev_room = cur_room; - } - } - - u16 RoomDataInternal_to_SceNpMatching2RoomDataInternal(event_data& edata, const RoomDataInternal* resp, SceNpMatching2RoomDataInternal* room_info, const SceNpId& npid, bool include_onlinename, bool include_avatarurl) - { - u16 member_id = 0; - room_info->serverId = resp->serverId(); - room_info->worldId = resp->worldId(); - room_info->lobbyId = resp->lobbyId(); - room_info->roomId = resp->roomId(); - room_info->passwordSlotMask = resp->passwordSlotMask(); - room_info->maxSlot = resp->maxSlot(); - - if (resp->roomGroup() && resp->roomGroup()->size() != 0) - { - room_info->roomGroupNum = resp->roomGroup()->size(); - auto* ptr_groups = edata.allocate(sizeof(SceNpMatching2RoomGroup) * room_info->roomGroupNum, room_info->roomGroup); - RoomGroups_to_SceNpMatching2RoomGroups(resp->roomGroup(), ptr_groups); - } - - room_info->memberList.membersNum = static_cast(resp->memberList()->size()); - edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal) * room_info->memberList.membersNum, room_info->memberList.members); - - for (flatbuffers::uoffset_t i = 0; i < resp->memberList()->size(); i++) - { - auto fb_member = resp->memberList()->Get(i); - SceNpMatching2RoomMemberDataInternal* sce_member = &room_info->memberList.members[i]; - - if (i < (resp->memberList()->size() - 1)) - { - sce_member->next = room_info->memberList.members + i + 1; - edata.add_relocation(sce_member->next); - } - - RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, fb_member, room_info, sce_member, include_onlinename, include_avatarurl); - } - - for (u32 i = 0; i < room_info->memberList.membersNum; i++) - { - SceNpMatching2RoomMemberDataInternal* sce_member = &room_info->memberList.members[i]; - if (strcmp(sce_member->userInfo.npId.handle.data, npid.handle.data) == 0) - { - room_info->memberList.me = room_info->memberList.members + i; - edata.add_relocation(room_info->memberList.me); - member_id = sce_member->memberId; - break; - } - } - - for (u32 i = 0; i < room_info->memberList.membersNum; i++) - { - SceNpMatching2RoomMemberDataInternal* sce_member = &room_info->memberList.members[i]; - if (sce_member->memberId == resp->ownerId()) - { - room_info->memberList.owner = room_info->memberList.members + i; - edata.add_relocation(room_info->memberList.owner); - break; - } - } - - room_info->flagAttr = resp->flagAttr(); - - if (resp->roomBinAttrInternal() && resp->roomBinAttrInternal()->size() != 0) - { - room_info->roomBinAttrInternalNum = resp->roomBinAttrInternal()->size(); - auto* ptr_bin_attr = edata.allocate(sizeof(SceNpMatching2RoomBinAttrInternal) * room_info->roomBinAttrInternalNum, room_info->roomBinAttrInternal); - - for (u32 b_index = 0; b_index < room_info->roomBinAttrInternalNum; b_index++) - { - auto fb_bin_attr = resp->roomBinAttrInternal()->Get(b_index); - ptr_bin_attr[b_index].updateDate.tick = fb_bin_attr->updateDate(); - ptr_bin_attr[b_index].updateMemberId = fb_bin_attr->updateMemberId(); - - ptr_bin_attr[b_index].data.id = fb_bin_attr->data()->id(); - ptr_bin_attr[b_index].data.size = fb_bin_attr->data()->data()->size(); - auto* ptr_bin_attr_data = edata.allocate(ptr_bin_attr[b_index].data.size, ptr_bin_attr[b_index].data.ptr); - for (flatbuffers::uoffset_t tmp_index = 0; tmp_index < ptr_bin_attr[b_index].data.size; tmp_index++) - { - ptr_bin_attr_data[tmp_index] = fb_bin_attr->data()->data()->Get(tmp_index); - } - } - } - - return member_id; - } - - void RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(event_data& edata, const RoomMemberDataInternal* member_data, const SceNpMatching2RoomDataInternal* room_info, SceNpMatching2RoomMemberDataInternal* sce_member_data, bool include_onlinename, bool include_avatarurl) - { - UserInfo_to_SceNpUserInfo2(edata, member_data->userInfo(), &sce_member_data->userInfo, include_onlinename, include_avatarurl); - sce_member_data->joinDate.tick = member_data->joinDate(); - sce_member_data->memberId = member_data->memberId(); - sce_member_data->teamId = member_data->teamId(); - - if (const auto* fb_roomgroup = member_data->roomGroup()) - { - if (room_info) - { - // If we have SceNpMatching2RoomDataInternal available we point the pointers to the group there - sce_member_data->roomGroup = room_info->roomGroup + (fb_roomgroup->groupId() - 1); - edata.add_relocation(sce_member_data->roomGroup); - } - else - { - // Otherwise we allocate for it - auto* ptr_group = edata.allocate(sizeof(SceNpMatching2RoomGroup), sce_member_data->roomGroup); - RoomGroup_to_SceNpMatching2RoomGroup(fb_roomgroup, ptr_group); - } - } - - sce_member_data->natType = member_data->natType(); - sce_member_data->flagAttr = member_data->flagAttr(); - - if (member_data->roomMemberBinAttrInternal() && member_data->roomMemberBinAttrInternal()->size() != 0) - { - sce_member_data->roomMemberBinAttrInternalNum = member_data->roomMemberBinAttrInternal()->size(); - auto* sce_binattrs = edata.allocate(sizeof(SceNpMatching2RoomMemberBinAttrInternal) * sce_member_data->roomMemberBinAttrInternalNum, sce_member_data->roomMemberBinAttrInternal); - for (u32 b_index = 0; b_index < sce_member_data->roomMemberBinAttrInternalNum; b_index++) - { - const auto fb_battr = member_data->roomMemberBinAttrInternal()->Get(b_index); - sce_binattrs[b_index].updateDate.tick = fb_battr->updateDate(); - - sce_binattrs[b_index].data.id = fb_battr->data()->id(); - sce_binattrs[b_index].data.size = fb_battr->data()->data()->size(); - auto* sce_binattr_data = edata.allocate(sce_binattrs[b_index].data.size, sce_binattrs[b_index].data.ptr); - for (flatbuffers::uoffset_t tmp_index = 0; tmp_index < sce_binattrs[b_index].data.size; tmp_index++) - { - sce_binattr_data[tmp_index] = fb_battr->data()->data()->Get(tmp_index); - } - } - } - } - - void RoomMemberUpdateInfo_to_SceNpMatching2RoomMemberUpdateInfo(event_data& edata, const RoomMemberUpdateInfo* update_info, SceNpMatching2RoomMemberUpdateInfo* sce_update_info, bool include_onlinename, bool include_avatarurl) - { - sce_update_info->eventCause = 0; - if (update_info->optData()) - { - sce_update_info->optData.length = update_info->optData()->data()->size(); - for (flatbuffers::uoffset_t i = 0; i < 16; i++) - { - sce_update_info->optData.data[i] = update_info->optData()->data()->Get(i); - } - } - - if (update_info->roomMemberDataInternal()) - { - auto fb_member = update_info->roomMemberDataInternal(); - auto* ptr_roomemberinternal = edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal), sce_update_info->roomMemberDataInternal); - - // TODO: Pass room_info - RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, fb_member, nullptr, ptr_roomemberinternal, include_onlinename, include_avatarurl); - } - } - - void RoomUpdateInfo_to_SceNpMatching2RoomUpdateInfo(const RoomUpdateInfo* update_info, SceNpMatching2RoomUpdateInfo* sce_update_info) - { - sce_update_info->errorCode = 0; - sce_update_info->eventCause = 0; - if (update_info->optData()) - { - sce_update_info->optData.length = update_info->optData()->data()->size(); - for (flatbuffers::uoffset_t i = 0; i < 16; i++) - { - sce_update_info->optData.data[i] = update_info->optData()->data()->Get(i); - } - } - } - - void RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo(event_data& edata, const RoomDataInternalUpdateInfo* update_info, SceNpMatching2RoomDataInternalUpdateInfo* sce_update_info, const SceNpId& npid, bool include_onlinename, bool include_avatarurl) - { - auto* sce_room_data = edata.allocate(sizeof(SceNpMatching2RoomDataInternal), sce_update_info->newRoomDataInternal); - RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, update_info->newRoomDataInternal(), sce_room_data, npid, include_onlinename, include_avatarurl); - - if (sce_room_data->flagAttr != update_info->prevFlagAttr()) - { - sce_update_info->newFlagAttr = sce_update_info->newRoomDataInternal.ptr(&SceNpMatching2RoomDataInternal::flagAttr); - edata.add_relocation(sce_update_info->newFlagAttr); - auto* ptr_sce_prevflag = edata.allocate(sizeof(SceNpMatching2FlagAttr), sce_update_info->prevFlagAttr); - *ptr_sce_prevflag = update_info->prevFlagAttr(); - } - - if (sce_room_data->passwordSlotMask != update_info->prevRoomPasswordSlotMask()) - { - sce_update_info->newRoomPasswordSlotMask = sce_update_info->newRoomDataInternal.ptr(&SceNpMatching2RoomDataInternal::passwordSlotMask); - edata.add_relocation(sce_update_info->newRoomPasswordSlotMask); - auto* ptr_sce_prevpass = edata.allocate(sizeof(SceNpMatching2RoomPasswordSlotMask), sce_update_info->prevRoomPasswordSlotMask); - *ptr_sce_prevpass = update_info->prevRoomPasswordSlotMask(); - } - - if (update_info->newRoomGroup() && update_info->newRoomGroup()->size() != 0) - { - rpcn_log.todo("RoomDataInternalUpdateInfo::newRoomGroup"); - // TODO - // sce_update_info->newRoomGroupNum = update_info->newRoomGroup()->size(); - // vm::ptr group_info(allocate(sizeof(SceNpMatching2RoomGroup) * sce_update_info->newRoomGroupNum)); - // RoomGroups_to_SceNpMatching2RoomGroup(update_info->newRoomGroup(), group_info); - // sce_update_info->newRoomGroup = group_info; - } - - if (update_info->newRoomBinAttrInternal() && update_info->newRoomBinAttrInternal()->size() != 0) - { - const auto get_ptr_for_binattr = [&](u16 binattr_id) -> vm::bptr - { - vm::bptr ret_ptr = sce_room_data->roomBinAttrInternal; - for (u32 i = 0; i < sce_room_data->roomBinAttrInternalNum; i++) - { - if (ret_ptr->data.id == binattr_id) - return ret_ptr; - - ret_ptr++; - } - rpcn_log.fatal("RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo: Couldn't find matching roomBinAttrInternal!"); - return vm::null; - }; - - sce_update_info->newRoomBinAttrInternalNum = update_info->newRoomBinAttrInternal()->size(); - edata.allocate_ptr_array(sce_update_info->newRoomBinAttrInternalNum, sce_update_info->newRoomBinAttrInternal); - for (u32 i = 0; i < sce_update_info->newRoomBinAttrInternalNum; i++) - { - sce_update_info->newRoomBinAttrInternal[i] = get_ptr_for_binattr(update_info->newRoomBinAttrInternal()->Get(i)); - } - } - } - - void RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo(event_data& edata, const RoomMemberDataInternalUpdateInfo* update_info, SceNpMatching2RoomMemberDataInternalUpdateInfo* sce_update_info, bool include_onlinename, bool include_avatarurl) - { - auto* sce_room_member_data = edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal), sce_update_info->newRoomMemberDataInternal); - RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, update_info->newRoomMemberDataInternal(), nullptr, sce_room_member_data, include_onlinename, include_avatarurl); - - if (sce_update_info->newRoomMemberDataInternal->flagAttr != update_info->prevFlagAttr()) - { - sce_update_info->newFlagAttr = sce_update_info->newRoomMemberDataInternal.ptr(&SceNpMatching2RoomMemberDataInternal::flagAttr); - edata.add_relocation(sce_update_info->newFlagAttr); - auto* ptr_sce_prevflag = edata.allocate(sizeof(SceNpMatching2FlagAttr), sce_update_info->prevFlagAttr); - *ptr_sce_prevflag = update_info->prevFlagAttr(); - } - - if (sce_update_info->newRoomMemberDataInternal->teamId != update_info->prevTeamId()) - { - sce_update_info->newTeamId = sce_update_info->newRoomMemberDataInternal.ptr(&SceNpMatching2RoomMemberDataInternal::teamId); - edata.add_relocation(sce_update_info->newTeamId); - } - - if (update_info->newRoomMemberBinAttrInternal() && update_info->newRoomMemberBinAttrInternal()->size() != 0) - { - const auto get_ptr_for_binattr = [&](u16 binattr_id) -> vm::bptr - { - vm::bptr ret_ptr = sce_room_member_data->roomMemberBinAttrInternal; - for (u32 i = 0; i < sce_room_member_data->roomMemberBinAttrInternalNum; i++) - { - if (ret_ptr->data.id == binattr_id) - return ret_ptr; - - ret_ptr++; - } - rpcn_log.fatal("RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo: Couldn't find matching roomMemberBinAttrInternal!"); - return vm::null; - }; - - sce_update_info->newRoomMemberBinAttrInternalNum = update_info->newRoomMemberBinAttrInternal()->size(); - edata.allocate_ptr_array(sce_update_info->newRoomMemberBinAttrInternalNum, sce_update_info->newRoomMemberBinAttrInternal); - for (u32 i = 0; i < sce_update_info->newRoomMemberBinAttrInternalNum; i++) - { - sce_update_info->newRoomMemberBinAttrInternal[i] = get_ptr_for_binattr(update_info->newRoomMemberBinAttrInternal()->Get(i)); - } - } - } - - void GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(const GetPingInfoResponse* resp, SceNpMatching2SignalingGetPingInfoResponse* sce_resp) - { - sce_resp->serverId = resp->serverId(); - sce_resp->worldId = resp->worldId(); - sce_resp->roomId = resp->roomId(); - sce_resp->rtt = resp->rtt(); - } - - void RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(event_data& edata, const RoomMessageInfo* mi, SceNpMatching2RoomMessageInfo* sce_mi, bool include_onlinename, bool include_avatarurl) - { - sce_mi->filtered = mi->filtered(); - sce_mi->castType = mi->castType(); - - if (sce_mi->castType != SCE_NP_MATCHING2_CASTTYPE_BROADCAST) - { - edata.allocate(sizeof(SceNpMatching2RoomMessageDestination), sce_mi->dst); - } - - switch (sce_mi->castType) - { - case SCE_NP_MATCHING2_CASTTYPE_BROADCAST: break; - case SCE_NP_MATCHING2_CASTTYPE_UNICAST: sce_mi->dst->unicastTarget = mi->dst()->Get(0); break; - case SCE_NP_MATCHING2_CASTTYPE_MULTICAST: - { - sce_mi->dst->multicastTarget.memberIdNum = mi->dst()->size(); - edata.allocate(sizeof(u16) * mi->dst()->size(), sce_mi->dst->multicastTarget.memberId); - for (u32 i = 0; i < mi->dst()->size(); i++) - { - sce_mi->dst->multicastTarget.memberId[i] = mi->dst()->Get(i); - } - break; - } - case SCE_NP_MATCHING2_CASTTYPE_MULTICAST_TEAM: sce_mi->dst->multicastTargetTeamId = ::narrow(mi->dst()->Get(0)); break; - default: ensure(false); - } - - if (auto src_member = mi->srcMember()) - { - auto* ptr_sce_userinfo = edata.allocate(sizeof(SceNpUserInfo2), sce_mi->srcMember); - UserInfo_to_SceNpUserInfo2(edata, src_member, ptr_sce_userinfo, include_onlinename, include_avatarurl); - } - - if (auto msg = mi->msg()) - { - sce_mi->msgLen = msg->size(); - auto* ptr_msg_data = static_cast(edata.allocate(msg->size(), sce_mi->msg)); - for (u32 i = 0; i < msg->size(); i++) - { - ptr_msg_data[i] = msg->Get(i); - } - } - } - - void MatchingRoomStatus_to_SceNpMatchingRoomStatus(event_data& edata, const MatchingRoomStatus* resp, SceNpMatchingRoomStatus* room_status) - { - const auto* vec_id = resp->id(); - ensure(vec_id && vec_id->size() == 28, "Invalid room id in MatchingRoomStatus"); - - for (flatbuffers::uoffset_t i = 0; i < 28; i++) - { - room_status->id.opt[i] = vec_id->Get(i); - } - - // In some events the member list can be empty - if (const auto* members = resp->members(); members && members->size()) - { - room_status->num = members->size(); - SceNpMatchingRoomMember* prev_member{}; - - for (flatbuffers::uoffset_t i = 0; i < members->size(); i++) - { - auto* cur_member = edata.allocate(sizeof(SceNpMatchingRoomMember), (i > 0) ? prev_member->next : room_status->members); - const auto* member = members->Get(i); - ensure(member && member->info(), "Invalid member in MatchingRoomStatus list"); - - cur_member->owner = member->owner() ? 1 : 0; - UserInfo_to_SceNpUserInfo(member->info(), &cur_member->user_info); - - prev_member = cur_member; - } - } - - if (const auto* kick_npid = resp->kick_actor(); kick_npid) - { - auto* npid = edata.allocate(sizeof(SceNpId), room_status->kick_actor); - std::memcpy(npid->handle.data, kick_npid->c_str(), std::min(16, kick_npid->size())); - } - - if (const auto* opt = resp->opt(); opt && opt->size()) - { - room_status->opt_len = opt->size(); - u8* opt_data = static_cast(edata.allocate(opt->size(), room_status->opt)); - - for (flatbuffers::uoffset_t i = 0; i < opt->size(); i++) - { - opt_data[i] = opt->Get(i); - } - } - } - - void MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(event_data& edata, const MatchingRoomStatus* resp, SceNpMatchingJoinedRoomInfo* room_info) - { - // The use of SceNpLobbyId is unclear as it is never specified by the client except in further operations, so we always set it to a series of 0 and a 1 - room_info->lobbyid.opt[27] = 1; - MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, resp, &room_info->room_status); - } - - void MatchingAttr_to_SceNpMatchingAttr(event_data& edata, const flatbuffers::Vector>* attr_list, vm::bptr& first_attr) - { - if (attr_list) - { - SceNpMatchingAttr* cur_attr = nullptr; - - for (flatbuffers::uoffset_t i_attr = 0; i_attr < attr_list->size(); i_attr++) - { - const auto* attr = attr_list->Get(i_attr); - cur_attr = edata.allocate(sizeof(SceNpMatchingAttr), cur_attr ? cur_attr->next : first_attr); - - ensure(attr); - cur_attr->type = attr->attr_type(); - cur_attr->id = attr->attr_id(); - if (attr->data()) - { - if (attr->data()->size()) - { - cur_attr->value.data.size = attr->data()->size(); - u8* data_ptr = static_cast(edata.allocate(attr->data()->size(), cur_attr->value.data.ptr)); - memcpy(data_ptr, attr->data()->data(), attr->data()->size()); - } - } - else - { - cur_attr->value.num = attr->num(); - } - } - } - } - - void MatchingRoom_to_SceNpMatchingRoom(event_data& edata, const MatchingRoom* resp, SceNpMatchingRoom* room) - { - ensure(room && resp->id() && resp->id()->size() == sizeof(SceNpRoomId::opt)); - memcpy(room->id.opt, resp->id()->data(), sizeof(SceNpRoomId::opt)); - MatchingAttr_to_SceNpMatchingAttr(edata, resp->attr(), room->attr); - } - - void MatchingRoomList_to_SceNpMatchingRoomList(event_data& edata, const MatchingRoomList* resp, SceNpMatchingRoomList* room_list) - { - // The use of SceNpLobbyId is unclear as it is never specified by the client except in further operations, so we always set it to a series of 0 and a 1 - room_list->lobbyid.opt[27] = 1; - room_list->range.start = resp->start(); - room_list->range.total = resp->total(); - - if (auto rooms = resp->rooms(); rooms) - { - room_list->range.results = rooms->size(); - - SceNpMatchingRoom* cur_room = nullptr; - - for (flatbuffers::uoffset_t i = 0; i < rooms->size(); i++) - { - const auto* room = rooms->Get(i); - cur_room = edata.allocate(sizeof(SceNpMatchingRoom), cur_room ? cur_room->next : room_list->head); - MatchingRoom_to_SceNpMatchingRoom(edata, room, cur_room); - } - } - } - - void MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(event_data& edata, const MatchingSearchJoinRoomInfo* resp, SceNpMatchingSearchJoinRoomInfo* room_info) - { - ensure(resp->room()); - room_info->lobbyid.opt[27] = 1; - MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, resp->room(), &room_info->room_status); - MatchingAttr_to_SceNpMatchingAttr(edata, resp->attr(), room_info->attr); - } - -} // namespace np diff --git a/rpcs3/Emu/NP/fb_helpers.h b/rpcs3/Emu/NP/fb_helpers.h deleted file mode 100644 index 6b92cfba37..0000000000 --- a/rpcs3/Emu/NP/fb_helpers.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "Emu/Cell/Modules/sceNp.h" -#include "Emu/Cell/Modules/sceNp2.h" -#include "np_event_data.h" -#include "generated/np2_structs_generated.h" - -namespace np -{ - void BinAttr_to_SceNpMatching2BinAttr(event_data& edata, const BinAttr* bin_attr, SceNpMatching2BinAttr* binattr_info); - void BinAttrs_to_SceNpMatching2BinAttrs(event_data& edata, const flatbuffers::Vector>* fb_attr, SceNpMatching2BinAttr* binattr_info); - void RoomMemberBinAttrInternal_to_SceNpMatching2RoomMemberBinAttrInternal(event_data& edata, const RoomMemberBinAttrInternal* fb_attr, SceNpMatching2RoomMemberBinAttrInternal* binattr_info); - void RoomBinAttrInternal_to_SceNpMatching2RoomBinAttrInternal(event_data& edata, const BinAttrInternal* fb_attr, SceNpMatching2RoomBinAttrInternal* binattr_info); - void RoomGroup_to_SceNpMatching2RoomGroup(const RoomGroup* fb_group, SceNpMatching2RoomGroup* sce_group); - void RoomGroups_to_SceNpMatching2RoomGroups(const flatbuffers::Vector>* fb_groups, SceNpMatching2RoomGroup* sce_groups); - void UserInfo_to_SceNpUserInfo(const UserInfo* user, SceNpUserInfo* user_info); - void UserInfo_to_SceNpUserInfo2(event_data& edata, const UserInfo* user, SceNpUserInfo2* user_info, bool include_onlinename, bool include_avatarurl); - void RoomDataExternal_to_SceNpMatching2RoomDataExternal(event_data& edata, const RoomDataExternal* room, SceNpMatching2RoomDataExternal* room_info, bool include_onlinename, bool include_avatarurl); - void SearchRoomResponse_to_SceNpMatching2SearchRoomResponse(event_data& edata, const SearchRoomResponse* resp, SceNpMatching2SearchRoomResponse* search_resp); - void GetRoomDataExternalListResponse_to_SceNpMatching2GetRoomDataExternalListResponse(event_data& edata, const GetRoomDataExternalListResponse* resp, SceNpMatching2GetRoomDataExternalListResponse* get_resp, bool include_onlinename, bool include_avatarurl); - u16 RoomDataInternal_to_SceNpMatching2RoomDataInternal(event_data& edata, const RoomDataInternal* resp, SceNpMatching2RoomDataInternal* room_resp, const SceNpId& npid, bool include_onlinename, bool include_avatarurl); - void RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(event_data& edata, const RoomMemberDataInternal* member_data, const SceNpMatching2RoomDataInternal* room_info, SceNpMatching2RoomMemberDataInternal* sce_member_data, bool include_onlinename, bool include_avatarurl); - void RoomMemberUpdateInfo_to_SceNpMatching2RoomMemberUpdateInfo(event_data& edata, const RoomMemberUpdateInfo* resp, SceNpMatching2RoomMemberUpdateInfo* room_info, bool include_onlinename, bool include_avatarurl); - void RoomUpdateInfo_to_SceNpMatching2RoomUpdateInfo(const RoomUpdateInfo* update_info, SceNpMatching2RoomUpdateInfo* sce_update_info); - void GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(const GetPingInfoResponse* resp, SceNpMatching2SignalingGetPingInfoResponse* sce_resp); - void RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(event_data& edata, const RoomMessageInfo* mi, SceNpMatching2RoomMessageInfo* sce_mi, bool include_onlinename, bool include_avatarurl); - void RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo(event_data& edata, const RoomDataInternalUpdateInfo* update_info, SceNpMatching2RoomDataInternalUpdateInfo* sce_update_info, const SceNpId& npid, bool include_onlinename, bool include_avatarurl); - void RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo(event_data& edata, const RoomMemberDataInternalUpdateInfo* update_info, SceNpMatching2RoomMemberDataInternalUpdateInfo* sce_update_info, bool include_onlinename, bool include_avatarurl); - void MatchingRoomStatus_to_SceNpMatchingRoomStatus(event_data& edata, const MatchingRoomStatus* resp, SceNpMatchingRoomStatus* room_status); - void MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(event_data& edata, const MatchingRoomStatus* resp, SceNpMatchingJoinedRoomInfo* room_info); - void MatchingRoom_to_SceNpMatchingRoom(event_data& edata, const MatchingRoom* resp, SceNpMatchingRoom* room); - void MatchingRoomList_to_SceNpMatchingRoomList(event_data& edata, const MatchingRoomList* resp, SceNpMatchingRoomList* room_list); - void MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(event_data& edata, const MatchingSearchJoinRoomInfo* resp, SceNpMatchingSearchJoinRoomInfo* room_info); -} // namespace np diff --git a/rpcs3/Emu/NP/generated/np2_structs.fbs b/rpcs3/Emu/NP/generated/np2_structs.fbs deleted file mode 100644 index 9ca6e4a437..0000000000 --- a/rpcs3/Emu/NP/generated/np2_structs.fbs +++ /dev/null @@ -1,584 +0,0 @@ -table SignalingAddr { - ip:[uint8]; - port:uint16; -} - -table MatchingSignalingInfo { - npid:string; - addr:SignalingAddr; -} - -table Matching2SignalingInfo { - member_id:uint16; - addr:SignalingAddr; -} - -table BinAttr { - id:uint16; - data:[uint8]; -} - -table IntAttr { - id:uint16; - num:uint32; -} - -table RoomMemberBinAttrInternal { - updateDate:uint64; - data:BinAttr; -} - -table BinAttrInternal { - updateDate:uint64; - updateMemberId:uint16; - data:BinAttr; -} - -table OptParam { - type:uint8; - flag:uint8; - hubMemberId:uint16 ; -} - -table GroupConfig { - slotNum:uint32; - label:[uint8]; - withPassword:bool; -} - -table UserInfo { - npId:string; - onlineName:string; - avatarUrl:string; -} - -table RoomMemberDataInternal { - userInfo:UserInfo; - joinDate:uint64; - memberId:uint16; - teamId:uint8; - roomGroup:RoomGroup; - natType:uint8; - flagAttr:uint32; - roomMemberBinAttrInternal:[RoomMemberBinAttrInternal]; -} - -table RoomGroup { - groupId:uint8; - withPassword:bool; - label:[uint8]; - slotNum:uint32; - curGroupMemberNum:uint32; -} - -table RoomDataInternal { - serverId:uint16; - worldId:uint32; - lobbyId:uint64; - roomId:uint64; - passwordSlotMask:uint64; - maxSlot:uint32; - memberList:[RoomMemberDataInternal]; - ownerId:uint16; - roomGroup:[RoomGroup]; - flagAttr:uint32; - roomBinAttrInternal:[BinAttrInternal]; -} - -table RoomDataExternal { - serverId:uint16; - worldId:uint32; - publicSlotNum:uint16; - privateSlotNum:uint16; - lobbyId:uint64; - roomId:uint64; - openPublicSlotNum:uint16; - maxSlot:uint16; - openPrivateSlotNum:uint16; - curMemberNum:uint16; - passwordSlotMask:uint64; - owner:UserInfo; - roomGroup:[RoomGroup]; - flagAttr:uint32; - roomSearchableIntAttrExternal:[IntAttr]; - roomSearchableBinAttrExternal:[BinAttr]; - roomBinAttrExternal:[BinAttr]; -} - -table IntSearchFilter { - searchOperator:uint8; - attr:IntAttr; -} - -table BinSearchFilter { - searchOperator:uint8; - attr:BinAttr; -} - -table PresenceOptionData { - data:[uint8]; - len:uint32; -} - -table RoomGroupPasswordConfig { - groupId:uint8; - withPassword:bool; -} - -table SearchRoomRequest { - option:int32; - worldId:uint32; - lobbyId:uint64; - rangeFilter_startIndex:uint32; - rangeFilter_max:uint32; - flagFilter:uint32; - flagAttr:uint32; - intFilter:[IntSearchFilter]; - binFilter:[BinSearchFilter]; - attrId:[uint16]; -} - -table SearchRoomResponse { - startIndex:uint32; - total:uint32; - rooms:[RoomDataExternal]; -} - -table CreateJoinRoomRequest { - worldId:uint32; - lobbyId:uint64; - maxSlot:uint32; - flagAttr:uint32; - roomBinAttrInternal:[BinAttr]; - roomSearchableIntAttrExternal:[IntAttr]; - roomSearchableBinAttrExternal:[BinAttr]; - roomBinAttrExternal:[BinAttr]; - roomPassword:[uint8]; - groupConfig:[GroupConfig]; - passwordSlotMask:uint64; - allowedUser:[string]; - blockedUser:[string]; - - joinRoomGroupLabel:[uint8]; - roomMemberBinAttrInternal:[BinAttr]; - teamId:uint8; - sigOptParam:OptParam; -} - -table JoinRoomRequest { - roomId:uint64; - roomPassword:[uint8]; - joinRoomGroupLabel:[uint8]; - roomMemberBinAttrInternal:[BinAttr]; - optData:PresenceOptionData; - teamId:uint8; -} - -table JoinRoomResponse { - room_data: RoomDataInternal; - signaling_data: [Matching2SignalingInfo]; -} - -table LeaveRoomRequest { - roomId:uint64; - optData:PresenceOptionData; -} - -table GetRoomDataExternalListRequest { - roomIds:[uint64]; - attrIds:[uint16]; -} - -table GetRoomDataExternalListResponse { - rooms:[RoomDataExternal]; -} - -table SetRoomDataExternalRequest { - roomId:uint64; - roomSearchableIntAttrExternal:[IntAttr]; - roomSearchableBinAttrExternal:[BinAttr]; - roomBinAttrExternal:[BinAttr]; -} - -table SetRoomDataInternalRequest { - roomId:uint64; - flagFilter:uint32; - flagAttr:uint32; - roomBinAttrInternal:[BinAttr]; - passwordConfig:[RoomGroupPasswordConfig]; - passwordSlotMask:[uint64]; - ownerPrivilegeRank:[uint16]; -} - -table GetRoomMemberDataInternalRequest { - roomId:uint64; - memberId:uint16; - attrId:[uint16]; -} - -table SetRoomMemberDataInternalRequest { - roomId:uint64; - memberId:uint16; - teamId:uint8; - roomMemberBinAttrInternal:[BinAttr]; -} - -table SetUserInfo { - serverId:uint16; - userBinAttr:[BinAttr]; -} - -table GetRoomDataInternalRequest { - roomId:uint64; - attrId:[uint16]; -} - -table RoomMemberUpdateInfo { - roomMemberDataInternal:RoomMemberDataInternal; - eventCause:uint8; - optData:PresenceOptionData; -} - -table NotificationUserJoinedRoom { - room_id:uint64; - update_info:RoomMemberUpdateInfo; - signaling:SignalingAddr; -} - -table RoomUpdateInfo { - eventCause:uint8; - errorCode:int32; - optData:PresenceOptionData; -} - -table RoomDataInternalUpdateInfo { - newRoomDataInternal:RoomDataInternal; - prevFlagAttr:uint32; - prevRoomPasswordSlotMask:uint64; - newRoomGroup:[uint8]; - newRoomBinAttrInternal:[uint16]; -} - -table RoomMemberDataInternalUpdateInfo { - newRoomMemberDataInternal:RoomMemberDataInternal; - prevFlagAttr:uint32; - prevTeamId:uint8; - newRoomMemberBinAttrInternal:[uint16]; -} - -table GetPingInfoResponse { - serverId:uint16; - worldId:uint32; - roomId:uint64; - rtt:uint32; -} - -table SendRoomMessageRequest { - roomId:uint64; - castType:uint8; - dst:[uint16]; - msg:[uint8]; - option:uint8; -} - -table RoomMessageInfo { - filtered:bool; - castType:uint8; - dst:[uint16]; - srcMember:UserInfo; - msg:[uint8]; -} - -table MessageDetails { - communicationId:string; - msgId:uint64; - mainType:uint16; - subType:uint16; - msgFeatures:uint32; - subject:string; - body:string; - data:[uint8]; -} - -table SendMessageRequest { - message:[uint8] (nested_flatbuffer: "MessageDetails"); - npids:[string]; -} - -table BoardInfo { - rankLimit:uint32; - updateMode:uint32; - sortMode:uint32; - uploadNumLimit:uint32; - uploadSizeLimit:uint32; -} - -table RecordScoreRequest { - boardId:uint32; - pcId:int32; - score:int64; - comment:string; - data:[uint8]; -} - -table GetScoreRangeRequest { - boardId:uint32; - startRank:uint32; - numRanks:uint32; - withComment:bool; - withGameInfo:bool; -} - -table ScoreNpIdPcId { - npid:string; - pcId:int32; -} - -table GetScoreNpIdRequest { - boardId:uint32; - npids:[ScoreNpIdPcId]; - withComment:bool; - withGameInfo:bool; -} - -table GetScoreFriendsRequest { - boardId:uint32; - include_self:bool; - max:uint32; - withComment:bool; - withGameInfo:bool; -} - -table ScoreRankData { - npId:string; - onlineName:string; - pcId:int32; - rank:uint32; - score:int64; - hasGameData:bool; - recordDate:uint64; -} - -table ScoreInfo { - data:[uint8]; -} - -table GetScoreResponse { - rankArray:[ScoreRankData]; - commentArray:[string]; - infoArray:[ScoreInfo]; - lastSortDate:uint64; - totalRecord:uint32; -} - -table RecordScoreGameDataRequest { - boardId:uint32; - pcId:int32; - score:int64; -} - -table GetScoreGameDataRequest { - boardId:uint32; - npId:string; - pcId:int32; -} - -table TusUser { - vuser:bool; - npid:string; -} - -table TusVariable { - ownerId:string; - hasData:bool; - lastChangedDate:uint64; - lastChangedAuthorId:string; - variable:int64; - oldVariable:int64; -} - -table TusVarResponse { - vars:[TusVariable]; -} - -table TusSetMultiSlotVariableRequest { - user:TusUser; - slotIdArray:[int32]; - variableArray:[int64]; -} - -table TusGetMultiSlotVariableRequest { - user:TusUser; - slotIdArray:[int32]; -} - -table TusGetMultiUserVariableRequest { - users:[TusUser]; - slotId:int32; -} - -table TusGetFriendsVariableRequest { - slotId:int32; - includeSelf:bool; - sortType:int32; - arrayNum:uint32; -} - -table TusAddAndGetVariableRequest { - user:TusUser; - slotId:int32; - inVariable:int64; - isLastChangedDate:[uint64]; - isLastChangedAuthorId:string; -} - -table TusTryAndSetVariableRequest { - user:TusUser; - slotId:int32; - opeType:int32; - variable:int64; - isLastChangedDate:[uint64]; - isLastChangedAuthorId:string; - compareValue:[int64]; -} - -table TusDeleteMultiSlotVariableRequest { - user:TusUser; - slotIdArray:[int32]; -} - -table TusSetDataRequest { - user:TusUser; - slotId:int32; - data:[uint8]; - info:[uint8]; - isLastChangedDate:[uint64]; - isLastChangedAuthorId:string; -} - -table TusDataStatus { - ownerId:string; - hasData:bool; - lastChangedDate:uint64; - lastChangedAuthorId:string; - info:[uint8]; -} - -table TusData { - status: TusDataStatus; - data:[uint8]; -} - -table TusDataStatusResponse { - status: [TusDataStatus]; -} - -table TusGetDataRequest { - user:TusUser; - slotId:int32; -} - -table TusGetMultiSlotDataStatusRequest { - user:TusUser; - slotIdArray:[int32]; -} - -table TusGetMultiUserDataStatusRequest { - users:[TusUser]; - slotId:int32; -} - -table TusGetFriendsDataStatusRequest { - slotId:int32; - includeSelf:bool; - sortType:int32; - arrayNum:uint32; -} - -table TusDeleteMultiSlotDataRequest { - user:TusUser; - slotIdArray:[int32]; -} - -table SetPresenceRequest { - title:string; - status:string; - comment:string; - data:[uint8]; -} - -table MatchingSearchCondition { - attr_type:uint32; - attr_id:uint32; - comp_op:uint32; - comp_value:uint32; -} - -table MatchingAttr { - attr_type:uint32; - attr_id:uint32; - num:uint32; - data:[uint8]; -} - -table CreateRoomGUIRequest { - total_slots:uint32; - private_slots:uint32; - privilege_grant:bool; - stealth:bool; - game_attrs:[MatchingAttr]; -} - -table GUIUserInfo { - info:UserInfo; - owner:bool; -} - -table MatchingRoomStatus { - id:[uint8]; - members:[GUIUserInfo]; - kick_actor:string; - opt:[uint8]; -} - -table GetRoomListGUIRequest { - range_start:uint32; - range_max:uint32; - conds:[MatchingSearchCondition]; - attrs:[MatchingAttr]; -} - -table MatchingRoom { - id:[uint8]; - attr:[MatchingAttr]; -} - -table MatchingRoomList { - start:uint32; - total:uint32; - rooms:[MatchingRoom]; -} - -table MatchingGuiRoomId { - id:[uint8]; -} - -table SetRoomSearchFlagGUI { - roomid:[uint8]; - stealth:bool; -} - -table QuickMatchGUIRequest { - conds:[MatchingSearchCondition]; - available_num:uint32; -} - -table SearchJoinRoomGUIRequest { - conds:[MatchingSearchCondition]; - attrs:[MatchingAttr]; -} - -table MatchingSearchJoinRoomInfo { - room:MatchingRoomStatus; - attr:[MatchingAttr]; -} diff --git a/rpcs3/Emu/NP/generated/np2_structs.pb.cc b/rpcs3/Emu/NP/generated/np2_structs.pb.cc new file mode 100644 index 0000000000..2a4c4f6241 --- /dev/null +++ b/rpcs3/Emu/NP/generated/np2_structs.pb.cc @@ -0,0 +1,36762 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: np2_structs.proto +// Protobuf C++ Version: 6.33.4 + +#include "np2_structs.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/io/zero_copy_stream_impl_lite.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace np2_structs { + +inline constexpr uint8::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + value_{0u} {} + +template +PROTOBUF_CONSTEXPR uint8::uint8(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(uint8_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct uint8DefaultTypeInternal { + PROTOBUF_CONSTEXPR uint8DefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~uint8DefaultTypeInternal() {} + union { + uint8 _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 uint8DefaultTypeInternal _uint8_default_instance_; + +inline constexpr uint16::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + value_{0u} {} + +template +PROTOBUF_CONSTEXPR uint16::uint16(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(uint16_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct uint16DefaultTypeInternal { + PROTOBUF_CONSTEXPR uint16DefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~uint16DefaultTypeInternal() {} + union { + uint16 _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 uint16DefaultTypeInternal _uint16_default_instance_; + +inline constexpr UserInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + onlinename_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + avatarurl_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR UserInfo::UserInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(UserInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct UserInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR UserInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~UserInfoDefaultTypeInternal() {} + union { + UserInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UserInfoDefaultTypeInternal _UserInfo_default_instance_; + +inline constexpr TusVariable::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + ownerid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + lastchangedauthorid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + lastchangeddate_{::uint64_t{0u}}, + variable_{::int64_t{0}}, + oldvariable_{::int64_t{0}}, + hasdata_{false} {} + +template +PROTOBUF_CONSTEXPR TusVariable::TusVariable(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusVariable_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusVariableDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusVariableDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusVariableDefaultTypeInternal() {} + union { + TusVariable _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusVariableDefaultTypeInternal _TusVariable_default_instance_; + +inline constexpr TusUser::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + vuser_{false} {} + +template +PROTOBUF_CONSTEXPR TusUser::TusUser(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusUser_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusUserDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusUserDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusUserDefaultTypeInternal() {} + union { + TusUser _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusUserDefaultTypeInternal _TusUser_default_instance_; + +inline constexpr TusGetFriendsVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotid_{0}, + includeself_{false}, + sorttype_{0}, + arraynum_{0u} {} + +template +PROTOBUF_CONSTEXPR TusGetFriendsVariableRequest::TusGetFriendsVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetFriendsVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetFriendsVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetFriendsVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetFriendsVariableRequestDefaultTypeInternal() {} + union { + TusGetFriendsVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetFriendsVariableRequestDefaultTypeInternal _TusGetFriendsVariableRequest_default_instance_; + +inline constexpr TusGetFriendsDataStatusRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotid_{0}, + includeself_{false}, + sorttype_{0}, + arraynum_{0u} {} + +template +PROTOBUF_CONSTEXPR TusGetFriendsDataStatusRequest::TusGetFriendsDataStatusRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetFriendsDataStatusRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetFriendsDataStatusRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetFriendsDataStatusRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetFriendsDataStatusRequestDefaultTypeInternal() {} + union { + TusGetFriendsDataStatusRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetFriendsDataStatusRequestDefaultTypeInternal _TusGetFriendsDataStatusRequest_default_instance_; + +inline constexpr TusDataStatus::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + ownerid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + lastchangedauthorid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + info_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + lastchangeddate_{::uint64_t{0u}}, + hasdata_{false} {} + +template +PROTOBUF_CONSTEXPR TusDataStatus::TusDataStatus(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusDataStatus_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusDataStatusDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusDataStatusDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusDataStatusDefaultTypeInternal() {} + union { + TusDataStatus _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusDataStatusDefaultTypeInternal _TusDataStatus_default_instance_; + +inline constexpr SetRoomSearchFlagGUI::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roomid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + stealth_{false} {} + +template +PROTOBUF_CONSTEXPR SetRoomSearchFlagGUI::SetRoomSearchFlagGUI(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SetRoomSearchFlagGUI_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SetRoomSearchFlagGUIDefaultTypeInternal { + PROTOBUF_CONSTEXPR SetRoomSearchFlagGUIDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SetRoomSearchFlagGUIDefaultTypeInternal() {} + union { + SetRoomSearchFlagGUI _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetRoomSearchFlagGUIDefaultTypeInternal _SetRoomSearchFlagGUI_default_instance_; + +inline constexpr SetPresenceRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + title_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + status_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + comment_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR SetPresenceRequest::SetPresenceRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SetPresenceRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SetPresenceRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SetPresenceRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SetPresenceRequestDefaultTypeInternal() {} + union { + SetPresenceRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetPresenceRequestDefaultTypeInternal _SetPresenceRequest_default_instance_; + +inline constexpr SendMessageRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npids_{}, + message_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR SendMessageRequest::SendMessageRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SendMessageRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SendMessageRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SendMessageRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SendMessageRequestDefaultTypeInternal() {} + union { + SendMessageRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SendMessageRequestDefaultTypeInternal _SendMessageRequest_default_instance_; + +inline constexpr ScoreRankData::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + onlinename_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + pcid_{0}, + rank_{0u}, + score_{::int64_t{0}}, + recorddate_{::uint64_t{0u}}, + hasgamedata_{false} {} + +template +PROTOBUF_CONSTEXPR ScoreRankData::ScoreRankData(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(ScoreRankData_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ScoreRankDataDefaultTypeInternal { + PROTOBUF_CONSTEXPR ScoreRankDataDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ScoreRankDataDefaultTypeInternal() {} + union { + ScoreRankData _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScoreRankDataDefaultTypeInternal _ScoreRankData_default_instance_; + +inline constexpr ScoreNpIdPcId::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + pcid_{0} {} + +template +PROTOBUF_CONSTEXPR ScoreNpIdPcId::ScoreNpIdPcId(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(ScoreNpIdPcId_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ScoreNpIdPcIdDefaultTypeInternal { + PROTOBUF_CONSTEXPR ScoreNpIdPcIdDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ScoreNpIdPcIdDefaultTypeInternal() {} + union { + ScoreNpIdPcId _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScoreNpIdPcIdDefaultTypeInternal _ScoreNpIdPcId_default_instance_; + +inline constexpr ScoreInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR ScoreInfo::ScoreInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(ScoreInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ScoreInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ScoreInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ScoreInfoDefaultTypeInternal() {} + union { + ScoreInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScoreInfoDefaultTypeInternal _ScoreInfo_default_instance_; + +inline constexpr RecordScoreRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + comment_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + boardid_{0u}, + pcid_{0}, + score_{::int64_t{0}} {} + +template +PROTOBUF_CONSTEXPR RecordScoreRequest::RecordScoreRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RecordScoreRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RecordScoreRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RecordScoreRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RecordScoreRequestDefaultTypeInternal() {} + union { + RecordScoreRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecordScoreRequestDefaultTypeInternal _RecordScoreRequest_default_instance_; + +inline constexpr RecordScoreGameDataRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + boardid_{0u}, + pcid_{0}, + score_{::int64_t{0}} {} + +template +PROTOBUF_CONSTEXPR RecordScoreGameDataRequest::RecordScoreGameDataRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RecordScoreGameDataRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RecordScoreGameDataRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RecordScoreGameDataRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RecordScoreGameDataRequestDefaultTypeInternal() {} + union { + RecordScoreGameDataRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecordScoreGameDataRequestDefaultTypeInternal _RecordScoreGameDataRequest_default_instance_; + +inline constexpr PresenceOptionData::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + len_{0u} {} + +template +PROTOBUF_CONSTEXPR PresenceOptionData::PresenceOptionData(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(PresenceOptionData_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct PresenceOptionDataDefaultTypeInternal { + PROTOBUF_CONSTEXPR PresenceOptionDataDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~PresenceOptionDataDefaultTypeInternal() {} + union { + PresenceOptionData _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PresenceOptionDataDefaultTypeInternal _PresenceOptionData_default_instance_; + +inline constexpr MatchingSearchCondition::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + attr_type_{0u}, + attr_id_{0u}, + comp_op_{0u}, + comp_value_{0u} {} + +template +PROTOBUF_CONSTEXPR MatchingSearchCondition::MatchingSearchCondition(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingSearchCondition_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingSearchConditionDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingSearchConditionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingSearchConditionDefaultTypeInternal() {} + union { + MatchingSearchCondition _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingSearchConditionDefaultTypeInternal _MatchingSearchCondition_default_instance_; + +inline constexpr MatchingGuiRoomId::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + id_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR MatchingGuiRoomId::MatchingGuiRoomId(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingGuiRoomId_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingGuiRoomIdDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingGuiRoomIdDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingGuiRoomIdDefaultTypeInternal() {} + union { + MatchingGuiRoomId _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingGuiRoomIdDefaultTypeInternal _MatchingGuiRoomId_default_instance_; + +inline constexpr MatchingAttr::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + attr_type_{0u}, + attr_id_{0u}, + num_{0u} {} + +template +PROTOBUF_CONSTEXPR MatchingAttr::MatchingAttr(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingAttr_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingAttrDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingAttrDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingAttrDefaultTypeInternal() {} + union { + MatchingAttr _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingAttrDefaultTypeInternal _MatchingAttr_default_instance_; + +inline constexpr GroupConfig::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + label_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + slotnum_{0u}, + withpassword_{false} {} + +template +PROTOBUF_CONSTEXPR GroupConfig::GroupConfig(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GroupConfig_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GroupConfigDefaultTypeInternal { + PROTOBUF_CONSTEXPR GroupConfigDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GroupConfigDefaultTypeInternal() {} + union { + GroupConfig _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GroupConfigDefaultTypeInternal _GroupConfig_default_instance_; + +inline constexpr GetScoreRangeRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + boardid_{0u}, + startrank_{0u}, + numranks_{0u}, + withcomment_{false}, + withgameinfo_{false} {} + +template +PROTOBUF_CONSTEXPR GetScoreRangeRequest::GetScoreRangeRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetScoreRangeRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetScoreRangeRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetScoreRangeRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetScoreRangeRequestDefaultTypeInternal() {} + union { + GetScoreRangeRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetScoreRangeRequestDefaultTypeInternal _GetScoreRangeRequest_default_instance_; + +inline constexpr GetScoreGameDataRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + boardid_{0u}, + pcid_{0} {} + +template +PROTOBUF_CONSTEXPR GetScoreGameDataRequest::GetScoreGameDataRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetScoreGameDataRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetScoreGameDataRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetScoreGameDataRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetScoreGameDataRequestDefaultTypeInternal() {} + union { + GetScoreGameDataRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetScoreGameDataRequestDefaultTypeInternal _GetScoreGameDataRequest_default_instance_; + +inline constexpr GetScoreFriendsRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + boardid_{0u}, + max_{0u}, + include_self_{false}, + withcomment_{false}, + withgameinfo_{false} {} + +template +PROTOBUF_CONSTEXPR GetScoreFriendsRequest::GetScoreFriendsRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetScoreFriendsRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetScoreFriendsRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetScoreFriendsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetScoreFriendsRequestDefaultTypeInternal() {} + union { + GetScoreFriendsRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetScoreFriendsRequestDefaultTypeInternal _GetScoreFriendsRequest_default_instance_; + +inline constexpr BoardInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + ranklimit_{0u}, + updatemode_{0u}, + sortmode_{0u}, + uploadnumlimit_{0u}, + uploadsizelimit_{0u} {} + +template +PROTOBUF_CONSTEXPR BoardInfo::BoardInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(BoardInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct BoardInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR BoardInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~BoardInfoDefaultTypeInternal() {} + union { + BoardInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoardInfoDefaultTypeInternal _BoardInfo_default_instance_; + +inline constexpr TusVarResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + vars_{} {} + +template +PROTOBUF_CONSTEXPR TusVarResponse::TusVarResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusVarResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusVarResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusVarResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusVarResponseDefaultTypeInternal() {} + union { + TusVarResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusVarResponseDefaultTypeInternal _TusVarResponse_default_instance_; + +inline constexpr TusTryAndSetVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + islastchangeddate_{}, + _islastchangeddate_cached_byte_size_{0}, + comparevalue_{}, + _comparevalue_cached_byte_size_{0}, + islastchangedauthorid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + user_{nullptr}, + slotid_{0}, + opetype_{0}, + variable_{::int64_t{0}} {} + +template +PROTOBUF_CONSTEXPR TusTryAndSetVariableRequest::TusTryAndSetVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusTryAndSetVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusTryAndSetVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusTryAndSetVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusTryAndSetVariableRequestDefaultTypeInternal() {} + union { + TusTryAndSetVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusTryAndSetVariableRequestDefaultTypeInternal _TusTryAndSetVariableRequest_default_instance_; + +inline constexpr TusSetMultiSlotVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotidarray_{}, + _slotidarray_cached_byte_size_{0}, + variablearray_{}, + _variablearray_cached_byte_size_{0}, + user_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TusSetMultiSlotVariableRequest::TusSetMultiSlotVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusSetMultiSlotVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusSetMultiSlotVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusSetMultiSlotVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusSetMultiSlotVariableRequestDefaultTypeInternal() {} + union { + TusSetMultiSlotVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusSetMultiSlotVariableRequestDefaultTypeInternal _TusSetMultiSlotVariableRequest_default_instance_; + +inline constexpr TusSetDataRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + islastchangeddate_{}, + _islastchangeddate_cached_byte_size_{0}, + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + info_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + islastchangedauthorid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + user_{nullptr}, + slotid_{0} {} + +template +PROTOBUF_CONSTEXPR TusSetDataRequest::TusSetDataRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusSetDataRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusSetDataRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusSetDataRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusSetDataRequestDefaultTypeInternal() {} + union { + TusSetDataRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusSetDataRequestDefaultTypeInternal _TusSetDataRequest_default_instance_; + +inline constexpr TusGetMultiUserVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + users_{}, + slotid_{0} {} + +template +PROTOBUF_CONSTEXPR TusGetMultiUserVariableRequest::TusGetMultiUserVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetMultiUserVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetMultiUserVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetMultiUserVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetMultiUserVariableRequestDefaultTypeInternal() {} + union { + TusGetMultiUserVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetMultiUserVariableRequestDefaultTypeInternal _TusGetMultiUserVariableRequest_default_instance_; + +inline constexpr TusGetMultiUserDataStatusRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + users_{}, + slotid_{0} {} + +template +PROTOBUF_CONSTEXPR TusGetMultiUserDataStatusRequest::TusGetMultiUserDataStatusRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetMultiUserDataStatusRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetMultiUserDataStatusRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetMultiUserDataStatusRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetMultiUserDataStatusRequestDefaultTypeInternal() {} + union { + TusGetMultiUserDataStatusRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetMultiUserDataStatusRequestDefaultTypeInternal _TusGetMultiUserDataStatusRequest_default_instance_; + +inline constexpr TusGetMultiSlotVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotidarray_{}, + _slotidarray_cached_byte_size_{0}, + user_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TusGetMultiSlotVariableRequest::TusGetMultiSlotVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetMultiSlotVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetMultiSlotVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetMultiSlotVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetMultiSlotVariableRequestDefaultTypeInternal() {} + union { + TusGetMultiSlotVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetMultiSlotVariableRequestDefaultTypeInternal _TusGetMultiSlotVariableRequest_default_instance_; + +inline constexpr TusGetMultiSlotDataStatusRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotidarray_{}, + _slotidarray_cached_byte_size_{0}, + user_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TusGetMultiSlotDataStatusRequest::TusGetMultiSlotDataStatusRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetMultiSlotDataStatusRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetMultiSlotDataStatusRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetMultiSlotDataStatusRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetMultiSlotDataStatusRequestDefaultTypeInternal() {} + union { + TusGetMultiSlotDataStatusRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetMultiSlotDataStatusRequestDefaultTypeInternal _TusGetMultiSlotDataStatusRequest_default_instance_; + +inline constexpr TusGetDataRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + user_{nullptr}, + slotid_{0} {} + +template +PROTOBUF_CONSTEXPR TusGetDataRequest::TusGetDataRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusGetDataRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusGetDataRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusGetDataRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusGetDataRequestDefaultTypeInternal() {} + union { + TusGetDataRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusGetDataRequestDefaultTypeInternal _TusGetDataRequest_default_instance_; + +inline constexpr TusDeleteMultiSlotVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotidarray_{}, + _slotidarray_cached_byte_size_{0}, + user_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TusDeleteMultiSlotVariableRequest::TusDeleteMultiSlotVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusDeleteMultiSlotVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusDeleteMultiSlotVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusDeleteMultiSlotVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusDeleteMultiSlotVariableRequestDefaultTypeInternal() {} + union { + TusDeleteMultiSlotVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusDeleteMultiSlotVariableRequestDefaultTypeInternal _TusDeleteMultiSlotVariableRequest_default_instance_; + +inline constexpr TusDeleteMultiSlotDataRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + slotidarray_{}, + _slotidarray_cached_byte_size_{0}, + user_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TusDeleteMultiSlotDataRequest::TusDeleteMultiSlotDataRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusDeleteMultiSlotDataRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusDeleteMultiSlotDataRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusDeleteMultiSlotDataRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusDeleteMultiSlotDataRequestDefaultTypeInternal() {} + union { + TusDeleteMultiSlotDataRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusDeleteMultiSlotDataRequestDefaultTypeInternal _TusDeleteMultiSlotDataRequest_default_instance_; + +inline constexpr TusDataStatusResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + status_{} {} + +template +PROTOBUF_CONSTEXPR TusDataStatusResponse::TusDataStatusResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusDataStatusResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusDataStatusResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusDataStatusResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusDataStatusResponseDefaultTypeInternal() {} + union { + TusDataStatusResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusDataStatusResponseDefaultTypeInternal _TusDataStatusResponse_default_instance_; + +inline constexpr TusData::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + status_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TusData::TusData(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusData_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusDataDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusDataDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusDataDefaultTypeInternal() {} + union { + TusData _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusDataDefaultTypeInternal _TusData_default_instance_; + +inline constexpr TusAddAndGetVariableRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + islastchangeddate_{}, + _islastchangeddate_cached_byte_size_{0}, + islastchangedauthorid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + user_{nullptr}, + invariable_{::int64_t{0}}, + slotid_{0} {} + +template +PROTOBUF_CONSTEXPR TusAddAndGetVariableRequest::TusAddAndGetVariableRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(TusAddAndGetVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TusAddAndGetVariableRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TusAddAndGetVariableRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TusAddAndGetVariableRequestDefaultTypeInternal() {} + union { + TusAddAndGetVariableRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TusAddAndGetVariableRequestDefaultTypeInternal _TusAddAndGetVariableRequest_default_instance_; + +inline constexpr SignalingAddr::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + ip_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + port_{nullptr} {} + +template +PROTOBUF_CONSTEXPR SignalingAddr::SignalingAddr(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SignalingAddr_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SignalingAddrDefaultTypeInternal { + PROTOBUF_CONSTEXPR SignalingAddrDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SignalingAddrDefaultTypeInternal() {} + union { + SignalingAddr _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SignalingAddrDefaultTypeInternal _SignalingAddr_default_instance_; + +inline constexpr SendRoomMessageRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + dst_{}, + msg_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + casttype_{nullptr}, + option_{nullptr}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR SendRoomMessageRequest::SendRoomMessageRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SendRoomMessageRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SendRoomMessageRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SendRoomMessageRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SendRoomMessageRequestDefaultTypeInternal() {} + union { + SendRoomMessageRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SendRoomMessageRequestDefaultTypeInternal _SendRoomMessageRequest_default_instance_; + +inline constexpr SearchJoinRoomGUIRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + conds_{}, + attrs_{} {} + +template +PROTOBUF_CONSTEXPR SearchJoinRoomGUIRequest::SearchJoinRoomGUIRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SearchJoinRoomGUIRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SearchJoinRoomGUIRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SearchJoinRoomGUIRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SearchJoinRoomGUIRequestDefaultTypeInternal() {} + union { + SearchJoinRoomGUIRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchJoinRoomGUIRequestDefaultTypeInternal _SearchJoinRoomGUIRequest_default_instance_; + +inline constexpr RoomUpdateInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + eventcause_{nullptr}, + optdata_{nullptr}, + errorcode_{0} {} + +template +PROTOBUF_CONSTEXPR RoomUpdateInfo::RoomUpdateInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomUpdateInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomUpdateInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomUpdateInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomUpdateInfoDefaultTypeInternal() {} + union { + RoomUpdateInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomUpdateInfoDefaultTypeInternal _RoomUpdateInfo_default_instance_; + +inline constexpr RoomMessageInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + dst_{}, + msg_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + casttype_{nullptr}, + srcmember_{nullptr}, + filtered_{false} {} + +template +PROTOBUF_CONSTEXPR RoomMessageInfo::RoomMessageInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomMessageInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomMessageInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomMessageInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomMessageInfoDefaultTypeInternal() {} + union { + RoomMessageInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomMessageInfoDefaultTypeInternal _RoomMessageInfo_default_instance_; + +inline constexpr RoomMemberDataExternal::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + userinfo_{nullptr}, + role_{nullptr}, + joindate_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR RoomMemberDataExternal::RoomMemberDataExternal(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomMemberDataExternal_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomMemberDataExternalDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomMemberDataExternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomMemberDataExternalDefaultTypeInternal() {} + union { + RoomMemberDataExternal _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomMemberDataExternalDefaultTypeInternal _RoomMemberDataExternal_default_instance_; + +inline constexpr RoomGroupPasswordConfig::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + groupid_{nullptr}, + withpassword_{false} {} + +template +PROTOBUF_CONSTEXPR RoomGroupPasswordConfig::RoomGroupPasswordConfig(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomGroupPasswordConfig_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomGroupPasswordConfigDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomGroupPasswordConfigDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomGroupPasswordConfigDefaultTypeInternal() {} + union { + RoomGroupPasswordConfig _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomGroupPasswordConfigDefaultTypeInternal _RoomGroupPasswordConfig_default_instance_; + +inline constexpr RoomGroup::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + label_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + groupid_{nullptr}, + withpassword_{false}, + slotnum_{0u}, + curgroupmembernum_{0u} {} + +template +PROTOBUF_CONSTEXPR RoomGroup::RoomGroup(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomGroup_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomGroupDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomGroupDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomGroupDefaultTypeInternal() {} + union { + RoomGroup _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomGroupDefaultTypeInternal _RoomGroup_default_instance_; + +inline constexpr QuickMatchGUIRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + conds_{}, + available_num_{0u} {} + +template +PROTOBUF_CONSTEXPR QuickMatchGUIRequest::QuickMatchGUIRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(QuickMatchGUIRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct QuickMatchGUIRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR QuickMatchGUIRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~QuickMatchGUIRequestDefaultTypeInternal() {} + union { + QuickMatchGUIRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QuickMatchGUIRequestDefaultTypeInternal _QuickMatchGUIRequest_default_instance_; + +inline constexpr OptParam::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + type_{nullptr}, + flag_{nullptr}, + hubmemberid_{nullptr} {} + +template +PROTOBUF_CONSTEXPR OptParam::OptParam(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(OptParam_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct OptParamDefaultTypeInternal { + PROTOBUF_CONSTEXPR OptParamDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~OptParamDefaultTypeInternal() {} + union { + OptParam _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptParamDefaultTypeInternal _OptParam_default_instance_; + +inline constexpr MessageDetails::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + communicationid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + subject_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + body_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + maintype_{nullptr}, + subtype_{nullptr}, + msgid_{::uint64_t{0u}}, + msgfeatures_{0u} {} + +template +PROTOBUF_CONSTEXPR MessageDetails::MessageDetails(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MessageDetails_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MessageDetailsDefaultTypeInternal { + PROTOBUF_CONSTEXPR MessageDetailsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MessageDetailsDefaultTypeInternal() {} + union { + MessageDetails _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageDetailsDefaultTypeInternal _MessageDetails_default_instance_; + +inline constexpr MatchingRoom::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + attr_{}, + id_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR MatchingRoom::MatchingRoom(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingRoom_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingRoomDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingRoomDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingRoomDefaultTypeInternal() {} + union { + MatchingRoom _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingRoomDefaultTypeInternal _MatchingRoom_default_instance_; + +inline constexpr LeaveRoomRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + optdata_{nullptr}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR LeaveRoomRequest::LeaveRoomRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(LeaveRoomRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct LeaveRoomRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR LeaveRoomRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~LeaveRoomRequestDefaultTypeInternal() {} + union { + LeaveRoomRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LeaveRoomRequestDefaultTypeInternal _LeaveRoomRequest_default_instance_; + +inline constexpr IntAttr::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + id_{nullptr}, + num_{0u} {} + +template +PROTOBUF_CONSTEXPR IntAttr::IntAttr(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(IntAttr_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct IntAttrDefaultTypeInternal { + PROTOBUF_CONSTEXPR IntAttrDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~IntAttrDefaultTypeInternal() {} + union { + IntAttr _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IntAttrDefaultTypeInternal _IntAttr_default_instance_; + +inline constexpr GetScoreResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + rankarray_{}, + commentarray_{}, + infoarray_{}, + lastsortdate_{::uint64_t{0u}}, + totalrecord_{0u} {} + +template +PROTOBUF_CONSTEXPR GetScoreResponse::GetScoreResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetScoreResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetScoreResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetScoreResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetScoreResponseDefaultTypeInternal() {} + union { + GetScoreResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetScoreResponseDefaultTypeInternal _GetScoreResponse_default_instance_; + +inline constexpr GetScoreNpIdRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npids_{}, + boardid_{0u}, + withcomment_{false}, + withgameinfo_{false} {} + +template +PROTOBUF_CONSTEXPR GetScoreNpIdRequest::GetScoreNpIdRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetScoreNpIdRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetScoreNpIdRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetScoreNpIdRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetScoreNpIdRequestDefaultTypeInternal() {} + union { + GetScoreNpIdRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetScoreNpIdRequestDefaultTypeInternal _GetScoreNpIdRequest_default_instance_; + +inline constexpr GetRoomMemberDataInternalRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + attrid_{}, + memberid_{nullptr}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR GetRoomMemberDataInternalRequest::GetRoomMemberDataInternalRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetRoomMemberDataInternalRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetRoomMemberDataInternalRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRoomMemberDataInternalRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRoomMemberDataInternalRequestDefaultTypeInternal() {} + union { + GetRoomMemberDataInternalRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomMemberDataInternalRequestDefaultTypeInternal _GetRoomMemberDataInternalRequest_default_instance_; + +inline constexpr GetRoomListGUIRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + conds_{}, + attrs_{}, + range_start_{0u}, + range_max_{0u} {} + +template +PROTOBUF_CONSTEXPR GetRoomListGUIRequest::GetRoomListGUIRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetRoomListGUIRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetRoomListGUIRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRoomListGUIRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRoomListGUIRequestDefaultTypeInternal() {} + union { + GetRoomListGUIRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomListGUIRequestDefaultTypeInternal _GetRoomListGUIRequest_default_instance_; + +inline constexpr GetRoomDataInternalRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + attrid_{}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR GetRoomDataInternalRequest::GetRoomDataInternalRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetRoomDataInternalRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetRoomDataInternalRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRoomDataInternalRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRoomDataInternalRequestDefaultTypeInternal() {} + union { + GetRoomDataInternalRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDataInternalRequestDefaultTypeInternal _GetRoomDataInternalRequest_default_instance_; + +inline constexpr GetRoomDataExternalListRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roomids_{}, + _roomids_cached_byte_size_{0}, + attrids_{} {} + +template +PROTOBUF_CONSTEXPR GetRoomDataExternalListRequest::GetRoomDataExternalListRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetRoomDataExternalListRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetRoomDataExternalListRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRoomDataExternalListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRoomDataExternalListRequestDefaultTypeInternal() {} + union { + GetRoomDataExternalListRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDataExternalListRequestDefaultTypeInternal _GetRoomDataExternalListRequest_default_instance_; + +inline constexpr GetPingInfoResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + serverid_{nullptr}, + roomid_{::uint64_t{0u}}, + worldid_{0u}, + rtt_{0u} {} + +template +PROTOBUF_CONSTEXPR GetPingInfoResponse::GetPingInfoResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetPingInfoResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetPingInfoResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetPingInfoResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetPingInfoResponseDefaultTypeInternal() {} + union { + GetPingInfoResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPingInfoResponseDefaultTypeInternal _GetPingInfoResponse_default_instance_; + +inline constexpr GUIUserInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + info_{nullptr}, + owner_{false} {} + +template +PROTOBUF_CONSTEXPR GUIUserInfo::GUIUserInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GUIUserInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GUIUserInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR GUIUserInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GUIUserInfoDefaultTypeInternal() {} + union { + GUIUserInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GUIUserInfoDefaultTypeInternal _GUIUserInfo_default_instance_; + +inline constexpr CreateRoomGUIRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + game_attrs_{}, + total_slots_{0u}, + private_slots_{0u}, + privilege_grant_{false}, + stealth_{false} {} + +template +PROTOBUF_CONSTEXPR CreateRoomGUIRequest::CreateRoomGUIRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(CreateRoomGUIRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct CreateRoomGUIRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateRoomGUIRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateRoomGUIRequestDefaultTypeInternal() {} + union { + CreateRoomGUIRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateRoomGUIRequestDefaultTypeInternal _CreateRoomGUIRequest_default_instance_; + +inline constexpr BinAttr::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + id_{nullptr} {} + +template +PROTOBUF_CONSTEXPR BinAttr::BinAttr(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(BinAttr_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct BinAttrDefaultTypeInternal { + PROTOBUF_CONSTEXPR BinAttrDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~BinAttrDefaultTypeInternal() {} + union { + BinAttr _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BinAttrDefaultTypeInternal _BinAttr_default_instance_; + +inline constexpr SetUserInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + userbinattr_{}, + serverid_{nullptr} {} + +template +PROTOBUF_CONSTEXPR SetUserInfo::SetUserInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SetUserInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SetUserInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR SetUserInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SetUserInfoDefaultTypeInternal() {} + union { + SetUserInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetUserInfoDefaultTypeInternal _SetUserInfo_default_instance_; + +inline constexpr SetRoomMemberDataInternalRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roommemberbinattrinternal_{}, + memberid_{nullptr}, + teamid_{nullptr}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR SetRoomMemberDataInternalRequest::SetRoomMemberDataInternalRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SetRoomMemberDataInternalRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SetRoomMemberDataInternalRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SetRoomMemberDataInternalRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SetRoomMemberDataInternalRequestDefaultTypeInternal() {} + union { + SetRoomMemberDataInternalRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetRoomMemberDataInternalRequestDefaultTypeInternal _SetRoomMemberDataInternalRequest_default_instance_; + +inline constexpr SetRoomDataInternalRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roombinattrinternal_{}, + passwordconfig_{}, + passwordslotmask_{}, + _passwordslotmask_cached_byte_size_{0}, + ownerprivilegerank_{}, + roomid_{::uint64_t{0u}}, + flagfilter_{0u}, + flagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR SetRoomDataInternalRequest::SetRoomDataInternalRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SetRoomDataInternalRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SetRoomDataInternalRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SetRoomDataInternalRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SetRoomDataInternalRequestDefaultTypeInternal() {} + union { + SetRoomDataInternalRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetRoomDataInternalRequestDefaultTypeInternal _SetRoomDataInternalRequest_default_instance_; + +inline constexpr SetRoomDataExternalRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roomsearchableintattrexternal_{}, + roomsearchablebinattrexternal_{}, + roombinattrexternal_{}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR SetRoomDataExternalRequest::SetRoomDataExternalRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SetRoomDataExternalRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SetRoomDataExternalRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SetRoomDataExternalRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SetRoomDataExternalRequestDefaultTypeInternal() {} + union { + SetRoomDataExternalRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetRoomDataExternalRequestDefaultTypeInternal _SetRoomDataExternalRequest_default_instance_; + +inline constexpr RoomMemberBinAttrInternal::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + data_{nullptr}, + updatedate_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR RoomMemberBinAttrInternal::RoomMemberBinAttrInternal(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomMemberBinAttrInternal_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomMemberBinAttrInternalDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomMemberBinAttrInternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomMemberBinAttrInternalDefaultTypeInternal() {} + union { + RoomMemberBinAttrInternal _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomMemberBinAttrInternalDefaultTypeInternal _RoomMemberBinAttrInternal_default_instance_; + +inline constexpr RoomDataExternal::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roomgroup_{}, + roomsearchableintattrexternal_{}, + roomsearchablebinattrexternal_{}, + roombinattrexternal_{}, + serverid_{nullptr}, + publicslotnum_{nullptr}, + privateslotnum_{nullptr}, + openpublicslotnum_{nullptr}, + maxslot_{nullptr}, + openprivateslotnum_{nullptr}, + curmembernum_{nullptr}, + owner_{nullptr}, + lobbyid_{::uint64_t{0u}}, + roomid_{::uint64_t{0u}}, + worldid_{0u}, + flagattr_{0u}, + passwordslotmask_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR RoomDataExternal::RoomDataExternal(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomDataExternal_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomDataExternalDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomDataExternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomDataExternalDefaultTypeInternal() {} + union { + RoomDataExternal _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomDataExternalDefaultTypeInternal _RoomDataExternal_default_instance_; + +inline constexpr MatchingSignalingInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + npid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + addr_{nullptr} {} + +template +PROTOBUF_CONSTEXPR MatchingSignalingInfo::MatchingSignalingInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingSignalingInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingSignalingInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingSignalingInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingSignalingInfoDefaultTypeInternal() {} + union { + MatchingSignalingInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingSignalingInfoDefaultTypeInternal _MatchingSignalingInfo_default_instance_; + +inline constexpr MatchingRoomStatus::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + members_{}, + id_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + kick_actor_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + opt_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR MatchingRoomStatus::MatchingRoomStatus(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingRoomStatus_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingRoomStatusDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingRoomStatusDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingRoomStatusDefaultTypeInternal() {} + union { + MatchingRoomStatus _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingRoomStatusDefaultTypeInternal _MatchingRoomStatus_default_instance_; + +inline constexpr MatchingRoomList::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + rooms_{}, + start_{0u}, + total_{0u} {} + +template +PROTOBUF_CONSTEXPR MatchingRoomList::MatchingRoomList(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingRoomList_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingRoomListDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingRoomListDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingRoomListDefaultTypeInternal() {} + union { + MatchingRoomList _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingRoomListDefaultTypeInternal _MatchingRoomList_default_instance_; + +inline constexpr Matching2SignalingInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + member_id_{nullptr}, + addr_{nullptr} {} + +template +PROTOBUF_CONSTEXPR Matching2SignalingInfo::Matching2SignalingInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(Matching2SignalingInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct Matching2SignalingInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR Matching2SignalingInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~Matching2SignalingInfoDefaultTypeInternal() {} + union { + Matching2SignalingInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Matching2SignalingInfoDefaultTypeInternal _Matching2SignalingInfo_default_instance_; + +inline constexpr JoinRoomRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roommemberbinattrinternal_{}, + roompassword_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + joinroomgrouplabel_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + optdata_{nullptr}, + teamid_{nullptr}, + roomid_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR JoinRoomRequest::JoinRoomRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(JoinRoomRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct JoinRoomRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR JoinRoomRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~JoinRoomRequestDefaultTypeInternal() {} + union { + JoinRoomRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JoinRoomRequestDefaultTypeInternal _JoinRoomRequest_default_instance_; + +inline constexpr IntSearchFilter::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + searchoperator_{nullptr}, + attr_{nullptr} {} + +template +PROTOBUF_CONSTEXPR IntSearchFilter::IntSearchFilter(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(IntSearchFilter_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct IntSearchFilterDefaultTypeInternal { + PROTOBUF_CONSTEXPR IntSearchFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~IntSearchFilterDefaultTypeInternal() {} + union { + IntSearchFilter _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IntSearchFilterDefaultTypeInternal _IntSearchFilter_default_instance_; + +inline constexpr GetRoomMemberDataExternalListResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + members_{} {} + +template +PROTOBUF_CONSTEXPR GetRoomMemberDataExternalListResponse::GetRoomMemberDataExternalListResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetRoomMemberDataExternalListResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetRoomMemberDataExternalListResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRoomMemberDataExternalListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRoomMemberDataExternalListResponseDefaultTypeInternal() {} + union { + GetRoomMemberDataExternalListResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomMemberDataExternalListResponseDefaultTypeInternal _GetRoomMemberDataExternalListResponse_default_instance_; + +inline constexpr CreateJoinRoomRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roombinattrinternal_{}, + roomsearchableintattrexternal_{}, + roomsearchablebinattrexternal_{}, + roombinattrexternal_{}, + groupconfig_{}, + alloweduser_{}, + blockeduser_{}, + roommemberbinattrinternal_{}, + roompassword_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + joinroomgrouplabel_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + teamid_{nullptr}, + sigoptparam_{nullptr}, + lobbyid_{::uint64_t{0u}}, + worldid_{0u}, + maxslot_{0u}, + passwordslotmask_{::uint64_t{0u}}, + flagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR CreateJoinRoomRequest::CreateJoinRoomRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(CreateJoinRoomRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct CreateJoinRoomRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateJoinRoomRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateJoinRoomRequestDefaultTypeInternal() {} + union { + CreateJoinRoomRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateJoinRoomRequestDefaultTypeInternal _CreateJoinRoomRequest_default_instance_; + +inline constexpr BinSearchFilter::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + searchoperator_{nullptr}, + attr_{nullptr} {} + +template +PROTOBUF_CONSTEXPR BinSearchFilter::BinSearchFilter(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(BinSearchFilter_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct BinSearchFilterDefaultTypeInternal { + PROTOBUF_CONSTEXPR BinSearchFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~BinSearchFilterDefaultTypeInternal() {} + union { + BinSearchFilter _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BinSearchFilterDefaultTypeInternal _BinSearchFilter_default_instance_; + +inline constexpr BinAttrInternal::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + updatememberid_{nullptr}, + data_{nullptr}, + updatedate_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR BinAttrInternal::BinAttrInternal(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(BinAttrInternal_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct BinAttrInternalDefaultTypeInternal { + PROTOBUF_CONSTEXPR BinAttrInternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~BinAttrInternalDefaultTypeInternal() {} + union { + BinAttrInternal _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BinAttrInternalDefaultTypeInternal _BinAttrInternal_default_instance_; + +inline constexpr SearchRoomResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + rooms_{}, + startindex_{0u}, + total_{0u} {} + +template +PROTOBUF_CONSTEXPR SearchRoomResponse::SearchRoomResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SearchRoomResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SearchRoomResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR SearchRoomResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SearchRoomResponseDefaultTypeInternal() {} + union { + SearchRoomResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchRoomResponseDefaultTypeInternal _SearchRoomResponse_default_instance_; + +inline constexpr SearchRoomRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + intfilter_{}, + binfilter_{}, + attrid_{}, + option_{0}, + worldid_{0u}, + lobbyid_{::uint64_t{0u}}, + rangefilter_startindex_{0u}, + rangefilter_max_{0u}, + flagfilter_{0u}, + flagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR SearchRoomRequest::SearchRoomRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(SearchRoomRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SearchRoomRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SearchRoomRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SearchRoomRequestDefaultTypeInternal() {} + union { + SearchRoomRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchRoomRequestDefaultTypeInternal _SearchRoomRequest_default_instance_; + +inline constexpr RoomMemberDataInternal::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roommemberbinattrinternal_{}, + userinfo_{nullptr}, + teamid_{nullptr}, + roomgroup_{nullptr}, + nattype_{nullptr}, + joindate_{::uint64_t{0u}}, + memberid_{0u}, + flagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR RoomMemberDataInternal::RoomMemberDataInternal(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomMemberDataInternal_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomMemberDataInternalDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomMemberDataInternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomMemberDataInternalDefaultTypeInternal() {} + union { + RoomMemberDataInternal _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomMemberDataInternalDefaultTypeInternal _RoomMemberDataInternal_default_instance_; + +inline constexpr MatchingSearchJoinRoomInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + attr_{}, + room_{nullptr} {} + +template +PROTOBUF_CONSTEXPR MatchingSearchJoinRoomInfo::MatchingSearchJoinRoomInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(MatchingSearchJoinRoomInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct MatchingSearchJoinRoomInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR MatchingSearchJoinRoomInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MatchingSearchJoinRoomInfoDefaultTypeInternal() {} + union { + MatchingSearchJoinRoomInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MatchingSearchJoinRoomInfoDefaultTypeInternal _MatchingSearchJoinRoomInfo_default_instance_; + +inline constexpr GetRoomDataExternalListResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + rooms_{} {} + +template +PROTOBUF_CONSTEXPR GetRoomDataExternalListResponse::GetRoomDataExternalListResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(GetRoomDataExternalListResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GetRoomDataExternalListResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRoomDataExternalListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRoomDataExternalListResponseDefaultTypeInternal() {} + union { + GetRoomDataExternalListResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRoomDataExternalListResponseDefaultTypeInternal _GetRoomDataExternalListResponse_default_instance_; + +inline constexpr RoomMemberUpdateInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + roommemberdatainternal_{nullptr}, + eventcause_{nullptr}, + optdata_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RoomMemberUpdateInfo::RoomMemberUpdateInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomMemberUpdateInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomMemberUpdateInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomMemberUpdateInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomMemberUpdateInfoDefaultTypeInternal() {} + union { + RoomMemberUpdateInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomMemberUpdateInfoDefaultTypeInternal _RoomMemberUpdateInfo_default_instance_; + +inline constexpr RoomMemberDataInternalUpdateInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + newroommemberbinattrinternal_{}, + newroommemberdatainternal_{nullptr}, + prevteamid_{nullptr}, + prevflagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR RoomMemberDataInternalUpdateInfo::RoomMemberDataInternalUpdateInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomMemberDataInternalUpdateInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomMemberDataInternalUpdateInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomMemberDataInternalUpdateInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomMemberDataInternalUpdateInfoDefaultTypeInternal() {} + union { + RoomMemberDataInternalUpdateInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomMemberDataInternalUpdateInfoDefaultTypeInternal _RoomMemberDataInternalUpdateInfo_default_instance_; + +inline constexpr RoomDataInternal::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + memberlist_{}, + roomgroup_{}, + roombinattrinternal_{}, + serverid_{nullptr}, + ownerid_{nullptr}, + lobbyid_{::uint64_t{0u}}, + roomid_{::uint64_t{0u}}, + worldid_{0u}, + maxslot_{0u}, + passwordslotmask_{::uint64_t{0u}}, + flagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR RoomDataInternal::RoomDataInternal(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomDataInternal_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomDataInternalDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomDataInternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomDataInternalDefaultTypeInternal() {} + union { + RoomDataInternal _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomDataInternalDefaultTypeInternal _RoomDataInternal_default_instance_; + +inline constexpr RoomDataInternalUpdateInfo::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + newroombinattrinternal_{}, + newroomgroup_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + newroomdatainternal_{nullptr}, + prevroompasswordslotmask_{::uint64_t{0u}}, + prevflagattr_{0u} {} + +template +PROTOBUF_CONSTEXPR RoomDataInternalUpdateInfo::RoomDataInternalUpdateInfo(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(RoomDataInternalUpdateInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct RoomDataInternalUpdateInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR RoomDataInternalUpdateInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RoomDataInternalUpdateInfoDefaultTypeInternal() {} + union { + RoomDataInternalUpdateInfo _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomDataInternalUpdateInfoDefaultTypeInternal _RoomDataInternalUpdateInfo_default_instance_; + +inline constexpr NotificationUserJoinedRoom::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + update_info_{nullptr}, + signaling_{nullptr}, + room_id_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR NotificationUserJoinedRoom::NotificationUserJoinedRoom(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(NotificationUserJoinedRoom_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct NotificationUserJoinedRoomDefaultTypeInternal { + PROTOBUF_CONSTEXPR NotificationUserJoinedRoomDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~NotificationUserJoinedRoomDefaultTypeInternal() {} + union { + NotificationUserJoinedRoom _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NotificationUserJoinedRoomDefaultTypeInternal _NotificationUserJoinedRoom_default_instance_; + +inline constexpr JoinRoomResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + signaling_data_{}, + room_data_{nullptr}, + opt_param_{nullptr} {} + +template +PROTOBUF_CONSTEXPR JoinRoomResponse::JoinRoomResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(JoinRoomResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct JoinRoomResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR JoinRoomResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~JoinRoomResponseDefaultTypeInternal() {} + union { + JoinRoomResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JoinRoomResponseDefaultTypeInternal _JoinRoomResponse_default_instance_; + +inline constexpr CreateRoomResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + internal_{nullptr}, + opt_param_{nullptr} {} + +template +PROTOBUF_CONSTEXPR CreateRoomResponse::CreateRoomResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(CreateRoomResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct CreateRoomResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateRoomResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateRoomResponseDefaultTypeInternal() {} + union { + CreateRoomResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateRoomResponseDefaultTypeInternal _CreateRoomResponse_default_instance_; +} // namespace np2_structs +namespace np2_structs { +// =================================================================== + +class uint8::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(uint8, _impl_._has_bits_); +}; + +uint8::uint8(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, uint8_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.uint8) +} +uint8::uint8( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const uint8& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, uint8_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE uint8::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void uint8::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; +} +uint8::~uint8() { + // @@protoc_insertion_point(destructor:np2_structs.uint8) + SharedDtor(*this); +} +inline void uint8::SharedDtor(MessageLite& self) { + uint8& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL uint8::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) uint8(arena); +} +constexpr auto uint8::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(uint8), + alignof(uint8)); +} +constexpr auto uint8::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<18>{ + { + &_uint8_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &uint8::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &uint8::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &uint8::ByteSizeLong, + &uint8::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(uint8, _impl_._cached_size_), + true, + }, + "np2_structs.uint8", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<18> uint8_class_data_ = + uint8::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +uint8::GetClassData() const { + return uint8_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> +uint8::_table_ = { + { + PROTOBUF_FIELD_OFFSET(uint8, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + uint8_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::uint8>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 value = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(uint8, _impl_.value_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 value = 1; + {PROTOBUF_FIELD_OFFSET(uint8, _impl_.value_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void uint8::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.uint8) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.value_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL uint8::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const uint8& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL uint8::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const uint8& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.uint8) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 value = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_value() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_value(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.uint8) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t uint8::ByteSizeLong(const MessageLite& base) { + const uint8& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t uint8::ByteSizeLong() const { + const uint8& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.uint8) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // uint32 value = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_value() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_value()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void uint8::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.uint8) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_value() != 0) { + _this->_impl_.value_ = from._impl_.value_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void uint8::CopyFrom(const uint8& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.uint8) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void uint8::InternalSwap(uint8* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.value_, other->_impl_.value_); +} + +// =================================================================== + +class uint16::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(uint16, _impl_._has_bits_); +}; + +uint16::uint16(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, uint16_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.uint16) +} +uint16::uint16( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const uint16& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, uint16_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE uint16::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void uint16::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; +} +uint16::~uint16() { + // @@protoc_insertion_point(destructor:np2_structs.uint16) + SharedDtor(*this); +} +inline void uint16::SharedDtor(MessageLite& self) { + uint16& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL uint16::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) uint16(arena); +} +constexpr auto uint16::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(uint16), + alignof(uint16)); +} +constexpr auto uint16::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<19>{ + { + &_uint16_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &uint16::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &uint16::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &uint16::ByteSizeLong, + &uint16::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(uint16, _impl_._cached_size_), + true, + }, + "np2_structs.uint16", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<19> uint16_class_data_ = + uint16::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +uint16::GetClassData() const { + return uint16_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> +uint16::_table_ = { + { + PROTOBUF_FIELD_OFFSET(uint16, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + uint16_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::uint16>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 value = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(uint16, _impl_.value_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 value = 1; + {PROTOBUF_FIELD_OFFSET(uint16, _impl_.value_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void uint16::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.uint16) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.value_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL uint16::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const uint16& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL uint16::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const uint16& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.uint16) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 value = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_value() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_value(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.uint16) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t uint16::ByteSizeLong(const MessageLite& base) { + const uint16& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t uint16::ByteSizeLong() const { + const uint16& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.uint16) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // uint32 value = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_value() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_value()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void uint16::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.uint16) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_value() != 0) { + _this->_impl_.value_ = from._impl_.value_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void uint16::CopyFrom(const uint16& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.uint16) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void uint16::InternalSwap(uint16* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.value_, other->_impl_.value_); +} + +// =================================================================== + +class SignalingAddr::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_._has_bits_); +}; + +SignalingAddr::SignalingAddr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SignalingAddr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SignalingAddr) +} +PROTOBUF_NDEBUG_INLINE SignalingAddr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SignalingAddr& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + ip_(arena, from.ip_) {} + +SignalingAddr::SignalingAddr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SignalingAddr& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SignalingAddr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SignalingAddr* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.port_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.port_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.SignalingAddr) +} +PROTOBUF_NDEBUG_INLINE SignalingAddr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + ip_(arena) {} + +inline void SignalingAddr::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.port_ = {}; +} +SignalingAddr::~SignalingAddr() { + // @@protoc_insertion_point(destructor:np2_structs.SignalingAddr) + SharedDtor(*this); +} +inline void SignalingAddr::SharedDtor(MessageLite& self) { + SignalingAddr& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.ip_.Destroy(); + delete this_._impl_.port_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SignalingAddr::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SignalingAddr(arena); +} +constexpr auto SignalingAddr::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SignalingAddr), + alignof(SignalingAddr)); +} +constexpr auto SignalingAddr::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<26>{ + { + &_SignalingAddr_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SignalingAddr::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SignalingAddr::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SignalingAddr::ByteSizeLong, + &SignalingAddr::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_._cached_size_), + true, + }, + "np2_structs.SignalingAddr", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<26> SignalingAddr_class_data_ = + SignalingAddr::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SignalingAddr::GetClassData() const { + return SignalingAddr_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +SignalingAddr::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SignalingAddr_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SignalingAddr>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.uint16 port = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_.port_)}}, + // bytes ip = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_.ip_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes ip = 1; + {PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_.ip_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // .np2_structs.uint16 port = 2; + {PROTOBUF_FIELD_OFFSET(SignalingAddr, _impl_.port_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SignalingAddr::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SignalingAddr) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.ip_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.port_ != nullptr); + _impl_.port_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SignalingAddr::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SignalingAddr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SignalingAddr::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SignalingAddr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SignalingAddr) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes ip = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_ip().empty()) { + const ::std::string& _s = this_._internal_ip(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + // .np2_structs.uint16 port = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.port_, this_._impl_.port_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SignalingAddr) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SignalingAddr::ByteSizeLong(const MessageLite& base) { + const SignalingAddr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SignalingAddr::ByteSizeLong() const { + const SignalingAddr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SignalingAddr) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // bytes ip = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_ip().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_ip()); + } + } + // .np2_structs.uint16 port = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.port_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SignalingAddr::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SignalingAddr) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_ip().empty()) { + _this->_internal_set_ip(from._internal_ip()); + } else { + if (_this->_impl_.ip_.IsDefault()) { + _this->_internal_set_ip(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.port_ != nullptr); + if (_this->_impl_.port_ == nullptr) { + _this->_impl_.port_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.port_); + } else { + _this->_impl_.port_->MergeFrom(*from._impl_.port_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SignalingAddr::CopyFrom(const SignalingAddr& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SignalingAddr) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SignalingAddr::InternalSwap(SignalingAddr* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.ip_, &other->_impl_.ip_, arena); + swap(_impl_.port_, other->_impl_.port_); +} + +// =================================================================== + +class MatchingSignalingInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_._has_bits_); +}; + +MatchingSignalingInfo::MatchingSignalingInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingSignalingInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingSignalingInfo) +} +PROTOBUF_NDEBUG_INLINE MatchingSignalingInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingSignalingInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npid_(arena, from.npid_) {} + +MatchingSignalingInfo::MatchingSignalingInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingSignalingInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingSignalingInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingSignalingInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.addr_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.addr_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingSignalingInfo) +} +PROTOBUF_NDEBUG_INLINE MatchingSignalingInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npid_(arena) {} + +inline void MatchingSignalingInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.addr_ = {}; +} +MatchingSignalingInfo::~MatchingSignalingInfo() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingSignalingInfo) + SharedDtor(*this); +} +inline void MatchingSignalingInfo::SharedDtor(MessageLite& self) { + MatchingSignalingInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.npid_.Destroy(); + delete this_._impl_.addr_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingSignalingInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingSignalingInfo(arena); +} +constexpr auto MatchingSignalingInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(MatchingSignalingInfo), + alignof(MatchingSignalingInfo)); +} +constexpr auto MatchingSignalingInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<34>{ + { + &_MatchingSignalingInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingSignalingInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingSignalingInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingSignalingInfo::ByteSizeLong, + &MatchingSignalingInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingSignalingInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<34> MatchingSignalingInfo_class_data_ = + MatchingSignalingInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingSignalingInfo::GetClassData() const { + return MatchingSignalingInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 46, 2> +MatchingSignalingInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + MatchingSignalingInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingSignalingInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.SignalingAddr addr = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_.addr_)}}, + // string npid = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_.npid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string npid = 1; + {PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_.npid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // .np2_structs.SignalingAddr addr = 2; + {PROTOBUF_FIELD_OFFSET(MatchingSignalingInfo, _impl_.addr_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::SignalingAddr>()}, + }}, + {{ + "\41\4\0\0\0\0\0\0" + "np2_structs.MatchingSignalingInfo" + "npid" + }}, +}; +PROTOBUF_NOINLINE void MatchingSignalingInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingSignalingInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.npid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.addr_ != nullptr); + _impl_.addr_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingSignalingInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingSignalingInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingSignalingInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingSignalingInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingSignalingInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string npid = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + const ::std::string& _s = this_._internal_npid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.MatchingSignalingInfo.npid"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // .np2_structs.SignalingAddr addr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.addr_, this_._impl_.addr_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingSignalingInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingSignalingInfo::ByteSizeLong(const MessageLite& base) { + const MatchingSignalingInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingSignalingInfo::ByteSizeLong() const { + const MatchingSignalingInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingSignalingInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // string npid = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npid()); + } + } + // .np2_structs.SignalingAddr addr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.addr_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingSignalingInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingSignalingInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_npid().empty()) { + _this->_internal_set_npid(from._internal_npid()); + } else { + if (_this->_impl_.npid_.IsDefault()) { + _this->_internal_set_npid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.addr_ != nullptr); + if (_this->_impl_.addr_ == nullptr) { + _this->_impl_.addr_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.addr_); + } else { + _this->_impl_.addr_->MergeFrom(*from._impl_.addr_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingSignalingInfo::CopyFrom(const MatchingSignalingInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingSignalingInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingSignalingInfo::InternalSwap(MatchingSignalingInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.npid_, &other->_impl_.npid_, arena); + swap(_impl_.addr_, other->_impl_.addr_); +} + +// =================================================================== + +class Matching2SignalingInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_._has_bits_); +}; + +Matching2SignalingInfo::Matching2SignalingInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, Matching2SignalingInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.Matching2SignalingInfo) +} +PROTOBUF_NDEBUG_INLINE Matching2SignalingInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::Matching2SignalingInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +Matching2SignalingInfo::Matching2SignalingInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const Matching2SignalingInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, Matching2SignalingInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + Matching2SignalingInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.member_id_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.member_id_) + : nullptr; + _impl_.addr_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.addr_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.Matching2SignalingInfo) +} +PROTOBUF_NDEBUG_INLINE Matching2SignalingInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void Matching2SignalingInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, member_id_), + 0, + offsetof(Impl_, addr_) - + offsetof(Impl_, member_id_) + + sizeof(Impl_::addr_)); +} +Matching2SignalingInfo::~Matching2SignalingInfo() { + // @@protoc_insertion_point(destructor:np2_structs.Matching2SignalingInfo) + SharedDtor(*this); +} +inline void Matching2SignalingInfo::SharedDtor(MessageLite& self) { + Matching2SignalingInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.member_id_; + delete this_._impl_.addr_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL Matching2SignalingInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) Matching2SignalingInfo(arena); +} +constexpr auto Matching2SignalingInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Matching2SignalingInfo), + alignof(Matching2SignalingInfo)); +} +constexpr auto Matching2SignalingInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<35>{ + { + &_Matching2SignalingInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &Matching2SignalingInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &Matching2SignalingInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &Matching2SignalingInfo::ByteSizeLong, + &Matching2SignalingInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_._cached_size_), + true, + }, + "np2_structs.Matching2SignalingInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<35> Matching2SignalingInfo_class_data_ = + Matching2SignalingInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +Matching2SignalingInfo::GetClassData() const { + return Matching2SignalingInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +Matching2SignalingInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + Matching2SignalingInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::Matching2SignalingInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.SignalingAddr addr = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_.addr_)}}, + // .np2_structs.uint16 member_id = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_.member_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 member_id = 1; + {PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_.member_id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.SignalingAddr addr = 2; + {PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_.addr_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::SignalingAddr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void Matching2SignalingInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.Matching2SignalingInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.member_id_ != nullptr); + _impl_.member_id_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.addr_ != nullptr); + _impl_.addr_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL Matching2SignalingInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const Matching2SignalingInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL Matching2SignalingInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const Matching2SignalingInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.Matching2SignalingInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 member_id = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.member_id_, this_._impl_.member_id_->GetCachedSize(), target, + stream); + } + + // .np2_structs.SignalingAddr addr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.addr_, this_._impl_.addr_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.Matching2SignalingInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t Matching2SignalingInfo::ByteSizeLong(const MessageLite& base) { + const Matching2SignalingInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t Matching2SignalingInfo::ByteSizeLong() const { + const Matching2SignalingInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.Matching2SignalingInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.uint16 member_id = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.member_id_); + } + // .np2_structs.SignalingAddr addr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.addr_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void Matching2SignalingInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.Matching2SignalingInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.member_id_ != nullptr); + if (_this->_impl_.member_id_ == nullptr) { + _this->_impl_.member_id_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.member_id_); + } else { + _this->_impl_.member_id_->MergeFrom(*from._impl_.member_id_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.addr_ != nullptr); + if (_this->_impl_.addr_ == nullptr) { + _this->_impl_.addr_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.addr_); + } else { + _this->_impl_.addr_->MergeFrom(*from._impl_.addr_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void Matching2SignalingInfo::CopyFrom(const Matching2SignalingInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.Matching2SignalingInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Matching2SignalingInfo::InternalSwap(Matching2SignalingInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_.addr_) + + sizeof(Matching2SignalingInfo::_impl_.addr_) + - PROTOBUF_FIELD_OFFSET(Matching2SignalingInfo, _impl_.member_id_)>( + reinterpret_cast(&_impl_.member_id_), + reinterpret_cast(&other->_impl_.member_id_)); +} + +// =================================================================== + +class BinAttr::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(BinAttr, _impl_._has_bits_); +}; + +BinAttr::BinAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BinAttr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.BinAttr) +} +PROTOBUF_NDEBUG_INLINE BinAttr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::BinAttr& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + data_(arena, from.data_) {} + +BinAttr::BinAttr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const BinAttr& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BinAttr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + BinAttr* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.id_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.id_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.BinAttr) +} +PROTOBUF_NDEBUG_INLINE BinAttr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + data_(arena) {} + +inline void BinAttr::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.id_ = {}; +} +BinAttr::~BinAttr() { + // @@protoc_insertion_point(destructor:np2_structs.BinAttr) + SharedDtor(*this); +} +inline void BinAttr::SharedDtor(MessageLite& self) { + BinAttr& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.data_.Destroy(); + delete this_._impl_.id_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL BinAttr::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) BinAttr(arena); +} +constexpr auto BinAttr::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(BinAttr), + alignof(BinAttr)); +} +constexpr auto BinAttr::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<20>{ + { + &_BinAttr_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &BinAttr::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &BinAttr::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &BinAttr::ByteSizeLong, + &BinAttr::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(BinAttr, _impl_._cached_size_), + true, + }, + "np2_structs.BinAttr", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<20> BinAttr_class_data_ = + BinAttr::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +BinAttr::GetClassData() const { + return BinAttr_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +BinAttr::_table_ = { + { + PROTOBUF_FIELD_OFFSET(BinAttr, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + BinAttr_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::BinAttr>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes data = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(BinAttr, _impl_.data_)}}, + // .np2_structs.uint16 id = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(BinAttr, _impl_.id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 id = 1; + {PROTOBUF_FIELD_OFFSET(BinAttr, _impl_.id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes data = 2; + {PROTOBUF_FIELD_OFFSET(BinAttr, _impl_.data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void BinAttr::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.BinAttr) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.id_ != nullptr); + _impl_.id_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL BinAttr::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const BinAttr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL BinAttr::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const BinAttr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.BinAttr) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.id_, this_._impl_.id_->GetCachedSize(), target, + stream); + } + + // bytes data = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.BinAttr) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t BinAttr::ByteSizeLong(const MessageLite& base) { + const BinAttr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t BinAttr::ByteSizeLong() const { + const BinAttr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.BinAttr) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // bytes data = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // .np2_structs.uint16 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.id_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void BinAttr::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.BinAttr) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.id_ != nullptr); + if (_this->_impl_.id_ == nullptr) { + _this->_impl_.id_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.id_); + } else { + _this->_impl_.id_->MergeFrom(*from._impl_.id_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void BinAttr::CopyFrom(const BinAttr& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.BinAttr) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void BinAttr::InternalSwap(BinAttr* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + swap(_impl_.id_, other->_impl_.id_); +} + +// =================================================================== + +class IntAttr::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(IntAttr, _impl_._has_bits_); +}; + +IntAttr::IntAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, IntAttr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.IntAttr) +} +PROTOBUF_NDEBUG_INLINE IntAttr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::IntAttr& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +IntAttr::IntAttr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const IntAttr& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, IntAttr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + IntAttr* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.id_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.id_) + : nullptr; + _impl_.num_ = from._impl_.num_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.IntAttr) +} +PROTOBUF_NDEBUG_INLINE IntAttr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void IntAttr::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + 0, + offsetof(Impl_, num_) - + offsetof(Impl_, id_) + + sizeof(Impl_::num_)); +} +IntAttr::~IntAttr() { + // @@protoc_insertion_point(destructor:np2_structs.IntAttr) + SharedDtor(*this); +} +inline void IntAttr::SharedDtor(MessageLite& self) { + IntAttr& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.id_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL IntAttr::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) IntAttr(arena); +} +constexpr auto IntAttr::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(IntAttr), + alignof(IntAttr)); +} +constexpr auto IntAttr::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<20>{ + { + &_IntAttr_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &IntAttr::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &IntAttr::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &IntAttr::ByteSizeLong, + &IntAttr::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(IntAttr, _impl_._cached_size_), + true, + }, + "np2_structs.IntAttr", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<20> IntAttr_class_data_ = + IntAttr::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +IntAttr::GetClassData() const { + return IntAttr_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +IntAttr::_table_ = { + { + PROTOBUF_FIELD_OFFSET(IntAttr, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + IntAttr_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::IntAttr>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 num = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(IntAttr, _impl_.num_)}}, + // .np2_structs.uint16 id = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(IntAttr, _impl_.id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 id = 1; + {PROTOBUF_FIELD_OFFSET(IntAttr, _impl_.id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 num = 2; + {PROTOBUF_FIELD_OFFSET(IntAttr, _impl_.num_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void IntAttr::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.IntAttr) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.id_ != nullptr); + _impl_.id_->Clear(); + } + _impl_.num_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL IntAttr::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const IntAttr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL IntAttr::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const IntAttr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.IntAttr) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.id_, this_._impl_.id_->GetCachedSize(), target, + stream); + } + + // uint32 num = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_num() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_num(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.IntAttr) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t IntAttr::ByteSizeLong(const MessageLite& base) { + const IntAttr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t IntAttr::ByteSizeLong() const { + const IntAttr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.IntAttr) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.uint16 id = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.id_); + } + // uint32 num = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_num() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_num()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void IntAttr::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.IntAttr) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.id_ != nullptr); + if (_this->_impl_.id_ == nullptr) { + _this->_impl_.id_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.id_); + } else { + _this->_impl_.id_->MergeFrom(*from._impl_.id_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_num() != 0) { + _this->_impl_.num_ = from._impl_.num_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void IntAttr::CopyFrom(const IntAttr& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.IntAttr) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void IntAttr::InternalSwap(IntAttr* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(IntAttr, _impl_.num_) + + sizeof(IntAttr::_impl_.num_) + - PROTOBUF_FIELD_OFFSET(IntAttr, _impl_.id_)>( + reinterpret_cast(&_impl_.id_), + reinterpret_cast(&other->_impl_.id_)); +} + +// =================================================================== + +class RoomMemberBinAttrInternal::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_._has_bits_); +}; + +RoomMemberBinAttrInternal::RoomMemberBinAttrInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberBinAttrInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomMemberBinAttrInternal) +} +PROTOBUF_NDEBUG_INLINE RoomMemberBinAttrInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomMemberBinAttrInternal& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +RoomMemberBinAttrInternal::RoomMemberBinAttrInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomMemberBinAttrInternal& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberBinAttrInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomMemberBinAttrInternal* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.data_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.data_) + : nullptr; + _impl_.updatedate_ = from._impl_.updatedate_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomMemberBinAttrInternal) +} +PROTOBUF_NDEBUG_INLINE RoomMemberBinAttrInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void RoomMemberBinAttrInternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, data_), + 0, + offsetof(Impl_, updatedate_) - + offsetof(Impl_, data_) + + sizeof(Impl_::updatedate_)); +} +RoomMemberBinAttrInternal::~RoomMemberBinAttrInternal() { + // @@protoc_insertion_point(destructor:np2_structs.RoomMemberBinAttrInternal) + SharedDtor(*this); +} +inline void RoomMemberBinAttrInternal::SharedDtor(MessageLite& self) { + RoomMemberBinAttrInternal& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.data_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomMemberBinAttrInternal::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomMemberBinAttrInternal(arena); +} +constexpr auto RoomMemberBinAttrInternal::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RoomMemberBinAttrInternal), + alignof(RoomMemberBinAttrInternal)); +} +constexpr auto RoomMemberBinAttrInternal::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<38>{ + { + &_RoomMemberBinAttrInternal_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomMemberBinAttrInternal::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomMemberBinAttrInternal::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomMemberBinAttrInternal::ByteSizeLong, + &RoomMemberBinAttrInternal::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_._cached_size_), + true, + }, + "np2_structs.RoomMemberBinAttrInternal", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<38> RoomMemberBinAttrInternal_class_data_ = + RoomMemberBinAttrInternal::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomMemberBinAttrInternal::GetClassData() const { + return RoomMemberBinAttrInternal_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +RoomMemberBinAttrInternal::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomMemberBinAttrInternal_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomMemberBinAttrInternal>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.BinAttr data = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_.data_)}}, + // uint64 updateDate = 1; + {::_pbi::TcParser::FastV64S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_.updatedate_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 updateDate = 1; + {PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_.updatedate_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.BinAttr data = 2; + {PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_.data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomMemberBinAttrInternal::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomMemberBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.data_ != nullptr); + _impl_.data_->Clear(); + } + _impl_.updatedate_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomMemberBinAttrInternal::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomMemberBinAttrInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomMemberBinAttrInternal::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomMemberBinAttrInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomMemberBinAttrInternal) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 updateDate = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_updatedate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_updatedate(), target); + } + } + + // .np2_structs.BinAttr data = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.data_, this_._impl_.data_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomMemberBinAttrInternal) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomMemberBinAttrInternal::ByteSizeLong(const MessageLite& base) { + const RoomMemberBinAttrInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomMemberBinAttrInternal::ByteSizeLong() const { + const RoomMemberBinAttrInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomMemberBinAttrInternal) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.BinAttr data = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.data_); + } + // uint64 updateDate = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_updatedate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_updatedate()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomMemberBinAttrInternal::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomMemberBinAttrInternal) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.data_ != nullptr); + if (_this->_impl_.data_ == nullptr) { + _this->_impl_.data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.data_); + } else { + _this->_impl_.data_->MergeFrom(*from._impl_.data_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_updatedate() != 0) { + _this->_impl_.updatedate_ = from._impl_.updatedate_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomMemberBinAttrInternal::CopyFrom(const RoomMemberBinAttrInternal& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomMemberBinAttrInternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomMemberBinAttrInternal::InternalSwap(RoomMemberBinAttrInternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_.updatedate_) + + sizeof(RoomMemberBinAttrInternal::_impl_.updatedate_) + - PROTOBUF_FIELD_OFFSET(RoomMemberBinAttrInternal, _impl_.data_)>( + reinterpret_cast(&_impl_.data_), + reinterpret_cast(&other->_impl_.data_)); +} + +// =================================================================== + +class BinAttrInternal::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_._has_bits_); +}; + +BinAttrInternal::BinAttrInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BinAttrInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.BinAttrInternal) +} +PROTOBUF_NDEBUG_INLINE BinAttrInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::BinAttrInternal& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +BinAttrInternal::BinAttrInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const BinAttrInternal& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BinAttrInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + BinAttrInternal* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.updatememberid_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.updatememberid_) + : nullptr; + _impl_.data_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.data_) + : nullptr; + _impl_.updatedate_ = from._impl_.updatedate_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.BinAttrInternal) +} +PROTOBUF_NDEBUG_INLINE BinAttrInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void BinAttrInternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, updatememberid_), + 0, + offsetof(Impl_, updatedate_) - + offsetof(Impl_, updatememberid_) + + sizeof(Impl_::updatedate_)); +} +BinAttrInternal::~BinAttrInternal() { + // @@protoc_insertion_point(destructor:np2_structs.BinAttrInternal) + SharedDtor(*this); +} +inline void BinAttrInternal::SharedDtor(MessageLite& self) { + BinAttrInternal& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.updatememberid_; + delete this_._impl_.data_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL BinAttrInternal::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) BinAttrInternal(arena); +} +constexpr auto BinAttrInternal::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(BinAttrInternal), + alignof(BinAttrInternal)); +} +constexpr auto BinAttrInternal::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<28>{ + { + &_BinAttrInternal_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &BinAttrInternal::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &BinAttrInternal::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &BinAttrInternal::ByteSizeLong, + &BinAttrInternal::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_._cached_size_), + true, + }, + "np2_structs.BinAttrInternal", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> BinAttrInternal_class_data_ = + BinAttrInternal::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +BinAttrInternal::GetClassData() const { + return BinAttrInternal_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> +BinAttrInternal::_table_ = { + { + PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + BinAttrInternal_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::BinAttrInternal>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 updateDate = 1; + {::_pbi::TcParser::FastV64S1, + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.updatedate_)}}, + // .np2_structs.uint16 updateMemberId = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.updatememberid_)}}, + // .np2_structs.BinAttr data = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 1, + PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.data_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 updateDate = 1; + {PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.updatedate_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint16 updateMemberId = 2; + {PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.updatememberid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.BinAttr data = 3; + {PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.data_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void BinAttrInternal::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.BinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.updatememberid_ != nullptr); + _impl_.updatememberid_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.data_ != nullptr); + _impl_.data_->Clear(); + } + } + _impl_.updatedate_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL BinAttrInternal::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const BinAttrInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL BinAttrInternal::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const BinAttrInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.BinAttrInternal) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 updateDate = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_updatedate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_updatedate(), target); + } + } + + // .np2_structs.uint16 updateMemberId = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.updatememberid_, this_._impl_.updatememberid_->GetCachedSize(), target, + stream); + } + + // .np2_structs.BinAttr data = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.data_, this_._impl_.data_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.BinAttrInternal) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t BinAttrInternal::ByteSizeLong(const MessageLite& base) { + const BinAttrInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t BinAttrInternal::ByteSizeLong() const { + const BinAttrInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.BinAttrInternal) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // .np2_structs.uint16 updateMemberId = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.updatememberid_); + } + // .np2_structs.BinAttr data = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.data_); + } + // uint64 updateDate = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_updatedate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_updatedate()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void BinAttrInternal::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.BinAttrInternal) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.updatememberid_ != nullptr); + if (_this->_impl_.updatememberid_ == nullptr) { + _this->_impl_.updatememberid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.updatememberid_); + } else { + _this->_impl_.updatememberid_->MergeFrom(*from._impl_.updatememberid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.data_ != nullptr); + if (_this->_impl_.data_ == nullptr) { + _this->_impl_.data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.data_); + } else { + _this->_impl_.data_->MergeFrom(*from._impl_.data_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_updatedate() != 0) { + _this->_impl_.updatedate_ = from._impl_.updatedate_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void BinAttrInternal::CopyFrom(const BinAttrInternal& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.BinAttrInternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void BinAttrInternal::InternalSwap(BinAttrInternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.updatedate_) + + sizeof(BinAttrInternal::_impl_.updatedate_) + - PROTOBUF_FIELD_OFFSET(BinAttrInternal, _impl_.updatememberid_)>( + reinterpret_cast(&_impl_.updatememberid_), + reinterpret_cast(&other->_impl_.updatememberid_)); +} + +// =================================================================== + +class OptParam::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(OptParam, _impl_._has_bits_); +}; + +OptParam::OptParam(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, OptParam_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.OptParam) +} +PROTOBUF_NDEBUG_INLINE OptParam::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::OptParam& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +OptParam::OptParam( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const OptParam& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, OptParam_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + OptParam* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.type_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.type_) + : nullptr; + _impl_.flag_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.flag_) + : nullptr; + _impl_.hubmemberid_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.hubmemberid_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.OptParam) +} +PROTOBUF_NDEBUG_INLINE OptParam::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void OptParam::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, type_), + 0, + offsetof(Impl_, hubmemberid_) - + offsetof(Impl_, type_) + + sizeof(Impl_::hubmemberid_)); +} +OptParam::~OptParam() { + // @@protoc_insertion_point(destructor:np2_structs.OptParam) + SharedDtor(*this); +} +inline void OptParam::SharedDtor(MessageLite& self) { + OptParam& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.type_; + delete this_._impl_.flag_; + delete this_._impl_.hubmemberid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL OptParam::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) OptParam(arena); +} +constexpr auto OptParam::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(OptParam), + alignof(OptParam)); +} +constexpr auto OptParam::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<21>{ + { + &_OptParam_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &OptParam::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &OptParam::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &OptParam::ByteSizeLong, + &OptParam::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(OptParam, _impl_._cached_size_), + true, + }, + "np2_structs.OptParam", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<21> OptParam_class_data_ = + OptParam::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +OptParam::GetClassData() const { + return OptParam_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 3, 0, 2> +OptParam::_table_ = { + { + PROTOBUF_FIELD_OFFSET(OptParam, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + OptParam_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::OptParam>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.uint8 type = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(OptParam, _impl_.type_)}}, + // .np2_structs.uint8 flag = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(OptParam, _impl_.flag_)}}, + // .np2_structs.uint16 hubMemberId = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 2, + PROTOBUF_FIELD_OFFSET(OptParam, _impl_.hubmemberid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint8 type = 1; + {PROTOBUF_FIELD_OFFSET(OptParam, _impl_.type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint8 flag = 2; + {PROTOBUF_FIELD_OFFSET(OptParam, _impl_.flag_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 hubMemberId = 3; + {PROTOBUF_FIELD_OFFSET(OptParam, _impl_.hubmemberid_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void OptParam::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.OptParam) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.type_ != nullptr); + _impl_.type_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.flag_ != nullptr); + _impl_.flag_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.hubmemberid_ != nullptr); + _impl_.hubmemberid_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL OptParam::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const OptParam& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL OptParam::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const OptParam& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.OptParam) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint8 type = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.type_, this_._impl_.type_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint8 flag = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.flag_, this_._impl_.flag_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint16 hubMemberId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.hubmemberid_, this_._impl_.hubmemberid_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.OptParam) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t OptParam::ByteSizeLong(const MessageLite& base) { + const OptParam& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t OptParam::ByteSizeLong() const { + const OptParam& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.OptParam) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // .np2_structs.uint8 type = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.type_); + } + // .np2_structs.uint8 flag = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.flag_); + } + // .np2_structs.uint16 hubMemberId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.hubmemberid_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void OptParam::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.OptParam) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.type_ != nullptr); + if (_this->_impl_.type_ == nullptr) { + _this->_impl_.type_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.type_); + } else { + _this->_impl_.type_->MergeFrom(*from._impl_.type_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.flag_ != nullptr); + if (_this->_impl_.flag_ == nullptr) { + _this->_impl_.flag_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.flag_); + } else { + _this->_impl_.flag_->MergeFrom(*from._impl_.flag_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.hubmemberid_ != nullptr); + if (_this->_impl_.hubmemberid_ == nullptr) { + _this->_impl_.hubmemberid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.hubmemberid_); + } else { + _this->_impl_.hubmemberid_->MergeFrom(*from._impl_.hubmemberid_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void OptParam::CopyFrom(const OptParam& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.OptParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void OptParam::InternalSwap(OptParam* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(OptParam, _impl_.hubmemberid_) + + sizeof(OptParam::_impl_.hubmemberid_) + - PROTOBUF_FIELD_OFFSET(OptParam, _impl_.type_)>( + reinterpret_cast(&_impl_.type_), + reinterpret_cast(&other->_impl_.type_)); +} + +// =================================================================== + +class GroupConfig::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_._has_bits_); +}; + +GroupConfig::GroupConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GroupConfig_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GroupConfig) +} +PROTOBUF_NDEBUG_INLINE GroupConfig::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GroupConfig& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + label_(arena, from.label_) {} + +GroupConfig::GroupConfig( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GroupConfig& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GroupConfig_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GroupConfig* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, slotnum_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, slotnum_), + offsetof(Impl_, withpassword_) - + offsetof(Impl_, slotnum_) + + sizeof(Impl_::withpassword_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GroupConfig) +} +PROTOBUF_NDEBUG_INLINE GroupConfig::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + label_(arena) {} + +inline void GroupConfig::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, slotnum_), + 0, + offsetof(Impl_, withpassword_) - + offsetof(Impl_, slotnum_) + + sizeof(Impl_::withpassword_)); +} +GroupConfig::~GroupConfig() { + // @@protoc_insertion_point(destructor:np2_structs.GroupConfig) + SharedDtor(*this); +} +inline void GroupConfig::SharedDtor(MessageLite& self) { + GroupConfig& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.label_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GroupConfig::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GroupConfig(arena); +} +constexpr auto GroupConfig::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(GroupConfig), + alignof(GroupConfig)); +} +constexpr auto GroupConfig::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<24>{ + { + &_GroupConfig_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GroupConfig::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GroupConfig::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GroupConfig::ByteSizeLong, + &GroupConfig::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_._cached_size_), + true, + }, + "np2_structs.GroupConfig", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> GroupConfig_class_data_ = + GroupConfig::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GroupConfig::GetClassData() const { + return GroupConfig_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 0, 2> +GroupConfig::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + GroupConfig_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GroupConfig>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 slotNum = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.slotnum_)}}, + // bytes label = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.label_)}}, + // bool withPassword = 3; + {::_pbi::TcParser::FastV8S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.withpassword_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 slotNum = 1; + {PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.slotnum_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // bytes label = 2; + {PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.label_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // bool withPassword = 3; + {PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.withpassword_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void GroupConfig::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GroupConfig) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.label_.ClearNonDefaultToEmpty(); + } + if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) { + ::memset(&_impl_.slotnum_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.withpassword_) - + reinterpret_cast(&_impl_.slotnum_)) + sizeof(_impl_.withpassword_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GroupConfig::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GroupConfig& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GroupConfig::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GroupConfig& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GroupConfig) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 slotNum = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotnum() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_slotnum(), target); + } + } + + // bytes label = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_label().empty()) { + const ::std::string& _s = this_._internal_label(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } + } + + // bool withPassword = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_withpassword() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_withpassword(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GroupConfig) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GroupConfig::ByteSizeLong(const MessageLite& base) { + const GroupConfig& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GroupConfig::ByteSizeLong() const { + const GroupConfig& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GroupConfig) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // bytes label = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_label().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_label()); + } + } + // uint32 slotNum = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotnum() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_slotnum()); + } + } + // bool withPassword = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_withpassword() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GroupConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GroupConfig) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_label().empty()) { + _this->_internal_set_label(from._internal_label()); + } else { + if (_this->_impl_.label_.IsDefault()) { + _this->_internal_set_label(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_slotnum() != 0) { + _this->_impl_.slotnum_ = from._impl_.slotnum_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_withpassword() != 0) { + _this->_impl_.withpassword_ = from._impl_.withpassword_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GroupConfig::CopyFrom(const GroupConfig& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GroupConfig) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GroupConfig::InternalSwap(GroupConfig* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.label_, &other->_impl_.label_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.withpassword_) + + sizeof(GroupConfig::_impl_.withpassword_) + - PROTOBUF_FIELD_OFFSET(GroupConfig, _impl_.slotnum_)>( + reinterpret_cast(&_impl_.slotnum_), + reinterpret_cast(&other->_impl_.slotnum_)); +} + +// =================================================================== + +class UserInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(UserInfo, _impl_._has_bits_); +}; + +UserInfo::UserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, UserInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.UserInfo) +} +PROTOBUF_NDEBUG_INLINE UserInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::UserInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npid_(arena, from.npid_), + onlinename_(arena, from.onlinename_), + avatarurl_(arena, from.avatarurl_) {} + +UserInfo::UserInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const UserInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, UserInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + UserInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.UserInfo) +} +PROTOBUF_NDEBUG_INLINE UserInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npid_(arena), + onlinename_(arena), + avatarurl_(arena) {} + +inline void UserInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +UserInfo::~UserInfo() { + // @@protoc_insertion_point(destructor:np2_structs.UserInfo) + SharedDtor(*this); +} +inline void UserInfo::SharedDtor(MessageLite& self) { + UserInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.npid_.Destroy(); + this_._impl_.onlinename_.Destroy(); + this_._impl_.avatarurl_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL UserInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) UserInfo(arena); +} +constexpr auto UserInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(UserInfo), + alignof(UserInfo)); +} +constexpr auto UserInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<21>{ + { + &_UserInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &UserInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &UserInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &UserInfo::ByteSizeLong, + &UserInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(UserInfo, _impl_._cached_size_), + true, + }, + "np2_structs.UserInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<21> UserInfo_class_data_ = + UserInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +UserInfo::GetClassData() const { + return UserInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 52, 2> +UserInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(UserInfo, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + UserInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::UserInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string npId = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(UserInfo, _impl_.npid_)}}, + // string onlineName = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(UserInfo, _impl_.onlinename_)}}, + // string avatarUrl = 3; + {::_pbi::TcParser::FastUS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(UserInfo, _impl_.avatarurl_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string npId = 1; + {PROTOBUF_FIELD_OFFSET(UserInfo, _impl_.npid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string onlineName = 2; + {PROTOBUF_FIELD_OFFSET(UserInfo, _impl_.onlinename_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string avatarUrl = 3; + {PROTOBUF_FIELD_OFFSET(UserInfo, _impl_.avatarurl_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\24\4\12\11\0\0\0\0" + "np2_structs.UserInfo" + "npId" + "onlineName" + "avatarUrl" + }}, +}; +PROTOBUF_NOINLINE void UserInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.UserInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.npid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.onlinename_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.avatarurl_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL UserInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const UserInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL UserInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const UserInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.UserInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string npId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + const ::std::string& _s = this_._internal_npid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.UserInfo.npId"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // string onlineName = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_onlinename().empty()) { + const ::std::string& _s = this_._internal_onlinename(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.UserInfo.onlineName"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // string avatarUrl = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_avatarurl().empty()) { + const ::std::string& _s = this_._internal_avatarurl(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.UserInfo.avatarUrl"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.UserInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t UserInfo::ByteSizeLong(const MessageLite& base) { + const UserInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t UserInfo::ByteSizeLong() const { + const UserInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.UserInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // string npId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npid()); + } + } + // string onlineName = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_onlinename().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_onlinename()); + } + } + // string avatarUrl = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_avatarurl().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_avatarurl()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void UserInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.UserInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_npid().empty()) { + _this->_internal_set_npid(from._internal_npid()); + } else { + if (_this->_impl_.npid_.IsDefault()) { + _this->_internal_set_npid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_onlinename().empty()) { + _this->_internal_set_onlinename(from._internal_onlinename()); + } else { + if (_this->_impl_.onlinename_.IsDefault()) { + _this->_internal_set_onlinename(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_avatarurl().empty()) { + _this->_internal_set_avatarurl(from._internal_avatarurl()); + } else { + if (_this->_impl_.avatarurl_.IsDefault()) { + _this->_internal_set_avatarurl(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void UserInfo::CopyFrom(const UserInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.UserInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void UserInfo::InternalSwap(UserInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.npid_, &other->_impl_.npid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.onlinename_, &other->_impl_.onlinename_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.avatarurl_, &other->_impl_.avatarurl_, arena); +} + +// =================================================================== + +class RoomMemberDataInternal::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_._has_bits_); +}; + +RoomMemberDataInternal::RoomMemberDataInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberDataInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomMemberDataInternal) +} +PROTOBUF_NDEBUG_INLINE RoomMemberDataInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomMemberDataInternal& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roommemberbinattrinternal_{visibility, arena, from.roommemberbinattrinternal_} {} + +RoomMemberDataInternal::RoomMemberDataInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomMemberDataInternal& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberDataInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomMemberDataInternal* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.userinfo_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.userinfo_) + : nullptr; + _impl_.teamid_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_) + : nullptr; + _impl_.roomgroup_ = (CheckHasBit(cached_has_bits, 0x00000008U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.roomgroup_) + : nullptr; + _impl_.nattype_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.nattype_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, joindate_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, joindate_), + offsetof(Impl_, flagattr_) - + offsetof(Impl_, joindate_) + + sizeof(Impl_::flagattr_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomMemberDataInternal) +} +PROTOBUF_NDEBUG_INLINE RoomMemberDataInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roommemberbinattrinternal_{visibility, arena} {} + +inline void RoomMemberDataInternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, userinfo_), + 0, + offsetof(Impl_, flagattr_) - + offsetof(Impl_, userinfo_) + + sizeof(Impl_::flagattr_)); +} +RoomMemberDataInternal::~RoomMemberDataInternal() { + // @@protoc_insertion_point(destructor:np2_structs.RoomMemberDataInternal) + SharedDtor(*this); +} +inline void RoomMemberDataInternal::SharedDtor(MessageLite& self) { + RoomMemberDataInternal& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.userinfo_; + delete this_._impl_.teamid_; + delete this_._impl_.roomgroup_; + delete this_._impl_.nattype_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomMemberDataInternal::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomMemberDataInternal(arena); +} +constexpr auto RoomMemberDataInternal::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.roommemberbinattrinternal_) + + decltype(RoomMemberDataInternal::_impl_.roommemberbinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(RoomMemberDataInternal), alignof(RoomMemberDataInternal), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&RoomMemberDataInternal::PlacementNew_, + sizeof(RoomMemberDataInternal), + alignof(RoomMemberDataInternal)); + } +} +constexpr auto RoomMemberDataInternal::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<35>{ + { + &_RoomMemberDataInternal_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomMemberDataInternal::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomMemberDataInternal::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomMemberDataInternal::ByteSizeLong, + &RoomMemberDataInternal::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_._cached_size_), + true, + }, + "np2_structs.RoomMemberDataInternal", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<35> RoomMemberDataInternal_class_data_ = + RoomMemberDataInternal::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomMemberDataInternal::GetClassData() const { + return RoomMemberDataInternal_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 8, 5, 0, 2> +RoomMemberDataInternal::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_._has_bits_), + 0, // no _extensions_ + 8, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967040, // skipmap + offsetof(decltype(_table_), field_entries), + 8, // num_field_entries + 5, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomMemberDataInternal_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataInternal>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; + {::_pbi::TcParser::FastMtR1, + {66, 0, 4, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.roommemberbinattrinternal_)}}, + // .np2_structs.UserInfo userInfo = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.userinfo_)}}, + // uint64 joinDate = 2; + {::_pbi::TcParser::FastV64S1, + {16, 5, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.joindate_)}}, + // uint32 memberId = 3; + {::_pbi::TcParser::FastV32S1, + {24, 6, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.memberid_)}}, + // .np2_structs.uint8 teamId = 4; + {::_pbi::TcParser::FastMtS1, + {34, 2, 1, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.teamid_)}}, + // .np2_structs.RoomGroup roomGroup = 5; + {::_pbi::TcParser::FastMtS1, + {42, 3, 2, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.roomgroup_)}}, + // .np2_structs.uint8 natType = 6; + {::_pbi::TcParser::FastMtS1, + {50, 4, 3, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.nattype_)}}, + // uint32 flagAttr = 7; + {::_pbi::TcParser::FastV32S1, + {56, 7, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.flagattr_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.UserInfo userInfo = 1; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.userinfo_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 joinDate = 2; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.joindate_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 memberId = 3; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.memberid_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // .np2_structs.uint8 teamId = 4; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.teamid_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.RoomGroup roomGroup = 5; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.roomgroup_), _Internal::kHasBitsOffset + 3, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint8 natType = 6; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.nattype_), _Internal::kHasBitsOffset + 4, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 flagAttr = 7; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.flagattr_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.roommemberbinattrinternal_), _Internal::kHasBitsOffset + 0, 4, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::UserInfo>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::RoomGroup>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::RoomMemberBinAttrInternal>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomMemberDataInternal::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomMemberDataInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roommemberbinattrinternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.userinfo_ != nullptr); + _impl_.userinfo_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.teamid_ != nullptr); + _impl_.teamid_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(_impl_.roomgroup_ != nullptr); + _impl_.roomgroup_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(_impl_.nattype_ != nullptr); + _impl_.nattype_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x000000e0U)) { + ::memset(&_impl_.joindate_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.flagattr_) - + reinterpret_cast(&_impl_.joindate_)) + sizeof(_impl_.flagattr_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomMemberDataInternal::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomMemberDataInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomMemberDataInternal::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomMemberDataInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomMemberDataInternal) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.UserInfo userInfo = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.userinfo_, this_._impl_.userinfo_->GetCachedSize(), target, + stream); + } + + // uint64 joinDate = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_joindate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this_._internal_joindate(), target); + } + } + + // uint32 memberId = 3; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_memberid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_memberid(), target); + } + } + + // .np2_structs.uint8 teamId = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.teamid_, this_._impl_.teamid_->GetCachedSize(), target, + stream); + } + + // .np2_structs.RoomGroup roomGroup = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.roomgroup_, this_._impl_.roomgroup_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint8 natType = 6; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, *this_._impl_.nattype_, this_._impl_.nattype_->GetCachedSize(), target, + stream); + } + + // uint32 flagAttr = 7; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_flagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 7, this_._internal_flagattr(), target); + } + } + + // repeated .np2_structs.RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roommemberbinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roommemberbinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomMemberDataInternal) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomMemberDataInternal::ByteSizeLong(const MessageLite& base) { + const RoomMemberDataInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomMemberDataInternal::ByteSizeLong() const { + const RoomMemberDataInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomMemberDataInternal) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // repeated .np2_structs.RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roommemberbinattrinternal_size(); + for (const auto& msg : this_._internal_roommemberbinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.UserInfo userInfo = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.userinfo_); + } + // .np2_structs.uint8 teamId = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.teamid_); + } + // .np2_structs.RoomGroup roomGroup = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.roomgroup_); + } + // .np2_structs.uint8 natType = 6; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.nattype_); + } + // uint64 joinDate = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_joindate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_joindate()); + } + } + // uint32 memberId = 3; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_memberid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_memberid()); + } + } + // uint32 flagAttr = 7; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_flagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomMemberDataInternal::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomMemberDataInternal) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roommemberbinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roommemberbinattrinternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.userinfo_ != nullptr); + if (_this->_impl_.userinfo_ == nullptr) { + _this->_impl_.userinfo_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.userinfo_); + } else { + _this->_impl_.userinfo_->MergeFrom(*from._impl_.userinfo_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.teamid_ != nullptr); + if (_this->_impl_.teamid_ == nullptr) { + _this->_impl_.teamid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_); + } else { + _this->_impl_.teamid_->MergeFrom(*from._impl_.teamid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(from._impl_.roomgroup_ != nullptr); + if (_this->_impl_.roomgroup_ == nullptr) { + _this->_impl_.roomgroup_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.roomgroup_); + } else { + _this->_impl_.roomgroup_->MergeFrom(*from._impl_.roomgroup_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(from._impl_.nattype_ != nullptr); + if (_this->_impl_.nattype_ == nullptr) { + _this->_impl_.nattype_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.nattype_); + } else { + _this->_impl_.nattype_->MergeFrom(*from._impl_.nattype_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_joindate() != 0) { + _this->_impl_.joindate_ = from._impl_.joindate_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_memberid() != 0) { + _this->_impl_.memberid_ = from._impl_.memberid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (from._internal_flagattr() != 0) { + _this->_impl_.flagattr_ = from._impl_.flagattr_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomMemberDataInternal::CopyFrom(const RoomMemberDataInternal& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomMemberDataInternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomMemberDataInternal::InternalSwap(RoomMemberDataInternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roommemberbinattrinternal_.InternalSwap(&other->_impl_.roommemberbinattrinternal_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.flagattr_) + + sizeof(RoomMemberDataInternal::_impl_.flagattr_) + - PROTOBUF_FIELD_OFFSET(RoomMemberDataInternal, _impl_.userinfo_)>( + reinterpret_cast(&_impl_.userinfo_), + reinterpret_cast(&other->_impl_.userinfo_)); +} + +// =================================================================== + +class RoomGroup::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_._has_bits_); +}; + +RoomGroup::RoomGroup(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomGroup_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomGroup) +} +PROTOBUF_NDEBUG_INLINE RoomGroup::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomGroup& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + label_(arena, from.label_) {} + +RoomGroup::RoomGroup( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomGroup& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomGroup_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomGroup* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.groupid_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.groupid_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, withpassword_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, withpassword_), + offsetof(Impl_, curgroupmembernum_) - + offsetof(Impl_, withpassword_) + + sizeof(Impl_::curgroupmembernum_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomGroup) +} +PROTOBUF_NDEBUG_INLINE RoomGroup::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + label_(arena) {} + +inline void RoomGroup::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, groupid_), + 0, + offsetof(Impl_, curgroupmembernum_) - + offsetof(Impl_, groupid_) + + sizeof(Impl_::curgroupmembernum_)); +} +RoomGroup::~RoomGroup() { + // @@protoc_insertion_point(destructor:np2_structs.RoomGroup) + SharedDtor(*this); +} +inline void RoomGroup::SharedDtor(MessageLite& self) { + RoomGroup& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.label_.Destroy(); + delete this_._impl_.groupid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomGroup::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomGroup(arena); +} +constexpr auto RoomGroup::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(RoomGroup), + alignof(RoomGroup)); +} +constexpr auto RoomGroup::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<22>{ + { + &_RoomGroup_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomGroup::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomGroup::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomGroup::ByteSizeLong, + &RoomGroup::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_._cached_size_), + true, + }, + "np2_structs.RoomGroup", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<22> RoomGroup_class_data_ = + RoomGroup::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomGroup::GetClassData() const { + return RoomGroup_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 1, 0, 2> +RoomGroup::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomGroup_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomGroup>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.uint8 groupId = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.groupid_)}}, + // bool withPassword = 2; + {::_pbi::TcParser::FastV8S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.withpassword_)}}, + // bytes label = 3; + {::_pbi::TcParser::FastBS1, + {26, 0, 0, + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.label_)}}, + // uint32 slotNum = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.slotnum_)}}, + // uint32 curGroupMemberNum = 5; + {::_pbi::TcParser::FastV32S1, + {40, 4, 0, + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.curgroupmembernum_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint8 groupId = 1; + {PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.groupid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool withPassword = 2; + {PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.withpassword_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // bytes label = 3; + {PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.label_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // uint32 slotNum = 4; + {PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.slotnum_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 curGroupMemberNum = 5; + {PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.curgroupmembernum_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomGroup::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomGroup) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.label_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.groupid_ != nullptr); + _impl_.groupid_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000001cU)) { + ::memset(&_impl_.withpassword_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.curgroupmembernum_) - + reinterpret_cast(&_impl_.withpassword_)) + sizeof(_impl_.curgroupmembernum_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomGroup::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomGroup& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomGroup::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomGroup& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomGroup) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint8 groupId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.groupid_, this_._impl_.groupid_->GetCachedSize(), target, + stream); + } + + // bool withPassword = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_withpassword() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_withpassword(), target); + } + } + + // bytes label = 3; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_label().empty()) { + const ::std::string& _s = this_._internal_label(); + target = stream->WriteBytesMaybeAliased(3, _s, target); + } + } + + // uint32 slotNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_slotnum() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_slotnum(), target); + } + } + + // uint32 curGroupMemberNum = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_curgroupmembernum() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 5, this_._internal_curgroupmembernum(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomGroup) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomGroup::ByteSizeLong(const MessageLite& base) { + const RoomGroup& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomGroup::ByteSizeLong() const { + const RoomGroup& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomGroup) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // bytes label = 3; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_label().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_label()); + } + } + // .np2_structs.uint8 groupId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.groupid_); + } + // bool withPassword = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_withpassword() != 0) { + total_size += 2; + } + } + // uint32 slotNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_slotnum() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_slotnum()); + } + } + // uint32 curGroupMemberNum = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_curgroupmembernum() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_curgroupmembernum()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomGroup::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomGroup) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_label().empty()) { + _this->_internal_set_label(from._internal_label()); + } else { + if (_this->_impl_.label_.IsDefault()) { + _this->_internal_set_label(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.groupid_ != nullptr); + if (_this->_impl_.groupid_ == nullptr) { + _this->_impl_.groupid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.groupid_); + } else { + _this->_impl_.groupid_->MergeFrom(*from._impl_.groupid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_withpassword() != 0) { + _this->_impl_.withpassword_ = from._impl_.withpassword_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_slotnum() != 0) { + _this->_impl_.slotnum_ = from._impl_.slotnum_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_curgroupmembernum() != 0) { + _this->_impl_.curgroupmembernum_ = from._impl_.curgroupmembernum_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomGroup::CopyFrom(const RoomGroup& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomGroup) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomGroup::InternalSwap(RoomGroup* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.label_, &other->_impl_.label_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.curgroupmembernum_) + + sizeof(RoomGroup::_impl_.curgroupmembernum_) + - PROTOBUF_FIELD_OFFSET(RoomGroup, _impl_.groupid_)>( + reinterpret_cast(&_impl_.groupid_), + reinterpret_cast(&other->_impl_.groupid_)); +} + +// =================================================================== + +class RoomDataInternal::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_._has_bits_); +}; + +RoomDataInternal::RoomDataInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomDataInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomDataInternal) +} +PROTOBUF_NDEBUG_INLINE RoomDataInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomDataInternal& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + memberlist_{visibility, arena, from.memberlist_}, + roomgroup_{visibility, arena, from.roomgroup_}, + roombinattrinternal_{visibility, arena, from.roombinattrinternal_} {} + +RoomDataInternal::RoomDataInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomDataInternal& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomDataInternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomDataInternal* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.serverid_ = (CheckHasBit(cached_has_bits, 0x00000008U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_) + : nullptr; + _impl_.ownerid_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.ownerid_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, lobbyid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lobbyid_), + offsetof(Impl_, flagattr_) - + offsetof(Impl_, lobbyid_) + + sizeof(Impl_::flagattr_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomDataInternal) +} +PROTOBUF_NDEBUG_INLINE RoomDataInternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + memberlist_{visibility, arena}, + roomgroup_{visibility, arena}, + roombinattrinternal_{visibility, arena} {} + +inline void RoomDataInternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, serverid_), + 0, + offsetof(Impl_, flagattr_) - + offsetof(Impl_, serverid_) + + sizeof(Impl_::flagattr_)); +} +RoomDataInternal::~RoomDataInternal() { + // @@protoc_insertion_point(destructor:np2_structs.RoomDataInternal) + SharedDtor(*this); +} +inline void RoomDataInternal::SharedDtor(MessageLite& self) { + RoomDataInternal& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.serverid_; + delete this_._impl_.ownerid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomDataInternal::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomDataInternal(arena); +} +constexpr auto RoomDataInternal::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.memberlist_) + + decltype(RoomDataInternal::_impl_.memberlist_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roomgroup_) + + decltype(RoomDataInternal::_impl_.roomgroup_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roombinattrinternal_) + + decltype(RoomDataInternal::_impl_.roombinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(RoomDataInternal), alignof(RoomDataInternal), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&RoomDataInternal::PlacementNew_, + sizeof(RoomDataInternal), + alignof(RoomDataInternal)); + } +} +constexpr auto RoomDataInternal::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<29>{ + { + &_RoomDataInternal_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomDataInternal::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomDataInternal::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomDataInternal::ByteSizeLong, + &RoomDataInternal::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_._cached_size_), + true, + }, + "np2_structs.RoomDataInternal", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<29> RoomDataInternal_class_data_ = + RoomDataInternal::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomDataInternal::GetClassData() const { + return RoomDataInternal_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 11, 5, 0, 2> +RoomDataInternal::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_._has_bits_), + 0, // no _extensions_ + 11, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294965248, // skipmap + offsetof(decltype(_table_), field_entries), + 11, // num_field_entries + 5, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomDataInternal_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternal>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.uint16 serverId = 1; + {::_pbi::TcParser::FastMtS1, + {10, 3, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.serverid_)}}, + // uint32 worldId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 7, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.worldid_)}}, + // uint64 lobbyId = 3; + {::_pbi::TcParser::FastV64S1, + {24, 5, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.lobbyid_)}}, + // uint64 roomId = 4; + {::_pbi::TcParser::FastV64S1, + {32, 6, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roomid_)}}, + // uint64 passwordSlotMask = 5; + {::_pbi::TcParser::FastV64S1, + {40, 9, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.passwordslotmask_)}}, + // uint32 maxSlot = 6; + {::_pbi::TcParser::FastV32S1, + {48, 8, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.maxslot_)}}, + // repeated .np2_structs.RoomMemberDataInternal memberList = 7; + {::_pbi::TcParser::FastMtR1, + {58, 0, 1, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.memberlist_)}}, + // .np2_structs.uint16 ownerId = 8; + {::_pbi::TcParser::FastMtS1, + {66, 4, 2, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.ownerid_)}}, + // repeated .np2_structs.RoomGroup roomGroup = 9; + {::_pbi::TcParser::FastMtR1, + {74, 1, 3, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roomgroup_)}}, + // uint32 flagAttr = 10; + {::_pbi::TcParser::FastV32S1, + {80, 10, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.flagattr_)}}, + // repeated .np2_structs.BinAttrInternal roomBinAttrInternal = 11; + {::_pbi::TcParser::FastMtR1, + {90, 2, 4, + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roombinattrinternal_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 serverId = 1; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.serverid_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 worldId = 2; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.worldid_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint64 lobbyId = 3; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.lobbyid_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint64 roomId = 4; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roomid_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint64 passwordSlotMask = 5; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.passwordslotmask_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 maxSlot = 6; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.maxslot_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.RoomMemberDataInternal memberList = 7; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.memberlist_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 ownerId = 8; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.ownerid_), _Internal::kHasBitsOffset + 4, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.RoomGroup roomGroup = 9; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roomgroup_), _Internal::kHasBitsOffset + 1, 3, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 flagAttr = 10; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.flagattr_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.BinAttrInternal roomBinAttrInternal = 11; + {PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.roombinattrinternal_), _Internal::kHasBitsOffset + 2, 4, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::RoomGroup>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttrInternal>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomDataInternal::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomDataInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.memberlist_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.roomgroup_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.roombinattrinternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(_impl_.serverid_ != nullptr); + _impl_.serverid_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(_impl_.ownerid_ != nullptr); + _impl_.ownerid_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x000000e0U)) { + ::memset(&_impl_.lobbyid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.worldid_) - + reinterpret_cast(&_impl_.lobbyid_)) + sizeof(_impl_.worldid_)); + } + if (BatchCheckHasBit(cached_has_bits, 0x00000700U)) { + ::memset(&_impl_.maxslot_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.flagattr_) - + reinterpret_cast(&_impl_.maxslot_)) + sizeof(_impl_.flagattr_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomDataInternal::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomDataInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomDataInternal::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomDataInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomDataInternal) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.serverid_, this_._impl_.serverid_->GetCachedSize(), target, + stream); + } + + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_worldid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_worldid(), target); + } + } + + // uint64 lobbyId = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_lobbyid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 3, this_._internal_lobbyid(), target); + } + } + + // uint64 roomId = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 4, this_._internal_roomid(), target); + } + } + + // uint64 passwordSlotMask = 5; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (this_._internal_passwordslotmask() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 5, this_._internal_passwordslotmask(), target); + } + } + + // uint32 maxSlot = 6; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (this_._internal_maxslot() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 6, this_._internal_maxslot(), target); + } + } + + // repeated .np2_structs.RoomMemberDataInternal memberList = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_memberlist_size()); + i < n; i++) { + const auto& repfield = this_._internal_memberlist().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // .np2_structs.uint16 ownerId = 8; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, *this_._impl_.ownerid_, this_._impl_.ownerid_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.RoomGroup roomGroup = 9; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomgroup_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomgroup().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // uint32 flagAttr = 10; + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (this_._internal_flagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 10, this_._internal_flagattr(), target); + } + } + + // repeated .np2_structs.BinAttrInternal roomBinAttrInternal = 11; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roombinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roombinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 11, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomDataInternal) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomDataInternal::ByteSizeLong(const MessageLite& base) { + const RoomDataInternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomDataInternal::ByteSizeLong() const { + const RoomDataInternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomDataInternal) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // repeated .np2_structs.RoomMemberDataInternal memberList = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_memberlist_size(); + for (const auto& msg : this_._internal_memberlist()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.RoomGroup roomGroup = 9; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_roomgroup_size(); + for (const auto& msg : this_._internal_roomgroup()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttrInternal roomBinAttrInternal = 11; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += 1UL * this_._internal_roombinattrinternal_size(); + for (const auto& msg : this_._internal_roombinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.serverid_); + } + // .np2_structs.uint16 ownerId = 8; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.ownerid_); + } + // uint64 lobbyId = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_lobbyid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lobbyid()); + } + } + // uint64 roomId = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_worldid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_worldid()); + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000700U)) { + // uint32 maxSlot = 6; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (this_._internal_maxslot() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_maxslot()); + } + } + // uint64 passwordSlotMask = 5; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (this_._internal_passwordslotmask() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_passwordslotmask()); + } + } + // uint32 flagAttr = 10; + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (this_._internal_flagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomDataInternal::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomDataInternal) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_memberlist()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_memberlist()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_roomgroup()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomgroup()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_roombinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roombinattrinternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(from._impl_.serverid_ != nullptr); + if (_this->_impl_.serverid_ == nullptr) { + _this->_impl_.serverid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_); + } else { + _this->_impl_.serverid_->MergeFrom(*from._impl_.serverid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(from._impl_.ownerid_ != nullptr); + if (_this->_impl_.ownerid_ == nullptr) { + _this->_impl_.ownerid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.ownerid_); + } else { + _this->_impl_.ownerid_->MergeFrom(*from._impl_.ownerid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_lobbyid() != 0) { + _this->_impl_.lobbyid_ = from._impl_.lobbyid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (from._internal_worldid() != 0) { + _this->_impl_.worldid_ = from._impl_.worldid_; + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000700U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (from._internal_maxslot() != 0) { + _this->_impl_.maxslot_ = from._impl_.maxslot_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (from._internal_passwordslotmask() != 0) { + _this->_impl_.passwordslotmask_ = from._impl_.passwordslotmask_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (from._internal_flagattr() != 0) { + _this->_impl_.flagattr_ = from._impl_.flagattr_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomDataInternal::CopyFrom(const RoomDataInternal& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomDataInternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomDataInternal::InternalSwap(RoomDataInternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.memberlist_.InternalSwap(&other->_impl_.memberlist_); + _impl_.roomgroup_.InternalSwap(&other->_impl_.roomgroup_); + _impl_.roombinattrinternal_.InternalSwap(&other->_impl_.roombinattrinternal_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.flagattr_) + + sizeof(RoomDataInternal::_impl_.flagattr_) + - PROTOBUF_FIELD_OFFSET(RoomDataInternal, _impl_.serverid_)>( + reinterpret_cast(&_impl_.serverid_), + reinterpret_cast(&other->_impl_.serverid_)); +} + +// =================================================================== + +class RoomDataExternal::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_._has_bits_); +}; + +RoomDataExternal::RoomDataExternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomDataExternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomDataExternal) +} +PROTOBUF_NDEBUG_INLINE RoomDataExternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomDataExternal& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roomgroup_{visibility, arena, from.roomgroup_}, + roomsearchableintattrexternal_{visibility, arena, from.roomsearchableintattrexternal_}, + roomsearchablebinattrexternal_{visibility, arena, from.roomsearchablebinattrexternal_}, + roombinattrexternal_{visibility, arena, from.roombinattrexternal_} {} + +RoomDataExternal::RoomDataExternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomDataExternal& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomDataExternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomDataExternal* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.serverid_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_) + : nullptr; + _impl_.publicslotnum_ = (CheckHasBit(cached_has_bits, 0x00000020U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.publicslotnum_) + : nullptr; + _impl_.privateslotnum_ = (CheckHasBit(cached_has_bits, 0x00000040U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.privateslotnum_) + : nullptr; + _impl_.openpublicslotnum_ = (CheckHasBit(cached_has_bits, 0x00000080U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.openpublicslotnum_) + : nullptr; + _impl_.maxslot_ = (CheckHasBit(cached_has_bits, 0x00000100U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.maxslot_) + : nullptr; + _impl_.openprivateslotnum_ = (CheckHasBit(cached_has_bits, 0x00000200U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.openprivateslotnum_) + : nullptr; + _impl_.curmembernum_ = (CheckHasBit(cached_has_bits, 0x00000400U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.curmembernum_) + : nullptr; + _impl_.owner_ = (CheckHasBit(cached_has_bits, 0x00000800U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.owner_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, lobbyid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lobbyid_), + offsetof(Impl_, passwordslotmask_) - + offsetof(Impl_, lobbyid_) + + sizeof(Impl_::passwordslotmask_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomDataExternal) +} +PROTOBUF_NDEBUG_INLINE RoomDataExternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roomgroup_{visibility, arena}, + roomsearchableintattrexternal_{visibility, arena}, + roomsearchablebinattrexternal_{visibility, arena}, + roombinattrexternal_{visibility, arena} {} + +inline void RoomDataExternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, serverid_), + 0, + offsetof(Impl_, passwordslotmask_) - + offsetof(Impl_, serverid_) + + sizeof(Impl_::passwordslotmask_)); +} +RoomDataExternal::~RoomDataExternal() { + // @@protoc_insertion_point(destructor:np2_structs.RoomDataExternal) + SharedDtor(*this); +} +inline void RoomDataExternal::SharedDtor(MessageLite& self) { + RoomDataExternal& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.serverid_; + delete this_._impl_.publicslotnum_; + delete this_._impl_.privateslotnum_; + delete this_._impl_.openpublicslotnum_; + delete this_._impl_.maxslot_; + delete this_._impl_.openprivateslotnum_; + delete this_._impl_.curmembernum_; + delete this_._impl_.owner_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomDataExternal::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomDataExternal(arena); +} +constexpr auto RoomDataExternal::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomgroup_) + + decltype(RoomDataExternal::_impl_.roomgroup_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomsearchableintattrexternal_) + + decltype(RoomDataExternal::_impl_.roomsearchableintattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomsearchablebinattrexternal_) + + decltype(RoomDataExternal::_impl_.roomsearchablebinattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roombinattrexternal_) + + decltype(RoomDataExternal::_impl_.roombinattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(RoomDataExternal), alignof(RoomDataExternal), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&RoomDataExternal::PlacementNew_, + sizeof(RoomDataExternal), + alignof(RoomDataExternal)); + } +} +constexpr auto RoomDataExternal::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<29>{ + { + &_RoomDataExternal_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomDataExternal::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomDataExternal::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomDataExternal::ByteSizeLong, + &RoomDataExternal::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_._cached_size_), + true, + }, + "np2_structs.RoomDataExternal", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<29> RoomDataExternal_class_data_ = + RoomDataExternal::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomDataExternal::GetClassData() const { + return RoomDataExternal_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<5, 17, 12, 0, 2> +RoomDataExternal::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_._has_bits_), + 0, // no _extensions_ + 17, 248, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294836224, // skipmap + offsetof(decltype(_table_), field_entries), + 17, // num_field_entries + 12, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomDataExternal_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomDataExternal>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.uint16 serverId = 1; + {::_pbi::TcParser::FastMtS1, + {10, 4, 0, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.serverid_)}}, + // uint32 worldId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 14, 0, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.worldid_)}}, + // .np2_structs.uint16 publicSlotNum = 3; + {::_pbi::TcParser::FastMtS1, + {26, 5, 1, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.publicslotnum_)}}, + // .np2_structs.uint16 privateSlotNum = 4; + {::_pbi::TcParser::FastMtS1, + {34, 6, 2, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.privateslotnum_)}}, + // uint64 lobbyId = 5; + {::_pbi::TcParser::FastV64S1, + {40, 12, 0, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.lobbyid_)}}, + // uint64 roomId = 6; + {::_pbi::TcParser::FastV64S1, + {48, 13, 0, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomid_)}}, + // .np2_structs.uint16 openPublicSlotNum = 7; + {::_pbi::TcParser::FastMtS1, + {58, 7, 3, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.openpublicslotnum_)}}, + // .np2_structs.uint16 maxSlot = 8; + {::_pbi::TcParser::FastMtS1, + {66, 8, 4, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.maxslot_)}}, + // .np2_structs.uint16 openPrivateSlotNum = 9; + {::_pbi::TcParser::FastMtS1, + {74, 9, 5, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.openprivateslotnum_)}}, + // .np2_structs.uint16 curMemberNum = 10; + {::_pbi::TcParser::FastMtS1, + {82, 10, 6, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.curmembernum_)}}, + // uint64 passwordSlotMask = 11; + {::_pbi::TcParser::FastV64S1, + {88, 16, 0, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.passwordslotmask_)}}, + // .np2_structs.UserInfo owner = 12; + {::_pbi::TcParser::FastMtS1, + {98, 11, 7, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.owner_)}}, + // repeated .np2_structs.RoomGroup roomGroup = 13; + {::_pbi::TcParser::FastMtR1, + {106, 0, 8, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomgroup_)}}, + // uint32 flagAttr = 14; + {::_pbi::TcParser::FastV32S1, + {112, 15, 0, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.flagattr_)}}, + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 15; + {::_pbi::TcParser::FastMtR1, + {122, 1, 9, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomsearchableintattrexternal_)}}, + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 16; + {::_pbi::TcParser::FastMtR2, + {386, 2, 10, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomsearchablebinattrexternal_)}}, + // repeated .np2_structs.BinAttr roomBinAttrExternal = 17; + {::_pbi::TcParser::FastMtR2, + {394, 3, 11, + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roombinattrexternal_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 serverId = 1; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.serverid_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 worldId = 2; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.worldid_), _Internal::kHasBitsOffset + 14, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // .np2_structs.uint16 publicSlotNum = 3; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.publicslotnum_), _Internal::kHasBitsOffset + 5, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 privateSlotNum = 4; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.privateslotnum_), _Internal::kHasBitsOffset + 6, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 lobbyId = 5; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.lobbyid_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint64 roomId = 6; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomid_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint16 openPublicSlotNum = 7; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.openpublicslotnum_), _Internal::kHasBitsOffset + 7, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 maxSlot = 8; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.maxslot_), _Internal::kHasBitsOffset + 8, 4, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 openPrivateSlotNum = 9; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.openprivateslotnum_), _Internal::kHasBitsOffset + 9, 5, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 curMemberNum = 10; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.curmembernum_), _Internal::kHasBitsOffset + 10, 6, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 passwordSlotMask = 11; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.passwordslotmask_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.UserInfo owner = 12; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.owner_), _Internal::kHasBitsOffset + 11, 7, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.RoomGroup roomGroup = 13; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomgroup_), _Internal::kHasBitsOffset + 0, 8, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 flagAttr = 14; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.flagattr_), _Internal::kHasBitsOffset + 15, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 15; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomsearchableintattrexternal_), _Internal::kHasBitsOffset + 1, 9, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 16; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roomsearchablebinattrexternal_), _Internal::kHasBitsOffset + 2, 10, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomBinAttrExternal = 17; + {PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.roombinattrexternal_), _Internal::kHasBitsOffset + 3, 11, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::UserInfo>()}, + {::_pbi::TcParser::GetTable<::np2_structs::RoomGroup>()}, + {::_pbi::TcParser::GetTable<::np2_structs::IntAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomDataExternal::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomDataExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roomgroup_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.roomsearchableintattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.roomsearchablebinattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + _impl_.roombinattrexternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(_impl_.serverid_ != nullptr); + _impl_.serverid_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + ABSL_DCHECK(_impl_.publicslotnum_ != nullptr); + _impl_.publicslotnum_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + ABSL_DCHECK(_impl_.privateslotnum_ != nullptr); + _impl_.privateslotnum_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + ABSL_DCHECK(_impl_.openpublicslotnum_ != nullptr); + _impl_.openpublicslotnum_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000f00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + ABSL_DCHECK(_impl_.maxslot_ != nullptr); + _impl_.maxslot_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + ABSL_DCHECK(_impl_.openprivateslotnum_ != nullptr); + _impl_.openprivateslotnum_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + ABSL_DCHECK(_impl_.curmembernum_ != nullptr); + _impl_.curmembernum_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + ABSL_DCHECK(_impl_.owner_ != nullptr); + _impl_.owner_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000f000U)) { + ::memset(&_impl_.lobbyid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.flagattr_) - + reinterpret_cast(&_impl_.lobbyid_)) + sizeof(_impl_.flagattr_)); + } + _impl_.passwordslotmask_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomDataExternal::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomDataExternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomDataExternal::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomDataExternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomDataExternal) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.serverid_, this_._impl_.serverid_->GetCachedSize(), target, + stream); + } + + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (this_._internal_worldid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_worldid(), target); + } + } + + // .np2_structs.uint16 publicSlotNum = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.publicslotnum_, this_._impl_.publicslotnum_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint16 privateSlotNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.privateslotnum_, this_._impl_.privateslotnum_->GetCachedSize(), target, + stream); + } + + // uint64 lobbyId = 5; + if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (this_._internal_lobbyid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 5, this_._internal_lobbyid(), target); + } + } + + // uint64 roomId = 6; + if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 6, this_._internal_roomid(), target); + } + } + + // .np2_structs.uint16 openPublicSlotNum = 7; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, *this_._impl_.openpublicslotnum_, this_._impl_.openpublicslotnum_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint16 maxSlot = 8; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, *this_._impl_.maxslot_, this_._impl_.maxslot_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint16 openPrivateSlotNum = 9; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, *this_._impl_.openprivateslotnum_, this_._impl_.openprivateslotnum_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint16 curMemberNum = 10; + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 10, *this_._impl_.curmembernum_, this_._impl_.curmembernum_->GetCachedSize(), target, + stream); + } + + // uint64 passwordSlotMask = 11; + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (this_._internal_passwordslotmask() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 11, this_._internal_passwordslotmask(), target); + } + } + + // .np2_structs.UserInfo owner = 12; + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 12, *this_._impl_.owner_, this_._impl_.owner_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.RoomGroup roomGroup = 13; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomgroup_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomgroup().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 13, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // uint32 flagAttr = 14; + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (this_._internal_flagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 14, this_._internal_flagattr(), target); + } + } + + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 15; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomsearchableintattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomsearchableintattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 16; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomsearchablebinattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomsearchablebinattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 16, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinAttr roomBinAttrExternal = 17; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roombinattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roombinattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 17, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomDataExternal) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomDataExternal::ByteSizeLong(const MessageLite& base) { + const RoomDataExternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomDataExternal::ByteSizeLong() const { + const RoomDataExternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomDataExternal) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // repeated .np2_structs.RoomGroup roomGroup = 13; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roomgroup_size(); + for (const auto& msg : this_._internal_roomgroup()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 15; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_roomsearchableintattrexternal_size(); + for (const auto& msg : this_._internal_roomsearchableintattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 16; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += 2UL * this_._internal_roomsearchablebinattrexternal_size(); + for (const auto& msg : this_._internal_roomsearchablebinattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttr roomBinAttrExternal = 17; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + total_size += 2UL * this_._internal_roombinattrexternal_size(); + for (const auto& msg : this_._internal_roombinattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.serverid_); + } + // .np2_structs.uint16 publicSlotNum = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.publicslotnum_); + } + // .np2_structs.uint16 privateSlotNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.privateslotnum_); + } + // .np2_structs.uint16 openPublicSlotNum = 7; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.openpublicslotnum_); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + // .np2_structs.uint16 maxSlot = 8; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.maxslot_); + } + // .np2_structs.uint16 openPrivateSlotNum = 9; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.openprivateslotnum_); + } + // .np2_structs.uint16 curMemberNum = 10; + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.curmembernum_); + } + // .np2_structs.UserInfo owner = 12; + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.owner_); + } + // uint64 lobbyId = 5; + if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (this_._internal_lobbyid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lobbyid()); + } + } + // uint64 roomId = 6; + if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (this_._internal_worldid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_worldid()); + } + } + // uint32 flagAttr = 14; + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (this_._internal_flagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagattr()); + } + } + } + { + // uint64 passwordSlotMask = 11; + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (this_._internal_passwordslotmask() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_passwordslotmask()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomDataExternal::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomDataExternal) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roomgroup()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomgroup()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_roomsearchableintattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomsearchableintattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_roomsearchablebinattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomsearchablebinattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + _this->_internal_mutable_roombinattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roombinattrexternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(from._impl_.serverid_ != nullptr); + if (_this->_impl_.serverid_ == nullptr) { + _this->_impl_.serverid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_); + } else { + _this->_impl_.serverid_->MergeFrom(*from._impl_.serverid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + ABSL_DCHECK(from._impl_.publicslotnum_ != nullptr); + if (_this->_impl_.publicslotnum_ == nullptr) { + _this->_impl_.publicslotnum_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.publicslotnum_); + } else { + _this->_impl_.publicslotnum_->MergeFrom(*from._impl_.publicslotnum_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + ABSL_DCHECK(from._impl_.privateslotnum_ != nullptr); + if (_this->_impl_.privateslotnum_ == nullptr) { + _this->_impl_.privateslotnum_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.privateslotnum_); + } else { + _this->_impl_.privateslotnum_->MergeFrom(*from._impl_.privateslotnum_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + ABSL_DCHECK(from._impl_.openpublicslotnum_ != nullptr); + if (_this->_impl_.openpublicslotnum_ == nullptr) { + _this->_impl_.openpublicslotnum_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.openpublicslotnum_); + } else { + _this->_impl_.openpublicslotnum_->MergeFrom(*from._impl_.openpublicslotnum_); + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + ABSL_DCHECK(from._impl_.maxslot_ != nullptr); + if (_this->_impl_.maxslot_ == nullptr) { + _this->_impl_.maxslot_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.maxslot_); + } else { + _this->_impl_.maxslot_->MergeFrom(*from._impl_.maxslot_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + ABSL_DCHECK(from._impl_.openprivateslotnum_ != nullptr); + if (_this->_impl_.openprivateslotnum_ == nullptr) { + _this->_impl_.openprivateslotnum_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.openprivateslotnum_); + } else { + _this->_impl_.openprivateslotnum_->MergeFrom(*from._impl_.openprivateslotnum_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + ABSL_DCHECK(from._impl_.curmembernum_ != nullptr); + if (_this->_impl_.curmembernum_ == nullptr) { + _this->_impl_.curmembernum_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.curmembernum_); + } else { + _this->_impl_.curmembernum_->MergeFrom(*from._impl_.curmembernum_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + ABSL_DCHECK(from._impl_.owner_ != nullptr); + if (_this->_impl_.owner_ == nullptr) { + _this->_impl_.owner_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.owner_); + } else { + _this->_impl_.owner_->MergeFrom(*from._impl_.owner_); + } + } + if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (from._internal_lobbyid() != 0) { + _this->_impl_.lobbyid_ = from._impl_.lobbyid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (from._internal_worldid() != 0) { + _this->_impl_.worldid_ = from._impl_.worldid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (from._internal_flagattr() != 0) { + _this->_impl_.flagattr_ = from._impl_.flagattr_; + } + } + } + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (from._internal_passwordslotmask() != 0) { + _this->_impl_.passwordslotmask_ = from._impl_.passwordslotmask_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomDataExternal::CopyFrom(const RoomDataExternal& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomDataExternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomDataExternal::InternalSwap(RoomDataExternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roomgroup_.InternalSwap(&other->_impl_.roomgroup_); + _impl_.roomsearchableintattrexternal_.InternalSwap(&other->_impl_.roomsearchableintattrexternal_); + _impl_.roomsearchablebinattrexternal_.InternalSwap(&other->_impl_.roomsearchablebinattrexternal_); + _impl_.roombinattrexternal_.InternalSwap(&other->_impl_.roombinattrexternal_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.passwordslotmask_) + + sizeof(RoomDataExternal::_impl_.passwordslotmask_) + - PROTOBUF_FIELD_OFFSET(RoomDataExternal, _impl_.serverid_)>( + reinterpret_cast(&_impl_.serverid_), + reinterpret_cast(&other->_impl_.serverid_)); +} + +// =================================================================== + +class IntSearchFilter::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_._has_bits_); +}; + +IntSearchFilter::IntSearchFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, IntSearchFilter_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.IntSearchFilter) +} +PROTOBUF_NDEBUG_INLINE IntSearchFilter::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::IntSearchFilter& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +IntSearchFilter::IntSearchFilter( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const IntSearchFilter& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, IntSearchFilter_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + IntSearchFilter* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.searchoperator_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.searchoperator_) + : nullptr; + _impl_.attr_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.attr_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.IntSearchFilter) +} +PROTOBUF_NDEBUG_INLINE IntSearchFilter::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void IntSearchFilter::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, searchoperator_), + 0, + offsetof(Impl_, attr_) - + offsetof(Impl_, searchoperator_) + + sizeof(Impl_::attr_)); +} +IntSearchFilter::~IntSearchFilter() { + // @@protoc_insertion_point(destructor:np2_structs.IntSearchFilter) + SharedDtor(*this); +} +inline void IntSearchFilter::SharedDtor(MessageLite& self) { + IntSearchFilter& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.searchoperator_; + delete this_._impl_.attr_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL IntSearchFilter::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) IntSearchFilter(arena); +} +constexpr auto IntSearchFilter::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(IntSearchFilter), + alignof(IntSearchFilter)); +} +constexpr auto IntSearchFilter::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<28>{ + { + &_IntSearchFilter_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &IntSearchFilter::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &IntSearchFilter::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &IntSearchFilter::ByteSizeLong, + &IntSearchFilter::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_._cached_size_), + true, + }, + "np2_structs.IntSearchFilter", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> IntSearchFilter_class_data_ = + IntSearchFilter::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +IntSearchFilter::GetClassData() const { + return IntSearchFilter_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +IntSearchFilter::_table_ = { + { + PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + IntSearchFilter_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::IntSearchFilter>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.IntAttr attr = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_.attr_)}}, + // .np2_structs.uint8 searchOperator = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_.searchoperator_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint8 searchOperator = 1; + {PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_.searchoperator_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.IntAttr attr = 2; + {PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_.attr_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::IntAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void IntSearchFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.IntSearchFilter) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.searchoperator_ != nullptr); + _impl_.searchoperator_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.attr_ != nullptr); + _impl_.attr_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL IntSearchFilter::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const IntSearchFilter& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL IntSearchFilter::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const IntSearchFilter& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.IntSearchFilter) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint8 searchOperator = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.searchoperator_, this_._impl_.searchoperator_->GetCachedSize(), target, + stream); + } + + // .np2_structs.IntAttr attr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.attr_, this_._impl_.attr_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.IntSearchFilter) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t IntSearchFilter::ByteSizeLong(const MessageLite& base) { + const IntSearchFilter& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t IntSearchFilter::ByteSizeLong() const { + const IntSearchFilter& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.IntSearchFilter) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.uint8 searchOperator = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.searchoperator_); + } + // .np2_structs.IntAttr attr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.attr_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void IntSearchFilter::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.IntSearchFilter) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.searchoperator_ != nullptr); + if (_this->_impl_.searchoperator_ == nullptr) { + _this->_impl_.searchoperator_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.searchoperator_); + } else { + _this->_impl_.searchoperator_->MergeFrom(*from._impl_.searchoperator_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.attr_ != nullptr); + if (_this->_impl_.attr_ == nullptr) { + _this->_impl_.attr_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.attr_); + } else { + _this->_impl_.attr_->MergeFrom(*from._impl_.attr_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void IntSearchFilter::CopyFrom(const IntSearchFilter& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.IntSearchFilter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void IntSearchFilter::InternalSwap(IntSearchFilter* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_.attr_) + + sizeof(IntSearchFilter::_impl_.attr_) + - PROTOBUF_FIELD_OFFSET(IntSearchFilter, _impl_.searchoperator_)>( + reinterpret_cast(&_impl_.searchoperator_), + reinterpret_cast(&other->_impl_.searchoperator_)); +} + +// =================================================================== + +class BinSearchFilter::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_._has_bits_); +}; + +BinSearchFilter::BinSearchFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BinSearchFilter_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.BinSearchFilter) +} +PROTOBUF_NDEBUG_INLINE BinSearchFilter::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::BinSearchFilter& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +BinSearchFilter::BinSearchFilter( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const BinSearchFilter& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BinSearchFilter_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + BinSearchFilter* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.searchoperator_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.searchoperator_) + : nullptr; + _impl_.attr_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.attr_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.BinSearchFilter) +} +PROTOBUF_NDEBUG_INLINE BinSearchFilter::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void BinSearchFilter::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, searchoperator_), + 0, + offsetof(Impl_, attr_) - + offsetof(Impl_, searchoperator_) + + sizeof(Impl_::attr_)); +} +BinSearchFilter::~BinSearchFilter() { + // @@protoc_insertion_point(destructor:np2_structs.BinSearchFilter) + SharedDtor(*this); +} +inline void BinSearchFilter::SharedDtor(MessageLite& self) { + BinSearchFilter& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.searchoperator_; + delete this_._impl_.attr_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL BinSearchFilter::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) BinSearchFilter(arena); +} +constexpr auto BinSearchFilter::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(BinSearchFilter), + alignof(BinSearchFilter)); +} +constexpr auto BinSearchFilter::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<28>{ + { + &_BinSearchFilter_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &BinSearchFilter::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &BinSearchFilter::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &BinSearchFilter::ByteSizeLong, + &BinSearchFilter::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_._cached_size_), + true, + }, + "np2_structs.BinSearchFilter", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> BinSearchFilter_class_data_ = + BinSearchFilter::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +BinSearchFilter::GetClassData() const { + return BinSearchFilter_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +BinSearchFilter::_table_ = { + { + PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + BinSearchFilter_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::BinSearchFilter>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.BinAttr attr = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_.attr_)}}, + // .np2_structs.uint8 searchOperator = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_.searchoperator_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint8 searchOperator = 1; + {PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_.searchoperator_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.BinAttr attr = 2; + {PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_.attr_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void BinSearchFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.BinSearchFilter) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.searchoperator_ != nullptr); + _impl_.searchoperator_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.attr_ != nullptr); + _impl_.attr_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL BinSearchFilter::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const BinSearchFilter& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL BinSearchFilter::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const BinSearchFilter& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.BinSearchFilter) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint8 searchOperator = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.searchoperator_, this_._impl_.searchoperator_->GetCachedSize(), target, + stream); + } + + // .np2_structs.BinAttr attr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.attr_, this_._impl_.attr_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.BinSearchFilter) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t BinSearchFilter::ByteSizeLong(const MessageLite& base) { + const BinSearchFilter& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t BinSearchFilter::ByteSizeLong() const { + const BinSearchFilter& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.BinSearchFilter) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.uint8 searchOperator = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.searchoperator_); + } + // .np2_structs.BinAttr attr = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.attr_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void BinSearchFilter::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.BinSearchFilter) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.searchoperator_ != nullptr); + if (_this->_impl_.searchoperator_ == nullptr) { + _this->_impl_.searchoperator_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.searchoperator_); + } else { + _this->_impl_.searchoperator_->MergeFrom(*from._impl_.searchoperator_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.attr_ != nullptr); + if (_this->_impl_.attr_ == nullptr) { + _this->_impl_.attr_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.attr_); + } else { + _this->_impl_.attr_->MergeFrom(*from._impl_.attr_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void BinSearchFilter::CopyFrom(const BinSearchFilter& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.BinSearchFilter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void BinSearchFilter::InternalSwap(BinSearchFilter* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_.attr_) + + sizeof(BinSearchFilter::_impl_.attr_) + - PROTOBUF_FIELD_OFFSET(BinSearchFilter, _impl_.searchoperator_)>( + reinterpret_cast(&_impl_.searchoperator_), + reinterpret_cast(&other->_impl_.searchoperator_)); +} + +// =================================================================== + +class PresenceOptionData::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_._has_bits_); +}; + +PresenceOptionData::PresenceOptionData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, PresenceOptionData_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.PresenceOptionData) +} +PROTOBUF_NDEBUG_INLINE PresenceOptionData::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::PresenceOptionData& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + data_(arena, from.data_) {} + +PresenceOptionData::PresenceOptionData( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const PresenceOptionData& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, PresenceOptionData_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + PresenceOptionData* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.len_ = from._impl_.len_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.PresenceOptionData) +} +PROTOBUF_NDEBUG_INLINE PresenceOptionData::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + data_(arena) {} + +inline void PresenceOptionData::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.len_ = {}; +} +PresenceOptionData::~PresenceOptionData() { + // @@protoc_insertion_point(destructor:np2_structs.PresenceOptionData) + SharedDtor(*this); +} +inline void PresenceOptionData::SharedDtor(MessageLite& self) { + PresenceOptionData& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.data_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL PresenceOptionData::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) PresenceOptionData(arena); +} +constexpr auto PresenceOptionData::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(PresenceOptionData), + alignof(PresenceOptionData)); +} +constexpr auto PresenceOptionData::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_PresenceOptionData_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &PresenceOptionData::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &PresenceOptionData::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &PresenceOptionData::ByteSizeLong, + &PresenceOptionData::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_._cached_size_), + true, + }, + "np2_structs.PresenceOptionData", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> PresenceOptionData_class_data_ = + PresenceOptionData::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +PresenceOptionData::GetClassData() const { + return PresenceOptionData_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> +PresenceOptionData::_table_ = { + { + PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + PresenceOptionData_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::PresenceOptionData>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 len = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_.len_)}}, + // bytes data = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_.data_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes data = 1; + {PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_.data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // uint32 len = 2; + {PROTOBUF_FIELD_OFFSET(PresenceOptionData, _impl_.len_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void PresenceOptionData::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.PresenceOptionData) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + _impl_.len_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL PresenceOptionData::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const PresenceOptionData& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL PresenceOptionData::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const PresenceOptionData& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.PresenceOptionData) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes data = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + // uint32 len = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_len() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_len(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.PresenceOptionData) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t PresenceOptionData::ByteSizeLong(const MessageLite& base) { + const PresenceOptionData& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t PresenceOptionData::ByteSizeLong() const { + const PresenceOptionData& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.PresenceOptionData) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // bytes data = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // uint32 len = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_len() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_len()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void PresenceOptionData::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.PresenceOptionData) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_len() != 0) { + _this->_impl_.len_ = from._impl_.len_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void PresenceOptionData::CopyFrom(const PresenceOptionData& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.PresenceOptionData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void PresenceOptionData::InternalSwap(PresenceOptionData* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + swap(_impl_.len_, other->_impl_.len_); +} + +// =================================================================== + +class RoomGroupPasswordConfig::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_._has_bits_); +}; + +RoomGroupPasswordConfig::RoomGroupPasswordConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomGroupPasswordConfig_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomGroupPasswordConfig) +} +PROTOBUF_NDEBUG_INLINE RoomGroupPasswordConfig::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomGroupPasswordConfig& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +RoomGroupPasswordConfig::RoomGroupPasswordConfig( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomGroupPasswordConfig& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomGroupPasswordConfig_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomGroupPasswordConfig* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.groupid_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.groupid_) + : nullptr; + _impl_.withpassword_ = from._impl_.withpassword_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomGroupPasswordConfig) +} +PROTOBUF_NDEBUG_INLINE RoomGroupPasswordConfig::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void RoomGroupPasswordConfig::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, groupid_), + 0, + offsetof(Impl_, withpassword_) - + offsetof(Impl_, groupid_) + + sizeof(Impl_::withpassword_)); +} +RoomGroupPasswordConfig::~RoomGroupPasswordConfig() { + // @@protoc_insertion_point(destructor:np2_structs.RoomGroupPasswordConfig) + SharedDtor(*this); +} +inline void RoomGroupPasswordConfig::SharedDtor(MessageLite& self) { + RoomGroupPasswordConfig& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.groupid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomGroupPasswordConfig::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomGroupPasswordConfig(arena); +} +constexpr auto RoomGroupPasswordConfig::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RoomGroupPasswordConfig), + alignof(RoomGroupPasswordConfig)); +} +constexpr auto RoomGroupPasswordConfig::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<36>{ + { + &_RoomGroupPasswordConfig_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomGroupPasswordConfig::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomGroupPasswordConfig::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomGroupPasswordConfig::ByteSizeLong, + &RoomGroupPasswordConfig::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_._cached_size_), + true, + }, + "np2_structs.RoomGroupPasswordConfig", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<36> RoomGroupPasswordConfig_class_data_ = + RoomGroupPasswordConfig::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomGroupPasswordConfig::GetClassData() const { + return RoomGroupPasswordConfig_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +RoomGroupPasswordConfig::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomGroupPasswordConfig_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomGroupPasswordConfig>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bool withPassword = 2; + {::_pbi::TcParser::FastV8S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_.withpassword_)}}, + // .np2_structs.uint8 groupId = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_.groupid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint8 groupId = 1; + {PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_.groupid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool withPassword = 2; + {PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_.withpassword_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomGroupPasswordConfig::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomGroupPasswordConfig) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.groupid_ != nullptr); + _impl_.groupid_->Clear(); + } + _impl_.withpassword_ = false; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomGroupPasswordConfig::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomGroupPasswordConfig& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomGroupPasswordConfig::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomGroupPasswordConfig& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomGroupPasswordConfig) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint8 groupId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.groupid_, this_._impl_.groupid_->GetCachedSize(), target, + stream); + } + + // bool withPassword = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_withpassword() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_withpassword(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomGroupPasswordConfig) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomGroupPasswordConfig::ByteSizeLong(const MessageLite& base) { + const RoomGroupPasswordConfig& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomGroupPasswordConfig::ByteSizeLong() const { + const RoomGroupPasswordConfig& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomGroupPasswordConfig) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.uint8 groupId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.groupid_); + } + // bool withPassword = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_withpassword() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomGroupPasswordConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomGroupPasswordConfig) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.groupid_ != nullptr); + if (_this->_impl_.groupid_ == nullptr) { + _this->_impl_.groupid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.groupid_); + } else { + _this->_impl_.groupid_->MergeFrom(*from._impl_.groupid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_withpassword() != 0) { + _this->_impl_.withpassword_ = from._impl_.withpassword_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomGroupPasswordConfig::CopyFrom(const RoomGroupPasswordConfig& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomGroupPasswordConfig) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomGroupPasswordConfig::InternalSwap(RoomGroupPasswordConfig* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_.withpassword_) + + sizeof(RoomGroupPasswordConfig::_impl_.withpassword_) + - PROTOBUF_FIELD_OFFSET(RoomGroupPasswordConfig, _impl_.groupid_)>( + reinterpret_cast(&_impl_.groupid_), + reinterpret_cast(&other->_impl_.groupid_)); +} + +// =================================================================== + +class SearchRoomRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_._has_bits_); +}; + +SearchRoomRequest::SearchRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SearchRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SearchRoomRequest) +} +PROTOBUF_NDEBUG_INLINE SearchRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SearchRoomRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + intfilter_{visibility, arena, from.intfilter_}, + binfilter_{visibility, arena, from.binfilter_}, + attrid_{visibility, arena, from.attrid_} {} + +SearchRoomRequest::SearchRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SearchRoomRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SearchRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SearchRoomRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, option_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, option_), + offsetof(Impl_, flagattr_) - + offsetof(Impl_, option_) + + sizeof(Impl_::flagattr_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.SearchRoomRequest) +} +PROTOBUF_NDEBUG_INLINE SearchRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + intfilter_{visibility, arena}, + binfilter_{visibility, arena}, + attrid_{visibility, arena} {} + +inline void SearchRoomRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, option_), + 0, + offsetof(Impl_, flagattr_) - + offsetof(Impl_, option_) + + sizeof(Impl_::flagattr_)); +} +SearchRoomRequest::~SearchRoomRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SearchRoomRequest) + SharedDtor(*this); +} +inline void SearchRoomRequest::SharedDtor(MessageLite& self) { + SearchRoomRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SearchRoomRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SearchRoomRequest(arena); +} +constexpr auto SearchRoomRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.intfilter_) + + decltype(SearchRoomRequest::_impl_.intfilter_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.binfilter_) + + decltype(SearchRoomRequest::_impl_.binfilter_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.attrid_) + + decltype(SearchRoomRequest::_impl_.attrid_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SearchRoomRequest), alignof(SearchRoomRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SearchRoomRequest::PlacementNew_, + sizeof(SearchRoomRequest), + alignof(SearchRoomRequest)); + } +} +constexpr auto SearchRoomRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<30>{ + { + &_SearchRoomRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SearchRoomRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SearchRoomRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SearchRoomRequest::ByteSizeLong, + &SearchRoomRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SearchRoomRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<30> SearchRoomRequest_class_data_ = + SearchRoomRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SearchRoomRequest::GetClassData() const { + return SearchRoomRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 10, 3, 0, 2> +SearchRoomRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_._has_bits_), + 0, // no _extensions_ + 10, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966272, // skipmap + offsetof(decltype(_table_), field_entries), + 10, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SearchRoomRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SearchRoomRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // int32 option = 1; + {::_pbi::TcParser::FastV32S1, + {8, 3, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.option_)}}, + // uint32 worldId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 4, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.worldid_)}}, + // uint64 lobbyId = 3; + {::_pbi::TcParser::FastV64S1, + {24, 5, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.lobbyid_)}}, + // uint32 rangeFilter_startIndex = 4; + {::_pbi::TcParser::FastV32S1, + {32, 6, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.rangefilter_startindex_)}}, + // uint32 rangeFilter_max = 5; + {::_pbi::TcParser::FastV32S1, + {40, 7, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.rangefilter_max_)}}, + // uint32 flagFilter = 6; + {::_pbi::TcParser::FastV32S1, + {48, 8, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.flagfilter_)}}, + // uint32 flagAttr = 7; + {::_pbi::TcParser::FastV32S1, + {56, 9, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.flagattr_)}}, + // repeated .np2_structs.IntSearchFilter intFilter = 8; + {::_pbi::TcParser::FastMtR1, + {66, 0, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.intfilter_)}}, + // repeated .np2_structs.BinSearchFilter binFilter = 9; + {::_pbi::TcParser::FastMtR1, + {74, 1, 1, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.binfilter_)}}, + // repeated .np2_structs.uint16 attrId = 10; + {::_pbi::TcParser::FastMtR1, + {82, 2, 2, + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.attrid_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // int32 option = 1; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.option_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // uint32 worldId = 2; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.worldid_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint64 lobbyId = 3; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.lobbyid_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 rangeFilter_startIndex = 4; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.rangefilter_startindex_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 rangeFilter_max = 5; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.rangefilter_max_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 flagFilter = 6; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.flagfilter_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 flagAttr = 7; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.flagattr_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.IntSearchFilter intFilter = 8; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.intfilter_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinSearchFilter binFilter = 9; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.binfilter_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.uint16 attrId = 10; + {PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.attrid_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::IntSearchFilter>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinSearchFilter>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SearchRoomRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SearchRoomRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.intfilter_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.binfilter_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.attrid_.Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x000000f8U)) { + ::memset(&_impl_.option_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.rangefilter_max_) - + reinterpret_cast(&_impl_.option_)) + sizeof(_impl_.rangefilter_max_)); + } + if (BatchCheckHasBit(cached_has_bits, 0x00000300U)) { + ::memset(&_impl_.flagfilter_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.flagattr_) - + reinterpret_cast(&_impl_.flagfilter_)) + sizeof(_impl_.flagattr_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SearchRoomRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SearchRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SearchRoomRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SearchRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SearchRoomRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // int32 option = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_option() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<1>( + stream, this_._internal_option(), target); + } + } + + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_worldid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_worldid(), target); + } + } + + // uint64 lobbyId = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_lobbyid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 3, this_._internal_lobbyid(), target); + } + } + + // uint32 rangeFilter_startIndex = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_rangefilter_startindex() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_rangefilter_startindex(), target); + } + } + + // uint32 rangeFilter_max = 5; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_rangefilter_max() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 5, this_._internal_rangefilter_max(), target); + } + } + + // uint32 flagFilter = 6; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (this_._internal_flagfilter() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 6, this_._internal_flagfilter(), target); + } + } + + // uint32 flagAttr = 7; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (this_._internal_flagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 7, this_._internal_flagattr(), target); + } + } + + // repeated .np2_structs.IntSearchFilter intFilter = 8; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_intfilter_size()); + i < n; i++) { + const auto& repfield = this_._internal_intfilter().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinSearchFilter binFilter = 9; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_binfilter_size()); + i < n; i++) { + const auto& repfield = this_._internal_binfilter().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.uint16 attrId = 10; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attrid_size()); + i < n; i++) { + const auto& repfield = this_._internal_attrid().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 10, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SearchRoomRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SearchRoomRequest::ByteSizeLong(const MessageLite& base) { + const SearchRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SearchRoomRequest::ByteSizeLong() const { + const SearchRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SearchRoomRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // repeated .np2_structs.IntSearchFilter intFilter = 8; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_intfilter_size(); + for (const auto& msg : this_._internal_intfilter()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinSearchFilter binFilter = 9; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_binfilter_size(); + for (const auto& msg : this_._internal_binfilter()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.uint16 attrId = 10; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += 1UL * this_._internal_attrid_size(); + for (const auto& msg : this_._internal_attrid()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // int32 option = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_option() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_option()); + } + } + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_worldid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_worldid()); + } + } + // uint64 lobbyId = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_lobbyid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lobbyid()); + } + } + // uint32 rangeFilter_startIndex = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_rangefilter_startindex() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_rangefilter_startindex()); + } + } + // uint32 rangeFilter_max = 5; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_rangefilter_max() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_rangefilter_max()); + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000300U)) { + // uint32 flagFilter = 6; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (this_._internal_flagfilter() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagfilter()); + } + } + // uint32 flagAttr = 7; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (this_._internal_flagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SearchRoomRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SearchRoomRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_intfilter()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_intfilter()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_binfilter()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_binfilter()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_attrid()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attrid()); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_option() != 0) { + _this->_impl_.option_ = from._impl_.option_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_worldid() != 0) { + _this->_impl_.worldid_ = from._impl_.worldid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_lobbyid() != 0) { + _this->_impl_.lobbyid_ = from._impl_.lobbyid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_rangefilter_startindex() != 0) { + _this->_impl_.rangefilter_startindex_ = from._impl_.rangefilter_startindex_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (from._internal_rangefilter_max() != 0) { + _this->_impl_.rangefilter_max_ = from._impl_.rangefilter_max_; + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000300U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (from._internal_flagfilter() != 0) { + _this->_impl_.flagfilter_ = from._impl_.flagfilter_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (from._internal_flagattr() != 0) { + _this->_impl_.flagattr_ = from._impl_.flagattr_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SearchRoomRequest::CopyFrom(const SearchRoomRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SearchRoomRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SearchRoomRequest::InternalSwap(SearchRoomRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.intfilter_.InternalSwap(&other->_impl_.intfilter_); + _impl_.binfilter_.InternalSwap(&other->_impl_.binfilter_); + _impl_.attrid_.InternalSwap(&other->_impl_.attrid_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.flagattr_) + + sizeof(SearchRoomRequest::_impl_.flagattr_) + - PROTOBUF_FIELD_OFFSET(SearchRoomRequest, _impl_.option_)>( + reinterpret_cast(&_impl_.option_), + reinterpret_cast(&other->_impl_.option_)); +} + +// =================================================================== + +class SearchRoomResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_._has_bits_); +}; + +SearchRoomResponse::SearchRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SearchRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SearchRoomResponse) +} +PROTOBUF_NDEBUG_INLINE SearchRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SearchRoomResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + rooms_{visibility, arena, from.rooms_} {} + +SearchRoomResponse::SearchRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SearchRoomResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SearchRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SearchRoomResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, startindex_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, startindex_), + offsetof(Impl_, total_) - + offsetof(Impl_, startindex_) + + sizeof(Impl_::total_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.SearchRoomResponse) +} +PROTOBUF_NDEBUG_INLINE SearchRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + rooms_{visibility, arena} {} + +inline void SearchRoomResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, startindex_), + 0, + offsetof(Impl_, total_) - + offsetof(Impl_, startindex_) + + sizeof(Impl_::total_)); +} +SearchRoomResponse::~SearchRoomResponse() { + // @@protoc_insertion_point(destructor:np2_structs.SearchRoomResponse) + SharedDtor(*this); +} +inline void SearchRoomResponse::SharedDtor(MessageLite& self) { + SearchRoomResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SearchRoomResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SearchRoomResponse(arena); +} +constexpr auto SearchRoomResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.rooms_) + + decltype(SearchRoomResponse::_impl_.rooms_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SearchRoomResponse), alignof(SearchRoomResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SearchRoomResponse::PlacementNew_, + sizeof(SearchRoomResponse), + alignof(SearchRoomResponse)); + } +} +constexpr auto SearchRoomResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_SearchRoomResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SearchRoomResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SearchRoomResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SearchRoomResponse::ByteSizeLong, + &SearchRoomResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_._cached_size_), + true, + }, + "np2_structs.SearchRoomResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> SearchRoomResponse_class_data_ = + SearchRoomResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SearchRoomResponse::GetClassData() const { + return SearchRoomResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 0, 2> +SearchRoomResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SearchRoomResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SearchRoomResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 startIndex = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.startindex_)}}, + // uint32 total = 2; + {::_pbi::TcParser::FastV32S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.total_)}}, + // repeated .np2_structs.RoomDataExternal rooms = 3; + {::_pbi::TcParser::FastMtR1, + {26, 0, 0, + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.rooms_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 startIndex = 1; + {PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.startindex_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 total = 2; + {PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.total_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.RoomDataExternal rooms = 3; + {PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.rooms_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomDataExternal>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SearchRoomResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SearchRoomResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.rooms_.Clear(); + } + if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) { + ::memset(&_impl_.startindex_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.total_) - + reinterpret_cast(&_impl_.startindex_)) + sizeof(_impl_.total_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SearchRoomResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SearchRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SearchRoomResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SearchRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SearchRoomResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 startIndex = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_startindex() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_startindex(), target); + } + } + + // uint32 total = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_total() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_total(), target); + } + } + + // repeated .np2_structs.RoomDataExternal rooms = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_rooms_size()); + i < n; i++) { + const auto& repfield = this_._internal_rooms().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SearchRoomResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SearchRoomResponse::ByteSizeLong(const MessageLite& base) { + const SearchRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SearchRoomResponse::ByteSizeLong() const { + const SearchRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SearchRoomResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // repeated .np2_structs.RoomDataExternal rooms = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_rooms_size(); + for (const auto& msg : this_._internal_rooms()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint32 startIndex = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_startindex() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_startindex()); + } + } + // uint32 total = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_total() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_total()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SearchRoomResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SearchRoomResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_rooms()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_rooms()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_startindex() != 0) { + _this->_impl_.startindex_ = from._impl_.startindex_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_total() != 0) { + _this->_impl_.total_ = from._impl_.total_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SearchRoomResponse::CopyFrom(const SearchRoomResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SearchRoomResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SearchRoomResponse::InternalSwap(SearchRoomResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.rooms_.InternalSwap(&other->_impl_.rooms_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.total_) + + sizeof(SearchRoomResponse::_impl_.total_) + - PROTOBUF_FIELD_OFFSET(SearchRoomResponse, _impl_.startindex_)>( + reinterpret_cast(&_impl_.startindex_), + reinterpret_cast(&other->_impl_.startindex_)); +} + +// =================================================================== + +class CreateJoinRoomRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_._has_bits_); +}; + +CreateJoinRoomRequest::CreateJoinRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateJoinRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.CreateJoinRoomRequest) +} +PROTOBUF_NDEBUG_INLINE CreateJoinRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::CreateJoinRoomRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roombinattrinternal_{visibility, arena, from.roombinattrinternal_}, + roomsearchableintattrexternal_{visibility, arena, from.roomsearchableintattrexternal_}, + roomsearchablebinattrexternal_{visibility, arena, from.roomsearchablebinattrexternal_}, + roombinattrexternal_{visibility, arena, from.roombinattrexternal_}, + groupconfig_{visibility, arena, from.groupconfig_}, + alloweduser_{visibility, arena, from.alloweduser_}, + blockeduser_{visibility, arena, from.blockeduser_}, + roommemberbinattrinternal_{visibility, arena, from.roommemberbinattrinternal_}, + roompassword_(arena, from.roompassword_), + joinroomgrouplabel_(arena, from.joinroomgrouplabel_) {} + +CreateJoinRoomRequest::CreateJoinRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const CreateJoinRoomRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateJoinRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + CreateJoinRoomRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.teamid_ = (CheckHasBit(cached_has_bits, 0x00000400U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_) + : nullptr; + _impl_.sigoptparam_ = (CheckHasBit(cached_has_bits, 0x00000800U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.sigoptparam_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, lobbyid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lobbyid_), + offsetof(Impl_, flagattr_) - + offsetof(Impl_, lobbyid_) + + sizeof(Impl_::flagattr_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.CreateJoinRoomRequest) +} +PROTOBUF_NDEBUG_INLINE CreateJoinRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roombinattrinternal_{visibility, arena}, + roomsearchableintattrexternal_{visibility, arena}, + roomsearchablebinattrexternal_{visibility, arena}, + roombinattrexternal_{visibility, arena}, + groupconfig_{visibility, arena}, + alloweduser_{visibility, arena}, + blockeduser_{visibility, arena}, + roommemberbinattrinternal_{visibility, arena}, + roompassword_(arena), + joinroomgrouplabel_(arena) {} + +inline void CreateJoinRoomRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, teamid_), + 0, + offsetof(Impl_, flagattr_) - + offsetof(Impl_, teamid_) + + sizeof(Impl_::flagattr_)); +} +CreateJoinRoomRequest::~CreateJoinRoomRequest() { + // @@protoc_insertion_point(destructor:np2_structs.CreateJoinRoomRequest) + SharedDtor(*this); +} +inline void CreateJoinRoomRequest::SharedDtor(MessageLite& self) { + CreateJoinRoomRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.roompassword_.Destroy(); + this_._impl_.joinroomgrouplabel_.Destroy(); + delete this_._impl_.teamid_; + delete this_._impl_.sigoptparam_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL CreateJoinRoomRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) CreateJoinRoomRequest(arena); +} +constexpr auto CreateJoinRoomRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roombinattrinternal_) + + decltype(CreateJoinRoomRequest::_impl_.roombinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roomsearchableintattrexternal_) + + decltype(CreateJoinRoomRequest::_impl_.roomsearchableintattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roomsearchablebinattrexternal_) + + decltype(CreateJoinRoomRequest::_impl_.roomsearchablebinattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roombinattrexternal_) + + decltype(CreateJoinRoomRequest::_impl_.roombinattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.groupconfig_) + + decltype(CreateJoinRoomRequest::_impl_.groupconfig_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.alloweduser_) + + decltype(CreateJoinRoomRequest::_impl_.alloweduser_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.blockeduser_) + + decltype(CreateJoinRoomRequest::_impl_.blockeduser_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roommemberbinattrinternal_) + + decltype(CreateJoinRoomRequest::_impl_.roommemberbinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(CreateJoinRoomRequest), alignof(CreateJoinRoomRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&CreateJoinRoomRequest::PlacementNew_, + sizeof(CreateJoinRoomRequest), + alignof(CreateJoinRoomRequest)); + } +} +constexpr auto CreateJoinRoomRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<34>{ + { + &_CreateJoinRoomRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &CreateJoinRoomRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &CreateJoinRoomRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &CreateJoinRoomRequest::ByteSizeLong, + &CreateJoinRoomRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_._cached_size_), + true, + }, + "np2_structs.CreateJoinRoomRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<34> CreateJoinRoomRequest_class_data_ = + CreateJoinRoomRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +CreateJoinRoomRequest::GetClassData() const { + return CreateJoinRoomRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<5, 17, 8, 80, 2> +CreateJoinRoomRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_._has_bits_), + 0, // no _extensions_ + 17, 248, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294836224, // skipmap + offsetof(decltype(_table_), field_entries), + 17, // num_field_entries + 8, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + CreateJoinRoomRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::CreateJoinRoomRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 worldId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 13, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.worldid_)}}, + // uint64 lobbyId = 2; + {::_pbi::TcParser::FastV64S1, + {16, 12, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.lobbyid_)}}, + // uint32 maxSlot = 3; + {::_pbi::TcParser::FastV32S1, + {24, 14, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.maxslot_)}}, + // uint32 flagAttr = 4; + {::_pbi::TcParser::FastV32S1, + {32, 16, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.flagattr_)}}, + // repeated .np2_structs.BinAttr roomBinAttrInternal = 5; + {::_pbi::TcParser::FastMtR1, + {42, 0, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roombinattrinternal_)}}, + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 6; + {::_pbi::TcParser::FastMtR1, + {50, 1, 1, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roomsearchableintattrexternal_)}}, + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 7; + {::_pbi::TcParser::FastMtR1, + {58, 2, 2, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roomsearchablebinattrexternal_)}}, + // repeated .np2_structs.BinAttr roomBinAttrExternal = 8; + {::_pbi::TcParser::FastMtR1, + {66, 3, 3, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roombinattrexternal_)}}, + // bytes roomPassword = 9; + {::_pbi::TcParser::FastBS1, + {74, 8, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roompassword_)}}, + // repeated .np2_structs.GroupConfig groupConfig = 10; + {::_pbi::TcParser::FastMtR1, + {82, 4, 4, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.groupconfig_)}}, + // uint64 passwordSlotMask = 11; + {::_pbi::TcParser::FastV64S1, + {88, 15, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.passwordslotmask_)}}, + // repeated string allowedUser = 12; + {::_pbi::TcParser::FastUR1, + {98, 5, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.alloweduser_)}}, + // repeated string blockedUser = 13; + {::_pbi::TcParser::FastUR1, + {106, 6, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.blockeduser_)}}, + // bytes joinRoomGroupLabel = 14; + {::_pbi::TcParser::FastBS1, + {114, 9, 0, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.joinroomgrouplabel_)}}, + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 15; + {::_pbi::TcParser::FastMtR1, + {122, 7, 5, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roommemberbinattrinternal_)}}, + // .np2_structs.uint8 teamId = 16; + {::_pbi::TcParser::FastMtS2, + {386, 10, 6, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.teamid_)}}, + // .np2_structs.OptParam sigOptParam = 17; + {::_pbi::TcParser::FastMtS2, + {394, 11, 7, + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.sigoptparam_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 worldId = 1; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.worldid_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint64 lobbyId = 2; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.lobbyid_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 maxSlot = 3; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.maxslot_), _Internal::kHasBitsOffset + 14, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 flagAttr = 4; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.flagattr_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.BinAttr roomBinAttrInternal = 5; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roombinattrinternal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 6; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roomsearchableintattrexternal_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 7; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roomsearchablebinattrexternal_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomBinAttrExternal = 8; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roombinattrexternal_), _Internal::kHasBitsOffset + 3, 3, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes roomPassword = 9; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roompassword_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .np2_structs.GroupConfig groupConfig = 10; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.groupconfig_), _Internal::kHasBitsOffset + 4, 4, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 passwordSlotMask = 11; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.passwordslotmask_), _Internal::kHasBitsOffset + 15, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // repeated string allowedUser = 12; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.alloweduser_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // repeated string blockedUser = 13; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.blockeduser_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // bytes joinRoomGroupLabel = 14; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.joinroomgrouplabel_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 15; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.roommemberbinattrinternal_), _Internal::kHasBitsOffset + 7, 5, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint8 teamId = 16; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.teamid_), _Internal::kHasBitsOffset + 10, 6, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.OptParam sigOptParam = 17; + {PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.sigoptparam_), _Internal::kHasBitsOffset + 11, 7, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::IntAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::GroupConfig>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::OptParam>()}, + }}, + {{ + "\41\0\0\0\0\0\0\0\0\0\0\0\13\13\0\0\0\0\0\0\0\0\0\0" + "np2_structs.CreateJoinRoomRequest" + "allowedUser" + "blockedUser" + }}, +}; +PROTOBUF_NOINLINE void CreateJoinRoomRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.CreateJoinRoomRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roombinattrinternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.roomsearchableintattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.roomsearchablebinattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + _impl_.roombinattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + _impl_.groupconfig_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000020U)) { + _impl_.alloweduser_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000040U)) { + _impl_.blockeduser_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000080U)) { + _impl_.roommemberbinattrinternal_.Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000f00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + _impl_.roompassword_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + _impl_.joinroomgrouplabel_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + ABSL_DCHECK(_impl_.teamid_ != nullptr); + _impl_.teamid_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + ABSL_DCHECK(_impl_.sigoptparam_ != nullptr); + _impl_.sigoptparam_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000f000U)) { + ::memset(&_impl_.lobbyid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.passwordslotmask_) - + reinterpret_cast(&_impl_.lobbyid_)) + sizeof(_impl_.passwordslotmask_)); + } + _impl_.flagattr_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL CreateJoinRoomRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const CreateJoinRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL CreateJoinRoomRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const CreateJoinRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.CreateJoinRoomRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 worldId = 1; + if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (this_._internal_worldid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_worldid(), target); + } + } + + // uint64 lobbyId = 2; + if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (this_._internal_lobbyid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this_._internal_lobbyid(), target); + } + } + + // uint32 maxSlot = 3; + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (this_._internal_maxslot() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_maxslot(), target); + } + } + + // uint32 flagAttr = 4; + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (this_._internal_flagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_flagattr(), target); + } + } + + // repeated .np2_structs.BinAttr roomBinAttrInternal = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roombinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roombinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 6; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomsearchableintattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomsearchableintattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomsearchablebinattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomsearchablebinattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinAttr roomBinAttrExternal = 8; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roombinattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roombinattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // bytes roomPassword = 9; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (!this_._internal_roompassword().empty()) { + const ::std::string& _s = this_._internal_roompassword(); + target = stream->WriteBytesMaybeAliased(9, _s, target); + } + } + + // repeated .np2_structs.GroupConfig groupConfig = 10; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_groupconfig_size()); + i < n; i++) { + const auto& repfield = this_._internal_groupconfig().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 10, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // uint64 passwordSlotMask = 11; + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (this_._internal_passwordslotmask() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 11, this_._internal_passwordslotmask(), target); + } + } + + // repeated string allowedUser = 12; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000020U)) { + for (int i = 0, n = this_._internal_alloweduser_size(); i < n; ++i) { + const auto& s = this_._internal_alloweduser().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.CreateJoinRoomRequest.allowedUser"); + target = stream->WriteString(12, s, target); + } + } + + // repeated string blockedUser = 13; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000040U)) { + for (int i = 0, n = this_._internal_blockeduser_size(); i < n; ++i) { + const auto& s = this_._internal_blockeduser().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.CreateJoinRoomRequest.blockedUser"); + target = stream->WriteString(13, s, target); + } + } + + // bytes joinRoomGroupLabel = 14; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (!this_._internal_joinroomgrouplabel().empty()) { + const ::std::string& _s = this_._internal_joinroomgrouplabel(); + target = stream->WriteBytesMaybeAliased(14, _s, target); + } + } + + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 15; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000080U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roommemberbinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roommemberbinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // .np2_structs.uint8 teamId = 16; + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 16, *this_._impl_.teamid_, this_._impl_.teamid_->GetCachedSize(), target, + stream); + } + + // .np2_structs.OptParam sigOptParam = 17; + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 17, *this_._impl_.sigoptparam_, this_._impl_.sigoptparam_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.CreateJoinRoomRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t CreateJoinRoomRequest::ByteSizeLong(const MessageLite& base) { + const CreateJoinRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t CreateJoinRoomRequest::ByteSizeLong() const { + const CreateJoinRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.CreateJoinRoomRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // repeated .np2_structs.BinAttr roomBinAttrInternal = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roombinattrinternal_size(); + for (const auto& msg : this_._internal_roombinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 6; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_roomsearchableintattrexternal_size(); + for (const auto& msg : this_._internal_roomsearchableintattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += 1UL * this_._internal_roomsearchablebinattrexternal_size(); + for (const auto& msg : this_._internal_roomsearchablebinattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttr roomBinAttrExternal = 8; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + total_size += 1UL * this_._internal_roombinattrexternal_size(); + for (const auto& msg : this_._internal_roombinattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.GroupConfig groupConfig = 10; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + total_size += 1UL * this_._internal_groupconfig_size(); + for (const auto& msg : this_._internal_groupconfig()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated string allowedUser = 12; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000020U)) { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_alloweduser().size()); + for (int i = 0, n = this_._internal_alloweduser().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_alloweduser().Get(i)); + } + } + // repeated string blockedUser = 13; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000040U)) { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_blockeduser().size()); + for (int i = 0, n = this_._internal_blockeduser().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_blockeduser().Get(i)); + } + } + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 15; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000080U)) { + total_size += 1UL * this_._internal_roommemberbinattrinternal_size(); + for (const auto& msg : this_._internal_roommemberbinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + // bytes roomPassword = 9; + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (!this_._internal_roompassword().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_roompassword()); + } + } + // bytes joinRoomGroupLabel = 14; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (!this_._internal_joinroomgrouplabel().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_joinroomgrouplabel()); + } + } + // .np2_structs.uint8 teamId = 16; + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.teamid_); + } + // .np2_structs.OptParam sigOptParam = 17; + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.sigoptparam_); + } + // uint64 lobbyId = 2; + if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (this_._internal_lobbyid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lobbyid()); + } + } + // uint32 worldId = 1; + if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (this_._internal_worldid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_worldid()); + } + } + // uint32 maxSlot = 3; + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (this_._internal_maxslot() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_maxslot()); + } + } + // uint64 passwordSlotMask = 11; + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (this_._internal_passwordslotmask() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_passwordslotmask()); + } + } + } + { + // uint32 flagAttr = 4; + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (this_._internal_flagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void CreateJoinRoomRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.CreateJoinRoomRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roombinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roombinattrinternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_roomsearchableintattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomsearchableintattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_roomsearchablebinattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomsearchablebinattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + _this->_internal_mutable_roombinattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roombinattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000010U)) { + _this->_internal_mutable_groupconfig()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_groupconfig()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000020U)) { + _this->_internal_mutable_alloweduser()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_alloweduser()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000040U)) { + _this->_internal_mutable_blockeduser()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_blockeduser()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000080U)) { + _this->_internal_mutable_roommemberbinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roommemberbinattrinternal()); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (!from._internal_roompassword().empty()) { + _this->_internal_set_roompassword(from._internal_roompassword()); + } else { + if (_this->_impl_.roompassword_.IsDefault()) { + _this->_internal_set_roompassword(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (!from._internal_joinroomgrouplabel().empty()) { + _this->_internal_set_joinroomgrouplabel(from._internal_joinroomgrouplabel()); + } else { + if (_this->_impl_.joinroomgrouplabel_.IsDefault()) { + _this->_internal_set_joinroomgrouplabel(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000400U)) { + ABSL_DCHECK(from._impl_.teamid_ != nullptr); + if (_this->_impl_.teamid_ == nullptr) { + _this->_impl_.teamid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_); + } else { + _this->_impl_.teamid_->MergeFrom(*from._impl_.teamid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000800U)) { + ABSL_DCHECK(from._impl_.sigoptparam_ != nullptr); + if (_this->_impl_.sigoptparam_ == nullptr) { + _this->_impl_.sigoptparam_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.sigoptparam_); + } else { + _this->_impl_.sigoptparam_->MergeFrom(*from._impl_.sigoptparam_); + } + } + if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (from._internal_lobbyid() != 0) { + _this->_impl_.lobbyid_ = from._impl_.lobbyid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (from._internal_worldid() != 0) { + _this->_impl_.worldid_ = from._impl_.worldid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (from._internal_maxslot() != 0) { + _this->_impl_.maxslot_ = from._impl_.maxslot_; + } + } + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (from._internal_passwordslotmask() != 0) { + _this->_impl_.passwordslotmask_ = from._impl_.passwordslotmask_; + } + } + } + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (from._internal_flagattr() != 0) { + _this->_impl_.flagattr_ = from._impl_.flagattr_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void CreateJoinRoomRequest::CopyFrom(const CreateJoinRoomRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.CreateJoinRoomRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void CreateJoinRoomRequest::InternalSwap(CreateJoinRoomRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roombinattrinternal_.InternalSwap(&other->_impl_.roombinattrinternal_); + _impl_.roomsearchableintattrexternal_.InternalSwap(&other->_impl_.roomsearchableintattrexternal_); + _impl_.roomsearchablebinattrexternal_.InternalSwap(&other->_impl_.roomsearchablebinattrexternal_); + _impl_.roombinattrexternal_.InternalSwap(&other->_impl_.roombinattrexternal_); + _impl_.groupconfig_.InternalSwap(&other->_impl_.groupconfig_); + _impl_.alloweduser_.InternalSwap(&other->_impl_.alloweduser_); + _impl_.blockeduser_.InternalSwap(&other->_impl_.blockeduser_); + _impl_.roommemberbinattrinternal_.InternalSwap(&other->_impl_.roommemberbinattrinternal_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.roompassword_, &other->_impl_.roompassword_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.joinroomgrouplabel_, &other->_impl_.joinroomgrouplabel_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.flagattr_) + + sizeof(CreateJoinRoomRequest::_impl_.flagattr_) + - PROTOBUF_FIELD_OFFSET(CreateJoinRoomRequest, _impl_.teamid_)>( + reinterpret_cast(&_impl_.teamid_), + reinterpret_cast(&other->_impl_.teamid_)); +} + +// =================================================================== + +class CreateRoomResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_._has_bits_); +}; + +CreateRoomResponse::CreateRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.CreateRoomResponse) +} +PROTOBUF_NDEBUG_INLINE CreateRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::CreateRoomResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +CreateRoomResponse::CreateRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const CreateRoomResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + CreateRoomResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.internal_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.internal_) + : nullptr; + _impl_.opt_param_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.CreateRoomResponse) +} +PROTOBUF_NDEBUG_INLINE CreateRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void CreateRoomResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, internal_), + 0, + offsetof(Impl_, opt_param_) - + offsetof(Impl_, internal_) + + sizeof(Impl_::opt_param_)); +} +CreateRoomResponse::~CreateRoomResponse() { + // @@protoc_insertion_point(destructor:np2_structs.CreateRoomResponse) + SharedDtor(*this); +} +inline void CreateRoomResponse::SharedDtor(MessageLite& self) { + CreateRoomResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.internal_; + delete this_._impl_.opt_param_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL CreateRoomResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) CreateRoomResponse(arena); +} +constexpr auto CreateRoomResponse::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(CreateRoomResponse), + alignof(CreateRoomResponse)); +} +constexpr auto CreateRoomResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_CreateRoomResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &CreateRoomResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &CreateRoomResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &CreateRoomResponse::ByteSizeLong, + &CreateRoomResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_._cached_size_), + true, + }, + "np2_structs.CreateRoomResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> CreateRoomResponse_class_data_ = + CreateRoomResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +CreateRoomResponse::GetClassData() const { + return CreateRoomResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +CreateRoomResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + CreateRoomResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::CreateRoomResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.OptParam opt_param = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.opt_param_)}}, + // .np2_structs.RoomDataInternal internal = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.internal_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.RoomDataInternal internal = 1; + {PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.internal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.OptParam opt_param = 2; + {PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.opt_param_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::OptParam>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void CreateRoomResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.CreateRoomResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.internal_ != nullptr); + _impl_.internal_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.opt_param_ != nullptr); + _impl_.opt_param_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL CreateRoomResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const CreateRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL CreateRoomResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const CreateRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.CreateRoomResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.RoomDataInternal internal = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.internal_, this_._impl_.internal_->GetCachedSize(), target, + stream); + } + + // .np2_structs.OptParam opt_param = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.opt_param_, this_._impl_.opt_param_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.CreateRoomResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t CreateRoomResponse::ByteSizeLong(const MessageLite& base) { + const CreateRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t CreateRoomResponse::ByteSizeLong() const { + const CreateRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.CreateRoomResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.RoomDataInternal internal = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.internal_); + } + // .np2_structs.OptParam opt_param = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.opt_param_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void CreateRoomResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.CreateRoomResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.internal_ != nullptr); + if (_this->_impl_.internal_ == nullptr) { + _this->_impl_.internal_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.internal_); + } else { + _this->_impl_.internal_->MergeFrom(*from._impl_.internal_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.opt_param_ != nullptr); + if (_this->_impl_.opt_param_ == nullptr) { + _this->_impl_.opt_param_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_); + } else { + _this->_impl_.opt_param_->MergeFrom(*from._impl_.opt_param_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void CreateRoomResponse::CopyFrom(const CreateRoomResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.CreateRoomResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void CreateRoomResponse::InternalSwap(CreateRoomResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.opt_param_) + + sizeof(CreateRoomResponse::_impl_.opt_param_) + - PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.internal_)>( + reinterpret_cast(&_impl_.internal_), + reinterpret_cast(&other->_impl_.internal_)); +} + +// =================================================================== + +class JoinRoomRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_._has_bits_); +}; + +JoinRoomRequest::JoinRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, JoinRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.JoinRoomRequest) +} +PROTOBUF_NDEBUG_INLINE JoinRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::JoinRoomRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roommemberbinattrinternal_{visibility, arena, from.roommemberbinattrinternal_}, + roompassword_(arena, from.roompassword_), + joinroomgrouplabel_(arena, from.joinroomgrouplabel_) {} + +JoinRoomRequest::JoinRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const JoinRoomRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, JoinRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + JoinRoomRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.optdata_ = (CheckHasBit(cached_has_bits, 0x00000008U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_) + : nullptr; + _impl_.teamid_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_) + : nullptr; + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.JoinRoomRequest) +} +PROTOBUF_NDEBUG_INLINE JoinRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roommemberbinattrinternal_{visibility, arena}, + roompassword_(arena), + joinroomgrouplabel_(arena) {} + +inline void JoinRoomRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, optdata_), + 0, + offsetof(Impl_, roomid_) - + offsetof(Impl_, optdata_) + + sizeof(Impl_::roomid_)); +} +JoinRoomRequest::~JoinRoomRequest() { + // @@protoc_insertion_point(destructor:np2_structs.JoinRoomRequest) + SharedDtor(*this); +} +inline void JoinRoomRequest::SharedDtor(MessageLite& self) { + JoinRoomRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.roompassword_.Destroy(); + this_._impl_.joinroomgrouplabel_.Destroy(); + delete this_._impl_.optdata_; + delete this_._impl_.teamid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL JoinRoomRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) JoinRoomRequest(arena); +} +constexpr auto JoinRoomRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roommemberbinattrinternal_) + + decltype(JoinRoomRequest::_impl_.roommemberbinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(JoinRoomRequest), alignof(JoinRoomRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&JoinRoomRequest::PlacementNew_, + sizeof(JoinRoomRequest), + alignof(JoinRoomRequest)); + } +} +constexpr auto JoinRoomRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<28>{ + { + &_JoinRoomRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &JoinRoomRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &JoinRoomRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &JoinRoomRequest::ByteSizeLong, + &JoinRoomRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_._cached_size_), + true, + }, + "np2_structs.JoinRoomRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> JoinRoomRequest_class_data_ = + JoinRoomRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +JoinRoomRequest::GetClassData() const { + return JoinRoomRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 6, 3, 0, 2> +JoinRoomRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_._has_bits_), + 0, // no _extensions_ + 6, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967232, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + JoinRoomRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::JoinRoomRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 5, 0, + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roomid_)}}, + // bytes roomPassword = 2; + {::_pbi::TcParser::FastBS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roompassword_)}}, + // bytes joinRoomGroupLabel = 3; + {::_pbi::TcParser::FastBS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.joinroomgrouplabel_)}}, + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + {::_pbi::TcParser::FastMtR1, + {34, 0, 0, + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roommemberbinattrinternal_)}}, + // .np2_structs.PresenceOptionData optData = 5; + {::_pbi::TcParser::FastMtS1, + {42, 3, 1, + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.optdata_)}}, + // .np2_structs.uint8 teamId = 6; + {::_pbi::TcParser::FastMtS1, + {50, 4, 2, + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.teamid_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // bytes roomPassword = 2; + {PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roompassword_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes joinRoomGroupLabel = 3; + {PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.joinroomgrouplabel_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + {PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roommemberbinattrinternal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.PresenceOptionData optData = 5; + {PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.optdata_), _Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint8 teamId = 6; + {PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.teamid_), _Internal::kHasBitsOffset + 4, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::PresenceOptionData>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void JoinRoomRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.JoinRoomRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roommemberbinattrinternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.roompassword_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.joinroomgrouplabel_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(_impl_.optdata_ != nullptr); + _impl_.optdata_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(_impl_.teamid_ != nullptr); + _impl_.teamid_->Clear(); + } + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL JoinRoomRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const JoinRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL JoinRoomRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const JoinRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.JoinRoomRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // bytes roomPassword = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_roompassword().empty()) { + const ::std::string& _s = this_._internal_roompassword(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } + } + + // bytes joinRoomGroupLabel = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_joinroomgrouplabel().empty()) { + const ::std::string& _s = this_._internal_joinroomgrouplabel(); + target = stream->WriteBytesMaybeAliased(3, _s, target); + } + } + + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roommemberbinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roommemberbinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // .np2_structs.PresenceOptionData optData = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.optdata_, this_._impl_.optdata_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint8 teamId = 6; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, *this_._impl_.teamid_, this_._impl_.teamid_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.JoinRoomRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t JoinRoomRequest::ByteSizeLong(const MessageLite& base) { + const JoinRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t JoinRoomRequest::ByteSizeLong() const { + const JoinRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.JoinRoomRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roommemberbinattrinternal_size(); + for (const auto& msg : this_._internal_roommemberbinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // bytes roomPassword = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_roompassword().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_roompassword()); + } + } + // bytes joinRoomGroupLabel = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_joinroomgrouplabel().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_joinroomgrouplabel()); + } + } + // .np2_structs.PresenceOptionData optData = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.optdata_); + } + // .np2_structs.uint8 teamId = 6; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.teamid_); + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void JoinRoomRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.JoinRoomRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roommemberbinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roommemberbinattrinternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_roompassword().empty()) { + _this->_internal_set_roompassword(from._internal_roompassword()); + } else { + if (_this->_impl_.roompassword_.IsDefault()) { + _this->_internal_set_roompassword(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_joinroomgrouplabel().empty()) { + _this->_internal_set_joinroomgrouplabel(from._internal_joinroomgrouplabel()); + } else { + if (_this->_impl_.joinroomgrouplabel_.IsDefault()) { + _this->_internal_set_joinroomgrouplabel(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(from._impl_.optdata_ != nullptr); + if (_this->_impl_.optdata_ == nullptr) { + _this->_impl_.optdata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_); + } else { + _this->_impl_.optdata_->MergeFrom(*from._impl_.optdata_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(from._impl_.teamid_ != nullptr); + if (_this->_impl_.teamid_ == nullptr) { + _this->_impl_.teamid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_); + } else { + _this->_impl_.teamid_->MergeFrom(*from._impl_.teamid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void JoinRoomRequest::CopyFrom(const JoinRoomRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.JoinRoomRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void JoinRoomRequest::InternalSwap(JoinRoomRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roommemberbinattrinternal_.InternalSwap(&other->_impl_.roommemberbinattrinternal_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.roompassword_, &other->_impl_.roompassword_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.joinroomgrouplabel_, &other->_impl_.joinroomgrouplabel_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.roomid_) + + sizeof(JoinRoomRequest::_impl_.roomid_) + - PROTOBUF_FIELD_OFFSET(JoinRoomRequest, _impl_.optdata_)>( + reinterpret_cast(&_impl_.optdata_), + reinterpret_cast(&other->_impl_.optdata_)); +} + +// =================================================================== + +class JoinRoomResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_._has_bits_); +}; + +JoinRoomResponse::JoinRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, JoinRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.JoinRoomResponse) +} +PROTOBUF_NDEBUG_INLINE JoinRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::JoinRoomResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + signaling_data_{visibility, arena, from.signaling_data_} {} + +JoinRoomResponse::JoinRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const JoinRoomResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, JoinRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + JoinRoomResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.room_data_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.room_data_) + : nullptr; + _impl_.opt_param_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.JoinRoomResponse) +} +PROTOBUF_NDEBUG_INLINE JoinRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + signaling_data_{visibility, arena} {} + +inline void JoinRoomResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, room_data_), + 0, + offsetof(Impl_, opt_param_) - + offsetof(Impl_, room_data_) + + sizeof(Impl_::opt_param_)); +} +JoinRoomResponse::~JoinRoomResponse() { + // @@protoc_insertion_point(destructor:np2_structs.JoinRoomResponse) + SharedDtor(*this); +} +inline void JoinRoomResponse::SharedDtor(MessageLite& self) { + JoinRoomResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.room_data_; + delete this_._impl_.opt_param_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL JoinRoomResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) JoinRoomResponse(arena); +} +constexpr auto JoinRoomResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.signaling_data_) + + decltype(JoinRoomResponse::_impl_.signaling_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(JoinRoomResponse), alignof(JoinRoomResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&JoinRoomResponse::PlacementNew_, + sizeof(JoinRoomResponse), + alignof(JoinRoomResponse)); + } +} +constexpr auto JoinRoomResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<29>{ + { + &_JoinRoomResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &JoinRoomResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &JoinRoomResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &JoinRoomResponse::ByteSizeLong, + &JoinRoomResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_._cached_size_), + true, + }, + "np2_structs.JoinRoomResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<29> JoinRoomResponse_class_data_ = + JoinRoomResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +JoinRoomResponse::GetClassData() const { + return JoinRoomResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 3, 0, 2> +JoinRoomResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + JoinRoomResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::JoinRoomResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.RoomDataInternal room_data = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.room_data_)}}, + // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 1, + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.signaling_data_)}}, + // .np2_structs.OptParam opt_param = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 2, + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.opt_param_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.RoomDataInternal room_data = 1; + {PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.room_data_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; + {PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.signaling_data_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.OptParam opt_param = 3; + {PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.opt_param_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::Matching2SignalingInfo>()}, + {::_pbi::TcParser::GetTable<::np2_structs::OptParam>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void JoinRoomResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.JoinRoomResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.signaling_data_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.room_data_ != nullptr); + _impl_.room_data_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.opt_param_ != nullptr); + _impl_.opt_param_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL JoinRoomResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const JoinRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL JoinRoomResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const JoinRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.JoinRoomResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.RoomDataInternal room_data = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.room_data_, this_._impl_.room_data_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_signaling_data_size()); + i < n; i++) { + const auto& repfield = this_._internal_signaling_data().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // .np2_structs.OptParam opt_param = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.opt_param_, this_._impl_.opt_param_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.JoinRoomResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t JoinRoomResponse::ByteSizeLong(const MessageLite& base) { + const JoinRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t JoinRoomResponse::ByteSizeLong() const { + const JoinRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.JoinRoomResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_signaling_data_size(); + for (const auto& msg : this_._internal_signaling_data()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.RoomDataInternal room_data = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.room_data_); + } + // .np2_structs.OptParam opt_param = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.opt_param_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void JoinRoomResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.JoinRoomResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_signaling_data()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_signaling_data()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.room_data_ != nullptr); + if (_this->_impl_.room_data_ == nullptr) { + _this->_impl_.room_data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.room_data_); + } else { + _this->_impl_.room_data_->MergeFrom(*from._impl_.room_data_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.opt_param_ != nullptr); + if (_this->_impl_.opt_param_ == nullptr) { + _this->_impl_.opt_param_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_); + } else { + _this->_impl_.opt_param_->MergeFrom(*from._impl_.opt_param_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void JoinRoomResponse::CopyFrom(const JoinRoomResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.JoinRoomResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void JoinRoomResponse::InternalSwap(JoinRoomResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.signaling_data_.InternalSwap(&other->_impl_.signaling_data_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.opt_param_) + + sizeof(JoinRoomResponse::_impl_.opt_param_) + - PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.room_data_)>( + reinterpret_cast(&_impl_.room_data_), + reinterpret_cast(&other->_impl_.room_data_)); +} + +// =================================================================== + +class LeaveRoomRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_._has_bits_); +}; + +LeaveRoomRequest::LeaveRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, LeaveRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.LeaveRoomRequest) +} +PROTOBUF_NDEBUG_INLINE LeaveRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::LeaveRoomRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +LeaveRoomRequest::LeaveRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const LeaveRoomRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, LeaveRoomRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + LeaveRoomRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.optdata_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_) + : nullptr; + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.LeaveRoomRequest) +} +PROTOBUF_NDEBUG_INLINE LeaveRoomRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void LeaveRoomRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, optdata_), + 0, + offsetof(Impl_, roomid_) - + offsetof(Impl_, optdata_) + + sizeof(Impl_::roomid_)); +} +LeaveRoomRequest::~LeaveRoomRequest() { + // @@protoc_insertion_point(destructor:np2_structs.LeaveRoomRequest) + SharedDtor(*this); +} +inline void LeaveRoomRequest::SharedDtor(MessageLite& self) { + LeaveRoomRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.optdata_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL LeaveRoomRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) LeaveRoomRequest(arena); +} +constexpr auto LeaveRoomRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(LeaveRoomRequest), + alignof(LeaveRoomRequest)); +} +constexpr auto LeaveRoomRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<29>{ + { + &_LeaveRoomRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &LeaveRoomRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &LeaveRoomRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &LeaveRoomRequest::ByteSizeLong, + &LeaveRoomRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_._cached_size_), + true, + }, + "np2_structs.LeaveRoomRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<29> LeaveRoomRequest_class_data_ = + LeaveRoomRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +LeaveRoomRequest::GetClassData() const { + return LeaveRoomRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +LeaveRoomRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + LeaveRoomRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::LeaveRoomRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.PresenceOptionData optData = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_.optdata_)}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_.roomid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.PresenceOptionData optData = 2; + {PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_.optdata_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::PresenceOptionData>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void LeaveRoomRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.LeaveRoomRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.optdata_ != nullptr); + _impl_.optdata_->Clear(); + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL LeaveRoomRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const LeaveRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL LeaveRoomRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const LeaveRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.LeaveRoomRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // .np2_structs.PresenceOptionData optData = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.optdata_, this_._impl_.optdata_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.LeaveRoomRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t LeaveRoomRequest::ByteSizeLong(const MessageLite& base) { + const LeaveRoomRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t LeaveRoomRequest::ByteSizeLong() const { + const LeaveRoomRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.LeaveRoomRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.PresenceOptionData optData = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.optdata_); + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void LeaveRoomRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.LeaveRoomRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.optdata_ != nullptr); + if (_this->_impl_.optdata_ == nullptr) { + _this->_impl_.optdata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_); + } else { + _this->_impl_.optdata_->MergeFrom(*from._impl_.optdata_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void LeaveRoomRequest::CopyFrom(const LeaveRoomRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.LeaveRoomRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void LeaveRoomRequest::InternalSwap(LeaveRoomRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_.roomid_) + + sizeof(LeaveRoomRequest::_impl_.roomid_) + - PROTOBUF_FIELD_OFFSET(LeaveRoomRequest, _impl_.optdata_)>( + reinterpret_cast(&_impl_.optdata_), + reinterpret_cast(&other->_impl_.optdata_)); +} + +// =================================================================== + +class GetRoomDataExternalListRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_._has_bits_); +}; + +GetRoomDataExternalListRequest::GetRoomDataExternalListRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomDataExternalListRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetRoomDataExternalListRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomDataExternalListRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetRoomDataExternalListRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roomids_{visibility, arena, from.roomids_}, + _roomids_cached_byte_size_{0}, + attrids_{visibility, arena, from.attrids_} {} + +GetRoomDataExternalListRequest::GetRoomDataExternalListRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetRoomDataExternalListRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomDataExternalListRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetRoomDataExternalListRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetRoomDataExternalListRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomDataExternalListRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roomids_{visibility, arena}, + _roomids_cached_byte_size_{0}, + attrids_{visibility, arena} {} + +inline void GetRoomDataExternalListRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +GetRoomDataExternalListRequest::~GetRoomDataExternalListRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetRoomDataExternalListRequest) + SharedDtor(*this); +} +inline void GetRoomDataExternalListRequest::SharedDtor(MessageLite& self) { + GetRoomDataExternalListRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetRoomDataExternalListRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetRoomDataExternalListRequest(arena); +} +constexpr auto GetRoomDataExternalListRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_.roomids_) + + decltype(GetRoomDataExternalListRequest::_impl_.roomids_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_.attrids_) + + decltype(GetRoomDataExternalListRequest::_impl_.attrids_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetRoomDataExternalListRequest), alignof(GetRoomDataExternalListRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetRoomDataExternalListRequest::PlacementNew_, + sizeof(GetRoomDataExternalListRequest), + alignof(GetRoomDataExternalListRequest)); + } +} +constexpr auto GetRoomDataExternalListRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<43>{ + { + &_GetRoomDataExternalListRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetRoomDataExternalListRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetRoomDataExternalListRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetRoomDataExternalListRequest::ByteSizeLong, + &GetRoomDataExternalListRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetRoomDataExternalListRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<43> GetRoomDataExternalListRequest_class_data_ = + GetRoomDataExternalListRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetRoomDataExternalListRequest::GetClassData() const { + return GetRoomDataExternalListRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +GetRoomDataExternalListRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetRoomDataExternalListRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetRoomDataExternalListRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.uint16 attrIds = 2; + {::_pbi::TcParser::FastMtR1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_.attrids_)}}, + // repeated uint64 roomIds = 1; + {::_pbi::TcParser::FastV64P1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_.roomids_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated uint64 roomIds = 1; + {PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_.roomids_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // repeated .np2_structs.uint16 attrIds = 2; + {PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListRequest, _impl_.attrids_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetRoomDataExternalListRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetRoomDataExternalListRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roomids_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.attrids_.Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetRoomDataExternalListRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetRoomDataExternalListRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetRoomDataExternalListRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetRoomDataExternalListRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetRoomDataExternalListRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated uint64 roomIds = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._roomids_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 1, this_._internal_roomids(), byte_size, target); + } + } + } + + // repeated .np2_structs.uint16 attrIds = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attrids_size()); + i < n; i++) { + const auto& repfield = this_._internal_attrids().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetRoomDataExternalListRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetRoomDataExternalListRequest::ByteSizeLong(const MessageLite& base) { + const GetRoomDataExternalListRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetRoomDataExternalListRequest::ByteSizeLong() const { + const GetRoomDataExternalListRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetRoomDataExternalListRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated uint64 roomIds = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::UInt64SizeWithPackedTagSize( + this_._internal_roomids(), 1, + this_._impl_._roomids_cached_byte_size_); + } + // repeated .np2_structs.uint16 attrIds = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_attrids_size(); + for (const auto& msg : this_._internal_attrids()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetRoomDataExternalListRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetRoomDataExternalListRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roomids()->MergeFrom(from._internal_roomids()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_attrids()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attrids()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetRoomDataExternalListRequest::CopyFrom(const GetRoomDataExternalListRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetRoomDataExternalListRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetRoomDataExternalListRequest::InternalSwap(GetRoomDataExternalListRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roomids_.InternalSwap(&other->_impl_.roomids_); + _impl_.attrids_.InternalSwap(&other->_impl_.attrids_); +} + +// =================================================================== + +class GetRoomDataExternalListResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListResponse, _impl_._has_bits_); +}; + +GetRoomDataExternalListResponse::GetRoomDataExternalListResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomDataExternalListResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetRoomDataExternalListResponse) +} +PROTOBUF_NDEBUG_INLINE GetRoomDataExternalListResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetRoomDataExternalListResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + rooms_{visibility, arena, from.rooms_} {} + +GetRoomDataExternalListResponse::GetRoomDataExternalListResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetRoomDataExternalListResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomDataExternalListResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetRoomDataExternalListResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetRoomDataExternalListResponse) +} +PROTOBUF_NDEBUG_INLINE GetRoomDataExternalListResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + rooms_{visibility, arena} {} + +inline void GetRoomDataExternalListResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +GetRoomDataExternalListResponse::~GetRoomDataExternalListResponse() { + // @@protoc_insertion_point(destructor:np2_structs.GetRoomDataExternalListResponse) + SharedDtor(*this); +} +inline void GetRoomDataExternalListResponse::SharedDtor(MessageLite& self) { + GetRoomDataExternalListResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetRoomDataExternalListResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetRoomDataExternalListResponse(arena); +} +constexpr auto GetRoomDataExternalListResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListResponse, _impl_.rooms_) + + decltype(GetRoomDataExternalListResponse::_impl_.rooms_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetRoomDataExternalListResponse), alignof(GetRoomDataExternalListResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetRoomDataExternalListResponse::PlacementNew_, + sizeof(GetRoomDataExternalListResponse), + alignof(GetRoomDataExternalListResponse)); + } +} +constexpr auto GetRoomDataExternalListResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<44>{ + { + &_GetRoomDataExternalListResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetRoomDataExternalListResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetRoomDataExternalListResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetRoomDataExternalListResponse::ByteSizeLong, + &GetRoomDataExternalListResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListResponse, _impl_._cached_size_), + true, + }, + "np2_structs.GetRoomDataExternalListResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<44> GetRoomDataExternalListResponse_class_data_ = + GetRoomDataExternalListResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetRoomDataExternalListResponse::GetClassData() const { + return GetRoomDataExternalListResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> +GetRoomDataExternalListResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetRoomDataExternalListResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetRoomDataExternalListResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.RoomDataExternal rooms = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListResponse, _impl_.rooms_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.RoomDataExternal rooms = 1; + {PROTOBUF_FIELD_OFFSET(GetRoomDataExternalListResponse, _impl_.rooms_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomDataExternal>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetRoomDataExternalListResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetRoomDataExternalListResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.rooms_.Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetRoomDataExternalListResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetRoomDataExternalListResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetRoomDataExternalListResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetRoomDataExternalListResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetRoomDataExternalListResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.RoomDataExternal rooms = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_rooms_size()); + i < n; i++) { + const auto& repfield = this_._internal_rooms().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetRoomDataExternalListResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetRoomDataExternalListResponse::ByteSizeLong(const MessageLite& base) { + const GetRoomDataExternalListResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetRoomDataExternalListResponse::ByteSizeLong() const { + const GetRoomDataExternalListResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetRoomDataExternalListResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .np2_structs.RoomDataExternal rooms = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_rooms_size(); + for (const auto& msg : this_._internal_rooms()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetRoomDataExternalListResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetRoomDataExternalListResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_rooms()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_rooms()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetRoomDataExternalListResponse::CopyFrom(const GetRoomDataExternalListResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetRoomDataExternalListResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetRoomDataExternalListResponse::InternalSwap(GetRoomDataExternalListResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.rooms_.InternalSwap(&other->_impl_.rooms_); +} + +// =================================================================== + +class SetRoomDataExternalRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_._has_bits_); +}; + +SetRoomDataExternalRequest::SetRoomDataExternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomDataExternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SetRoomDataExternalRequest) +} +PROTOBUF_NDEBUG_INLINE SetRoomDataExternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SetRoomDataExternalRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roomsearchableintattrexternal_{visibility, arena, from.roomsearchableintattrexternal_}, + roomsearchablebinattrexternal_{visibility, arena, from.roomsearchablebinattrexternal_}, + roombinattrexternal_{visibility, arena, from.roombinattrexternal_} {} + +SetRoomDataExternalRequest::SetRoomDataExternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SetRoomDataExternalRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomDataExternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SetRoomDataExternalRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.SetRoomDataExternalRequest) +} +PROTOBUF_NDEBUG_INLINE SetRoomDataExternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roomsearchableintattrexternal_{visibility, arena}, + roomsearchablebinattrexternal_{visibility, arena}, + roombinattrexternal_{visibility, arena} {} + +inline void SetRoomDataExternalRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.roomid_ = {}; +} +SetRoomDataExternalRequest::~SetRoomDataExternalRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SetRoomDataExternalRequest) + SharedDtor(*this); +} +inline void SetRoomDataExternalRequest::SharedDtor(MessageLite& self) { + SetRoomDataExternalRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SetRoomDataExternalRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SetRoomDataExternalRequest(arena); +} +constexpr auto SetRoomDataExternalRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomsearchableintattrexternal_) + + decltype(SetRoomDataExternalRequest::_impl_.roomsearchableintattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomsearchablebinattrexternal_) + + decltype(SetRoomDataExternalRequest::_impl_.roomsearchablebinattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roombinattrexternal_) + + decltype(SetRoomDataExternalRequest::_impl_.roombinattrexternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SetRoomDataExternalRequest), alignof(SetRoomDataExternalRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SetRoomDataExternalRequest::PlacementNew_, + sizeof(SetRoomDataExternalRequest), + alignof(SetRoomDataExternalRequest)); + } +} +constexpr auto SetRoomDataExternalRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_SetRoomDataExternalRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SetRoomDataExternalRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SetRoomDataExternalRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SetRoomDataExternalRequest::ByteSizeLong, + &SetRoomDataExternalRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SetRoomDataExternalRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> SetRoomDataExternalRequest_class_data_ = + SetRoomDataExternalRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SetRoomDataExternalRequest::GetClassData() const { + return SetRoomDataExternalRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 3, 0, 2> +SetRoomDataExternalRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SetRoomDataExternalRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SetRoomDataExternalRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.BinAttr roomBinAttrExternal = 4; + {::_pbi::TcParser::FastMtR1, + {34, 2, 2, + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roombinattrexternal_)}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 3, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomid_)}}, + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomsearchableintattrexternal_)}}, + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 3; + {::_pbi::TcParser::FastMtR1, + {26, 1, 1, + PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomsearchablebinattrexternal_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 2; + {PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomsearchableintattrexternal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 3; + {PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roomsearchablebinattrexternal_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomBinAttrExternal = 4; + {PROTOBUF_FIELD_OFFSET(SetRoomDataExternalRequest, _impl_.roombinattrexternal_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::IntAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SetRoomDataExternalRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SetRoomDataExternalRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roomsearchableintattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.roomsearchablebinattrexternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.roombinattrexternal_.Clear(); + } + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SetRoomDataExternalRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SetRoomDataExternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SetRoomDataExternalRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SetRoomDataExternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SetRoomDataExternalRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomsearchableintattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomsearchableintattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roomsearchablebinattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roomsearchablebinattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.BinAttr roomBinAttrExternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roombinattrexternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roombinattrexternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SetRoomDataExternalRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SetRoomDataExternalRequest::ByteSizeLong(const MessageLite& base) { + const SetRoomDataExternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SetRoomDataExternalRequest::ByteSizeLong() const { + const SetRoomDataExternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SetRoomDataExternalRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roomsearchableintattrexternal_size(); + for (const auto& msg : this_._internal_roomsearchableintattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_roomsearchablebinattrexternal_size(); + for (const auto& msg : this_._internal_roomsearchablebinattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.BinAttr roomBinAttrExternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += 1UL * this_._internal_roombinattrexternal_size(); + for (const auto& msg : this_._internal_roombinattrexternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SetRoomDataExternalRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SetRoomDataExternalRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roomsearchableintattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomsearchableintattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_roomsearchablebinattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roomsearchablebinattrexternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_roombinattrexternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roombinattrexternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SetRoomDataExternalRequest::CopyFrom(const SetRoomDataExternalRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SetRoomDataExternalRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SetRoomDataExternalRequest::InternalSwap(SetRoomDataExternalRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roomsearchableintattrexternal_.InternalSwap(&other->_impl_.roomsearchableintattrexternal_); + _impl_.roomsearchablebinattrexternal_.InternalSwap(&other->_impl_.roomsearchablebinattrexternal_); + _impl_.roombinattrexternal_.InternalSwap(&other->_impl_.roombinattrexternal_); + swap(_impl_.roomid_, other->_impl_.roomid_); +} + +// =================================================================== + +class SetRoomDataInternalRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_._has_bits_); +}; + +SetRoomDataInternalRequest::SetRoomDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SetRoomDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE SetRoomDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SetRoomDataInternalRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roombinattrinternal_{visibility, arena, from.roombinattrinternal_}, + passwordconfig_{visibility, arena, from.passwordconfig_}, + passwordslotmask_{visibility, arena, from.passwordslotmask_}, + _passwordslotmask_cached_byte_size_{0}, + ownerprivilegerank_{visibility, arena, from.ownerprivilegerank_} {} + +SetRoomDataInternalRequest::SetRoomDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SetRoomDataInternalRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SetRoomDataInternalRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, roomid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, roomid_), + offsetof(Impl_, flagattr_) - + offsetof(Impl_, roomid_) + + sizeof(Impl_::flagattr_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.SetRoomDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE SetRoomDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roombinattrinternal_{visibility, arena}, + passwordconfig_{visibility, arena}, + passwordslotmask_{visibility, arena}, + _passwordslotmask_cached_byte_size_{0}, + ownerprivilegerank_{visibility, arena} {} + +inline void SetRoomDataInternalRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, roomid_), + 0, + offsetof(Impl_, flagattr_) - + offsetof(Impl_, roomid_) + + sizeof(Impl_::flagattr_)); +} +SetRoomDataInternalRequest::~SetRoomDataInternalRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SetRoomDataInternalRequest) + SharedDtor(*this); +} +inline void SetRoomDataInternalRequest::SharedDtor(MessageLite& self) { + SetRoomDataInternalRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SetRoomDataInternalRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SetRoomDataInternalRequest(arena); +} +constexpr auto SetRoomDataInternalRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.roombinattrinternal_) + + decltype(SetRoomDataInternalRequest::_impl_.roombinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.passwordconfig_) + + decltype(SetRoomDataInternalRequest::_impl_.passwordconfig_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.passwordslotmask_) + + decltype(SetRoomDataInternalRequest::_impl_.passwordslotmask_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.ownerprivilegerank_) + + decltype(SetRoomDataInternalRequest::_impl_.ownerprivilegerank_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SetRoomDataInternalRequest), alignof(SetRoomDataInternalRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SetRoomDataInternalRequest::PlacementNew_, + sizeof(SetRoomDataInternalRequest), + alignof(SetRoomDataInternalRequest)); + } +} +constexpr auto SetRoomDataInternalRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_SetRoomDataInternalRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SetRoomDataInternalRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SetRoomDataInternalRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SetRoomDataInternalRequest::ByteSizeLong, + &SetRoomDataInternalRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SetRoomDataInternalRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> SetRoomDataInternalRequest_class_data_ = + SetRoomDataInternalRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SetRoomDataInternalRequest::GetClassData() const { + return SetRoomDataInternalRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 3, 0, 2> +SetRoomDataInternalRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SetRoomDataInternalRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SetRoomDataInternalRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 4, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.roomid_)}}, + // uint32 flagFilter = 2; + {::_pbi::TcParser::FastV32S1, + {16, 5, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.flagfilter_)}}, + // uint32 flagAttr = 3; + {::_pbi::TcParser::FastV32S1, + {24, 6, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.flagattr_)}}, + // repeated .np2_structs.BinAttr roomBinAttrInternal = 4; + {::_pbi::TcParser::FastMtR1, + {34, 0, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.roombinattrinternal_)}}, + // repeated .np2_structs.RoomGroupPasswordConfig passwordConfig = 5; + {::_pbi::TcParser::FastMtR1, + {42, 1, 1, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.passwordconfig_)}}, + // repeated uint64 passwordSlotMask = 6; + {::_pbi::TcParser::FastV64P1, + {50, 2, 0, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.passwordslotmask_)}}, + // repeated .np2_structs.uint16 ownerPrivilegeRank = 7; + {::_pbi::TcParser::FastMtR1, + {58, 3, 2, + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.ownerprivilegerank_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 flagFilter = 2; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.flagfilter_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 flagAttr = 3; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.flagattr_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.BinAttr roomBinAttrInternal = 4; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.roombinattrinternal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.RoomGroupPasswordConfig passwordConfig = 5; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.passwordconfig_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated uint64 passwordSlotMask = 6; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.passwordslotmask_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // repeated .np2_structs.uint16 ownerPrivilegeRank = 7; + {PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.ownerprivilegerank_), _Internal::kHasBitsOffset + 3, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + {::_pbi::TcParser::GetTable<::np2_structs::RoomGroupPasswordConfig>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SetRoomDataInternalRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SetRoomDataInternalRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roombinattrinternal_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.passwordconfig_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.passwordslotmask_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + _impl_.ownerprivilegerank_.Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000070U)) { + ::memset(&_impl_.roomid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.flagattr_) - + reinterpret_cast(&_impl_.roomid_)) + sizeof(_impl_.flagattr_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SetRoomDataInternalRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SetRoomDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SetRoomDataInternalRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SetRoomDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SetRoomDataInternalRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // uint32 flagFilter = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_flagfilter() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_flagfilter(), target); + } + } + + // uint32 flagAttr = 3; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_flagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_flagattr(), target); + } + } + + // repeated .np2_structs.BinAttr roomBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roombinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roombinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.RoomGroupPasswordConfig passwordConfig = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_passwordconfig_size()); + i < n; i++) { + const auto& repfield = this_._internal_passwordconfig().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated uint64 passwordSlotMask = 6; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + { + int byte_size = this_._impl_._passwordslotmask_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 6, this_._internal_passwordslotmask(), byte_size, target); + } + } + } + + // repeated .np2_structs.uint16 ownerPrivilegeRank = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_ownerprivilegerank_size()); + i < n; i++) { + const auto& repfield = this_._internal_ownerprivilegerank().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SetRoomDataInternalRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SetRoomDataInternalRequest::ByteSizeLong(const MessageLite& base) { + const SetRoomDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SetRoomDataInternalRequest::ByteSizeLong() const { + const SetRoomDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SetRoomDataInternalRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + // repeated .np2_structs.BinAttr roomBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roombinattrinternal_size(); + for (const auto& msg : this_._internal_roombinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.RoomGroupPasswordConfig passwordConfig = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_passwordconfig_size(); + for (const auto& msg : this_._internal_passwordconfig()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated uint64 passwordSlotMask = 6; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += + ::_pbi::WireFormatLite::UInt64SizeWithPackedTagSize( + this_._internal_passwordslotmask(), 1, + this_._impl_._passwordslotmask_cached_byte_size_); + } + // repeated .np2_structs.uint16 ownerPrivilegeRank = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + total_size += 1UL * this_._internal_ownerprivilegerank_size(); + for (const auto& msg : this_._internal_ownerprivilegerank()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + // uint32 flagFilter = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_flagfilter() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagfilter()); + } + } + // uint32 flagAttr = 3; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_flagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_flagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SetRoomDataInternalRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SetRoomDataInternalRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roombinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roombinattrinternal()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_passwordconfig()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_passwordconfig()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_passwordslotmask()->MergeFrom(from._internal_passwordslotmask()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000008U)) { + _this->_internal_mutable_ownerprivilegerank()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_ownerprivilegerank()); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_flagfilter() != 0) { + _this->_impl_.flagfilter_ = from._impl_.flagfilter_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_flagattr() != 0) { + _this->_impl_.flagattr_ = from._impl_.flagattr_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SetRoomDataInternalRequest::CopyFrom(const SetRoomDataInternalRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SetRoomDataInternalRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SetRoomDataInternalRequest::InternalSwap(SetRoomDataInternalRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roombinattrinternal_.InternalSwap(&other->_impl_.roombinattrinternal_); + _impl_.passwordconfig_.InternalSwap(&other->_impl_.passwordconfig_); + _impl_.passwordslotmask_.InternalSwap(&other->_impl_.passwordslotmask_); + _impl_.ownerprivilegerank_.InternalSwap(&other->_impl_.ownerprivilegerank_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.flagattr_) + + sizeof(SetRoomDataInternalRequest::_impl_.flagattr_) + - PROTOBUF_FIELD_OFFSET(SetRoomDataInternalRequest, _impl_.roomid_)>( + reinterpret_cast(&_impl_.roomid_), + reinterpret_cast(&other->_impl_.roomid_)); +} + +// =================================================================== + +class GetRoomMemberDataInternalRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_._has_bits_); +}; + +GetRoomMemberDataInternalRequest::GetRoomMemberDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomMemberDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetRoomMemberDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomMemberDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetRoomMemberDataInternalRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + attrid_{visibility, arena, from.attrid_} {} + +GetRoomMemberDataInternalRequest::GetRoomMemberDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetRoomMemberDataInternalRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomMemberDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetRoomMemberDataInternalRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.memberid_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.memberid_) + : nullptr; + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetRoomMemberDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomMemberDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + attrid_{visibility, arena} {} + +inline void GetRoomMemberDataInternalRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, memberid_), + 0, + offsetof(Impl_, roomid_) - + offsetof(Impl_, memberid_) + + sizeof(Impl_::roomid_)); +} +GetRoomMemberDataInternalRequest::~GetRoomMemberDataInternalRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetRoomMemberDataInternalRequest) + SharedDtor(*this); +} +inline void GetRoomMemberDataInternalRequest::SharedDtor(MessageLite& self) { + GetRoomMemberDataInternalRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.memberid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetRoomMemberDataInternalRequest(arena); +} +constexpr auto GetRoomMemberDataInternalRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.attrid_) + + decltype(GetRoomMemberDataInternalRequest::_impl_.attrid_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetRoomMemberDataInternalRequest), alignof(GetRoomMemberDataInternalRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetRoomMemberDataInternalRequest::PlacementNew_, + sizeof(GetRoomMemberDataInternalRequest), + alignof(GetRoomMemberDataInternalRequest)); + } +} +constexpr auto GetRoomMemberDataInternalRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<45>{ + { + &_GetRoomMemberDataInternalRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetRoomMemberDataInternalRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetRoomMemberDataInternalRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetRoomMemberDataInternalRequest::ByteSizeLong, + &GetRoomMemberDataInternalRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetRoomMemberDataInternalRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<45> GetRoomMemberDataInternalRequest_class_data_ = + GetRoomMemberDataInternalRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetRoomMemberDataInternalRequest::GetClassData() const { + return GetRoomMemberDataInternalRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> +GetRoomMemberDataInternalRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetRoomMemberDataInternalRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetRoomMemberDataInternalRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.roomid_)}}, + // .np2_structs.uint16 memberId = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.memberid_)}}, + // repeated .np2_structs.uint16 attrId = 3; + {::_pbi::TcParser::FastMtR1, + {26, 0, 1, + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.attrid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint16 memberId = 2; + {PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.memberid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.uint16 attrId = 3; + {PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.attrid_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetRoomMemberDataInternalRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetRoomMemberDataInternalRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.attrid_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.memberid_ != nullptr); + _impl_.memberid_->Clear(); + } + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetRoomMemberDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetRoomMemberDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetRoomMemberDataInternalRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // .np2_structs.uint16 memberId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.memberid_, this_._impl_.memberid_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.uint16 attrId = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attrid_size()); + i < n; i++) { + const auto& repfield = this_._internal_attrid().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetRoomMemberDataInternalRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetRoomMemberDataInternalRequest::ByteSizeLong(const MessageLite& base) { + const GetRoomMemberDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetRoomMemberDataInternalRequest::ByteSizeLong() const { + const GetRoomMemberDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetRoomMemberDataInternalRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // repeated .np2_structs.uint16 attrId = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_attrid_size(); + for (const auto& msg : this_._internal_attrid()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.uint16 memberId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.memberid_); + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetRoomMemberDataInternalRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetRoomMemberDataInternalRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_attrid()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attrid()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.memberid_ != nullptr); + if (_this->_impl_.memberid_ == nullptr) { + _this->_impl_.memberid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.memberid_); + } else { + _this->_impl_.memberid_->MergeFrom(*from._impl_.memberid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetRoomMemberDataInternalRequest::CopyFrom(const GetRoomMemberDataInternalRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetRoomMemberDataInternalRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetRoomMemberDataInternalRequest::InternalSwap(GetRoomMemberDataInternalRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.attrid_.InternalSwap(&other->_impl_.attrid_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.roomid_) + + sizeof(GetRoomMemberDataInternalRequest::_impl_.roomid_) + - PROTOBUF_FIELD_OFFSET(GetRoomMemberDataInternalRequest, _impl_.memberid_)>( + reinterpret_cast(&_impl_.memberid_), + reinterpret_cast(&other->_impl_.memberid_)); +} + +// =================================================================== + +class SetRoomMemberDataInternalRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_._has_bits_); +}; + +SetRoomMemberDataInternalRequest::SetRoomMemberDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomMemberDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SetRoomMemberDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE SetRoomMemberDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SetRoomMemberDataInternalRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roommemberbinattrinternal_{visibility, arena, from.roommemberbinattrinternal_} {} + +SetRoomMemberDataInternalRequest::SetRoomMemberDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SetRoomMemberDataInternalRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomMemberDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SetRoomMemberDataInternalRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.memberid_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.memberid_) + : nullptr; + _impl_.teamid_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_) + : nullptr; + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.SetRoomMemberDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE SetRoomMemberDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roommemberbinattrinternal_{visibility, arena} {} + +inline void SetRoomMemberDataInternalRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, memberid_), + 0, + offsetof(Impl_, roomid_) - + offsetof(Impl_, memberid_) + + sizeof(Impl_::roomid_)); +} +SetRoomMemberDataInternalRequest::~SetRoomMemberDataInternalRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SetRoomMemberDataInternalRequest) + SharedDtor(*this); +} +inline void SetRoomMemberDataInternalRequest::SharedDtor(MessageLite& self) { + SetRoomMemberDataInternalRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.memberid_; + delete this_._impl_.teamid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SetRoomMemberDataInternalRequest(arena); +} +constexpr auto SetRoomMemberDataInternalRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.roommemberbinattrinternal_) + + decltype(SetRoomMemberDataInternalRequest::_impl_.roommemberbinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SetRoomMemberDataInternalRequest), alignof(SetRoomMemberDataInternalRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SetRoomMemberDataInternalRequest::PlacementNew_, + sizeof(SetRoomMemberDataInternalRequest), + alignof(SetRoomMemberDataInternalRequest)); + } +} +constexpr auto SetRoomMemberDataInternalRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<45>{ + { + &_SetRoomMemberDataInternalRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SetRoomMemberDataInternalRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SetRoomMemberDataInternalRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SetRoomMemberDataInternalRequest::ByteSizeLong, + &SetRoomMemberDataInternalRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SetRoomMemberDataInternalRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<45> SetRoomMemberDataInternalRequest_class_data_ = + SetRoomMemberDataInternalRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SetRoomMemberDataInternalRequest::GetClassData() const { + return SetRoomMemberDataInternalRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 3, 0, 2> +SetRoomMemberDataInternalRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SetRoomMemberDataInternalRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SetRoomMemberDataInternalRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + {::_pbi::TcParser::FastMtR1, + {34, 0, 2, + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.roommemberbinattrinternal_)}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 3, 0, + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.roomid_)}}, + // .np2_structs.uint16 memberId = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.memberid_)}}, + // .np2_structs.uint8 teamId = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 1, + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.teamid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint16 memberId = 2; + {PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.memberid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint8 teamId = 3; + {PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.teamid_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + {PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.roommemberbinattrinternal_), _Internal::kHasBitsOffset + 0, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SetRoomMemberDataInternalRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SetRoomMemberDataInternalRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.roommemberbinattrinternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.memberid_ != nullptr); + _impl_.memberid_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.teamid_ != nullptr); + _impl_.teamid_->Clear(); + } + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SetRoomMemberDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SetRoomMemberDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SetRoomMemberDataInternalRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // .np2_structs.uint16 memberId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.memberid_, this_._impl_.memberid_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint8 teamId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.teamid_, this_._impl_.teamid_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_roommemberbinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_roommemberbinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SetRoomMemberDataInternalRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SetRoomMemberDataInternalRequest::ByteSizeLong(const MessageLite& base) { + const SetRoomMemberDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SetRoomMemberDataInternalRequest::ByteSizeLong() const { + const SetRoomMemberDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SetRoomMemberDataInternalRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_roommemberbinattrinternal_size(); + for (const auto& msg : this_._internal_roommemberbinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.uint16 memberId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.memberid_); + } + // .np2_structs.uint8 teamId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.teamid_); + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SetRoomMemberDataInternalRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SetRoomMemberDataInternalRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_roommemberbinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_roommemberbinattrinternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.memberid_ != nullptr); + if (_this->_impl_.memberid_ == nullptr) { + _this->_impl_.memberid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.memberid_); + } else { + _this->_impl_.memberid_->MergeFrom(*from._impl_.memberid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.teamid_ != nullptr); + if (_this->_impl_.teamid_ == nullptr) { + _this->_impl_.teamid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.teamid_); + } else { + _this->_impl_.teamid_->MergeFrom(*from._impl_.teamid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SetRoomMemberDataInternalRequest::CopyFrom(const SetRoomMemberDataInternalRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SetRoomMemberDataInternalRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SetRoomMemberDataInternalRequest::InternalSwap(SetRoomMemberDataInternalRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.roommemberbinattrinternal_.InternalSwap(&other->_impl_.roommemberbinattrinternal_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.roomid_) + + sizeof(SetRoomMemberDataInternalRequest::_impl_.roomid_) + - PROTOBUF_FIELD_OFFSET(SetRoomMemberDataInternalRequest, _impl_.memberid_)>( + reinterpret_cast(&_impl_.memberid_), + reinterpret_cast(&other->_impl_.memberid_)); +} + +// =================================================================== + +class SetUserInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_._has_bits_); +}; + +SetUserInfo::SetUserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetUserInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SetUserInfo) +} +PROTOBUF_NDEBUG_INLINE SetUserInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SetUserInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + userbinattr_{visibility, arena, from.userbinattr_} {} + +SetUserInfo::SetUserInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SetUserInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetUserInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SetUserInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.serverid_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.SetUserInfo) +} +PROTOBUF_NDEBUG_INLINE SetUserInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + userbinattr_{visibility, arena} {} + +inline void SetUserInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.serverid_ = {}; +} +SetUserInfo::~SetUserInfo() { + // @@protoc_insertion_point(destructor:np2_structs.SetUserInfo) + SharedDtor(*this); +} +inline void SetUserInfo::SharedDtor(MessageLite& self) { + SetUserInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.serverid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SetUserInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SetUserInfo(arena); +} +constexpr auto SetUserInfo::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_.userbinattr_) + + decltype(SetUserInfo::_impl_.userbinattr_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SetUserInfo), alignof(SetUserInfo), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SetUserInfo::PlacementNew_, + sizeof(SetUserInfo), + alignof(SetUserInfo)); + } +} +constexpr auto SetUserInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<24>{ + { + &_SetUserInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SetUserInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SetUserInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SetUserInfo::ByteSizeLong, + &SetUserInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_._cached_size_), + true, + }, + "np2_structs.SetUserInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> SetUserInfo_class_data_ = + SetUserInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SetUserInfo::GetClassData() const { + return SetUserInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +SetUserInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SetUserInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SetUserInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.BinAttr userBinAttr = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 1, + PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_.userbinattr_)}}, + // .np2_structs.uint16 serverId = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_.serverid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 serverId = 1; + {PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_.serverid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.BinAttr userBinAttr = 2; + {PROTOBUF_FIELD_OFFSET(SetUserInfo, _impl_.userbinattr_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::BinAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SetUserInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SetUserInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.userbinattr_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.serverid_ != nullptr); + _impl_.serverid_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SetUserInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SetUserInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SetUserInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SetUserInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SetUserInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.serverid_, this_._impl_.serverid_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.BinAttr userBinAttr = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_userbinattr_size()); + i < n; i++) { + const auto& repfield = this_._internal_userbinattr().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SetUserInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SetUserInfo::ByteSizeLong(const MessageLite& base) { + const SetUserInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SetUserInfo::ByteSizeLong() const { + const SetUserInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SetUserInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.BinAttr userBinAttr = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_userbinattr_size(); + for (const auto& msg : this_._internal_userbinattr()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.serverid_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SetUserInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SetUserInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_userbinattr()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_userbinattr()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.serverid_ != nullptr); + if (_this->_impl_.serverid_ == nullptr) { + _this->_impl_.serverid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_); + } else { + _this->_impl_.serverid_->MergeFrom(*from._impl_.serverid_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SetUserInfo::CopyFrom(const SetUserInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SetUserInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SetUserInfo::InternalSwap(SetUserInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.userbinattr_.InternalSwap(&other->_impl_.userbinattr_); + swap(_impl_.serverid_, other->_impl_.serverid_); +} + +// =================================================================== + +class GetRoomDataInternalRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_._has_bits_); +}; + +GetRoomDataInternalRequest::GetRoomDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetRoomDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetRoomDataInternalRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + attrid_{visibility, arena, from.attrid_} {} + +GetRoomDataInternalRequest::GetRoomDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetRoomDataInternalRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomDataInternalRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetRoomDataInternalRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetRoomDataInternalRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomDataInternalRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + attrid_{visibility, arena} {} + +inline void GetRoomDataInternalRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.roomid_ = {}; +} +GetRoomDataInternalRequest::~GetRoomDataInternalRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetRoomDataInternalRequest) + SharedDtor(*this); +} +inline void GetRoomDataInternalRequest::SharedDtor(MessageLite& self) { + GetRoomDataInternalRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetRoomDataInternalRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetRoomDataInternalRequest(arena); +} +constexpr auto GetRoomDataInternalRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_.attrid_) + + decltype(GetRoomDataInternalRequest::_impl_.attrid_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetRoomDataInternalRequest), alignof(GetRoomDataInternalRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetRoomDataInternalRequest::PlacementNew_, + sizeof(GetRoomDataInternalRequest), + alignof(GetRoomDataInternalRequest)); + } +} +constexpr auto GetRoomDataInternalRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_GetRoomDataInternalRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetRoomDataInternalRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetRoomDataInternalRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetRoomDataInternalRequest::ByteSizeLong, + &GetRoomDataInternalRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetRoomDataInternalRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> GetRoomDataInternalRequest_class_data_ = + GetRoomDataInternalRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetRoomDataInternalRequest::GetClassData() const { + return GetRoomDataInternalRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +GetRoomDataInternalRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetRoomDataInternalRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetRoomDataInternalRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.uint16 attrId = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_.attrid_)}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_.roomid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // repeated .np2_structs.uint16 attrId = 2; + {PROTOBUF_FIELD_OFFSET(GetRoomDataInternalRequest, _impl_.attrid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetRoomDataInternalRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetRoomDataInternalRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.attrid_.Clear(); + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetRoomDataInternalRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetRoomDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetRoomDataInternalRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetRoomDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetRoomDataInternalRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // repeated .np2_structs.uint16 attrId = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attrid_size()); + i < n; i++) { + const auto& repfield = this_._internal_attrid().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetRoomDataInternalRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetRoomDataInternalRequest::ByteSizeLong(const MessageLite& base) { + const GetRoomDataInternalRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetRoomDataInternalRequest::ByteSizeLong() const { + const GetRoomDataInternalRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetRoomDataInternalRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.uint16 attrId = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_attrid_size(); + for (const auto& msg : this_._internal_attrid()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetRoomDataInternalRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetRoomDataInternalRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_attrid()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attrid()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetRoomDataInternalRequest::CopyFrom(const GetRoomDataInternalRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetRoomDataInternalRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetRoomDataInternalRequest::InternalSwap(GetRoomDataInternalRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.attrid_.InternalSwap(&other->_impl_.attrid_); + swap(_impl_.roomid_, other->_impl_.roomid_); +} + +// =================================================================== + +class RoomMemberUpdateInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_._has_bits_); +}; + +RoomMemberUpdateInfo::RoomMemberUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomMemberUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomMemberUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomMemberUpdateInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +RoomMemberUpdateInfo::RoomMemberUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomMemberUpdateInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomMemberUpdateInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.roommemberdatainternal_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.roommemberdatainternal_) + : nullptr; + _impl_.eventcause_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.eventcause_) + : nullptr; + _impl_.optdata_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomMemberUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomMemberUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void RoomMemberUpdateInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, roommemberdatainternal_), + 0, + offsetof(Impl_, optdata_) - + offsetof(Impl_, roommemberdatainternal_) + + sizeof(Impl_::optdata_)); +} +RoomMemberUpdateInfo::~RoomMemberUpdateInfo() { + // @@protoc_insertion_point(destructor:np2_structs.RoomMemberUpdateInfo) + SharedDtor(*this); +} +inline void RoomMemberUpdateInfo::SharedDtor(MessageLite& self) { + RoomMemberUpdateInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.roommemberdatainternal_; + delete this_._impl_.eventcause_; + delete this_._impl_.optdata_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomMemberUpdateInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomMemberUpdateInfo(arena); +} +constexpr auto RoomMemberUpdateInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RoomMemberUpdateInfo), + alignof(RoomMemberUpdateInfo)); +} +constexpr auto RoomMemberUpdateInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<33>{ + { + &_RoomMemberUpdateInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomMemberUpdateInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomMemberUpdateInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomMemberUpdateInfo::ByteSizeLong, + &RoomMemberUpdateInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_._cached_size_), + true, + }, + "np2_structs.RoomMemberUpdateInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<33> RoomMemberUpdateInfo_class_data_ = + RoomMemberUpdateInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomMemberUpdateInfo::GetClassData() const { + return RoomMemberUpdateInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 3, 0, 2> +RoomMemberUpdateInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomMemberUpdateInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomMemberUpdateInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.RoomMemberDataInternal roomMemberDataInternal = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.roommemberdatainternal_)}}, + // .np2_structs.uint8 eventCause = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.eventcause_)}}, + // .np2_structs.PresenceOptionData optData = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 2, + PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.optdata_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.RoomMemberDataInternal roomMemberDataInternal = 1; + {PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.roommemberdatainternal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint8 eventCause = 2; + {PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.eventcause_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.PresenceOptionData optData = 3; + {PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.optdata_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::PresenceOptionData>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomMemberUpdateInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomMemberUpdateInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.roommemberdatainternal_ != nullptr); + _impl_.roommemberdatainternal_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.eventcause_ != nullptr); + _impl_.eventcause_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.optdata_ != nullptr); + _impl_.optdata_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomMemberUpdateInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomMemberUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomMemberUpdateInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomMemberUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomMemberUpdateInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.RoomMemberDataInternal roomMemberDataInternal = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.roommemberdatainternal_, this_._impl_.roommemberdatainternal_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint8 eventCause = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.eventcause_, this_._impl_.eventcause_->GetCachedSize(), target, + stream); + } + + // .np2_structs.PresenceOptionData optData = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.optdata_, this_._impl_.optdata_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomMemberUpdateInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomMemberUpdateInfo::ByteSizeLong(const MessageLite& base) { + const RoomMemberUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomMemberUpdateInfo::ByteSizeLong() const { + const RoomMemberUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomMemberUpdateInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // .np2_structs.RoomMemberDataInternal roomMemberDataInternal = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.roommemberdatainternal_); + } + // .np2_structs.uint8 eventCause = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.eventcause_); + } + // .np2_structs.PresenceOptionData optData = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.optdata_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomMemberUpdateInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomMemberUpdateInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.roommemberdatainternal_ != nullptr); + if (_this->_impl_.roommemberdatainternal_ == nullptr) { + _this->_impl_.roommemberdatainternal_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.roommemberdatainternal_); + } else { + _this->_impl_.roommemberdatainternal_->MergeFrom(*from._impl_.roommemberdatainternal_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.eventcause_ != nullptr); + if (_this->_impl_.eventcause_ == nullptr) { + _this->_impl_.eventcause_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.eventcause_); + } else { + _this->_impl_.eventcause_->MergeFrom(*from._impl_.eventcause_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.optdata_ != nullptr); + if (_this->_impl_.optdata_ == nullptr) { + _this->_impl_.optdata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_); + } else { + _this->_impl_.optdata_->MergeFrom(*from._impl_.optdata_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomMemberUpdateInfo::CopyFrom(const RoomMemberUpdateInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomMemberUpdateInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomMemberUpdateInfo::InternalSwap(RoomMemberUpdateInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.optdata_) + + sizeof(RoomMemberUpdateInfo::_impl_.optdata_) + - PROTOBUF_FIELD_OFFSET(RoomMemberUpdateInfo, _impl_.roommemberdatainternal_)>( + reinterpret_cast(&_impl_.roommemberdatainternal_), + reinterpret_cast(&other->_impl_.roommemberdatainternal_)); +} + +// =================================================================== + +class NotificationUserJoinedRoom::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_._has_bits_); +}; + +NotificationUserJoinedRoom::NotificationUserJoinedRoom(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, NotificationUserJoinedRoom_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.NotificationUserJoinedRoom) +} +PROTOBUF_NDEBUG_INLINE NotificationUserJoinedRoom::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::NotificationUserJoinedRoom& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +NotificationUserJoinedRoom::NotificationUserJoinedRoom( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const NotificationUserJoinedRoom& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, NotificationUserJoinedRoom_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + NotificationUserJoinedRoom* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.update_info_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.update_info_) + : nullptr; + _impl_.signaling_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.signaling_) + : nullptr; + _impl_.room_id_ = from._impl_.room_id_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.NotificationUserJoinedRoom) +} +PROTOBUF_NDEBUG_INLINE NotificationUserJoinedRoom::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void NotificationUserJoinedRoom::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, update_info_), + 0, + offsetof(Impl_, room_id_) - + offsetof(Impl_, update_info_) + + sizeof(Impl_::room_id_)); +} +NotificationUserJoinedRoom::~NotificationUserJoinedRoom() { + // @@protoc_insertion_point(destructor:np2_structs.NotificationUserJoinedRoom) + SharedDtor(*this); +} +inline void NotificationUserJoinedRoom::SharedDtor(MessageLite& self) { + NotificationUserJoinedRoom& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.update_info_; + delete this_._impl_.signaling_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL NotificationUserJoinedRoom::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) NotificationUserJoinedRoom(arena); +} +constexpr auto NotificationUserJoinedRoom::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(NotificationUserJoinedRoom), + alignof(NotificationUserJoinedRoom)); +} +constexpr auto NotificationUserJoinedRoom::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_NotificationUserJoinedRoom_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &NotificationUserJoinedRoom::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &NotificationUserJoinedRoom::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &NotificationUserJoinedRoom::ByteSizeLong, + &NotificationUserJoinedRoom::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_._cached_size_), + true, + }, + "np2_structs.NotificationUserJoinedRoom", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> NotificationUserJoinedRoom_class_data_ = + NotificationUserJoinedRoom::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +NotificationUserJoinedRoom::GetClassData() const { + return NotificationUserJoinedRoom_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> +NotificationUserJoinedRoom::_table_ = { + { + PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + NotificationUserJoinedRoom_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::NotificationUserJoinedRoom>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 room_id = 1; + {::_pbi::TcParser::FastV64S1, + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.room_id_)}}, + // .np2_structs.RoomMemberUpdateInfo update_info = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.update_info_)}}, + // .np2_structs.SignalingAddr signaling = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 1, + PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.signaling_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 room_id = 1; + {PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.room_id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.RoomMemberUpdateInfo update_info = 2; + {PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.update_info_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.SignalingAddr signaling = 3; + {PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.signaling_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomMemberUpdateInfo>()}, + {::_pbi::TcParser::GetTable<::np2_structs::SignalingAddr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void NotificationUserJoinedRoom::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.NotificationUserJoinedRoom) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.update_info_ != nullptr); + _impl_.update_info_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.signaling_ != nullptr); + _impl_.signaling_->Clear(); + } + } + _impl_.room_id_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL NotificationUserJoinedRoom::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const NotificationUserJoinedRoom& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL NotificationUserJoinedRoom::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const NotificationUserJoinedRoom& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.NotificationUserJoinedRoom) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 room_id = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_room_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_room_id(), target); + } + } + + // .np2_structs.RoomMemberUpdateInfo update_info = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.update_info_, this_._impl_.update_info_->GetCachedSize(), target, + stream); + } + + // .np2_structs.SignalingAddr signaling = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.signaling_, this_._impl_.signaling_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.NotificationUserJoinedRoom) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t NotificationUserJoinedRoom::ByteSizeLong(const MessageLite& base) { + const NotificationUserJoinedRoom& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t NotificationUserJoinedRoom::ByteSizeLong() const { + const NotificationUserJoinedRoom& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.NotificationUserJoinedRoom) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // .np2_structs.RoomMemberUpdateInfo update_info = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.update_info_); + } + // .np2_structs.SignalingAddr signaling = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.signaling_); + } + // uint64 room_id = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_room_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_room_id()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void NotificationUserJoinedRoom::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.NotificationUserJoinedRoom) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.update_info_ != nullptr); + if (_this->_impl_.update_info_ == nullptr) { + _this->_impl_.update_info_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.update_info_); + } else { + _this->_impl_.update_info_->MergeFrom(*from._impl_.update_info_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.signaling_ != nullptr); + if (_this->_impl_.signaling_ == nullptr) { + _this->_impl_.signaling_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.signaling_); + } else { + _this->_impl_.signaling_->MergeFrom(*from._impl_.signaling_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_room_id() != 0) { + _this->_impl_.room_id_ = from._impl_.room_id_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void NotificationUserJoinedRoom::CopyFrom(const NotificationUserJoinedRoom& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.NotificationUserJoinedRoom) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void NotificationUserJoinedRoom::InternalSwap(NotificationUserJoinedRoom* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.room_id_) + + sizeof(NotificationUserJoinedRoom::_impl_.room_id_) + - PROTOBUF_FIELD_OFFSET(NotificationUserJoinedRoom, _impl_.update_info_)>( + reinterpret_cast(&_impl_.update_info_), + reinterpret_cast(&other->_impl_.update_info_)); +} + +// =================================================================== + +class RoomUpdateInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_._has_bits_); +}; + +RoomUpdateInfo::RoomUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomUpdateInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +RoomUpdateInfo::RoomUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomUpdateInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomUpdateInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.eventcause_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.eventcause_) + : nullptr; + _impl_.optdata_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_) + : nullptr; + _impl_.errorcode_ = from._impl_.errorcode_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void RoomUpdateInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, eventcause_), + 0, + offsetof(Impl_, errorcode_) - + offsetof(Impl_, eventcause_) + + sizeof(Impl_::errorcode_)); +} +RoomUpdateInfo::~RoomUpdateInfo() { + // @@protoc_insertion_point(destructor:np2_structs.RoomUpdateInfo) + SharedDtor(*this); +} +inline void RoomUpdateInfo::SharedDtor(MessageLite& self) { + RoomUpdateInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.eventcause_; + delete this_._impl_.optdata_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomUpdateInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomUpdateInfo(arena); +} +constexpr auto RoomUpdateInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RoomUpdateInfo), + alignof(RoomUpdateInfo)); +} +constexpr auto RoomUpdateInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<27>{ + { + &_RoomUpdateInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomUpdateInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomUpdateInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomUpdateInfo::ByteSizeLong, + &RoomUpdateInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_._cached_size_), + true, + }, + "np2_structs.RoomUpdateInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<27> RoomUpdateInfo_class_data_ = + RoomUpdateInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomUpdateInfo::GetClassData() const { + return RoomUpdateInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> +RoomUpdateInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomUpdateInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomUpdateInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.uint8 eventCause = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.eventcause_)}}, + // int32 errorCode = 2; + {::_pbi::TcParser::FastV32S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.errorcode_)}}, + // .np2_structs.PresenceOptionData optData = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 1, + PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.optdata_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint8 eventCause = 1; + {PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.eventcause_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 errorCode = 2; + {PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.errorcode_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // .np2_structs.PresenceOptionData optData = 3; + {PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.optdata_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::PresenceOptionData>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomUpdateInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomUpdateInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.eventcause_ != nullptr); + _impl_.eventcause_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.optdata_ != nullptr); + _impl_.optdata_->Clear(); + } + } + _impl_.errorcode_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomUpdateInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomUpdateInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomUpdateInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint8 eventCause = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.eventcause_, this_._impl_.eventcause_->GetCachedSize(), target, + stream); + } + + // int32 errorCode = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_errorcode() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_errorcode(), target); + } + } + + // .np2_structs.PresenceOptionData optData = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.optdata_, this_._impl_.optdata_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomUpdateInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomUpdateInfo::ByteSizeLong(const MessageLite& base) { + const RoomUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomUpdateInfo::ByteSizeLong() const { + const RoomUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomUpdateInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // .np2_structs.uint8 eventCause = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.eventcause_); + } + // .np2_structs.PresenceOptionData optData = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.optdata_); + } + // int32 errorCode = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_errorcode() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_errorcode()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomUpdateInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomUpdateInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.eventcause_ != nullptr); + if (_this->_impl_.eventcause_ == nullptr) { + _this->_impl_.eventcause_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.eventcause_); + } else { + _this->_impl_.eventcause_->MergeFrom(*from._impl_.eventcause_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.optdata_ != nullptr); + if (_this->_impl_.optdata_ == nullptr) { + _this->_impl_.optdata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.optdata_); + } else { + _this->_impl_.optdata_->MergeFrom(*from._impl_.optdata_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_errorcode() != 0) { + _this->_impl_.errorcode_ = from._impl_.errorcode_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomUpdateInfo::CopyFrom(const RoomUpdateInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomUpdateInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomUpdateInfo::InternalSwap(RoomUpdateInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.errorcode_) + + sizeof(RoomUpdateInfo::_impl_.errorcode_) + - PROTOBUF_FIELD_OFFSET(RoomUpdateInfo, _impl_.eventcause_)>( + reinterpret_cast(&_impl_.eventcause_), + reinterpret_cast(&other->_impl_.eventcause_)); +} + +// =================================================================== + +class RoomDataInternalUpdateInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_._has_bits_); +}; + +RoomDataInternalUpdateInfo::RoomDataInternalUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomDataInternalUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomDataInternalUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomDataInternalUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomDataInternalUpdateInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + newroombinattrinternal_{visibility, arena, from.newroombinattrinternal_}, + newroomgroup_(arena, from.newroomgroup_) {} + +RoomDataInternalUpdateInfo::RoomDataInternalUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomDataInternalUpdateInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomDataInternalUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomDataInternalUpdateInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.newroomdatainternal_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.newroomdatainternal_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, prevroompasswordslotmask_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, prevroompasswordslotmask_), + offsetof(Impl_, prevflagattr_) - + offsetof(Impl_, prevroompasswordslotmask_) + + sizeof(Impl_::prevflagattr_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomDataInternalUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomDataInternalUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + newroombinattrinternal_{visibility, arena}, + newroomgroup_(arena) {} + +inline void RoomDataInternalUpdateInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, newroomdatainternal_), + 0, + offsetof(Impl_, prevflagattr_) - + offsetof(Impl_, newroomdatainternal_) + + sizeof(Impl_::prevflagattr_)); +} +RoomDataInternalUpdateInfo::~RoomDataInternalUpdateInfo() { + // @@protoc_insertion_point(destructor:np2_structs.RoomDataInternalUpdateInfo) + SharedDtor(*this); +} +inline void RoomDataInternalUpdateInfo::SharedDtor(MessageLite& self) { + RoomDataInternalUpdateInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.newroomgroup_.Destroy(); + delete this_._impl_.newroomdatainternal_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomDataInternalUpdateInfo(arena); +} +constexpr auto RoomDataInternalUpdateInfo::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroombinattrinternal_) + + decltype(RoomDataInternalUpdateInfo::_impl_.newroombinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(RoomDataInternalUpdateInfo), alignof(RoomDataInternalUpdateInfo), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&RoomDataInternalUpdateInfo::PlacementNew_, + sizeof(RoomDataInternalUpdateInfo), + alignof(RoomDataInternalUpdateInfo)); + } +} +constexpr auto RoomDataInternalUpdateInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_RoomDataInternalUpdateInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomDataInternalUpdateInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomDataInternalUpdateInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomDataInternalUpdateInfo::ByteSizeLong, + &RoomDataInternalUpdateInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_._cached_size_), + true, + }, + "np2_structs.RoomDataInternalUpdateInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> RoomDataInternalUpdateInfo_class_data_ = + RoomDataInternalUpdateInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomDataInternalUpdateInfo::GetClassData() const { + return RoomDataInternalUpdateInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 2, 0, 2> +RoomDataInternalUpdateInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomDataInternalUpdateInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternalUpdateInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.RoomDataInternal newRoomDataInternal = 1; + {::_pbi::TcParser::FastMtS1, + {10, 2, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroomdatainternal_)}}, + // uint32 prevFlagAttr = 2; + {::_pbi::TcParser::FastV32S1, + {16, 4, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.prevflagattr_)}}, + // uint64 prevRoomPasswordSlotMask = 3; + {::_pbi::TcParser::FastV64S1, + {24, 3, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.prevroompasswordslotmask_)}}, + // bytes newRoomGroup = 4; + {::_pbi::TcParser::FastBS1, + {34, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroomgroup_)}}, + // repeated .np2_structs.uint16 newRoomBinAttrInternal = 5; + {::_pbi::TcParser::FastMtR1, + {42, 0, 1, + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroombinattrinternal_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.RoomDataInternal newRoomDataInternal = 1; + {PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroomdatainternal_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 prevFlagAttr = 2; + {PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.prevflagattr_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint64 prevRoomPasswordSlotMask = 3; + {PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.prevroompasswordslotmask_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // bytes newRoomGroup = 4; + {PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroomgroup_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .np2_structs.uint16 newRoomBinAttrInternal = 5; + {PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroombinattrinternal_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomDataInternalUpdateInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomDataInternalUpdateInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.newroombinattrinternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.newroomgroup_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.newroomdatainternal_ != nullptr); + _impl_.newroomdatainternal_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000018U)) { + ::memset(&_impl_.prevroompasswordslotmask_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.prevflagattr_) - + reinterpret_cast(&_impl_.prevroompasswordslotmask_)) + sizeof(_impl_.prevflagattr_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomDataInternalUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomDataInternalUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomDataInternalUpdateInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.RoomDataInternal newRoomDataInternal = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.newroomdatainternal_, this_._impl_.newroomdatainternal_->GetCachedSize(), target, + stream); + } + + // uint32 prevFlagAttr = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_prevflagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_prevflagattr(), target); + } + } + + // uint64 prevRoomPasswordSlotMask = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_prevroompasswordslotmask() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 3, this_._internal_prevroompasswordslotmask(), target); + } + } + + // bytes newRoomGroup = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_newroomgroup().empty()) { + const ::std::string& _s = this_._internal_newroomgroup(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + // repeated .np2_structs.uint16 newRoomBinAttrInternal = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_newroombinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_newroombinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomDataInternalUpdateInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomDataInternalUpdateInfo::ByteSizeLong(const MessageLite& base) { + const RoomDataInternalUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomDataInternalUpdateInfo::ByteSizeLong() const { + const RoomDataInternalUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomDataInternalUpdateInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // repeated .np2_structs.uint16 newRoomBinAttrInternal = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_newroombinattrinternal_size(); + for (const auto& msg : this_._internal_newroombinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // bytes newRoomGroup = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_newroomgroup().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_newroomgroup()); + } + } + // .np2_structs.RoomDataInternal newRoomDataInternal = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.newroomdatainternal_); + } + // uint64 prevRoomPasswordSlotMask = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_prevroompasswordslotmask() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_prevroompasswordslotmask()); + } + } + // uint32 prevFlagAttr = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_prevflagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_prevflagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomDataInternalUpdateInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomDataInternalUpdateInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_newroombinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_newroombinattrinternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_newroomgroup().empty()) { + _this->_internal_set_newroomgroup(from._internal_newroomgroup()); + } else { + if (_this->_impl_.newroomgroup_.IsDefault()) { + _this->_internal_set_newroomgroup(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.newroomdatainternal_ != nullptr); + if (_this->_impl_.newroomdatainternal_ == nullptr) { + _this->_impl_.newroomdatainternal_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.newroomdatainternal_); + } else { + _this->_impl_.newroomdatainternal_->MergeFrom(*from._impl_.newroomdatainternal_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_prevroompasswordslotmask() != 0) { + _this->_impl_.prevroompasswordslotmask_ = from._impl_.prevroompasswordslotmask_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_prevflagattr() != 0) { + _this->_impl_.prevflagattr_ = from._impl_.prevflagattr_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomDataInternalUpdateInfo::CopyFrom(const RoomDataInternalUpdateInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomDataInternalUpdateInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomDataInternalUpdateInfo::InternalSwap(RoomDataInternalUpdateInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.newroombinattrinternal_.InternalSwap(&other->_impl_.newroombinattrinternal_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.newroomgroup_, &other->_impl_.newroomgroup_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.prevflagattr_) + + sizeof(RoomDataInternalUpdateInfo::_impl_.prevflagattr_) + - PROTOBUF_FIELD_OFFSET(RoomDataInternalUpdateInfo, _impl_.newroomdatainternal_)>( + reinterpret_cast(&_impl_.newroomdatainternal_), + reinterpret_cast(&other->_impl_.newroomdatainternal_)); +} + +// =================================================================== + +class RoomMemberDataInternalUpdateInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_._has_bits_); +}; + +RoomMemberDataInternalUpdateInfo::RoomMemberDataInternalUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberDataInternalUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomMemberDataInternalUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomMemberDataInternalUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomMemberDataInternalUpdateInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + newroommemberbinattrinternal_{visibility, arena, from.newroommemberbinattrinternal_} {} + +RoomMemberDataInternalUpdateInfo::RoomMemberDataInternalUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomMemberDataInternalUpdateInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberDataInternalUpdateInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomMemberDataInternalUpdateInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.newroommemberdatainternal_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.newroommemberdatainternal_) + : nullptr; + _impl_.prevteamid_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.prevteamid_) + : nullptr; + _impl_.prevflagattr_ = from._impl_.prevflagattr_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomMemberDataInternalUpdateInfo) +} +PROTOBUF_NDEBUG_INLINE RoomMemberDataInternalUpdateInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + newroommemberbinattrinternal_{visibility, arena} {} + +inline void RoomMemberDataInternalUpdateInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, newroommemberdatainternal_), + 0, + offsetof(Impl_, prevflagattr_) - + offsetof(Impl_, newroommemberdatainternal_) + + sizeof(Impl_::prevflagattr_)); +} +RoomMemberDataInternalUpdateInfo::~RoomMemberDataInternalUpdateInfo() { + // @@protoc_insertion_point(destructor:np2_structs.RoomMemberDataInternalUpdateInfo) + SharedDtor(*this); +} +inline void RoomMemberDataInternalUpdateInfo::SharedDtor(MessageLite& self) { + RoomMemberDataInternalUpdateInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.newroommemberdatainternal_; + delete this_._impl_.prevteamid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomMemberDataInternalUpdateInfo(arena); +} +constexpr auto RoomMemberDataInternalUpdateInfo::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.newroommemberbinattrinternal_) + + decltype(RoomMemberDataInternalUpdateInfo::_impl_.newroommemberbinattrinternal_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(RoomMemberDataInternalUpdateInfo), alignof(RoomMemberDataInternalUpdateInfo), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&RoomMemberDataInternalUpdateInfo::PlacementNew_, + sizeof(RoomMemberDataInternalUpdateInfo), + alignof(RoomMemberDataInternalUpdateInfo)); + } +} +constexpr auto RoomMemberDataInternalUpdateInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<45>{ + { + &_RoomMemberDataInternalUpdateInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomMemberDataInternalUpdateInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomMemberDataInternalUpdateInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomMemberDataInternalUpdateInfo::ByteSizeLong, + &RoomMemberDataInternalUpdateInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_._cached_size_), + true, + }, + "np2_structs.RoomMemberDataInternalUpdateInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<45> RoomMemberDataInternalUpdateInfo_class_data_ = + RoomMemberDataInternalUpdateInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomMemberDataInternalUpdateInfo::GetClassData() const { + return RoomMemberDataInternalUpdateInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 3, 0, 2> +RoomMemberDataInternalUpdateInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomMemberDataInternalUpdateInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataInternalUpdateInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.uint16 newRoomMemberBinAttrInternal = 4; + {::_pbi::TcParser::FastMtR1, + {34, 0, 2, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.newroommemberbinattrinternal_)}}, + // .np2_structs.RoomMemberDataInternal newRoomMemberDataInternal = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.newroommemberdatainternal_)}}, + // uint32 prevFlagAttr = 2; + {::_pbi::TcParser::FastV32S1, + {16, 3, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.prevflagattr_)}}, + // .np2_structs.uint8 prevTeamId = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 1, + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.prevteamid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.RoomMemberDataInternal newRoomMemberDataInternal = 1; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.newroommemberdatainternal_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 prevFlagAttr = 2; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.prevflagattr_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // .np2_structs.uint8 prevTeamId = 3; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.prevteamid_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.uint16 newRoomMemberBinAttrInternal = 4; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.newroommemberbinattrinternal_), _Internal::kHasBitsOffset + 0, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomMemberDataInternalUpdateInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomMemberDataInternalUpdateInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.newroommemberbinattrinternal_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.newroommemberdatainternal_ != nullptr); + _impl_.newroommemberdatainternal_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.prevteamid_ != nullptr); + _impl_.prevteamid_->Clear(); + } + } + _impl_.prevflagattr_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomMemberDataInternalUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomMemberDataInternalUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomMemberDataInternalUpdateInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.RoomMemberDataInternal newRoomMemberDataInternal = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.newroommemberdatainternal_, this_._impl_.newroommemberdatainternal_->GetCachedSize(), target, + stream); + } + + // uint32 prevFlagAttr = 2; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_prevflagattr() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_prevflagattr(), target); + } + } + + // .np2_structs.uint8 prevTeamId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.prevteamid_, this_._impl_.prevteamid_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.uint16 newRoomMemberBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_newroommemberbinattrinternal_size()); + i < n; i++) { + const auto& repfield = this_._internal_newroommemberbinattrinternal().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomMemberDataInternalUpdateInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomMemberDataInternalUpdateInfo::ByteSizeLong(const MessageLite& base) { + const RoomMemberDataInternalUpdateInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomMemberDataInternalUpdateInfo::ByteSizeLong() const { + const RoomMemberDataInternalUpdateInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomMemberDataInternalUpdateInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // repeated .np2_structs.uint16 newRoomMemberBinAttrInternal = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_newroommemberbinattrinternal_size(); + for (const auto& msg : this_._internal_newroommemberbinattrinternal()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.RoomMemberDataInternal newRoomMemberDataInternal = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.newroommemberdatainternal_); + } + // .np2_structs.uint8 prevTeamId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.prevteamid_); + } + // uint32 prevFlagAttr = 2; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_prevflagattr() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_prevflagattr()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomMemberDataInternalUpdateInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomMemberDataInternalUpdateInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_newroommemberbinattrinternal()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_newroommemberbinattrinternal()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.newroommemberdatainternal_ != nullptr); + if (_this->_impl_.newroommemberdatainternal_ == nullptr) { + _this->_impl_.newroommemberdatainternal_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.newroommemberdatainternal_); + } else { + _this->_impl_.newroommemberdatainternal_->MergeFrom(*from._impl_.newroommemberdatainternal_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.prevteamid_ != nullptr); + if (_this->_impl_.prevteamid_ == nullptr) { + _this->_impl_.prevteamid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.prevteamid_); + } else { + _this->_impl_.prevteamid_->MergeFrom(*from._impl_.prevteamid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_prevflagattr() != 0) { + _this->_impl_.prevflagattr_ = from._impl_.prevflagattr_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomMemberDataInternalUpdateInfo::CopyFrom(const RoomMemberDataInternalUpdateInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomMemberDataInternalUpdateInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomMemberDataInternalUpdateInfo::InternalSwap(RoomMemberDataInternalUpdateInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.newroommemberbinattrinternal_.InternalSwap(&other->_impl_.newroommemberbinattrinternal_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.prevflagattr_) + + sizeof(RoomMemberDataInternalUpdateInfo::_impl_.prevflagattr_) + - PROTOBUF_FIELD_OFFSET(RoomMemberDataInternalUpdateInfo, _impl_.newroommemberdatainternal_)>( + reinterpret_cast(&_impl_.newroommemberdatainternal_), + reinterpret_cast(&other->_impl_.newroommemberdatainternal_)); +} + +// =================================================================== + +class GetPingInfoResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_._has_bits_); +}; + +GetPingInfoResponse::GetPingInfoResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetPingInfoResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetPingInfoResponse) +} +PROTOBUF_NDEBUG_INLINE GetPingInfoResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetPingInfoResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +GetPingInfoResponse::GetPingInfoResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetPingInfoResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetPingInfoResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetPingInfoResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.serverid_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, roomid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, roomid_), + offsetof(Impl_, rtt_) - + offsetof(Impl_, roomid_) + + sizeof(Impl_::rtt_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetPingInfoResponse) +} +PROTOBUF_NDEBUG_INLINE GetPingInfoResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void GetPingInfoResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, serverid_), + 0, + offsetof(Impl_, rtt_) - + offsetof(Impl_, serverid_) + + sizeof(Impl_::rtt_)); +} +GetPingInfoResponse::~GetPingInfoResponse() { + // @@protoc_insertion_point(destructor:np2_structs.GetPingInfoResponse) + SharedDtor(*this); +} +inline void GetPingInfoResponse::SharedDtor(MessageLite& self) { + GetPingInfoResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.serverid_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetPingInfoResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetPingInfoResponse(arena); +} +constexpr auto GetPingInfoResponse::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(GetPingInfoResponse), + alignof(GetPingInfoResponse)); +} +constexpr auto GetPingInfoResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<32>{ + { + &_GetPingInfoResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetPingInfoResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetPingInfoResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetPingInfoResponse::ByteSizeLong, + &GetPingInfoResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_._cached_size_), + true, + }, + "np2_structs.GetPingInfoResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<32> GetPingInfoResponse_class_data_ = + GetPingInfoResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetPingInfoResponse::GetClassData() const { + return GetPingInfoResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 0, 2> +GetPingInfoResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetPingInfoResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetPingInfoResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 rtt = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.rtt_)}}, + // .np2_structs.uint16 serverId = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.serverid_)}}, + // uint32 worldId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.worldid_)}}, + // uint64 roomId = 3; + {::_pbi::TcParser::FastV64S1, + {24, 1, 0, + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.roomid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.uint16 serverId = 1; + {PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.serverid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 worldId = 2; + {PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.worldid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint64 roomId = 3; + {PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.roomid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 rtt = 4; + {PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.rtt_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetPingInfoResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetPingInfoResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.serverid_ != nullptr); + _impl_.serverid_->Clear(); + } + if (BatchCheckHasBit(cached_has_bits, 0x0000000eU)) { + ::memset(&_impl_.roomid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.rtt_) - + reinterpret_cast(&_impl_.roomid_)) + sizeof(_impl_.rtt_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetPingInfoResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetPingInfoResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetPingInfoResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetPingInfoResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetPingInfoResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.serverid_, this_._impl_.serverid_->GetCachedSize(), target, + stream); + } + + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_worldid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_worldid(), target); + } + } + + // uint64 roomId = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 3, this_._internal_roomid(), target); + } + } + + // uint32 rtt = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_rtt() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_rtt(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetPingInfoResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetPingInfoResponse::ByteSizeLong(const MessageLite& base) { + const GetPingInfoResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetPingInfoResponse::ByteSizeLong() const { + const GetPingInfoResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetPingInfoResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // .np2_structs.uint16 serverId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.serverid_); + } + // uint64 roomId = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + // uint32 worldId = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_worldid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_worldid()); + } + } + // uint32 rtt = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_rtt() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_rtt()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetPingInfoResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetPingInfoResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.serverid_ != nullptr); + if (_this->_impl_.serverid_ == nullptr) { + _this->_impl_.serverid_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.serverid_); + } else { + _this->_impl_.serverid_->MergeFrom(*from._impl_.serverid_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_worldid() != 0) { + _this->_impl_.worldid_ = from._impl_.worldid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_rtt() != 0) { + _this->_impl_.rtt_ = from._impl_.rtt_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetPingInfoResponse::CopyFrom(const GetPingInfoResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetPingInfoResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetPingInfoResponse::InternalSwap(GetPingInfoResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.rtt_) + + sizeof(GetPingInfoResponse::_impl_.rtt_) + - PROTOBUF_FIELD_OFFSET(GetPingInfoResponse, _impl_.serverid_)>( + reinterpret_cast(&_impl_.serverid_), + reinterpret_cast(&other->_impl_.serverid_)); +} + +// =================================================================== + +class SendRoomMessageRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_._has_bits_); +}; + +SendRoomMessageRequest::SendRoomMessageRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SendRoomMessageRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SendRoomMessageRequest) +} +PROTOBUF_NDEBUG_INLINE SendRoomMessageRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SendRoomMessageRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + dst_{visibility, arena, from.dst_}, + msg_(arena, from.msg_) {} + +SendRoomMessageRequest::SendRoomMessageRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SendRoomMessageRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SendRoomMessageRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SendRoomMessageRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.casttype_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.casttype_) + : nullptr; + _impl_.option_ = (CheckHasBit(cached_has_bits, 0x00000008U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.option_) + : nullptr; + _impl_.roomid_ = from._impl_.roomid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.SendRoomMessageRequest) +} +PROTOBUF_NDEBUG_INLINE SendRoomMessageRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + dst_{visibility, arena}, + msg_(arena) {} + +inline void SendRoomMessageRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, casttype_), + 0, + offsetof(Impl_, roomid_) - + offsetof(Impl_, casttype_) + + sizeof(Impl_::roomid_)); +} +SendRoomMessageRequest::~SendRoomMessageRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SendRoomMessageRequest) + SharedDtor(*this); +} +inline void SendRoomMessageRequest::SharedDtor(MessageLite& self) { + SendRoomMessageRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.msg_.Destroy(); + delete this_._impl_.casttype_; + delete this_._impl_.option_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SendRoomMessageRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SendRoomMessageRequest(arena); +} +constexpr auto SendRoomMessageRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.dst_) + + decltype(SendRoomMessageRequest::_impl_.dst_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(SendRoomMessageRequest), alignof(SendRoomMessageRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SendRoomMessageRequest::PlacementNew_, + sizeof(SendRoomMessageRequest), + alignof(SendRoomMessageRequest)); + } +} +constexpr auto SendRoomMessageRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<35>{ + { + &_SendRoomMessageRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SendRoomMessageRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SendRoomMessageRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SendRoomMessageRequest::ByteSizeLong, + &SendRoomMessageRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SendRoomMessageRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<35> SendRoomMessageRequest_class_data_ = + SendRoomMessageRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SendRoomMessageRequest::GetClassData() const { + return SendRoomMessageRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 3, 0, 2> +SendRoomMessageRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SendRoomMessageRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SendRoomMessageRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 roomId = 1; + {::_pbi::TcParser::FastV64S1, + {8, 4, 0, + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.roomid_)}}, + // .np2_structs.uint8 castType = 2; + {::_pbi::TcParser::FastMtS1, + {18, 2, 0, + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.casttype_)}}, + // repeated .np2_structs.uint16 dst = 3; + {::_pbi::TcParser::FastMtR1, + {26, 0, 1, + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.dst_)}}, + // bytes msg = 4; + {::_pbi::TcParser::FastBS1, + {34, 1, 0, + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.msg_)}}, + // .np2_structs.uint8 option = 5; + {::_pbi::TcParser::FastMtS1, + {42, 3, 2, + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.option_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 roomId = 1; + {PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.roomid_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint8 castType = 2; + {PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.casttype_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.uint16 dst = 3; + {PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.dst_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes msg = 4; + {PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.msg_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // .np2_structs.uint8 option = 5; + {PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.option_), _Internal::kHasBitsOffset + 3, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SendRoomMessageRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SendRoomMessageRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.dst_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.msg_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.casttype_ != nullptr); + _impl_.casttype_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(_impl_.option_ != nullptr); + _impl_.option_->Clear(); + } + } + _impl_.roomid_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SendRoomMessageRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SendRoomMessageRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SendRoomMessageRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SendRoomMessageRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SendRoomMessageRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_roomid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this_._internal_roomid(), target); + } + } + + // .np2_structs.uint8 castType = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.casttype_, this_._impl_.casttype_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.uint16 dst = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_dst_size()); + i < n; i++) { + const auto& repfield = this_._internal_dst().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // bytes msg = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_msg().empty()) { + const ::std::string& _s = this_._internal_msg(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + // .np2_structs.uint8 option = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.option_, this_._impl_.option_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SendRoomMessageRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SendRoomMessageRequest::ByteSizeLong(const MessageLite& base) { + const SendRoomMessageRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SendRoomMessageRequest::ByteSizeLong() const { + const SendRoomMessageRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SendRoomMessageRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // repeated .np2_structs.uint16 dst = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_dst_size(); + for (const auto& msg : this_._internal_dst()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // bytes msg = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_msg().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_msg()); + } + } + // .np2_structs.uint8 castType = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.casttype_); + } + // .np2_structs.uint8 option = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.option_); + } + // uint64 roomId = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_roomid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_roomid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SendRoomMessageRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SendRoomMessageRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_dst()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_dst()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_msg().empty()) { + _this->_internal_set_msg(from._internal_msg()); + } else { + if (_this->_impl_.msg_.IsDefault()) { + _this->_internal_set_msg(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.casttype_ != nullptr); + if (_this->_impl_.casttype_ == nullptr) { + _this->_impl_.casttype_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.casttype_); + } else { + _this->_impl_.casttype_->MergeFrom(*from._impl_.casttype_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(from._impl_.option_ != nullptr); + if (_this->_impl_.option_ == nullptr) { + _this->_impl_.option_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.option_); + } else { + _this->_impl_.option_->MergeFrom(*from._impl_.option_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_roomid() != 0) { + _this->_impl_.roomid_ = from._impl_.roomid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SendRoomMessageRequest::CopyFrom(const SendRoomMessageRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SendRoomMessageRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SendRoomMessageRequest::InternalSwap(SendRoomMessageRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.dst_.InternalSwap(&other->_impl_.dst_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.msg_, &other->_impl_.msg_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.roomid_) + + sizeof(SendRoomMessageRequest::_impl_.roomid_) + - PROTOBUF_FIELD_OFFSET(SendRoomMessageRequest, _impl_.casttype_)>( + reinterpret_cast(&_impl_.casttype_), + reinterpret_cast(&other->_impl_.casttype_)); +} + +// =================================================================== + +class RoomMessageInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_._has_bits_); +}; + +RoomMessageInfo::RoomMessageInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMessageInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomMessageInfo) +} +PROTOBUF_NDEBUG_INLINE RoomMessageInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomMessageInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + dst_{visibility, arena, from.dst_}, + msg_(arena, from.msg_) {} + +RoomMessageInfo::RoomMessageInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomMessageInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMessageInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomMessageInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.casttype_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.casttype_) + : nullptr; + _impl_.srcmember_ = (CheckHasBit(cached_has_bits, 0x00000008U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.srcmember_) + : nullptr; + _impl_.filtered_ = from._impl_.filtered_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomMessageInfo) +} +PROTOBUF_NDEBUG_INLINE RoomMessageInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + dst_{visibility, arena}, + msg_(arena) {} + +inline void RoomMessageInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, casttype_), + 0, + offsetof(Impl_, filtered_) - + offsetof(Impl_, casttype_) + + sizeof(Impl_::filtered_)); +} +RoomMessageInfo::~RoomMessageInfo() { + // @@protoc_insertion_point(destructor:np2_structs.RoomMessageInfo) + SharedDtor(*this); +} +inline void RoomMessageInfo::SharedDtor(MessageLite& self) { + RoomMessageInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.msg_.Destroy(); + delete this_._impl_.casttype_; + delete this_._impl_.srcmember_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomMessageInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomMessageInfo(arena); +} +constexpr auto RoomMessageInfo::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.dst_) + + decltype(RoomMessageInfo::_impl_.dst_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(RoomMessageInfo), alignof(RoomMessageInfo), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&RoomMessageInfo::PlacementNew_, + sizeof(RoomMessageInfo), + alignof(RoomMessageInfo)); + } +} +constexpr auto RoomMessageInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<28>{ + { + &_RoomMessageInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomMessageInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomMessageInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomMessageInfo::ByteSizeLong, + &RoomMessageInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_._cached_size_), + true, + }, + "np2_structs.RoomMessageInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> RoomMessageInfo_class_data_ = + RoomMessageInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomMessageInfo::GetClassData() const { + return RoomMessageInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 3, 0, 2> +RoomMessageInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomMessageInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomMessageInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // bool filtered = 1; + {::_pbi::TcParser::FastV8S1, + {8, 4, 0, + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.filtered_)}}, + // .np2_structs.uint8 castType = 2; + {::_pbi::TcParser::FastMtS1, + {18, 2, 0, + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.casttype_)}}, + // repeated .np2_structs.uint16 dst = 3; + {::_pbi::TcParser::FastMtR1, + {26, 0, 1, + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.dst_)}}, + // .np2_structs.UserInfo srcMember = 4; + {::_pbi::TcParser::FastMtS1, + {34, 3, 2, + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.srcmember_)}}, + // bytes msg = 5; + {::_pbi::TcParser::FastBS1, + {42, 1, 0, + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.msg_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // bool filtered = 1; + {PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.filtered_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // .np2_structs.uint8 castType = 2; + {PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.casttype_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.uint16 dst = 3; + {PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.dst_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.UserInfo srcMember = 4; + {PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.srcmember_), _Internal::kHasBitsOffset + 3, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes msg = 5; + {PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.msg_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::UserInfo>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomMessageInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomMessageInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.dst_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.msg_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.casttype_ != nullptr); + _impl_.casttype_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(_impl_.srcmember_ != nullptr); + _impl_.srcmember_->Clear(); + } + } + _impl_.filtered_ = false; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomMessageInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomMessageInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomMessageInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomMessageInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomMessageInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bool filtered = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_filtered() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this_._internal_filtered(), target); + } + } + + // .np2_structs.uint8 castType = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.casttype_, this_._impl_.casttype_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.uint16 dst = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_dst_size()); + i < n; i++) { + const auto& repfield = this_._internal_dst().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // .np2_structs.UserInfo srcMember = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.srcmember_, this_._impl_.srcmember_->GetCachedSize(), target, + stream); + } + + // bytes msg = 5; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_msg().empty()) { + const ::std::string& _s = this_._internal_msg(); + target = stream->WriteBytesMaybeAliased(5, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomMessageInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomMessageInfo::ByteSizeLong(const MessageLite& base) { + const RoomMessageInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomMessageInfo::ByteSizeLong() const { + const RoomMessageInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomMessageInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // repeated .np2_structs.uint16 dst = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_dst_size(); + for (const auto& msg : this_._internal_dst()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // bytes msg = 5; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_msg().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_msg()); + } + } + // .np2_structs.uint8 castType = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.casttype_); + } + // .np2_structs.UserInfo srcMember = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.srcmember_); + } + // bool filtered = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_filtered() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomMessageInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomMessageInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_dst()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_dst()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_msg().empty()) { + _this->_internal_set_msg(from._internal_msg()); + } else { + if (_this->_impl_.msg_.IsDefault()) { + _this->_internal_set_msg(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.casttype_ != nullptr); + if (_this->_impl_.casttype_ == nullptr) { + _this->_impl_.casttype_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.casttype_); + } else { + _this->_impl_.casttype_->MergeFrom(*from._impl_.casttype_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(from._impl_.srcmember_ != nullptr); + if (_this->_impl_.srcmember_ == nullptr) { + _this->_impl_.srcmember_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.srcmember_); + } else { + _this->_impl_.srcmember_->MergeFrom(*from._impl_.srcmember_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_filtered() != 0) { + _this->_impl_.filtered_ = from._impl_.filtered_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomMessageInfo::CopyFrom(const RoomMessageInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomMessageInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomMessageInfo::InternalSwap(RoomMessageInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.dst_.InternalSwap(&other->_impl_.dst_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.msg_, &other->_impl_.msg_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.filtered_) + + sizeof(RoomMessageInfo::_impl_.filtered_) + - PROTOBUF_FIELD_OFFSET(RoomMessageInfo, _impl_.casttype_)>( + reinterpret_cast(&_impl_.casttype_), + reinterpret_cast(&other->_impl_.casttype_)); +} + +// =================================================================== + +class MessageDetails::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_._has_bits_); +}; + +MessageDetails::MessageDetails(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MessageDetails_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MessageDetails) +} +PROTOBUF_NDEBUG_INLINE MessageDetails::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MessageDetails& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + communicationid_(arena, from.communicationid_), + subject_(arena, from.subject_), + body_(arena, from.body_), + data_(arena, from.data_) {} + +MessageDetails::MessageDetails( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MessageDetails& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MessageDetails_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MessageDetails* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.maintype_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.maintype_) + : nullptr; + _impl_.subtype_ = (CheckHasBit(cached_has_bits, 0x00000020U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.subtype_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, msgid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, msgid_), + offsetof(Impl_, msgfeatures_) - + offsetof(Impl_, msgid_) + + sizeof(Impl_::msgfeatures_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.MessageDetails) +} +PROTOBUF_NDEBUG_INLINE MessageDetails::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + communicationid_(arena), + subject_(arena), + body_(arena), + data_(arena) {} + +inline void MessageDetails::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, maintype_), + 0, + offsetof(Impl_, msgfeatures_) - + offsetof(Impl_, maintype_) + + sizeof(Impl_::msgfeatures_)); +} +MessageDetails::~MessageDetails() { + // @@protoc_insertion_point(destructor:np2_structs.MessageDetails) + SharedDtor(*this); +} +inline void MessageDetails::SharedDtor(MessageLite& self) { + MessageDetails& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.communicationid_.Destroy(); + this_._impl_.subject_.Destroy(); + this_._impl_.body_.Destroy(); + this_._impl_.data_.Destroy(); + delete this_._impl_.maintype_; + delete this_._impl_.subtype_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MessageDetails::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MessageDetails(arena); +} +constexpr auto MessageDetails::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(MessageDetails), + alignof(MessageDetails)); +} +constexpr auto MessageDetails::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<27>{ + { + &_MessageDetails_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MessageDetails::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MessageDetails::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MessageDetails::ByteSizeLong, + &MessageDetails::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_._cached_size_), + true, + }, + "np2_structs.MessageDetails", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<27> MessageDetails_class_data_ = + MessageDetails::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MessageDetails::GetClassData() const { + return MessageDetails_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 8, 2, 69, 2> +MessageDetails::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_._has_bits_), + 0, // no _extensions_ + 8, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967040, // skipmap + offsetof(decltype(_table_), field_entries), + 8, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + MessageDetails_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MessageDetails>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes data = 8; + {::_pbi::TcParser::FastBS1, + {66, 3, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.data_)}}, + // string communicationId = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.communicationid_)}}, + // uint64 msgId = 2; + {::_pbi::TcParser::FastV64S1, + {16, 6, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.msgid_)}}, + // .np2_structs.uint16 mainType = 3; + {::_pbi::TcParser::FastMtS1, + {26, 4, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.maintype_)}}, + // .np2_structs.uint16 subType = 4; + {::_pbi::TcParser::FastMtS1, + {34, 5, 1, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.subtype_)}}, + // uint32 msgFeatures = 5; + {::_pbi::TcParser::FastV32S1, + {40, 7, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.msgfeatures_)}}, + // string subject = 6; + {::_pbi::TcParser::FastUS1, + {50, 1, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.subject_)}}, + // string body = 7; + {::_pbi::TcParser::FastUS1, + {58, 2, 0, + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.body_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string communicationId = 1; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.communicationid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 msgId = 2; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.msgid_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint16 mainType = 3; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.maintype_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.uint16 subType = 4; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.subtype_), _Internal::kHasBitsOffset + 5, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 msgFeatures = 5; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.msgfeatures_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // string subject = 6; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.subject_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string body = 7; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.body_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes data = 8; + {PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.data_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint16>()}, + }}, + {{ + "\32\17\0\0\0\0\7\4\0\0\0\0\0\0\0\0" + "np2_structs.MessageDetails" + "communicationId" + "subject" + "body" + }}, +}; +PROTOBUF_NOINLINE void MessageDetails::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MessageDetails) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.communicationid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.subject_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.body_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(_impl_.maintype_ != nullptr); + _impl_.maintype_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + ABSL_DCHECK(_impl_.subtype_ != nullptr); + _impl_.subtype_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x000000c0U)) { + ::memset(&_impl_.msgid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.msgfeatures_) - + reinterpret_cast(&_impl_.msgid_)) + sizeof(_impl_.msgfeatures_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MessageDetails::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MessageDetails& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MessageDetails::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MessageDetails& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MessageDetails) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string communicationId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_communicationid().empty()) { + const ::std::string& _s = this_._internal_communicationid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.MessageDetails.communicationId"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // uint64 msgId = 2; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_msgid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this_._internal_msgid(), target); + } + } + + // .np2_structs.uint16 mainType = 3; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.maintype_, this_._impl_.maintype_->GetCachedSize(), target, + stream); + } + + // .np2_structs.uint16 subType = 4; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.subtype_, this_._impl_.subtype_->GetCachedSize(), target, + stream); + } + + // uint32 msgFeatures = 5; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_msgfeatures() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 5, this_._internal_msgfeatures(), target); + } + } + + // string subject = 6; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_subject().empty()) { + const ::std::string& _s = this_._internal_subject(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.MessageDetails.subject"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + } + + // string body = 7; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_body().empty()) { + const ::std::string& _s = this_._internal_body(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.MessageDetails.body"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + } + + // bytes data = 8; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(8, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MessageDetails) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MessageDetails::ByteSizeLong(const MessageLite& base) { + const MessageDetails& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MessageDetails::ByteSizeLong() const { + const MessageDetails& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MessageDetails) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // string communicationId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_communicationid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_communicationid()); + } + } + // string subject = 6; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_subject().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_subject()); + } + } + // string body = 7; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_body().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_body()); + } + } + // bytes data = 8; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // .np2_structs.uint16 mainType = 3; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.maintype_); + } + // .np2_structs.uint16 subType = 4; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.subtype_); + } + // uint64 msgId = 2; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_msgid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_msgid()); + } + } + // uint32 msgFeatures = 5; + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (this_._internal_msgfeatures() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_msgfeatures()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MessageDetails::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MessageDetails) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_communicationid().empty()) { + _this->_internal_set_communicationid(from._internal_communicationid()); + } else { + if (_this->_impl_.communicationid_.IsDefault()) { + _this->_internal_set_communicationid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_subject().empty()) { + _this->_internal_set_subject(from._internal_subject()); + } else { + if (_this->_impl_.subject_.IsDefault()) { + _this->_internal_set_subject(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_body().empty()) { + _this->_internal_set_body(from._internal_body()); + } else { + if (_this->_impl_.body_.IsDefault()) { + _this->_internal_set_body(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(from._impl_.maintype_ != nullptr); + if (_this->_impl_.maintype_ == nullptr) { + _this->_impl_.maintype_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.maintype_); + } else { + _this->_impl_.maintype_->MergeFrom(*from._impl_.maintype_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + ABSL_DCHECK(from._impl_.subtype_ != nullptr); + if (_this->_impl_.subtype_ == nullptr) { + _this->_impl_.subtype_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.subtype_); + } else { + _this->_impl_.subtype_->MergeFrom(*from._impl_.subtype_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_msgid() != 0) { + _this->_impl_.msgid_ = from._impl_.msgid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (from._internal_msgfeatures() != 0) { + _this->_impl_.msgfeatures_ = from._impl_.msgfeatures_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MessageDetails::CopyFrom(const MessageDetails& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MessageDetails) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MessageDetails::InternalSwap(MessageDetails* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.communicationid_, &other->_impl_.communicationid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.subject_, &other->_impl_.subject_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.body_, &other->_impl_.body_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.msgfeatures_) + + sizeof(MessageDetails::_impl_.msgfeatures_) + - PROTOBUF_FIELD_OFFSET(MessageDetails, _impl_.maintype_)>( + reinterpret_cast(&_impl_.maintype_), + reinterpret_cast(&other->_impl_.maintype_)); +} + +// =================================================================== + +class SendMessageRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_._has_bits_); +}; + +SendMessageRequest::SendMessageRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SendMessageRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SendMessageRequest) +} +PROTOBUF_NDEBUG_INLINE SendMessageRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SendMessageRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npids_{visibility, arena, from.npids_}, + message_(arena, from.message_) {} + +SendMessageRequest::SendMessageRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SendMessageRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SendMessageRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SendMessageRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.SendMessageRequest) +} +PROTOBUF_NDEBUG_INLINE SendMessageRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npids_{visibility, arena}, + message_(arena) {} + +inline void SendMessageRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +SendMessageRequest::~SendMessageRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SendMessageRequest) + SharedDtor(*this); +} +inline void SendMessageRequest::SharedDtor(MessageLite& self) { + SendMessageRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.message_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SendMessageRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SendMessageRequest(arena); +} +constexpr auto SendMessageRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_.npids_) + + decltype(SendMessageRequest::_impl_.npids_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(SendMessageRequest), alignof(SendMessageRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SendMessageRequest::PlacementNew_, + sizeof(SendMessageRequest), + alignof(SendMessageRequest)); + } +} +constexpr auto SendMessageRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_SendMessageRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SendMessageRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SendMessageRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SendMessageRequest::ByteSizeLong, + &SendMessageRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SendMessageRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> SendMessageRequest_class_data_ = + SendMessageRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SendMessageRequest::GetClassData() const { + return SendMessageRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 44, 2> +SendMessageRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + SendMessageRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SendMessageRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated string npids = 2; + {::_pbi::TcParser::FastUR1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_.npids_)}}, + // bytes message = 1; + {::_pbi::TcParser::FastBS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_.message_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes message = 1; + {PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_.message_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated string npids = 2; + {PROTOBUF_FIELD_OFFSET(SendMessageRequest, _impl_.npids_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + }}, + // no aux_entries + {{ + "\36\0\5\0\0\0\0\0" + "np2_structs.SendMessageRequest" + "npids" + }}, +}; +PROTOBUF_NOINLINE void SendMessageRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SendMessageRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.npids_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.message_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SendMessageRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SendMessageRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SendMessageRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SendMessageRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SendMessageRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes message = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_message().empty()) { + const ::std::string& _s = this_._internal_message(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + // repeated string npids = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (int i = 0, n = this_._internal_npids_size(); i < n; ++i) { + const auto& s = this_._internal_npids().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.SendMessageRequest.npids"); + target = stream->WriteString(2, s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SendMessageRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SendMessageRequest::ByteSizeLong(const MessageLite& base) { + const SendMessageRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SendMessageRequest::ByteSizeLong() const { + const SendMessageRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SendMessageRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated string npids = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_npids().size()); + for (int i = 0, n = this_._internal_npids().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npids().Get(i)); + } + } + // bytes message = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_message().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_message()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SendMessageRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SendMessageRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_npids()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_npids()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_message().empty()) { + _this->_internal_set_message(from._internal_message()); + } else { + if (_this->_impl_.message_.IsDefault()) { + _this->_internal_set_message(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SendMessageRequest::CopyFrom(const SendMessageRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SendMessageRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SendMessageRequest::InternalSwap(SendMessageRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.npids_.InternalSwap(&other->_impl_.npids_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, &other->_impl_.message_, arena); +} + +// =================================================================== + +class BoardInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_._has_bits_); +}; + +BoardInfo::BoardInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BoardInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.BoardInfo) +} +BoardInfo::BoardInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BoardInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, BoardInfo_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE BoardInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void BoardInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, ranklimit_), + 0, + offsetof(Impl_, uploadsizelimit_) - + offsetof(Impl_, ranklimit_) + + sizeof(Impl_::uploadsizelimit_)); +} +BoardInfo::~BoardInfo() { + // @@protoc_insertion_point(destructor:np2_structs.BoardInfo) + SharedDtor(*this); +} +inline void BoardInfo::SharedDtor(MessageLite& self) { + BoardInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL BoardInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) BoardInfo(arena); +} +constexpr auto BoardInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(BoardInfo), + alignof(BoardInfo)); +} +constexpr auto BoardInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<22>{ + { + &_BoardInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &BoardInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &BoardInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &BoardInfo::ByteSizeLong, + &BoardInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_._cached_size_), + true, + }, + "np2_structs.BoardInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<22> BoardInfo_class_data_ = + BoardInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +BoardInfo::GetClassData() const { + return BoardInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 0, 2> +BoardInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + BoardInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::BoardInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 rankLimit = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.ranklimit_)}}, + // uint32 updateMode = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.updatemode_)}}, + // uint32 sortMode = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.sortmode_)}}, + // uint32 uploadNumLimit = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.uploadnumlimit_)}}, + // uint32 uploadSizeLimit = 5; + {::_pbi::TcParser::FastV32S1, + {40, 4, 0, + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.uploadsizelimit_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 rankLimit = 1; + {PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.ranklimit_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 updateMode = 2; + {PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.updatemode_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 sortMode = 3; + {PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.sortmode_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 uploadNumLimit = 4; + {PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.uploadnumlimit_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 uploadSizeLimit = 5; + {PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.uploadsizelimit_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void BoardInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.BoardInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + ::memset(&_impl_.ranklimit_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.uploadsizelimit_) - + reinterpret_cast(&_impl_.ranklimit_)) + sizeof(_impl_.uploadsizelimit_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL BoardInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const BoardInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL BoardInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const BoardInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.BoardInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 rankLimit = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_ranklimit() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_ranklimit(), target); + } + } + + // uint32 updateMode = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_updatemode() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_updatemode(), target); + } + } + + // uint32 sortMode = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_sortmode() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_sortmode(), target); + } + } + + // uint32 uploadNumLimit = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_uploadnumlimit() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_uploadnumlimit(), target); + } + } + + // uint32 uploadSizeLimit = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_uploadsizelimit() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 5, this_._internal_uploadsizelimit(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.BoardInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t BoardInfo::ByteSizeLong(const MessageLite& base) { + const BoardInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t BoardInfo::ByteSizeLong() const { + const BoardInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.BoardInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // uint32 rankLimit = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_ranklimit() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_ranklimit()); + } + } + // uint32 updateMode = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_updatemode() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_updatemode()); + } + } + // uint32 sortMode = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_sortmode() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_sortmode()); + } + } + // uint32 uploadNumLimit = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_uploadnumlimit() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_uploadnumlimit()); + } + } + // uint32 uploadSizeLimit = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_uploadsizelimit() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_uploadsizelimit()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void BoardInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.BoardInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_ranklimit() != 0) { + _this->_impl_.ranklimit_ = from._impl_.ranklimit_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_updatemode() != 0) { + _this->_impl_.updatemode_ = from._impl_.updatemode_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_sortmode() != 0) { + _this->_impl_.sortmode_ = from._impl_.sortmode_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_uploadnumlimit() != 0) { + _this->_impl_.uploadnumlimit_ = from._impl_.uploadnumlimit_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_uploadsizelimit() != 0) { + _this->_impl_.uploadsizelimit_ = from._impl_.uploadsizelimit_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void BoardInfo::CopyFrom(const BoardInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.BoardInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void BoardInfo::InternalSwap(BoardInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.uploadsizelimit_) + + sizeof(BoardInfo::_impl_.uploadsizelimit_) + - PROTOBUF_FIELD_OFFSET(BoardInfo, _impl_.ranklimit_)>( + reinterpret_cast(&_impl_.ranklimit_), + reinterpret_cast(&other->_impl_.ranklimit_)); +} + +// =================================================================== + +class RecordScoreRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_._has_bits_); +}; + +RecordScoreRequest::RecordScoreRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RecordScoreRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RecordScoreRequest) +} +PROTOBUF_NDEBUG_INLINE RecordScoreRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RecordScoreRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + comment_(arena, from.comment_), + data_(arena, from.data_) {} + +RecordScoreRequest::RecordScoreRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RecordScoreRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RecordScoreRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RecordScoreRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, boardid_), + offsetof(Impl_, score_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::score_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.RecordScoreRequest) +} +PROTOBUF_NDEBUG_INLINE RecordScoreRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + comment_(arena), + data_(arena) {} + +inline void RecordScoreRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + 0, + offsetof(Impl_, score_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::score_)); +} +RecordScoreRequest::~RecordScoreRequest() { + // @@protoc_insertion_point(destructor:np2_structs.RecordScoreRequest) + SharedDtor(*this); +} +inline void RecordScoreRequest::SharedDtor(MessageLite& self) { + RecordScoreRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.comment_.Destroy(); + this_._impl_.data_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RecordScoreRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RecordScoreRequest(arena); +} +constexpr auto RecordScoreRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(RecordScoreRequest), + alignof(RecordScoreRequest)); +} +constexpr auto RecordScoreRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_RecordScoreRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RecordScoreRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RecordScoreRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RecordScoreRequest::ByteSizeLong, + &RecordScoreRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_._cached_size_), + true, + }, + "np2_structs.RecordScoreRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> RecordScoreRequest_class_data_ = + RecordScoreRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RecordScoreRequest::GetClassData() const { + return RecordScoreRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 46, 2> +RecordScoreRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + RecordScoreRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RecordScoreRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 boardId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.boardid_)}}, + // int32 pcId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 3, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.pcid_)}}, + // int64 score = 3; + {::_pbi::TcParser::FastV64S1, + {24, 4, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.score_)}}, + // string comment = 4; + {::_pbi::TcParser::FastUS1, + {34, 0, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.comment_)}}, + // bytes data = 5; + {::_pbi::TcParser::FastBS1, + {42, 1, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.data_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 boardId = 1; + {PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.boardid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // int32 pcId = 2; + {PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.pcid_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // int64 score = 3; + {PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.score_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // string comment = 4; + {PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.comment_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes data = 5; + {PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.data_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\36\0\0\0\7\0\0\0" + "np2_structs.RecordScoreRequest" + "comment" + }}, +}; +PROTOBUF_NOINLINE void RecordScoreRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RecordScoreRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.comment_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000001cU)) { + ::memset(&_impl_.boardid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.score_) - + reinterpret_cast(&_impl_.boardid_)) + sizeof(_impl_.score_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RecordScoreRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RecordScoreRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RecordScoreRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RecordScoreRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RecordScoreRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_boardid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_boardid(), target); + } + } + + // int32 pcId = 2; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_pcid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_pcid(), target); + } + } + + // int64 score = 3; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_score() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>( + stream, this_._internal_score(), target); + } + } + + // string comment = 4; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_comment().empty()) { + const ::std::string& _s = this_._internal_comment(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.RecordScoreRequest.comment"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + } + + // bytes data = 5; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(5, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RecordScoreRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RecordScoreRequest::ByteSizeLong(const MessageLite& base) { + const RecordScoreRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RecordScoreRequest::ByteSizeLong() const { + const RecordScoreRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RecordScoreRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // string comment = 4; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_comment().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_comment()); + } + } + // bytes data = 5; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_boardid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_boardid()); + } + } + // int32 pcId = 2; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_pcid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_pcid()); + } + } + // int64 score = 3; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_score() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_score()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RecordScoreRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RecordScoreRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_comment().empty()) { + _this->_internal_set_comment(from._internal_comment()); + } else { + if (_this->_impl_.comment_.IsDefault()) { + _this->_internal_set_comment(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_boardid() != 0) { + _this->_impl_.boardid_ = from._impl_.boardid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_pcid() != 0) { + _this->_impl_.pcid_ = from._impl_.pcid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_score() != 0) { + _this->_impl_.score_ = from._impl_.score_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RecordScoreRequest::CopyFrom(const RecordScoreRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RecordScoreRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RecordScoreRequest::InternalSwap(RecordScoreRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.comment_, &other->_impl_.comment_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.score_) + + sizeof(RecordScoreRequest::_impl_.score_) + - PROTOBUF_FIELD_OFFSET(RecordScoreRequest, _impl_.boardid_)>( + reinterpret_cast(&_impl_.boardid_), + reinterpret_cast(&other->_impl_.boardid_)); +} + +// =================================================================== + +class GetScoreRangeRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_._has_bits_); +}; + +GetScoreRangeRequest::GetScoreRangeRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreRangeRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetScoreRangeRequest) +} +GetScoreRangeRequest::GetScoreRangeRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreRangeRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreRangeRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE GetScoreRangeRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void GetScoreRangeRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + 0, + offsetof(Impl_, withgameinfo_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::withgameinfo_)); +} +GetScoreRangeRequest::~GetScoreRangeRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetScoreRangeRequest) + SharedDtor(*this); +} +inline void GetScoreRangeRequest::SharedDtor(MessageLite& self) { + GetScoreRangeRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetScoreRangeRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetScoreRangeRequest(arena); +} +constexpr auto GetScoreRangeRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(GetScoreRangeRequest), + alignof(GetScoreRangeRequest)); +} +constexpr auto GetScoreRangeRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<33>{ + { + &_GetScoreRangeRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetScoreRangeRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetScoreRangeRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetScoreRangeRequest::ByteSizeLong, + &GetScoreRangeRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetScoreRangeRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<33> GetScoreRangeRequest_class_data_ = + GetScoreRangeRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetScoreRangeRequest::GetClassData() const { + return GetScoreRangeRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 0, 2> +GetScoreRangeRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + GetScoreRangeRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetScoreRangeRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 boardId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.boardid_)}}, + // uint32 startRank = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.startrank_)}}, + // uint32 numRanks = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.numranks_)}}, + // bool withComment = 4; + {::_pbi::TcParser::FastV8S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.withcomment_)}}, + // bool withGameInfo = 5; + {::_pbi::TcParser::FastV8S1, + {40, 4, 0, + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.withgameinfo_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 boardId = 1; + {PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.boardid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 startRank = 2; + {PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.startrank_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 numRanks = 3; + {PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.numranks_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // bool withComment = 4; + {PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.withcomment_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // bool withGameInfo = 5; + {PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.withgameinfo_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void GetScoreRangeRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetScoreRangeRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + ::memset(&_impl_.boardid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.withgameinfo_) - + reinterpret_cast(&_impl_.boardid_)) + sizeof(_impl_.withgameinfo_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetScoreRangeRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetScoreRangeRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetScoreRangeRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetScoreRangeRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetScoreRangeRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_boardid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_boardid(), target); + } + } + + // uint32 startRank = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_startrank() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_startrank(), target); + } + } + + // uint32 numRanks = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_numranks() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_numranks(), target); + } + } + + // bool withComment = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_withcomment() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this_._internal_withcomment(), target); + } + } + + // bool withGameInfo = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_withgameinfo() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this_._internal_withgameinfo(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetScoreRangeRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetScoreRangeRequest::ByteSizeLong(const MessageLite& base) { + const GetScoreRangeRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetScoreRangeRequest::ByteSizeLong() const { + const GetScoreRangeRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetScoreRangeRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_boardid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_boardid()); + } + } + // uint32 startRank = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_startrank() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_startrank()); + } + } + // uint32 numRanks = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_numranks() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_numranks()); + } + } + // bool withComment = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_withcomment() != 0) { + total_size += 2; + } + } + // bool withGameInfo = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_withgameinfo() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetScoreRangeRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetScoreRangeRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_boardid() != 0) { + _this->_impl_.boardid_ = from._impl_.boardid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_startrank() != 0) { + _this->_impl_.startrank_ = from._impl_.startrank_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_numranks() != 0) { + _this->_impl_.numranks_ = from._impl_.numranks_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_withcomment() != 0) { + _this->_impl_.withcomment_ = from._impl_.withcomment_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_withgameinfo() != 0) { + _this->_impl_.withgameinfo_ = from._impl_.withgameinfo_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetScoreRangeRequest::CopyFrom(const GetScoreRangeRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetScoreRangeRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetScoreRangeRequest::InternalSwap(GetScoreRangeRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.withgameinfo_) + + sizeof(GetScoreRangeRequest::_impl_.withgameinfo_) + - PROTOBUF_FIELD_OFFSET(GetScoreRangeRequest, _impl_.boardid_)>( + reinterpret_cast(&_impl_.boardid_), + reinterpret_cast(&other->_impl_.boardid_)); +} + +// =================================================================== + +class ScoreNpIdPcId::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_._has_bits_); +}; + +ScoreNpIdPcId::ScoreNpIdPcId(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, ScoreNpIdPcId_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.ScoreNpIdPcId) +} +PROTOBUF_NDEBUG_INLINE ScoreNpIdPcId::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::ScoreNpIdPcId& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npid_(arena, from.npid_) {} + +ScoreNpIdPcId::ScoreNpIdPcId( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ScoreNpIdPcId& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, ScoreNpIdPcId_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ScoreNpIdPcId* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.pcid_ = from._impl_.pcid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.ScoreNpIdPcId) +} +PROTOBUF_NDEBUG_INLINE ScoreNpIdPcId::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npid_(arena) {} + +inline void ScoreNpIdPcId::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.pcid_ = {}; +} +ScoreNpIdPcId::~ScoreNpIdPcId() { + // @@protoc_insertion_point(destructor:np2_structs.ScoreNpIdPcId) + SharedDtor(*this); +} +inline void ScoreNpIdPcId::SharedDtor(MessageLite& self) { + ScoreNpIdPcId& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.npid_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ScoreNpIdPcId::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ScoreNpIdPcId(arena); +} +constexpr auto ScoreNpIdPcId::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ScoreNpIdPcId), + alignof(ScoreNpIdPcId)); +} +constexpr auto ScoreNpIdPcId::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<26>{ + { + &_ScoreNpIdPcId_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ScoreNpIdPcId::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ScoreNpIdPcId::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &ScoreNpIdPcId::ByteSizeLong, + &ScoreNpIdPcId::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_._cached_size_), + true, + }, + "np2_structs.ScoreNpIdPcId", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<26> ScoreNpIdPcId_class_data_ = + ScoreNpIdPcId::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ScoreNpIdPcId::GetClassData() const { + return ScoreNpIdPcId_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 38, 2> +ScoreNpIdPcId::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ScoreNpIdPcId_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::ScoreNpIdPcId>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // int32 pcId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_.pcid_)}}, + // string npid = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_.npid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string npid = 1; + {PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_.npid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int32 pcId = 2; + {PROTOBUF_FIELD_OFFSET(ScoreNpIdPcId, _impl_.pcid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + }}, + // no aux_entries + {{ + "\31\4\0\0\0\0\0\0" + "np2_structs.ScoreNpIdPcId" + "npid" + }}, +}; +PROTOBUF_NOINLINE void ScoreNpIdPcId::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.ScoreNpIdPcId) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.npid_.ClearNonDefaultToEmpty(); + } + _impl_.pcid_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ScoreNpIdPcId::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ScoreNpIdPcId& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ScoreNpIdPcId::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ScoreNpIdPcId& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.ScoreNpIdPcId) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string npid = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + const ::std::string& _s = this_._internal_npid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.ScoreNpIdPcId.npid"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // int32 pcId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_pcid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_pcid(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.ScoreNpIdPcId) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ScoreNpIdPcId::ByteSizeLong(const MessageLite& base) { + const ScoreNpIdPcId& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ScoreNpIdPcId::ByteSizeLong() const { + const ScoreNpIdPcId& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.ScoreNpIdPcId) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // string npid = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npid()); + } + } + // int32 pcId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_pcid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_pcid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void ScoreNpIdPcId::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.ScoreNpIdPcId) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_npid().empty()) { + _this->_internal_set_npid(from._internal_npid()); + } else { + if (_this->_impl_.npid_.IsDefault()) { + _this->_internal_set_npid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_pcid() != 0) { + _this->_impl_.pcid_ = from._impl_.pcid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void ScoreNpIdPcId::CopyFrom(const ScoreNpIdPcId& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.ScoreNpIdPcId) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ScoreNpIdPcId::InternalSwap(ScoreNpIdPcId* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.npid_, &other->_impl_.npid_, arena); + swap(_impl_.pcid_, other->_impl_.pcid_); +} + +// =================================================================== + +class GetScoreNpIdRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_._has_bits_); +}; + +GetScoreNpIdRequest::GetScoreNpIdRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreNpIdRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetScoreNpIdRequest) +} +PROTOBUF_NDEBUG_INLINE GetScoreNpIdRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetScoreNpIdRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npids_{visibility, arena, from.npids_} {} + +GetScoreNpIdRequest::GetScoreNpIdRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetScoreNpIdRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreNpIdRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetScoreNpIdRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, boardid_), + offsetof(Impl_, withgameinfo_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::withgameinfo_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetScoreNpIdRequest) +} +PROTOBUF_NDEBUG_INLINE GetScoreNpIdRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npids_{visibility, arena} {} + +inline void GetScoreNpIdRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + 0, + offsetof(Impl_, withgameinfo_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::withgameinfo_)); +} +GetScoreNpIdRequest::~GetScoreNpIdRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetScoreNpIdRequest) + SharedDtor(*this); +} +inline void GetScoreNpIdRequest::SharedDtor(MessageLite& self) { + GetScoreNpIdRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetScoreNpIdRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetScoreNpIdRequest(arena); +} +constexpr auto GetScoreNpIdRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.npids_) + + decltype(GetScoreNpIdRequest::_impl_.npids_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetScoreNpIdRequest), alignof(GetScoreNpIdRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetScoreNpIdRequest::PlacementNew_, + sizeof(GetScoreNpIdRequest), + alignof(GetScoreNpIdRequest)); + } +} +constexpr auto GetScoreNpIdRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<32>{ + { + &_GetScoreNpIdRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetScoreNpIdRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetScoreNpIdRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetScoreNpIdRequest::ByteSizeLong, + &GetScoreNpIdRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetScoreNpIdRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<32> GetScoreNpIdRequest_class_data_ = + GetScoreNpIdRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetScoreNpIdRequest::GetClassData() const { + return GetScoreNpIdRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 0, 2> +GetScoreNpIdRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetScoreNpIdRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetScoreNpIdRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bool withGameInfo = 4; + {::_pbi::TcParser::FastV8S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.withgameinfo_)}}, + // uint32 boardId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.boardid_)}}, + // repeated .np2_structs.ScoreNpIdPcId npids = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.npids_)}}, + // bool withComment = 3; + {::_pbi::TcParser::FastV8S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.withcomment_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 boardId = 1; + {PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.boardid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.ScoreNpIdPcId npids = 2; + {PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.npids_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool withComment = 3; + {PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.withcomment_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // bool withGameInfo = 4; + {PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.withgameinfo_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::ScoreNpIdPcId>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetScoreNpIdRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetScoreNpIdRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.npids_.Clear(); + } + if (BatchCheckHasBit(cached_has_bits, 0x0000000eU)) { + ::memset(&_impl_.boardid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.withgameinfo_) - + reinterpret_cast(&_impl_.boardid_)) + sizeof(_impl_.withgameinfo_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetScoreNpIdRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetScoreNpIdRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetScoreNpIdRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetScoreNpIdRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetScoreNpIdRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_boardid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_boardid(), target); + } + } + + // repeated .np2_structs.ScoreNpIdPcId npids = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_npids_size()); + i < n; i++) { + const auto& repfield = this_._internal_npids().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // bool withComment = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_withcomment() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_withcomment(), target); + } + } + + // bool withGameInfo = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_withgameinfo() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this_._internal_withgameinfo(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetScoreNpIdRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetScoreNpIdRequest::ByteSizeLong(const MessageLite& base) { + const GetScoreNpIdRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetScoreNpIdRequest::ByteSizeLong() const { + const GetScoreNpIdRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetScoreNpIdRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // repeated .np2_structs.ScoreNpIdPcId npids = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_npids_size(); + for (const auto& msg : this_._internal_npids()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_boardid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_boardid()); + } + } + // bool withComment = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_withcomment() != 0) { + total_size += 2; + } + } + // bool withGameInfo = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_withgameinfo() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetScoreNpIdRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetScoreNpIdRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_npids()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_npids()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_boardid() != 0) { + _this->_impl_.boardid_ = from._impl_.boardid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_withcomment() != 0) { + _this->_impl_.withcomment_ = from._impl_.withcomment_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_withgameinfo() != 0) { + _this->_impl_.withgameinfo_ = from._impl_.withgameinfo_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetScoreNpIdRequest::CopyFrom(const GetScoreNpIdRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetScoreNpIdRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetScoreNpIdRequest::InternalSwap(GetScoreNpIdRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.npids_.InternalSwap(&other->_impl_.npids_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.withgameinfo_) + + sizeof(GetScoreNpIdRequest::_impl_.withgameinfo_) + - PROTOBUF_FIELD_OFFSET(GetScoreNpIdRequest, _impl_.boardid_)>( + reinterpret_cast(&_impl_.boardid_), + reinterpret_cast(&other->_impl_.boardid_)); +} + +// =================================================================== + +class GetScoreFriendsRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_._has_bits_); +}; + +GetScoreFriendsRequest::GetScoreFriendsRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreFriendsRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetScoreFriendsRequest) +} +GetScoreFriendsRequest::GetScoreFriendsRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreFriendsRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreFriendsRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE GetScoreFriendsRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void GetScoreFriendsRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + 0, + offsetof(Impl_, withgameinfo_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::withgameinfo_)); +} +GetScoreFriendsRequest::~GetScoreFriendsRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetScoreFriendsRequest) + SharedDtor(*this); +} +inline void GetScoreFriendsRequest::SharedDtor(MessageLite& self) { + GetScoreFriendsRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetScoreFriendsRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetScoreFriendsRequest(arena); +} +constexpr auto GetScoreFriendsRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(GetScoreFriendsRequest), + alignof(GetScoreFriendsRequest)); +} +constexpr auto GetScoreFriendsRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<35>{ + { + &_GetScoreFriendsRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetScoreFriendsRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetScoreFriendsRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetScoreFriendsRequest::ByteSizeLong, + &GetScoreFriendsRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetScoreFriendsRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<35> GetScoreFriendsRequest_class_data_ = + GetScoreFriendsRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetScoreFriendsRequest::GetClassData() const { + return GetScoreFriendsRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 0, 2> +GetScoreFriendsRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + GetScoreFriendsRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetScoreFriendsRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 boardId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.boardid_)}}, + // bool include_self = 2; + {::_pbi::TcParser::FastV8S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.include_self_)}}, + // uint32 max = 3; + {::_pbi::TcParser::FastV32S1, + {24, 1, 0, + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.max_)}}, + // bool withComment = 4; + {::_pbi::TcParser::FastV8S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.withcomment_)}}, + // bool withGameInfo = 5; + {::_pbi::TcParser::FastV8S1, + {40, 4, 0, + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.withgameinfo_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 boardId = 1; + {PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.boardid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // bool include_self = 2; + {PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.include_self_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // uint32 max = 3; + {PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.max_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // bool withComment = 4; + {PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.withcomment_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // bool withGameInfo = 5; + {PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.withgameinfo_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void GetScoreFriendsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetScoreFriendsRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + ::memset(&_impl_.boardid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.withgameinfo_) - + reinterpret_cast(&_impl_.boardid_)) + sizeof(_impl_.withgameinfo_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetScoreFriendsRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetScoreFriendsRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetScoreFriendsRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetScoreFriendsRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetScoreFriendsRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_boardid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_boardid(), target); + } + } + + // bool include_self = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_include_self() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_include_self(), target); + } + } + + // uint32 max = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_max() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_max(), target); + } + } + + // bool withComment = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_withcomment() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this_._internal_withcomment(), target); + } + } + + // bool withGameInfo = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_withgameinfo() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this_._internal_withgameinfo(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetScoreFriendsRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetScoreFriendsRequest::ByteSizeLong(const MessageLite& base) { + const GetScoreFriendsRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetScoreFriendsRequest::ByteSizeLong() const { + const GetScoreFriendsRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetScoreFriendsRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_boardid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_boardid()); + } + } + // uint32 max = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_max() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_max()); + } + } + // bool include_self = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_include_self() != 0) { + total_size += 2; + } + } + // bool withComment = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_withcomment() != 0) { + total_size += 2; + } + } + // bool withGameInfo = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_withgameinfo() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetScoreFriendsRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetScoreFriendsRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_boardid() != 0) { + _this->_impl_.boardid_ = from._impl_.boardid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_max() != 0) { + _this->_impl_.max_ = from._impl_.max_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_include_self() != 0) { + _this->_impl_.include_self_ = from._impl_.include_self_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_withcomment() != 0) { + _this->_impl_.withcomment_ = from._impl_.withcomment_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_withgameinfo() != 0) { + _this->_impl_.withgameinfo_ = from._impl_.withgameinfo_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetScoreFriendsRequest::CopyFrom(const GetScoreFriendsRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetScoreFriendsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetScoreFriendsRequest::InternalSwap(GetScoreFriendsRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.withgameinfo_) + + sizeof(GetScoreFriendsRequest::_impl_.withgameinfo_) + - PROTOBUF_FIELD_OFFSET(GetScoreFriendsRequest, _impl_.boardid_)>( + reinterpret_cast(&_impl_.boardid_), + reinterpret_cast(&other->_impl_.boardid_)); +} + +// =================================================================== + +class ScoreRankData::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_._has_bits_); +}; + +ScoreRankData::ScoreRankData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, ScoreRankData_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.ScoreRankData) +} +PROTOBUF_NDEBUG_INLINE ScoreRankData::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::ScoreRankData& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npid_(arena, from.npid_), + onlinename_(arena, from.onlinename_) {} + +ScoreRankData::ScoreRankData( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ScoreRankData& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, ScoreRankData_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ScoreRankData* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, pcid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, pcid_), + offsetof(Impl_, hasgamedata_) - + offsetof(Impl_, pcid_) + + sizeof(Impl_::hasgamedata_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.ScoreRankData) +} +PROTOBUF_NDEBUG_INLINE ScoreRankData::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npid_(arena), + onlinename_(arena) {} + +inline void ScoreRankData::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, pcid_), + 0, + offsetof(Impl_, hasgamedata_) - + offsetof(Impl_, pcid_) + + sizeof(Impl_::hasgamedata_)); +} +ScoreRankData::~ScoreRankData() { + // @@protoc_insertion_point(destructor:np2_structs.ScoreRankData) + SharedDtor(*this); +} +inline void ScoreRankData::SharedDtor(MessageLite& self) { + ScoreRankData& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.npid_.Destroy(); + this_._impl_.onlinename_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ScoreRankData::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ScoreRankData(arena); +} +constexpr auto ScoreRankData::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ScoreRankData), + alignof(ScoreRankData)); +} +constexpr auto ScoreRankData::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<26>{ + { + &_ScoreRankData_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ScoreRankData::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ScoreRankData::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &ScoreRankData::ByteSizeLong, + &ScoreRankData::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_._cached_size_), + true, + }, + "np2_structs.ScoreRankData", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<26> ScoreRankData_class_data_ = + ScoreRankData::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ScoreRankData::GetClassData() const { + return ScoreRankData_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 0, 48, 2> +ScoreRankData::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ScoreRankData_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::ScoreRankData>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string npId = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.npid_)}}, + // string onlineName = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.onlinename_)}}, + // int32 pcId = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.pcid_)}}, + // uint32 rank = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.rank_)}}, + // int64 score = 5; + {::_pbi::TcParser::FastV64S1, + {40, 4, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.score_)}}, + // bool hasGameData = 6; + {::_pbi::TcParser::FastV8S1, + {48, 6, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.hasgamedata_)}}, + // uint64 recordDate = 7; + {::_pbi::TcParser::FastV64S1, + {56, 5, 0, + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.recorddate_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string npId = 1; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.npid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string onlineName = 2; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.onlinename_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int32 pcId = 3; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.pcid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // uint32 rank = 4; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.rank_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // int64 score = 5; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.score_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // bool hasGameData = 6; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.hasgamedata_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // uint64 recordDate = 7; + {PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.recorddate_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + "\31\4\12\0\0\0\0\0" + "np2_structs.ScoreRankData" + "npId" + "onlineName" + }}, +}; +PROTOBUF_NOINLINE void ScoreRankData::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.ScoreRankData) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.npid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.onlinename_.ClearNonDefaultToEmpty(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000007cU)) { + ::memset(&_impl_.pcid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.hasgamedata_) - + reinterpret_cast(&_impl_.pcid_)) + sizeof(_impl_.hasgamedata_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ScoreRankData::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ScoreRankData& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ScoreRankData::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ScoreRankData& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.ScoreRankData) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string npId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + const ::std::string& _s = this_._internal_npid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.ScoreRankData.npId"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // string onlineName = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_onlinename().empty()) { + const ::std::string& _s = this_._internal_onlinename(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.ScoreRankData.onlineName"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // int32 pcId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_pcid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>( + stream, this_._internal_pcid(), target); + } + } + + // uint32 rank = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_rank() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_rank(), target); + } + } + + // int64 score = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_score() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<5>( + stream, this_._internal_score(), target); + } + } + + // bool hasGameData = 6; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_hasgamedata() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 6, this_._internal_hasgamedata(), target); + } + } + + // uint64 recordDate = 7; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_recorddate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 7, this_._internal_recorddate(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.ScoreRankData) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ScoreRankData::ByteSizeLong(const MessageLite& base) { + const ScoreRankData& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ScoreRankData::ByteSizeLong() const { + const ScoreRankData& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.ScoreRankData) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + // string npId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npid()); + } + } + // string onlineName = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_onlinename().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_onlinename()); + } + } + // int32 pcId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_pcid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_pcid()); + } + } + // uint32 rank = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_rank() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_rank()); + } + } + // int64 score = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_score() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_score()); + } + } + // uint64 recordDate = 7; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_recorddate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_recorddate()); + } + } + // bool hasGameData = 6; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_hasgamedata() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void ScoreRankData::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.ScoreRankData) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_npid().empty()) { + _this->_internal_set_npid(from._internal_npid()); + } else { + if (_this->_impl_.npid_.IsDefault()) { + _this->_internal_set_npid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_onlinename().empty()) { + _this->_internal_set_onlinename(from._internal_onlinename()); + } else { + if (_this->_impl_.onlinename_.IsDefault()) { + _this->_internal_set_onlinename(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_pcid() != 0) { + _this->_impl_.pcid_ = from._impl_.pcid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_rank() != 0) { + _this->_impl_.rank_ = from._impl_.rank_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_score() != 0) { + _this->_impl_.score_ = from._impl_.score_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_recorddate() != 0) { + _this->_impl_.recorddate_ = from._impl_.recorddate_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_hasgamedata() != 0) { + _this->_impl_.hasgamedata_ = from._impl_.hasgamedata_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void ScoreRankData::CopyFrom(const ScoreRankData& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.ScoreRankData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ScoreRankData::InternalSwap(ScoreRankData* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.npid_, &other->_impl_.npid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.onlinename_, &other->_impl_.onlinename_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.hasgamedata_) + + sizeof(ScoreRankData::_impl_.hasgamedata_) + - PROTOBUF_FIELD_OFFSET(ScoreRankData, _impl_.pcid_)>( + reinterpret_cast(&_impl_.pcid_), + reinterpret_cast(&other->_impl_.pcid_)); +} + +// =================================================================== + +class ScoreInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ScoreInfo, _impl_._has_bits_); +}; + +ScoreInfo::ScoreInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, ScoreInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.ScoreInfo) +} +PROTOBUF_NDEBUG_INLINE ScoreInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::ScoreInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + data_(arena, from.data_) {} + +ScoreInfo::ScoreInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ScoreInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, ScoreInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ScoreInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.ScoreInfo) +} +PROTOBUF_NDEBUG_INLINE ScoreInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + data_(arena) {} + +inline void ScoreInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +ScoreInfo::~ScoreInfo() { + // @@protoc_insertion_point(destructor:np2_structs.ScoreInfo) + SharedDtor(*this); +} +inline void ScoreInfo::SharedDtor(MessageLite& self) { + ScoreInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.data_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ScoreInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ScoreInfo(arena); +} +constexpr auto ScoreInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ScoreInfo), + alignof(ScoreInfo)); +} +constexpr auto ScoreInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<22>{ + { + &_ScoreInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ScoreInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ScoreInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &ScoreInfo::ByteSizeLong, + &ScoreInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ScoreInfo, _impl_._cached_size_), + true, + }, + "np2_structs.ScoreInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<22> ScoreInfo_class_data_ = + ScoreInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ScoreInfo::GetClassData() const { + return ScoreInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> +ScoreInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ScoreInfo, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ScoreInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::ScoreInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes data = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(ScoreInfo, _impl_.data_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes data = 1; + {PROTOBUF_FIELD_OFFSET(ScoreInfo, _impl_.data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void ScoreInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.ScoreInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ScoreInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ScoreInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ScoreInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ScoreInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.ScoreInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes data = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.ScoreInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ScoreInfo::ByteSizeLong(const MessageLite& base) { + const ScoreInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ScoreInfo::ByteSizeLong() const { + const ScoreInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.ScoreInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // bytes data = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void ScoreInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.ScoreInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void ScoreInfo::CopyFrom(const ScoreInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.ScoreInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ScoreInfo::InternalSwap(ScoreInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); +} + +// =================================================================== + +class GetScoreResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_._has_bits_); +}; + +GetScoreResponse::GetScoreResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetScoreResponse) +} +PROTOBUF_NDEBUG_INLINE GetScoreResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetScoreResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + rankarray_{visibility, arena, from.rankarray_}, + commentarray_{visibility, arena, from.commentarray_}, + infoarray_{visibility, arena, from.infoarray_} {} + +GetScoreResponse::GetScoreResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetScoreResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetScoreResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastsortdate_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lastsortdate_), + offsetof(Impl_, totalrecord_) - + offsetof(Impl_, lastsortdate_) + + sizeof(Impl_::totalrecord_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetScoreResponse) +} +PROTOBUF_NDEBUG_INLINE GetScoreResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + rankarray_{visibility, arena}, + commentarray_{visibility, arena}, + infoarray_{visibility, arena} {} + +inline void GetScoreResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastsortdate_), + 0, + offsetof(Impl_, totalrecord_) - + offsetof(Impl_, lastsortdate_) + + sizeof(Impl_::totalrecord_)); +} +GetScoreResponse::~GetScoreResponse() { + // @@protoc_insertion_point(destructor:np2_structs.GetScoreResponse) + SharedDtor(*this); +} +inline void GetScoreResponse::SharedDtor(MessageLite& self) { + GetScoreResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetScoreResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetScoreResponse(arena); +} +constexpr auto GetScoreResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.rankarray_) + + decltype(GetScoreResponse::_impl_.rankarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.commentarray_) + + decltype(GetScoreResponse::_impl_.commentarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.infoarray_) + + decltype(GetScoreResponse::_impl_.infoarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetScoreResponse), alignof(GetScoreResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetScoreResponse::PlacementNew_, + sizeof(GetScoreResponse), + alignof(GetScoreResponse)); + } +} +constexpr auto GetScoreResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<29>{ + { + &_GetScoreResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetScoreResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetScoreResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetScoreResponse::ByteSizeLong, + &GetScoreResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_._cached_size_), + true, + }, + "np2_structs.GetScoreResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<29> GetScoreResponse_class_data_ = + GetScoreResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetScoreResponse::GetClassData() const { + return GetScoreResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 2, 49, 2> +GetScoreResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetScoreResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetScoreResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // repeated .np2_structs.ScoreRankData rankArray = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.rankarray_)}}, + // repeated string commentArray = 2; + {::_pbi::TcParser::FastUR1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.commentarray_)}}, + // repeated .np2_structs.ScoreInfo infoArray = 3; + {::_pbi::TcParser::FastMtR1, + {26, 2, 1, + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.infoarray_)}}, + // uint64 lastSortDate = 4; + {::_pbi::TcParser::FastV64S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.lastsortdate_)}}, + // uint32 totalRecord = 5; + {::_pbi::TcParser::FastV32S1, + {40, 4, 0, + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.totalrecord_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.ScoreRankData rankArray = 1; + {PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.rankarray_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated string commentArray = 2; + {PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.commentarray_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // repeated .np2_structs.ScoreInfo infoArray = 3; + {PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.infoarray_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 lastSortDate = 4; + {PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.lastsortdate_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 totalRecord = 5; + {PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.totalrecord_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::ScoreRankData>()}, + {::_pbi::TcParser::GetTable<::np2_structs::ScoreInfo>()}, + }}, + {{ + "\34\0\14\0\0\0\0\0" + "np2_structs.GetScoreResponse" + "commentArray" + }}, +}; +PROTOBUF_NOINLINE void GetScoreResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetScoreResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.rankarray_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.commentarray_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _impl_.infoarray_.Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000018U)) { + ::memset(&_impl_.lastsortdate_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.totalrecord_) - + reinterpret_cast(&_impl_.lastsortdate_)) + sizeof(_impl_.totalrecord_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetScoreResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetScoreResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetScoreResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetScoreResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetScoreResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.ScoreRankData rankArray = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_rankarray_size()); + i < n; i++) { + const auto& repfield = this_._internal_rankarray().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated string commentArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (int i = 0, n = this_._internal_commentarray_size(); i < n; ++i) { + const auto& s = this_._internal_commentarray().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.GetScoreResponse.commentArray"); + target = stream->WriteString(2, s, target); + } + } + + // repeated .np2_structs.ScoreInfo infoArray = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_infoarray_size()); + i < n; i++) { + const auto& repfield = this_._internal_infoarray().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // uint64 lastSortDate = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_lastsortdate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 4, this_._internal_lastsortdate(), target); + } + } + + // uint32 totalRecord = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_totalrecord() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 5, this_._internal_totalrecord(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetScoreResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetScoreResponse::ByteSizeLong(const MessageLite& base) { + const GetScoreResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetScoreResponse::ByteSizeLong() const { + const GetScoreResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetScoreResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // repeated .np2_structs.ScoreRankData rankArray = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_rankarray_size(); + for (const auto& msg : this_._internal_rankarray()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated string commentArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_commentarray().size()); + for (int i = 0, n = this_._internal_commentarray().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_commentarray().Get(i)); + } + } + // repeated .np2_structs.ScoreInfo infoArray = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + total_size += 1UL * this_._internal_infoarray_size(); + for (const auto& msg : this_._internal_infoarray()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint64 lastSortDate = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_lastsortdate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lastsortdate()); + } + } + // uint32 totalRecord = 5; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_totalrecord() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_totalrecord()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetScoreResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetScoreResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_rankarray()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_rankarray()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_commentarray()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_commentarray()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000004U)) { + _this->_internal_mutable_infoarray()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_infoarray()); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_lastsortdate() != 0) { + _this->_impl_.lastsortdate_ = from._impl_.lastsortdate_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_totalrecord() != 0) { + _this->_impl_.totalrecord_ = from._impl_.totalrecord_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetScoreResponse::CopyFrom(const GetScoreResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetScoreResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetScoreResponse::InternalSwap(GetScoreResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.rankarray_.InternalSwap(&other->_impl_.rankarray_); + _impl_.commentarray_.InternalSwap(&other->_impl_.commentarray_); + _impl_.infoarray_.InternalSwap(&other->_impl_.infoarray_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.totalrecord_) + + sizeof(GetScoreResponse::_impl_.totalrecord_) + - PROTOBUF_FIELD_OFFSET(GetScoreResponse, _impl_.lastsortdate_)>( + reinterpret_cast(&_impl_.lastsortdate_), + reinterpret_cast(&other->_impl_.lastsortdate_)); +} + +// =================================================================== + +class RecordScoreGameDataRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_._has_bits_); +}; + +RecordScoreGameDataRequest::RecordScoreGameDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RecordScoreGameDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RecordScoreGameDataRequest) +} +RecordScoreGameDataRequest::RecordScoreGameDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RecordScoreGameDataRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RecordScoreGameDataRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE RecordScoreGameDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void RecordScoreGameDataRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + 0, + offsetof(Impl_, score_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::score_)); +} +RecordScoreGameDataRequest::~RecordScoreGameDataRequest() { + // @@protoc_insertion_point(destructor:np2_structs.RecordScoreGameDataRequest) + SharedDtor(*this); +} +inline void RecordScoreGameDataRequest::SharedDtor(MessageLite& self) { + RecordScoreGameDataRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RecordScoreGameDataRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RecordScoreGameDataRequest(arena); +} +constexpr auto RecordScoreGameDataRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RecordScoreGameDataRequest), + alignof(RecordScoreGameDataRequest)); +} +constexpr auto RecordScoreGameDataRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_RecordScoreGameDataRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RecordScoreGameDataRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RecordScoreGameDataRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RecordScoreGameDataRequest::ByteSizeLong, + &RecordScoreGameDataRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_._cached_size_), + true, + }, + "np2_structs.RecordScoreGameDataRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> RecordScoreGameDataRequest_class_data_ = + RecordScoreGameDataRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RecordScoreGameDataRequest::GetClassData() const { + return RecordScoreGameDataRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 0, 2> +RecordScoreGameDataRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + RecordScoreGameDataRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RecordScoreGameDataRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 boardId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.boardid_)}}, + // int32 pcId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.pcid_)}}, + // int64 score = 3; + {::_pbi::TcParser::FastV64S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.score_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 boardId = 1; + {PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.boardid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // int32 pcId = 2; + {PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.pcid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // int64 score = 3; + {PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.score_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void RecordScoreGameDataRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RecordScoreGameDataRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + ::memset(&_impl_.boardid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.score_) - + reinterpret_cast(&_impl_.boardid_)) + sizeof(_impl_.score_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RecordScoreGameDataRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RecordScoreGameDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RecordScoreGameDataRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RecordScoreGameDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RecordScoreGameDataRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_boardid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_boardid(), target); + } + } + + // int32 pcId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_pcid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_pcid(), target); + } + } + + // int64 score = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_score() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>( + stream, this_._internal_score(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RecordScoreGameDataRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RecordScoreGameDataRequest::ByteSizeLong(const MessageLite& base) { + const RecordScoreGameDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RecordScoreGameDataRequest::ByteSizeLong() const { + const RecordScoreGameDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RecordScoreGameDataRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_boardid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_boardid()); + } + } + // int32 pcId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_pcid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_pcid()); + } + } + // int64 score = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_score() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_score()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RecordScoreGameDataRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RecordScoreGameDataRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_boardid() != 0) { + _this->_impl_.boardid_ = from._impl_.boardid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_pcid() != 0) { + _this->_impl_.pcid_ = from._impl_.pcid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_score() != 0) { + _this->_impl_.score_ = from._impl_.score_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RecordScoreGameDataRequest::CopyFrom(const RecordScoreGameDataRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RecordScoreGameDataRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RecordScoreGameDataRequest::InternalSwap(RecordScoreGameDataRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.score_) + + sizeof(RecordScoreGameDataRequest::_impl_.score_) + - PROTOBUF_FIELD_OFFSET(RecordScoreGameDataRequest, _impl_.boardid_)>( + reinterpret_cast(&_impl_.boardid_), + reinterpret_cast(&other->_impl_.boardid_)); +} + +// =================================================================== + +class GetScoreGameDataRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_._has_bits_); +}; + +GetScoreGameDataRequest::GetScoreGameDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreGameDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetScoreGameDataRequest) +} +PROTOBUF_NDEBUG_INLINE GetScoreGameDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetScoreGameDataRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npid_(arena, from.npid_) {} + +GetScoreGameDataRequest::GetScoreGameDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetScoreGameDataRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetScoreGameDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetScoreGameDataRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, boardid_), + offsetof(Impl_, pcid_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::pcid_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetScoreGameDataRequest) +} +PROTOBUF_NDEBUG_INLINE GetScoreGameDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npid_(arena) {} + +inline void GetScoreGameDataRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, boardid_), + 0, + offsetof(Impl_, pcid_) - + offsetof(Impl_, boardid_) + + sizeof(Impl_::pcid_)); +} +GetScoreGameDataRequest::~GetScoreGameDataRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetScoreGameDataRequest) + SharedDtor(*this); +} +inline void GetScoreGameDataRequest::SharedDtor(MessageLite& self) { + GetScoreGameDataRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.npid_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetScoreGameDataRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetScoreGameDataRequest(arena); +} +constexpr auto GetScoreGameDataRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(GetScoreGameDataRequest), + alignof(GetScoreGameDataRequest)); +} +constexpr auto GetScoreGameDataRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<36>{ + { + &_GetScoreGameDataRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetScoreGameDataRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetScoreGameDataRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetScoreGameDataRequest::ByteSizeLong, + &GetScoreGameDataRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetScoreGameDataRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<36> GetScoreGameDataRequest_class_data_ = + GetScoreGameDataRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetScoreGameDataRequest::GetClassData() const { + return GetScoreGameDataRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 48, 2> +GetScoreGameDataRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + GetScoreGameDataRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetScoreGameDataRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 boardId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.boardid_)}}, + // string npId = 2; + {::_pbi::TcParser::FastUS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.npid_)}}, + // int32 pcId = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.pcid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 boardId = 1; + {PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.boardid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // string npId = 2; + {PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.npid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int32 pcId = 3; + {PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.pcid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + }}, + // no aux_entries + {{ + "\43\0\4\0\0\0\0\0" + "np2_structs.GetScoreGameDataRequest" + "npId" + }}, +}; +PROTOBUF_NOINLINE void GetScoreGameDataRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetScoreGameDataRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.npid_.ClearNonDefaultToEmpty(); + } + if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) { + ::memset(&_impl_.boardid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.pcid_) - + reinterpret_cast(&_impl_.boardid_)) + sizeof(_impl_.pcid_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetScoreGameDataRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetScoreGameDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetScoreGameDataRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetScoreGameDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetScoreGameDataRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_boardid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_boardid(), target); + } + } + + // string npId = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + const ::std::string& _s = this_._internal_npid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.GetScoreGameDataRequest.npId"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // int32 pcId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_pcid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>( + stream, this_._internal_pcid(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetScoreGameDataRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetScoreGameDataRequest::ByteSizeLong(const MessageLite& base) { + const GetScoreGameDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetScoreGameDataRequest::ByteSizeLong() const { + const GetScoreGameDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetScoreGameDataRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // string npId = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npid()); + } + } + // uint32 boardId = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_boardid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_boardid()); + } + } + // int32 pcId = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_pcid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_pcid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetScoreGameDataRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetScoreGameDataRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_npid().empty()) { + _this->_internal_set_npid(from._internal_npid()); + } else { + if (_this->_impl_.npid_.IsDefault()) { + _this->_internal_set_npid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_boardid() != 0) { + _this->_impl_.boardid_ = from._impl_.boardid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_pcid() != 0) { + _this->_impl_.pcid_ = from._impl_.pcid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetScoreGameDataRequest::CopyFrom(const GetScoreGameDataRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetScoreGameDataRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetScoreGameDataRequest::InternalSwap(GetScoreGameDataRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.npid_, &other->_impl_.npid_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.pcid_) + + sizeof(GetScoreGameDataRequest::_impl_.pcid_) + - PROTOBUF_FIELD_OFFSET(GetScoreGameDataRequest, _impl_.boardid_)>( + reinterpret_cast(&_impl_.boardid_), + reinterpret_cast(&other->_impl_.boardid_)); +} + +// =================================================================== + +class TusUser::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusUser, _impl_._has_bits_); +}; + +TusUser::TusUser(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusUser_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusUser) +} +PROTOBUF_NDEBUG_INLINE TusUser::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusUser& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + npid_(arena, from.npid_) {} + +TusUser::TusUser( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusUser& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusUser_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusUser* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.vuser_ = from._impl_.vuser_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusUser) +} +PROTOBUF_NDEBUG_INLINE TusUser::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + npid_(arena) {} + +inline void TusUser::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.vuser_ = {}; +} +TusUser::~TusUser() { + // @@protoc_insertion_point(destructor:np2_structs.TusUser) + SharedDtor(*this); +} +inline void TusUser::SharedDtor(MessageLite& self) { + TusUser& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.npid_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusUser::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusUser(arena); +} +constexpr auto TusUser::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TusUser), + alignof(TusUser)); +} +constexpr auto TusUser::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<20>{ + { + &_TusUser_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusUser::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusUser::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusUser::ByteSizeLong, + &TusUser::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusUser, _impl_._cached_size_), + true, + }, + "np2_structs.TusUser", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<20> TusUser_class_data_ = + TusUser::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusUser::GetClassData() const { + return TusUser_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 32, 2> +TusUser::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusUser, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + TusUser_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusUser>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // string npid = 2; + {::_pbi::TcParser::FastUS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusUser, _impl_.npid_)}}, + // bool vuser = 1; + {::_pbi::TcParser::FastV8S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(TusUser, _impl_.vuser_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bool vuser = 1; + {PROTOBUF_FIELD_OFFSET(TusUser, _impl_.vuser_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // string npid = 2; + {PROTOBUF_FIELD_OFFSET(TusUser, _impl_.npid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\23\0\4\0\0\0\0\0" + "np2_structs.TusUser" + "npid" + }}, +}; +PROTOBUF_NOINLINE void TusUser::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusUser) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.npid_.ClearNonDefaultToEmpty(); + } + _impl_.vuser_ = false; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusUser::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusUser& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusUser::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusUser& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusUser) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bool vuser = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_vuser() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this_._internal_vuser(), target); + } + } + + // string npid = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + const ::std::string& _s = this_._internal_npid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusUser.npid"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusUser) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusUser::ByteSizeLong(const MessageLite& base) { + const TusUser& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusUser::ByteSizeLong() const { + const TusUser& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusUser) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // string npid = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_npid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_npid()); + } + } + // bool vuser = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_vuser() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusUser::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusUser) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_npid().empty()) { + _this->_internal_set_npid(from._internal_npid()); + } else { + if (_this->_impl_.npid_.IsDefault()) { + _this->_internal_set_npid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_vuser() != 0) { + _this->_impl_.vuser_ = from._impl_.vuser_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusUser::CopyFrom(const TusUser& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusUser) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusUser::InternalSwap(TusUser* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.npid_, &other->_impl_.npid_, arena); + swap(_impl_.vuser_, other->_impl_.vuser_); +} + +// =================================================================== + +class TusVariable::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusVariable, _impl_._has_bits_); +}; + +TusVariable::TusVariable(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusVariable_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusVariable) +} +PROTOBUF_NDEBUG_INLINE TusVariable::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusVariable& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + ownerid_(arena, from.ownerid_), + lastchangedauthorid_(arena, from.lastchangedauthorid_) {} + +TusVariable::TusVariable( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusVariable& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusVariable_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusVariable* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastchangeddate_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lastchangeddate_), + offsetof(Impl_, hasdata_) - + offsetof(Impl_, lastchangeddate_) + + sizeof(Impl_::hasdata_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusVariable) +} +PROTOBUF_NDEBUG_INLINE TusVariable::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + ownerid_(arena), + lastchangedauthorid_(arena) {} + +inline void TusVariable::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastchangeddate_), + 0, + offsetof(Impl_, hasdata_) - + offsetof(Impl_, lastchangeddate_) + + sizeof(Impl_::hasdata_)); +} +TusVariable::~TusVariable() { + // @@protoc_insertion_point(destructor:np2_structs.TusVariable) + SharedDtor(*this); +} +inline void TusVariable::SharedDtor(MessageLite& self) { + TusVariable& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.ownerid_.Destroy(); + this_._impl_.lastchangedauthorid_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusVariable::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusVariable(arena); +} +constexpr auto TusVariable::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TusVariable), + alignof(TusVariable)); +} +constexpr auto TusVariable::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<24>{ + { + &_TusVariable_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusVariable::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusVariable::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusVariable::ByteSizeLong, + &TusVariable::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_._cached_size_), + true, + }, + "np2_structs.TusVariable", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> TusVariable_class_data_ = + TusVariable::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusVariable::GetClassData() const { + return TusVariable_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 6, 0, 58, 2> +TusVariable::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_._has_bits_), + 0, // no _extensions_ + 6, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967232, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + TusVariable_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusVariable>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string ownerId = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.ownerid_)}}, + // bool hasData = 2; + {::_pbi::TcParser::FastV8S1, + {16, 5, 0, + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.hasdata_)}}, + // uint64 lastChangedDate = 3; + {::_pbi::TcParser::FastV64S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.lastchangeddate_)}}, + // string lastChangedAuthorId = 4; + {::_pbi::TcParser::FastUS1, + {34, 1, 0, + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.lastchangedauthorid_)}}, + // int64 variable = 5; + {::_pbi::TcParser::FastV64S1, + {40, 3, 0, + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.variable_)}}, + // int64 oldVariable = 6; + {::_pbi::TcParser::FastV64S1, + {48, 4, 0, + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.oldvariable_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string ownerId = 1; + {PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.ownerid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bool hasData = 2; + {PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.hasdata_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // uint64 lastChangedDate = 3; + {PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.lastchangeddate_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // string lastChangedAuthorId = 4; + {PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.lastchangedauthorid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int64 variable = 5; + {PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.variable_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // int64 oldVariable = 6; + {PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.oldvariable_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + }}, + // no aux_entries + {{ + "\27\7\0\0\23\0\0\0" + "np2_structs.TusVariable" + "ownerId" + "lastChangedAuthorId" + }}, +}; +PROTOBUF_NOINLINE void TusVariable::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusVariable) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.ownerid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.lastchangedauthorid_.ClearNonDefaultToEmpty(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000003cU)) { + ::memset(&_impl_.lastchangeddate_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.hasdata_) - + reinterpret_cast(&_impl_.lastchangeddate_)) + sizeof(_impl_.hasdata_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusVariable::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusVariable& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusVariable::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusVariable& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusVariable) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string ownerId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_ownerid().empty()) { + const ::std::string& _s = this_._internal_ownerid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusVariable.ownerId"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // bool hasData = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_hasdata() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_hasdata(), target); + } + } + + // uint64 lastChangedDate = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_lastchangeddate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 3, this_._internal_lastchangeddate(), target); + } + } + + // string lastChangedAuthorId = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_lastchangedauthorid().empty()) { + const ::std::string& _s = this_._internal_lastchangedauthorid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusVariable.lastChangedAuthorId"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + } + + // int64 variable = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_variable() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<5>( + stream, this_._internal_variable(), target); + } + } + + // int64 oldVariable = 6; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_oldvariable() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<6>( + stream, this_._internal_oldvariable(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusVariable) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusVariable::ByteSizeLong(const MessageLite& base) { + const TusVariable& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusVariable::ByteSizeLong() const { + const TusVariable& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusVariable) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + // string ownerId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_ownerid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_ownerid()); + } + } + // string lastChangedAuthorId = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_lastchangedauthorid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_lastchangedauthorid()); + } + } + // uint64 lastChangedDate = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_lastchangeddate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lastchangeddate()); + } + } + // int64 variable = 5; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_variable() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_variable()); + } + } + // int64 oldVariable = 6; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_oldvariable() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_oldvariable()); + } + } + // bool hasData = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_hasdata() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusVariable::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusVariable) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_ownerid().empty()) { + _this->_internal_set_ownerid(from._internal_ownerid()); + } else { + if (_this->_impl_.ownerid_.IsDefault()) { + _this->_internal_set_ownerid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_lastchangedauthorid().empty()) { + _this->_internal_set_lastchangedauthorid(from._internal_lastchangedauthorid()); + } else { + if (_this->_impl_.lastchangedauthorid_.IsDefault()) { + _this->_internal_set_lastchangedauthorid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_lastchangeddate() != 0) { + _this->_impl_.lastchangeddate_ = from._impl_.lastchangeddate_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_variable() != 0) { + _this->_impl_.variable_ = from._impl_.variable_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_oldvariable() != 0) { + _this->_impl_.oldvariable_ = from._impl_.oldvariable_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_hasdata() != 0) { + _this->_impl_.hasdata_ = from._impl_.hasdata_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusVariable::CopyFrom(const TusVariable& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusVariable) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusVariable::InternalSwap(TusVariable* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.ownerid_, &other->_impl_.ownerid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.lastchangedauthorid_, &other->_impl_.lastchangedauthorid_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.hasdata_) + + sizeof(TusVariable::_impl_.hasdata_) + - PROTOBUF_FIELD_OFFSET(TusVariable, _impl_.lastchangeddate_)>( + reinterpret_cast(&_impl_.lastchangeddate_), + reinterpret_cast(&other->_impl_.lastchangeddate_)); +} + +// =================================================================== + +class TusVarResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusVarResponse, _impl_._has_bits_); +}; + +TusVarResponse::TusVarResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusVarResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusVarResponse) +} +PROTOBUF_NDEBUG_INLINE TusVarResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusVarResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + vars_{visibility, arena, from.vars_} {} + +TusVarResponse::TusVarResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusVarResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusVarResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusVarResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusVarResponse) +} +PROTOBUF_NDEBUG_INLINE TusVarResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + vars_{visibility, arena} {} + +inline void TusVarResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +TusVarResponse::~TusVarResponse() { + // @@protoc_insertion_point(destructor:np2_structs.TusVarResponse) + SharedDtor(*this); +} +inline void TusVarResponse::SharedDtor(MessageLite& self) { + TusVarResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusVarResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusVarResponse(arena); +} +constexpr auto TusVarResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusVarResponse, _impl_.vars_) + + decltype(TusVarResponse::_impl_.vars_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusVarResponse), alignof(TusVarResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusVarResponse::PlacementNew_, + sizeof(TusVarResponse), + alignof(TusVarResponse)); + } +} +constexpr auto TusVarResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<27>{ + { + &_TusVarResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusVarResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusVarResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusVarResponse::ByteSizeLong, + &TusVarResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusVarResponse, _impl_._cached_size_), + true, + }, + "np2_structs.TusVarResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<27> TusVarResponse_class_data_ = + TusVarResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusVarResponse::GetClassData() const { + return TusVarResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> +TusVarResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusVarResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusVarResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusVarResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.TusVariable vars = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusVarResponse, _impl_.vars_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.TusVariable vars = 1; + {PROTOBUF_FIELD_OFFSET(TusVarResponse, _impl_.vars_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusVariable>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusVarResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusVarResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.vars_.Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusVarResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusVarResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusVarResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusVarResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusVarResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.TusVariable vars = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_vars_size()); + i < n; i++) { + const auto& repfield = this_._internal_vars().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusVarResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusVarResponse::ByteSizeLong(const MessageLite& base) { + const TusVarResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusVarResponse::ByteSizeLong() const { + const TusVarResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusVarResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .np2_structs.TusVariable vars = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_vars_size(); + for (const auto& msg : this_._internal_vars()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusVarResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusVarResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_vars()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_vars()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusVarResponse::CopyFrom(const TusVarResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusVarResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusVarResponse::InternalSwap(TusVarResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.vars_.InternalSwap(&other->_impl_.vars_); +} + +// =================================================================== + +class TusSetMultiSlotVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_._has_bits_); +}; + +TusSetMultiSlotVariableRequest::TusSetMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusSetMultiSlotVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusSetMultiSlotVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusSetMultiSlotVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusSetMultiSlotVariableRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + slotidarray_{visibility, arena, from.slotidarray_}, + _slotidarray_cached_byte_size_{0}, + variablearray_{visibility, arena, from.variablearray_}, + _variablearray_cached_byte_size_{0} {} + +TusSetMultiSlotVariableRequest::TusSetMultiSlotVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusSetMultiSlotVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusSetMultiSlotVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusSetMultiSlotVariableRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusSetMultiSlotVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusSetMultiSlotVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + slotidarray_{visibility, arena}, + _slotidarray_cached_byte_size_{0}, + variablearray_{visibility, arena}, + _variablearray_cached_byte_size_{0} {} + +inline void TusSetMultiSlotVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.user_ = {}; +} +TusSetMultiSlotVariableRequest::~TusSetMultiSlotVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusSetMultiSlotVariableRequest) + SharedDtor(*this); +} +inline void TusSetMultiSlotVariableRequest::SharedDtor(MessageLite& self) { + TusSetMultiSlotVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusSetMultiSlotVariableRequest(arena); +} +constexpr auto TusSetMultiSlotVariableRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.slotidarray_) + + decltype(TusSetMultiSlotVariableRequest::_impl_.slotidarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.variablearray_) + + decltype(TusSetMultiSlotVariableRequest::_impl_.variablearray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusSetMultiSlotVariableRequest), alignof(TusSetMultiSlotVariableRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusSetMultiSlotVariableRequest::PlacementNew_, + sizeof(TusSetMultiSlotVariableRequest), + alignof(TusSetMultiSlotVariableRequest)); + } +} +constexpr auto TusSetMultiSlotVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<43>{ + { + &_TusSetMultiSlotVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusSetMultiSlotVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusSetMultiSlotVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusSetMultiSlotVariableRequest::ByteSizeLong, + &TusSetMultiSlotVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusSetMultiSlotVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<43> TusSetMultiSlotVariableRequest_class_data_ = + TusSetMultiSlotVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusSetMultiSlotVariableRequest::GetClassData() const { + return TusSetMultiSlotVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 0, 2> +TusSetMultiSlotVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusSetMultiSlotVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusSetMultiSlotVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 2, 0, + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.user_)}}, + // repeated int32 slotIdArray = 2; + {::_pbi::TcParser::FastV32P1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.slotidarray_)}}, + // repeated int64 variableArray = 3; + {::_pbi::TcParser::FastV64P1, + {26, 1, 0, + PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.variablearray_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.user_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int32 slotIdArray = 2; + {PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.slotidarray_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)}, + // repeated int64 variableArray = 3; + {PROTOBUF_FIELD_OFFSET(TusSetMultiSlotVariableRequest, _impl_.variablearray_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusSetMultiSlotVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusSetMultiSlotVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.slotidarray_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.variablearray_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusSetMultiSlotVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusSetMultiSlotVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusSetMultiSlotVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._slotidarray_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, this_._internal_slotidarray(), byte_size, target); + } + } + } + + // repeated int64 variableArray = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + { + int byte_size = this_._impl_._variablearray_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 3, this_._internal_variablearray(), byte_size, target); + } + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusSetMultiSlotVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusSetMultiSlotVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusSetMultiSlotVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusSetMultiSlotVariableRequest::ByteSizeLong() const { + const TusSetMultiSlotVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusSetMultiSlotVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize( + this_._internal_slotidarray(), 1, + this_._impl_._slotidarray_cached_byte_size_); + } + // repeated int64 variableArray = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += + ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize( + this_._internal_variablearray(), 1, + this_._impl_._variablearray_cached_byte_size_); + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusSetMultiSlotVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusSetMultiSlotVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_slotidarray()->MergeFrom(from._internal_slotidarray()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_variablearray()->MergeFrom(from._internal_variablearray()); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusSetMultiSlotVariableRequest::CopyFrom(const TusSetMultiSlotVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusSetMultiSlotVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusSetMultiSlotVariableRequest::InternalSwap(TusSetMultiSlotVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.slotidarray_.InternalSwap(&other->_impl_.slotidarray_); + _impl_.variablearray_.InternalSwap(&other->_impl_.variablearray_); + swap(_impl_.user_, other->_impl_.user_); +} + +// =================================================================== + +class TusGetMultiSlotVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_._has_bits_); +}; + +TusGetMultiSlotVariableRequest::TusGetMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiSlotVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetMultiSlotVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiSlotVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusGetMultiSlotVariableRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + slotidarray_{visibility, arena, from.slotidarray_}, + _slotidarray_cached_byte_size_{0} {} + +TusGetMultiSlotVariableRequest::TusGetMultiSlotVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusGetMultiSlotVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiSlotVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusGetMultiSlotVariableRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusGetMultiSlotVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiSlotVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + slotidarray_{visibility, arena}, + _slotidarray_cached_byte_size_{0} {} + +inline void TusGetMultiSlotVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.user_ = {}; +} +TusGetMultiSlotVariableRequest::~TusGetMultiSlotVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetMultiSlotVariableRequest) + SharedDtor(*this); +} +inline void TusGetMultiSlotVariableRequest::SharedDtor(MessageLite& self) { + TusGetMultiSlotVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetMultiSlotVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetMultiSlotVariableRequest(arena); +} +constexpr auto TusGetMultiSlotVariableRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_.slotidarray_) + + decltype(TusGetMultiSlotVariableRequest::_impl_.slotidarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusGetMultiSlotVariableRequest), alignof(TusGetMultiSlotVariableRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusGetMultiSlotVariableRequest::PlacementNew_, + sizeof(TusGetMultiSlotVariableRequest), + alignof(TusGetMultiSlotVariableRequest)); + } +} +constexpr auto TusGetMultiSlotVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<43>{ + { + &_TusGetMultiSlotVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetMultiSlotVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetMultiSlotVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetMultiSlotVariableRequest::ByteSizeLong, + &TusGetMultiSlotVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetMultiSlotVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<43> TusGetMultiSlotVariableRequest_class_data_ = + TusGetMultiSlotVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetMultiSlotVariableRequest::GetClassData() const { + return TusGetMultiSlotVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusGetMultiSlotVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusGetMultiSlotVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetMultiSlotVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated int32 slotIdArray = 2; + {::_pbi::TcParser::FastV32P1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_.slotidarray_)}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_.user_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_.user_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int32 slotIdArray = 2; + {PROTOBUF_FIELD_OFFSET(TusGetMultiSlotVariableRequest, _impl_.slotidarray_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetMultiSlotVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetMultiSlotVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.slotidarray_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetMultiSlotVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetMultiSlotVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetMultiSlotVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetMultiSlotVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetMultiSlotVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._slotidarray_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, this_._internal_slotidarray(), byte_size, target); + } + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetMultiSlotVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetMultiSlotVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusGetMultiSlotVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetMultiSlotVariableRequest::ByteSizeLong() const { + const TusGetMultiSlotVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetMultiSlotVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize( + this_._internal_slotidarray(), 1, + this_._impl_._slotidarray_cached_byte_size_); + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetMultiSlotVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetMultiSlotVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_slotidarray()->MergeFrom(from._internal_slotidarray()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetMultiSlotVariableRequest::CopyFrom(const TusGetMultiSlotVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetMultiSlotVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetMultiSlotVariableRequest::InternalSwap(TusGetMultiSlotVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.slotidarray_.InternalSwap(&other->_impl_.slotidarray_); + swap(_impl_.user_, other->_impl_.user_); +} + +// =================================================================== + +class TusGetMultiUserVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_._has_bits_); +}; + +TusGetMultiUserVariableRequest::TusGetMultiUserVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiUserVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetMultiUserVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiUserVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusGetMultiUserVariableRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + users_{visibility, arena, from.users_} {} + +TusGetMultiUserVariableRequest::TusGetMultiUserVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusGetMultiUserVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiUserVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusGetMultiUserVariableRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.slotid_ = from._impl_.slotid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusGetMultiUserVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiUserVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + users_{visibility, arena} {} + +inline void TusGetMultiUserVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.slotid_ = {}; +} +TusGetMultiUserVariableRequest::~TusGetMultiUserVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetMultiUserVariableRequest) + SharedDtor(*this); +} +inline void TusGetMultiUserVariableRequest::SharedDtor(MessageLite& self) { + TusGetMultiUserVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetMultiUserVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetMultiUserVariableRequest(arena); +} +constexpr auto TusGetMultiUserVariableRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_.users_) + + decltype(TusGetMultiUserVariableRequest::_impl_.users_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusGetMultiUserVariableRequest), alignof(TusGetMultiUserVariableRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusGetMultiUserVariableRequest::PlacementNew_, + sizeof(TusGetMultiUserVariableRequest), + alignof(TusGetMultiUserVariableRequest)); + } +} +constexpr auto TusGetMultiUserVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<43>{ + { + &_TusGetMultiUserVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetMultiUserVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetMultiUserVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetMultiUserVariableRequest::ByteSizeLong, + &TusGetMultiUserVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetMultiUserVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<43> TusGetMultiUserVariableRequest_class_data_ = + TusGetMultiUserVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetMultiUserVariableRequest::GetClassData() const { + return TusGetMultiUserVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusGetMultiUserVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusGetMultiUserVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetMultiUserVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // int32 slotId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_.slotid_)}}, + // repeated .np2_structs.TusUser users = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_.users_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.TusUser users = 1; + {PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_.users_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 slotId = 2; + {PROTOBUF_FIELD_OFFSET(TusGetMultiUserVariableRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetMultiUserVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetMultiUserVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.users_.Clear(); + } + _impl_.slotid_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetMultiUserVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetMultiUserVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetMultiUserVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetMultiUserVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetMultiUserVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.TusUser users = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_users_size()); + i < n; i++) { + const auto& repfield = this_._internal_users().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_slotid(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetMultiUserVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetMultiUserVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusGetMultiUserVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetMultiUserVariableRequest::ByteSizeLong() const { + const TusGetMultiUserVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetMultiUserVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.TusUser users = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_users_size(); + for (const auto& msg : this_._internal_users()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetMultiUserVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetMultiUserVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_users()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_users()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetMultiUserVariableRequest::CopyFrom(const TusGetMultiUserVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetMultiUserVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetMultiUserVariableRequest::InternalSwap(TusGetMultiUserVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.users_.InternalSwap(&other->_impl_.users_); + swap(_impl_.slotid_, other->_impl_.slotid_); +} + +// =================================================================== + +class TusGetFriendsVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_._has_bits_); +}; + +TusGetFriendsVariableRequest::TusGetFriendsVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetFriendsVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetFriendsVariableRequest) +} +TusGetFriendsVariableRequest::TusGetFriendsVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetFriendsVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetFriendsVariableRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE TusGetFriendsVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void TusGetFriendsVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, slotid_), + 0, + offsetof(Impl_, arraynum_) - + offsetof(Impl_, slotid_) + + sizeof(Impl_::arraynum_)); +} +TusGetFriendsVariableRequest::~TusGetFriendsVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetFriendsVariableRequest) + SharedDtor(*this); +} +inline void TusGetFriendsVariableRequest::SharedDtor(MessageLite& self) { + TusGetFriendsVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetFriendsVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetFriendsVariableRequest(arena); +} +constexpr auto TusGetFriendsVariableRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TusGetFriendsVariableRequest), + alignof(TusGetFriendsVariableRequest)); +} +constexpr auto TusGetFriendsVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<41>{ + { + &_TusGetFriendsVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetFriendsVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetFriendsVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetFriendsVariableRequest::ByteSizeLong, + &TusGetFriendsVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetFriendsVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<41> TusGetFriendsVariableRequest_class_data_ = + TusGetFriendsVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetFriendsVariableRequest::GetClassData() const { + return TusGetFriendsVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 0, 2> +TusGetFriendsVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + TusGetFriendsVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetFriendsVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 arrayNum = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.arraynum_)}}, + // int32 slotId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.slotid_)}}, + // bool includeSelf = 2; + {::_pbi::TcParser::FastV8S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.includeself_)}}, + // int32 sortType = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.sorttype_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // int32 slotId = 1; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // bool includeSelf = 2; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.includeself_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // int32 sortType = 3; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.sorttype_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // uint32 arrayNum = 4; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.arraynum_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetFriendsVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetFriendsVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + ::memset(&_impl_.slotid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.arraynum_) - + reinterpret_cast(&_impl_.slotid_)) + sizeof(_impl_.arraynum_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetFriendsVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetFriendsVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetFriendsVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetFriendsVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetFriendsVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // int32 slotId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<1>( + stream, this_._internal_slotid(), target); + } + } + + // bool includeSelf = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_includeself() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_includeself(), target); + } + } + + // int32 sortType = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_sorttype() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>( + stream, this_._internal_sorttype(), target); + } + } + + // uint32 arrayNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_arraynum() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_arraynum(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetFriendsVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetFriendsVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusGetFriendsVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetFriendsVariableRequest::ByteSizeLong() const { + const TusGetFriendsVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetFriendsVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // int32 slotId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + // bool includeSelf = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_includeself() != 0) { + total_size += 2; + } + } + // int32 sortType = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_sorttype() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_sorttype()); + } + } + // uint32 arrayNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_arraynum() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_arraynum()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetFriendsVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetFriendsVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_includeself() != 0) { + _this->_impl_.includeself_ = from._impl_.includeself_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_sorttype() != 0) { + _this->_impl_.sorttype_ = from._impl_.sorttype_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_arraynum() != 0) { + _this->_impl_.arraynum_ = from._impl_.arraynum_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetFriendsVariableRequest::CopyFrom(const TusGetFriendsVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetFriendsVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetFriendsVariableRequest::InternalSwap(TusGetFriendsVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.arraynum_) + + sizeof(TusGetFriendsVariableRequest::_impl_.arraynum_) + - PROTOBUF_FIELD_OFFSET(TusGetFriendsVariableRequest, _impl_.slotid_)>( + reinterpret_cast(&_impl_.slotid_), + reinterpret_cast(&other->_impl_.slotid_)); +} + +// =================================================================== + +class TusAddAndGetVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_._has_bits_); +}; + +TusAddAndGetVariableRequest::TusAddAndGetVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusAddAndGetVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusAddAndGetVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusAddAndGetVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusAddAndGetVariableRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + islastchangeddate_{visibility, arena, from.islastchangeddate_}, + _islastchangeddate_cached_byte_size_{0}, + islastchangedauthorid_(arena, from.islastchangedauthorid_) {} + +TusAddAndGetVariableRequest::TusAddAndGetVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusAddAndGetVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusAddAndGetVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusAddAndGetVariableRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, invariable_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, invariable_), + offsetof(Impl_, slotid_) - + offsetof(Impl_, invariable_) + + sizeof(Impl_::slotid_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusAddAndGetVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusAddAndGetVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + islastchangeddate_{visibility, arena}, + _islastchangeddate_cached_byte_size_{0}, + islastchangedauthorid_(arena) {} + +inline void TusAddAndGetVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, user_), + 0, + offsetof(Impl_, slotid_) - + offsetof(Impl_, user_) + + sizeof(Impl_::slotid_)); +} +TusAddAndGetVariableRequest::~TusAddAndGetVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusAddAndGetVariableRequest) + SharedDtor(*this); +} +inline void TusAddAndGetVariableRequest::SharedDtor(MessageLite& self) { + TusAddAndGetVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.islastchangedauthorid_.Destroy(); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusAddAndGetVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusAddAndGetVariableRequest(arena); +} +constexpr auto TusAddAndGetVariableRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.islastchangeddate_) + + decltype(TusAddAndGetVariableRequest::_impl_.islastchangeddate_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(TusAddAndGetVariableRequest), alignof(TusAddAndGetVariableRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusAddAndGetVariableRequest::PlacementNew_, + sizeof(TusAddAndGetVariableRequest), + alignof(TusAddAndGetVariableRequest)); + } +} +constexpr auto TusAddAndGetVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<40>{ + { + &_TusAddAndGetVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusAddAndGetVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusAddAndGetVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusAddAndGetVariableRequest::ByteSizeLong, + &TusAddAndGetVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusAddAndGetVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<40> TusAddAndGetVariableRequest_class_data_ = + TusAddAndGetVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusAddAndGetVariableRequest::GetClassData() const { + return TusAddAndGetVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 1, 69, 2> +TusAddAndGetVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusAddAndGetVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusAddAndGetVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 2, 0, + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.user_)}}, + // int32 slotId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 4, 0, + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.slotid_)}}, + // int64 inVariable = 3; + {::_pbi::TcParser::FastV64S1, + {24, 3, 0, + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.invariable_)}}, + // repeated uint64 isLastChangedDate = 4; + {::_pbi::TcParser::FastV64P1, + {34, 0, 0, + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.islastchangeddate_)}}, + // string isLastChangedAuthorId = 5; + {::_pbi::TcParser::FastUS1, + {42, 1, 0, + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.islastchangedauthorid_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.user_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 slotId = 2; + {PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // int64 inVariable = 3; + {PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.invariable_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // repeated uint64 isLastChangedDate = 4; + {PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.islastchangeddate_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // string isLastChangedAuthorId = 5; + {PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.islastchangedauthorid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + "\47\0\0\0\0\25\0\0" + "np2_structs.TusAddAndGetVariableRequest" + "isLastChangedAuthorId" + }}, +}; +PROTOBUF_NOINLINE void TusAddAndGetVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusAddAndGetVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.islastchangeddate_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.islastchangedauthorid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000018U)) { + ::memset(&_impl_.invariable_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.slotid_) - + reinterpret_cast(&_impl_.invariable_)) + sizeof(_impl_.slotid_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusAddAndGetVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusAddAndGetVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusAddAndGetVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusAddAndGetVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusAddAndGetVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_slotid(), target); + } + } + + // int64 inVariable = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_invariable() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>( + stream, this_._internal_invariable(), target); + } + } + + // repeated uint64 isLastChangedDate = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._islastchangeddate_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 4, this_._internal_islastchangeddate(), byte_size, target); + } + } + } + + // string isLastChangedAuthorId = 5; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_islastchangedauthorid().empty()) { + const ::std::string& _s = this_._internal_islastchangedauthorid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusAddAndGetVariableRequest.isLastChangedAuthorId"); + target = stream->WriteStringMaybeAliased(5, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusAddAndGetVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusAddAndGetVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusAddAndGetVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusAddAndGetVariableRequest::ByteSizeLong() const { + const TusAddAndGetVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusAddAndGetVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // repeated uint64 isLastChangedDate = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::UInt64SizeWithPackedTagSize( + this_._internal_islastchangeddate(), 1, + this_._impl_._islastchangeddate_cached_byte_size_); + } + // string isLastChangedAuthorId = 5; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_islastchangedauthorid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_islastchangedauthorid()); + } + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + // int64 inVariable = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_invariable() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_invariable()); + } + } + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusAddAndGetVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusAddAndGetVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_islastchangeddate()->MergeFrom(from._internal_islastchangeddate()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_islastchangedauthorid().empty()) { + _this->_internal_set_islastchangedauthorid(from._internal_islastchangedauthorid()); + } else { + if (_this->_impl_.islastchangedauthorid_.IsDefault()) { + _this->_internal_set_islastchangedauthorid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_invariable() != 0) { + _this->_impl_.invariable_ = from._impl_.invariable_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusAddAndGetVariableRequest::CopyFrom(const TusAddAndGetVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusAddAndGetVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusAddAndGetVariableRequest::InternalSwap(TusAddAndGetVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.islastchangeddate_.InternalSwap(&other->_impl_.islastchangeddate_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.islastchangedauthorid_, &other->_impl_.islastchangedauthorid_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.slotid_) + + sizeof(TusAddAndGetVariableRequest::_impl_.slotid_) + - PROTOBUF_FIELD_OFFSET(TusAddAndGetVariableRequest, _impl_.user_)>( + reinterpret_cast(&_impl_.user_), + reinterpret_cast(&other->_impl_.user_)); +} + +// =================================================================== + +class TusTryAndSetVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_._has_bits_); +}; + +TusTryAndSetVariableRequest::TusTryAndSetVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusTryAndSetVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusTryAndSetVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusTryAndSetVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusTryAndSetVariableRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + islastchangeddate_{visibility, arena, from.islastchangeddate_}, + _islastchangeddate_cached_byte_size_{0}, + comparevalue_{visibility, arena, from.comparevalue_}, + _comparevalue_cached_byte_size_{0}, + islastchangedauthorid_(arena, from.islastchangedauthorid_) {} + +TusTryAndSetVariableRequest::TusTryAndSetVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusTryAndSetVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusTryAndSetVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusTryAndSetVariableRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000008U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, slotid_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, slotid_), + offsetof(Impl_, variable_) - + offsetof(Impl_, slotid_) + + sizeof(Impl_::variable_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusTryAndSetVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusTryAndSetVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + islastchangeddate_{visibility, arena}, + _islastchangeddate_cached_byte_size_{0}, + comparevalue_{visibility, arena}, + _comparevalue_cached_byte_size_{0}, + islastchangedauthorid_(arena) {} + +inline void TusTryAndSetVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, user_), + 0, + offsetof(Impl_, variable_) - + offsetof(Impl_, user_) + + sizeof(Impl_::variable_)); +} +TusTryAndSetVariableRequest::~TusTryAndSetVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusTryAndSetVariableRequest) + SharedDtor(*this); +} +inline void TusTryAndSetVariableRequest::SharedDtor(MessageLite& self) { + TusTryAndSetVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.islastchangedauthorid_.Destroy(); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusTryAndSetVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusTryAndSetVariableRequest(arena); +} +constexpr auto TusTryAndSetVariableRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.islastchangeddate_) + + decltype(TusTryAndSetVariableRequest::_impl_.islastchangeddate_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.comparevalue_) + + decltype(TusTryAndSetVariableRequest::_impl_.comparevalue_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(TusTryAndSetVariableRequest), alignof(TusTryAndSetVariableRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusTryAndSetVariableRequest::PlacementNew_, + sizeof(TusTryAndSetVariableRequest), + alignof(TusTryAndSetVariableRequest)); + } +} +constexpr auto TusTryAndSetVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<40>{ + { + &_TusTryAndSetVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusTryAndSetVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusTryAndSetVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusTryAndSetVariableRequest::ByteSizeLong, + &TusTryAndSetVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusTryAndSetVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<40> TusTryAndSetVariableRequest_class_data_ = + TusTryAndSetVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusTryAndSetVariableRequest::GetClassData() const { + return TusTryAndSetVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 1, 69, 2> +TusTryAndSetVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusTryAndSetVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusTryAndSetVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 3, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.user_)}}, + // int32 slotId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 4, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.slotid_)}}, + // int32 opeType = 3; + {::_pbi::TcParser::FastV32S1, + {24, 5, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.opetype_)}}, + // int64 variable = 4; + {::_pbi::TcParser::FastV64S1, + {32, 6, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.variable_)}}, + // repeated uint64 isLastChangedDate = 5; + {::_pbi::TcParser::FastV64P1, + {42, 0, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.islastchangeddate_)}}, + // string isLastChangedAuthorId = 6; + {::_pbi::TcParser::FastUS1, + {50, 2, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.islastchangedauthorid_)}}, + // repeated int64 compareValue = 7; + {::_pbi::TcParser::FastV64P1, + {58, 1, 0, + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.comparevalue_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.user_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 slotId = 2; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // int32 opeType = 3; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.opetype_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // int64 variable = 4; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.variable_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // repeated uint64 isLastChangedDate = 5; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.islastchangeddate_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // string isLastChangedAuthorId = 6; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.islastchangedauthorid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated int64 compareValue = 7; + {PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.comparevalue_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + "\47\0\0\0\0\0\25\0" + "np2_structs.TusTryAndSetVariableRequest" + "isLastChangedAuthorId" + }}, +}; +PROTOBUF_NOINLINE void TusTryAndSetVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusTryAndSetVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.islastchangeddate_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.comparevalue_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.islastchangedauthorid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000070U)) { + ::memset(&_impl_.slotid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.variable_) - + reinterpret_cast(&_impl_.slotid_)) + sizeof(_impl_.variable_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusTryAndSetVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusTryAndSetVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusTryAndSetVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusTryAndSetVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusTryAndSetVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_slotid(), target); + } + } + + // int32 opeType = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_opetype() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>( + stream, this_._internal_opetype(), target); + } + } + + // int64 variable = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_variable() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>( + stream, this_._internal_variable(), target); + } + } + + // repeated uint64 isLastChangedDate = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._islastchangeddate_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 5, this_._internal_islastchangeddate(), byte_size, target); + } + } + } + + // string isLastChangedAuthorId = 6; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_islastchangedauthorid().empty()) { + const ::std::string& _s = this_._internal_islastchangedauthorid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusTryAndSetVariableRequest.isLastChangedAuthorId"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + } + + // repeated int64 compareValue = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + { + int byte_size = this_._impl_._comparevalue_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 7, this_._internal_comparevalue(), byte_size, target); + } + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusTryAndSetVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusTryAndSetVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusTryAndSetVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusTryAndSetVariableRequest::ByteSizeLong() const { + const TusTryAndSetVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusTryAndSetVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + // repeated uint64 isLastChangedDate = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::UInt64SizeWithPackedTagSize( + this_._internal_islastchangeddate(), 1, + this_._impl_._islastchangeddate_cached_byte_size_); + } + // repeated int64 compareValue = 7; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += + ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize( + this_._internal_comparevalue(), 1, + this_._impl_._comparevalue_cached_byte_size_); + } + // string isLastChangedAuthorId = 6; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_islastchangedauthorid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_islastchangedauthorid()); + } + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + // int32 opeType = 3; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_opetype() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_opetype()); + } + } + // int64 variable = 4; + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (this_._internal_variable() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_variable()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusTryAndSetVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusTryAndSetVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_islastchangeddate()->MergeFrom(from._internal_islastchangeddate()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_comparevalue()->MergeFrom(from._internal_comparevalue()); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_islastchangedauthorid().empty()) { + _this->_internal_set_islastchangedauthorid(from._internal_islastchangedauthorid()); + } else { + if (_this->_impl_.islastchangedauthorid_.IsDefault()) { + _this->_internal_set_islastchangedauthorid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_opetype() != 0) { + _this->_impl_.opetype_ = from._impl_.opetype_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (from._internal_variable() != 0) { + _this->_impl_.variable_ = from._impl_.variable_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusTryAndSetVariableRequest::CopyFrom(const TusTryAndSetVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusTryAndSetVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusTryAndSetVariableRequest::InternalSwap(TusTryAndSetVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.islastchangeddate_.InternalSwap(&other->_impl_.islastchangeddate_); + _impl_.comparevalue_.InternalSwap(&other->_impl_.comparevalue_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.islastchangedauthorid_, &other->_impl_.islastchangedauthorid_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.variable_) + + sizeof(TusTryAndSetVariableRequest::_impl_.variable_) + - PROTOBUF_FIELD_OFFSET(TusTryAndSetVariableRequest, _impl_.user_)>( + reinterpret_cast(&_impl_.user_), + reinterpret_cast(&other->_impl_.user_)); +} + +// =================================================================== + +class TusDeleteMultiSlotVariableRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_._has_bits_); +}; + +TusDeleteMultiSlotVariableRequest::TusDeleteMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDeleteMultiSlotVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusDeleteMultiSlotVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusDeleteMultiSlotVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusDeleteMultiSlotVariableRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + slotidarray_{visibility, arena, from.slotidarray_}, + _slotidarray_cached_byte_size_{0} {} + +TusDeleteMultiSlotVariableRequest::TusDeleteMultiSlotVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusDeleteMultiSlotVariableRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDeleteMultiSlotVariableRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusDeleteMultiSlotVariableRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusDeleteMultiSlotVariableRequest) +} +PROTOBUF_NDEBUG_INLINE TusDeleteMultiSlotVariableRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + slotidarray_{visibility, arena}, + _slotidarray_cached_byte_size_{0} {} + +inline void TusDeleteMultiSlotVariableRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.user_ = {}; +} +TusDeleteMultiSlotVariableRequest::~TusDeleteMultiSlotVariableRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusDeleteMultiSlotVariableRequest) + SharedDtor(*this); +} +inline void TusDeleteMultiSlotVariableRequest::SharedDtor(MessageLite& self) { + TusDeleteMultiSlotVariableRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusDeleteMultiSlotVariableRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusDeleteMultiSlotVariableRequest(arena); +} +constexpr auto TusDeleteMultiSlotVariableRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_.slotidarray_) + + decltype(TusDeleteMultiSlotVariableRequest::_impl_.slotidarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusDeleteMultiSlotVariableRequest), alignof(TusDeleteMultiSlotVariableRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusDeleteMultiSlotVariableRequest::PlacementNew_, + sizeof(TusDeleteMultiSlotVariableRequest), + alignof(TusDeleteMultiSlotVariableRequest)); + } +} +constexpr auto TusDeleteMultiSlotVariableRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<46>{ + { + &_TusDeleteMultiSlotVariableRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusDeleteMultiSlotVariableRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusDeleteMultiSlotVariableRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusDeleteMultiSlotVariableRequest::ByteSizeLong, + &TusDeleteMultiSlotVariableRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusDeleteMultiSlotVariableRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<46> TusDeleteMultiSlotVariableRequest_class_data_ = + TusDeleteMultiSlotVariableRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusDeleteMultiSlotVariableRequest::GetClassData() const { + return TusDeleteMultiSlotVariableRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusDeleteMultiSlotVariableRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusDeleteMultiSlotVariableRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusDeleteMultiSlotVariableRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated int32 slotIdArray = 2; + {::_pbi::TcParser::FastV32P1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_.slotidarray_)}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_.user_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_.user_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int32 slotIdArray = 2; + {PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotVariableRequest, _impl_.slotidarray_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusDeleteMultiSlotVariableRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusDeleteMultiSlotVariableRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.slotidarray_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusDeleteMultiSlotVariableRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusDeleteMultiSlotVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusDeleteMultiSlotVariableRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusDeleteMultiSlotVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusDeleteMultiSlotVariableRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._slotidarray_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, this_._internal_slotidarray(), byte_size, target); + } + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusDeleteMultiSlotVariableRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusDeleteMultiSlotVariableRequest::ByteSizeLong(const MessageLite& base) { + const TusDeleteMultiSlotVariableRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusDeleteMultiSlotVariableRequest::ByteSizeLong() const { + const TusDeleteMultiSlotVariableRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusDeleteMultiSlotVariableRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize( + this_._internal_slotidarray(), 1, + this_._impl_._slotidarray_cached_byte_size_); + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusDeleteMultiSlotVariableRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusDeleteMultiSlotVariableRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_slotidarray()->MergeFrom(from._internal_slotidarray()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusDeleteMultiSlotVariableRequest::CopyFrom(const TusDeleteMultiSlotVariableRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusDeleteMultiSlotVariableRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusDeleteMultiSlotVariableRequest::InternalSwap(TusDeleteMultiSlotVariableRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.slotidarray_.InternalSwap(&other->_impl_.slotidarray_); + swap(_impl_.user_, other->_impl_.user_); +} + +// =================================================================== + +class TusSetDataRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_._has_bits_); +}; + +TusSetDataRequest::TusSetDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusSetDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusSetDataRequest) +} +PROTOBUF_NDEBUG_INLINE TusSetDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusSetDataRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + islastchangeddate_{visibility, arena, from.islastchangeddate_}, + _islastchangeddate_cached_byte_size_{0}, + data_(arena, from.data_), + info_(arena, from.info_), + islastchangedauthorid_(arena, from.islastchangedauthorid_) {} + +TusSetDataRequest::TusSetDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusSetDataRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusSetDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusSetDataRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + _impl_.slotid_ = from._impl_.slotid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusSetDataRequest) +} +PROTOBUF_NDEBUG_INLINE TusSetDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + islastchangeddate_{visibility, arena}, + _islastchangeddate_cached_byte_size_{0}, + data_(arena), + info_(arena), + islastchangedauthorid_(arena) {} + +inline void TusSetDataRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, user_), + 0, + offsetof(Impl_, slotid_) - + offsetof(Impl_, user_) + + sizeof(Impl_::slotid_)); +} +TusSetDataRequest::~TusSetDataRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusSetDataRequest) + SharedDtor(*this); +} +inline void TusSetDataRequest::SharedDtor(MessageLite& self) { + TusSetDataRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.data_.Destroy(); + this_._impl_.info_.Destroy(); + this_._impl_.islastchangedauthorid_.Destroy(); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusSetDataRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusSetDataRequest(arena); +} +constexpr auto TusSetDataRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.islastchangeddate_) + + decltype(TusSetDataRequest::_impl_.islastchangeddate_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(TusSetDataRequest), alignof(TusSetDataRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusSetDataRequest::PlacementNew_, + sizeof(TusSetDataRequest), + alignof(TusSetDataRequest)); + } +} +constexpr auto TusSetDataRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<30>{ + { + &_TusSetDataRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusSetDataRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusSetDataRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusSetDataRequest::ByteSizeLong, + &TusSetDataRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusSetDataRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<30> TusSetDataRequest_class_data_ = + TusSetDataRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusSetDataRequest::GetClassData() const { + return TusSetDataRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 6, 1, 59, 2> +TusSetDataRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_._has_bits_), + 0, // no _extensions_ + 6, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967232, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusSetDataRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusSetDataRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 4, 0, + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.user_)}}, + // int32 slotId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 5, 0, + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.slotid_)}}, + // bytes data = 3; + {::_pbi::TcParser::FastBS1, + {26, 1, 0, + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.data_)}}, + // bytes info = 4; + {::_pbi::TcParser::FastBS1, + {34, 2, 0, + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.info_)}}, + // repeated uint64 isLastChangedDate = 5; + {::_pbi::TcParser::FastV64P1, + {42, 0, 0, + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.islastchangeddate_)}}, + // string isLastChangedAuthorId = 6; + {::_pbi::TcParser::FastUS1, + {50, 3, 0, + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.islastchangedauthorid_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.user_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 slotId = 2; + {PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // bytes data = 3; + {PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.data_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes info = 4; + {PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.info_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated uint64 isLastChangedDate = 5; + {PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.islastchangeddate_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // string isLastChangedAuthorId = 6; + {PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.islastchangedauthorid_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + "\35\0\0\0\0\0\25\0" + "np2_structs.TusSetDataRequest" + "isLastChangedAuthorId" + }}, +}; +PROTOBUF_NOINLINE void TusSetDataRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusSetDataRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.islastchangeddate_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.info_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + _impl_.islastchangedauthorid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + _impl_.slotid_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusSetDataRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusSetDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusSetDataRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusSetDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusSetDataRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_slotid(), target); + } + } + + // bytes data = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(3, _s, target); + } + } + + // bytes info = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_info().empty()) { + const ::std::string& _s = this_._internal_info(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + // repeated uint64 isLastChangedDate = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._islastchangeddate_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 5, this_._internal_islastchangeddate(), byte_size, target); + } + } + } + + // string isLastChangedAuthorId = 6; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_islastchangedauthorid().empty()) { + const ::std::string& _s = this_._internal_islastchangedauthorid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusSetDataRequest.isLastChangedAuthorId"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusSetDataRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusSetDataRequest::ByteSizeLong(const MessageLite& base) { + const TusSetDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusSetDataRequest::ByteSizeLong() const { + const TusSetDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusSetDataRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + // repeated uint64 isLastChangedDate = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::UInt64SizeWithPackedTagSize( + this_._internal_islastchangeddate(), 1, + this_._impl_._islastchangeddate_cached_byte_size_); + } + // bytes data = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // bytes info = 4; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_info().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_info()); + } + } + // string isLastChangedAuthorId = 6; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_islastchangedauthorid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_islastchangedauthorid()); + } + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusSetDataRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusSetDataRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_islastchangeddate()->MergeFrom(from._internal_islastchangeddate()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_info().empty()) { + _this->_internal_set_info(from._internal_info()); + } else { + if (_this->_impl_.info_.IsDefault()) { + _this->_internal_set_info(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!from._internal_islastchangedauthorid().empty()) { + _this->_internal_set_islastchangedauthorid(from._internal_islastchangedauthorid()); + } else { + if (_this->_impl_.islastchangedauthorid_.IsDefault()) { + _this->_internal_set_islastchangedauthorid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusSetDataRequest::CopyFrom(const TusSetDataRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusSetDataRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusSetDataRequest::InternalSwap(TusSetDataRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.islastchangeddate_.InternalSwap(&other->_impl_.islastchangeddate_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.info_, &other->_impl_.info_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.islastchangedauthorid_, &other->_impl_.islastchangedauthorid_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.slotid_) + + sizeof(TusSetDataRequest::_impl_.slotid_) + - PROTOBUF_FIELD_OFFSET(TusSetDataRequest, _impl_.user_)>( + reinterpret_cast(&_impl_.user_), + reinterpret_cast(&other->_impl_.user_)); +} + +// =================================================================== + +class TusDataStatus::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_._has_bits_); +}; + +TusDataStatus::TusDataStatus(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDataStatus_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusDataStatus) +} +PROTOBUF_NDEBUG_INLINE TusDataStatus::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusDataStatus& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + ownerid_(arena, from.ownerid_), + lastchangedauthorid_(arena, from.lastchangedauthorid_), + info_(arena, from.info_) {} + +TusDataStatus::TusDataStatus( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusDataStatus& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDataStatus_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusDataStatus* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastchangeddate_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lastchangeddate_), + offsetof(Impl_, hasdata_) - + offsetof(Impl_, lastchangeddate_) + + sizeof(Impl_::hasdata_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusDataStatus) +} +PROTOBUF_NDEBUG_INLINE TusDataStatus::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + ownerid_(arena), + lastchangedauthorid_(arena), + info_(arena) {} + +inline void TusDataStatus::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastchangeddate_), + 0, + offsetof(Impl_, hasdata_) - + offsetof(Impl_, lastchangeddate_) + + sizeof(Impl_::hasdata_)); +} +TusDataStatus::~TusDataStatus() { + // @@protoc_insertion_point(destructor:np2_structs.TusDataStatus) + SharedDtor(*this); +} +inline void TusDataStatus::SharedDtor(MessageLite& self) { + TusDataStatus& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.ownerid_.Destroy(); + this_._impl_.lastchangedauthorid_.Destroy(); + this_._impl_.info_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusDataStatus::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusDataStatus(arena); +} +constexpr auto TusDataStatus::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TusDataStatus), + alignof(TusDataStatus)); +} +constexpr auto TusDataStatus::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<26>{ + { + &_TusDataStatus_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusDataStatus::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusDataStatus::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusDataStatus::ByteSizeLong, + &TusDataStatus::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_._cached_size_), + true, + }, + "np2_structs.TusDataStatus", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<26> TusDataStatus_class_data_ = + TusDataStatus::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusDataStatus::GetClassData() const { + return TusDataStatus_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 0, 60, 2> +TusDataStatus::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + TusDataStatus_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusDataStatus>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string ownerId = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.ownerid_)}}, + // bool hasData = 2; + {::_pbi::TcParser::FastV8S1, + {16, 4, 0, + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.hasdata_)}}, + // uint64 lastChangedDate = 3; + {::_pbi::TcParser::FastV64S1, + {24, 3, 0, + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.lastchangeddate_)}}, + // string lastChangedAuthorId = 4; + {::_pbi::TcParser::FastUS1, + {34, 1, 0, + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.lastchangedauthorid_)}}, + // bytes info = 5; + {::_pbi::TcParser::FastBS1, + {42, 2, 0, + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.info_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string ownerId = 1; + {PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.ownerid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bool hasData = 2; + {PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.hasdata_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // uint64 lastChangedDate = 3; + {PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.lastchangeddate_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // string lastChangedAuthorId = 4; + {PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.lastchangedauthorid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes info = 5; + {PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.info_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\31\7\0\0\23\0\0\0" + "np2_structs.TusDataStatus" + "ownerId" + "lastChangedAuthorId" + }}, +}; +PROTOBUF_NOINLINE void TusDataStatus::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusDataStatus) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.ownerid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.lastchangedauthorid_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.info_.ClearNonDefaultToEmpty(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x00000018U)) { + ::memset(&_impl_.lastchangeddate_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.hasdata_) - + reinterpret_cast(&_impl_.lastchangeddate_)) + sizeof(_impl_.hasdata_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusDataStatus::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusDataStatus& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusDataStatus::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusDataStatus& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusDataStatus) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string ownerId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_ownerid().empty()) { + const ::std::string& _s = this_._internal_ownerid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusDataStatus.ownerId"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // bool hasData = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_hasdata() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_hasdata(), target); + } + } + + // uint64 lastChangedDate = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_lastchangeddate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 3, this_._internal_lastchangeddate(), target); + } + } + + // string lastChangedAuthorId = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_lastchangedauthorid().empty()) { + const ::std::string& _s = this_._internal_lastchangedauthorid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.TusDataStatus.lastChangedAuthorId"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + } + + // bytes info = 5; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_info().empty()) { + const ::std::string& _s = this_._internal_info(); + target = stream->WriteBytesMaybeAliased(5, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusDataStatus) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusDataStatus::ByteSizeLong(const MessageLite& base) { + const TusDataStatus& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusDataStatus::ByteSizeLong() const { + const TusDataStatus& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusDataStatus) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // string ownerId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_ownerid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_ownerid()); + } + } + // string lastChangedAuthorId = 4; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_lastchangedauthorid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_lastchangedauthorid()); + } + } + // bytes info = 5; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_info().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_info()); + } + } + // uint64 lastChangedDate = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_lastchangeddate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_lastchangeddate()); + } + } + // bool hasData = 2; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_hasdata() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusDataStatus::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusDataStatus) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_ownerid().empty()) { + _this->_internal_set_ownerid(from._internal_ownerid()); + } else { + if (_this->_impl_.ownerid_.IsDefault()) { + _this->_internal_set_ownerid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_lastchangedauthorid().empty()) { + _this->_internal_set_lastchangedauthorid(from._internal_lastchangedauthorid()); + } else { + if (_this->_impl_.lastchangedauthorid_.IsDefault()) { + _this->_internal_set_lastchangedauthorid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_info().empty()) { + _this->_internal_set_info(from._internal_info()); + } else { + if (_this->_impl_.info_.IsDefault()) { + _this->_internal_set_info(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_lastchangeddate() != 0) { + _this->_impl_.lastchangeddate_ = from._impl_.lastchangeddate_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_hasdata() != 0) { + _this->_impl_.hasdata_ = from._impl_.hasdata_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusDataStatus::CopyFrom(const TusDataStatus& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusDataStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusDataStatus::InternalSwap(TusDataStatus* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.ownerid_, &other->_impl_.ownerid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.lastchangedauthorid_, &other->_impl_.lastchangedauthorid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.info_, &other->_impl_.info_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.hasdata_) + + sizeof(TusDataStatus::_impl_.hasdata_) + - PROTOBUF_FIELD_OFFSET(TusDataStatus, _impl_.lastchangeddate_)>( + reinterpret_cast(&_impl_.lastchangeddate_), + reinterpret_cast(&other->_impl_.lastchangeddate_)); +} + +// =================================================================== + +class TusData::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusData, _impl_._has_bits_); +}; + +TusData::TusData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusData_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusData) +} +PROTOBUF_NDEBUG_INLINE TusData::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusData& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + data_(arena, from.data_) {} + +TusData::TusData( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusData& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusData_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusData* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.status_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.status_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusData) +} +PROTOBUF_NDEBUG_INLINE TusData::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + data_(arena) {} + +inline void TusData::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.status_ = {}; +} +TusData::~TusData() { + // @@protoc_insertion_point(destructor:np2_structs.TusData) + SharedDtor(*this); +} +inline void TusData::SharedDtor(MessageLite& self) { + TusData& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.data_.Destroy(); + delete this_._impl_.status_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusData::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusData(arena); +} +constexpr auto TusData::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TusData), + alignof(TusData)); +} +constexpr auto TusData::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<20>{ + { + &_TusData_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusData::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusData::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusData::ByteSizeLong, + &TusData::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusData, _impl_._cached_size_), + true, + }, + "np2_structs.TusData", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<20> TusData_class_data_ = + TusData::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusData::GetClassData() const { + return TusData_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusData::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusData, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusData_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusData>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes data = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusData, _impl_.data_)}}, + // .np2_structs.TusDataStatus status = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(TusData, _impl_.status_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusDataStatus status = 1; + {PROTOBUF_FIELD_OFFSET(TusData, _impl_.status_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes data = 2; + {PROTOBUF_FIELD_OFFSET(TusData, _impl_.data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusDataStatus>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusData::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusData) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.status_ != nullptr); + _impl_.status_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusData::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusData& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusData::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusData& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusData) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusDataStatus status = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.status_, this_._impl_.status_->GetCachedSize(), target, + stream); + } + + // bytes data = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusData) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusData::ByteSizeLong(const MessageLite& base) { + const TusData& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusData::ByteSizeLong() const { + const TusData& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusData) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // bytes data = 2; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // .np2_structs.TusDataStatus status = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.status_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusData::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusData) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.status_ != nullptr); + if (_this->_impl_.status_ == nullptr) { + _this->_impl_.status_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.status_); + } else { + _this->_impl_.status_->MergeFrom(*from._impl_.status_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusData::CopyFrom(const TusData& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusData::InternalSwap(TusData* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + swap(_impl_.status_, other->_impl_.status_); +} + +// =================================================================== + +class TusDataStatusResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusDataStatusResponse, _impl_._has_bits_); +}; + +TusDataStatusResponse::TusDataStatusResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDataStatusResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusDataStatusResponse) +} +PROTOBUF_NDEBUG_INLINE TusDataStatusResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusDataStatusResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + status_{visibility, arena, from.status_} {} + +TusDataStatusResponse::TusDataStatusResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusDataStatusResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDataStatusResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusDataStatusResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusDataStatusResponse) +} +PROTOBUF_NDEBUG_INLINE TusDataStatusResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + status_{visibility, arena} {} + +inline void TusDataStatusResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +TusDataStatusResponse::~TusDataStatusResponse() { + // @@protoc_insertion_point(destructor:np2_structs.TusDataStatusResponse) + SharedDtor(*this); +} +inline void TusDataStatusResponse::SharedDtor(MessageLite& self) { + TusDataStatusResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusDataStatusResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusDataStatusResponse(arena); +} +constexpr auto TusDataStatusResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusDataStatusResponse, _impl_.status_) + + decltype(TusDataStatusResponse::_impl_.status_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusDataStatusResponse), alignof(TusDataStatusResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusDataStatusResponse::PlacementNew_, + sizeof(TusDataStatusResponse), + alignof(TusDataStatusResponse)); + } +} +constexpr auto TusDataStatusResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<34>{ + { + &_TusDataStatusResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusDataStatusResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusDataStatusResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusDataStatusResponse::ByteSizeLong, + &TusDataStatusResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusDataStatusResponse, _impl_._cached_size_), + true, + }, + "np2_structs.TusDataStatusResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<34> TusDataStatusResponse_class_data_ = + TusDataStatusResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusDataStatusResponse::GetClassData() const { + return TusDataStatusResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> +TusDataStatusResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusDataStatusResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusDataStatusResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusDataStatusResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.TusDataStatus status = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusDataStatusResponse, _impl_.status_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.TusDataStatus status = 1; + {PROTOBUF_FIELD_OFFSET(TusDataStatusResponse, _impl_.status_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusDataStatus>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusDataStatusResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusDataStatusResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.status_.Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusDataStatusResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusDataStatusResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusDataStatusResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusDataStatusResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusDataStatusResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.TusDataStatus status = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_status_size()); + i < n; i++) { + const auto& repfield = this_._internal_status().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusDataStatusResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusDataStatusResponse::ByteSizeLong(const MessageLite& base) { + const TusDataStatusResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusDataStatusResponse::ByteSizeLong() const { + const TusDataStatusResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusDataStatusResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .np2_structs.TusDataStatus status = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_status_size(); + for (const auto& msg : this_._internal_status()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusDataStatusResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusDataStatusResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_status()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_status()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusDataStatusResponse::CopyFrom(const TusDataStatusResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusDataStatusResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusDataStatusResponse::InternalSwap(TusDataStatusResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.status_.InternalSwap(&other->_impl_.status_); +} + +// =================================================================== + +class TusGetDataRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_._has_bits_); +}; + +TusGetDataRequest::TusGetDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetDataRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusGetDataRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +TusGetDataRequest::TusGetDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusGetDataRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusGetDataRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + _impl_.slotid_ = from._impl_.slotid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusGetDataRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void TusGetDataRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, user_), + 0, + offsetof(Impl_, slotid_) - + offsetof(Impl_, user_) + + sizeof(Impl_::slotid_)); +} +TusGetDataRequest::~TusGetDataRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetDataRequest) + SharedDtor(*this); +} +inline void TusGetDataRequest::SharedDtor(MessageLite& self) { + TusGetDataRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetDataRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetDataRequest(arena); +} +constexpr auto TusGetDataRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TusGetDataRequest), + alignof(TusGetDataRequest)); +} +constexpr auto TusGetDataRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<30>{ + { + &_TusGetDataRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetDataRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetDataRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetDataRequest::ByteSizeLong, + &TusGetDataRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetDataRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<30> TusGetDataRequest_class_data_ = + TusGetDataRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetDataRequest::GetClassData() const { + return TusGetDataRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusGetDataRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusGetDataRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetDataRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // int32 slotId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_.slotid_)}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_.user_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_.user_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 slotId = 2; + {PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetDataRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetDataRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + _impl_.slotid_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetDataRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetDataRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetDataRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_slotid(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetDataRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetDataRequest::ByteSizeLong(const MessageLite& base) { + const TusGetDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetDataRequest::ByteSizeLong() const { + const TusGetDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetDataRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetDataRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetDataRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetDataRequest::CopyFrom(const TusGetDataRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetDataRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetDataRequest::InternalSwap(TusGetDataRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_.slotid_) + + sizeof(TusGetDataRequest::_impl_.slotid_) + - PROTOBUF_FIELD_OFFSET(TusGetDataRequest, _impl_.user_)>( + reinterpret_cast(&_impl_.user_), + reinterpret_cast(&other->_impl_.user_)); +} + +// =================================================================== + +class TusGetMultiSlotDataStatusRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_._has_bits_); +}; + +TusGetMultiSlotDataStatusRequest::TusGetMultiSlotDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiSlotDataStatusRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetMultiSlotDataStatusRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiSlotDataStatusRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusGetMultiSlotDataStatusRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + slotidarray_{visibility, arena, from.slotidarray_}, + _slotidarray_cached_byte_size_{0} {} + +TusGetMultiSlotDataStatusRequest::TusGetMultiSlotDataStatusRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusGetMultiSlotDataStatusRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiSlotDataStatusRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusGetMultiSlotDataStatusRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusGetMultiSlotDataStatusRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiSlotDataStatusRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + slotidarray_{visibility, arena}, + _slotidarray_cached_byte_size_{0} {} + +inline void TusGetMultiSlotDataStatusRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.user_ = {}; +} +TusGetMultiSlotDataStatusRequest::~TusGetMultiSlotDataStatusRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetMultiSlotDataStatusRequest) + SharedDtor(*this); +} +inline void TusGetMultiSlotDataStatusRequest::SharedDtor(MessageLite& self) { + TusGetMultiSlotDataStatusRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetMultiSlotDataStatusRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetMultiSlotDataStatusRequest(arena); +} +constexpr auto TusGetMultiSlotDataStatusRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_.slotidarray_) + + decltype(TusGetMultiSlotDataStatusRequest::_impl_.slotidarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusGetMultiSlotDataStatusRequest), alignof(TusGetMultiSlotDataStatusRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusGetMultiSlotDataStatusRequest::PlacementNew_, + sizeof(TusGetMultiSlotDataStatusRequest), + alignof(TusGetMultiSlotDataStatusRequest)); + } +} +constexpr auto TusGetMultiSlotDataStatusRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<45>{ + { + &_TusGetMultiSlotDataStatusRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetMultiSlotDataStatusRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetMultiSlotDataStatusRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetMultiSlotDataStatusRequest::ByteSizeLong, + &TusGetMultiSlotDataStatusRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetMultiSlotDataStatusRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<45> TusGetMultiSlotDataStatusRequest_class_data_ = + TusGetMultiSlotDataStatusRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetMultiSlotDataStatusRequest::GetClassData() const { + return TusGetMultiSlotDataStatusRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusGetMultiSlotDataStatusRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusGetMultiSlotDataStatusRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetMultiSlotDataStatusRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated int32 slotIdArray = 2; + {::_pbi::TcParser::FastV32P1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_.slotidarray_)}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_.user_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_.user_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int32 slotIdArray = 2; + {PROTOBUF_FIELD_OFFSET(TusGetMultiSlotDataStatusRequest, _impl_.slotidarray_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetMultiSlotDataStatusRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetMultiSlotDataStatusRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.slotidarray_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetMultiSlotDataStatusRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetMultiSlotDataStatusRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetMultiSlotDataStatusRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetMultiSlotDataStatusRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetMultiSlotDataStatusRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._slotidarray_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, this_._internal_slotidarray(), byte_size, target); + } + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetMultiSlotDataStatusRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetMultiSlotDataStatusRequest::ByteSizeLong(const MessageLite& base) { + const TusGetMultiSlotDataStatusRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetMultiSlotDataStatusRequest::ByteSizeLong() const { + const TusGetMultiSlotDataStatusRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetMultiSlotDataStatusRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize( + this_._internal_slotidarray(), 1, + this_._impl_._slotidarray_cached_byte_size_); + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetMultiSlotDataStatusRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetMultiSlotDataStatusRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_slotidarray()->MergeFrom(from._internal_slotidarray()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetMultiSlotDataStatusRequest::CopyFrom(const TusGetMultiSlotDataStatusRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetMultiSlotDataStatusRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetMultiSlotDataStatusRequest::InternalSwap(TusGetMultiSlotDataStatusRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.slotidarray_.InternalSwap(&other->_impl_.slotidarray_); + swap(_impl_.user_, other->_impl_.user_); +} + +// =================================================================== + +class TusGetMultiUserDataStatusRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_._has_bits_); +}; + +TusGetMultiUserDataStatusRequest::TusGetMultiUserDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiUserDataStatusRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetMultiUserDataStatusRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiUserDataStatusRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusGetMultiUserDataStatusRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + users_{visibility, arena, from.users_} {} + +TusGetMultiUserDataStatusRequest::TusGetMultiUserDataStatusRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusGetMultiUserDataStatusRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetMultiUserDataStatusRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusGetMultiUserDataStatusRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.slotid_ = from._impl_.slotid_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusGetMultiUserDataStatusRequest) +} +PROTOBUF_NDEBUG_INLINE TusGetMultiUserDataStatusRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + users_{visibility, arena} {} + +inline void TusGetMultiUserDataStatusRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.slotid_ = {}; +} +TusGetMultiUserDataStatusRequest::~TusGetMultiUserDataStatusRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetMultiUserDataStatusRequest) + SharedDtor(*this); +} +inline void TusGetMultiUserDataStatusRequest::SharedDtor(MessageLite& self) { + TusGetMultiUserDataStatusRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetMultiUserDataStatusRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetMultiUserDataStatusRequest(arena); +} +constexpr auto TusGetMultiUserDataStatusRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_.users_) + + decltype(TusGetMultiUserDataStatusRequest::_impl_.users_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusGetMultiUserDataStatusRequest), alignof(TusGetMultiUserDataStatusRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusGetMultiUserDataStatusRequest::PlacementNew_, + sizeof(TusGetMultiUserDataStatusRequest), + alignof(TusGetMultiUserDataStatusRequest)); + } +} +constexpr auto TusGetMultiUserDataStatusRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<45>{ + { + &_TusGetMultiUserDataStatusRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetMultiUserDataStatusRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetMultiUserDataStatusRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetMultiUserDataStatusRequest::ByteSizeLong, + &TusGetMultiUserDataStatusRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetMultiUserDataStatusRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<45> TusGetMultiUserDataStatusRequest_class_data_ = + TusGetMultiUserDataStatusRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetMultiUserDataStatusRequest::GetClassData() const { + return TusGetMultiUserDataStatusRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusGetMultiUserDataStatusRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusGetMultiUserDataStatusRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetMultiUserDataStatusRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // int32 slotId = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_.slotid_)}}, + // repeated .np2_structs.TusUser users = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_.users_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.TusUser users = 1; + {PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_.users_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // int32 slotId = 2; + {PROTOBUF_FIELD_OFFSET(TusGetMultiUserDataStatusRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetMultiUserDataStatusRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetMultiUserDataStatusRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.users_.Clear(); + } + _impl_.slotid_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetMultiUserDataStatusRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetMultiUserDataStatusRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetMultiUserDataStatusRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetMultiUserDataStatusRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetMultiUserDataStatusRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.TusUser users = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_users_size()); + i < n; i++) { + const auto& repfield = this_._internal_users().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( + stream, this_._internal_slotid(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetMultiUserDataStatusRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetMultiUserDataStatusRequest::ByteSizeLong(const MessageLite& base) { + const TusGetMultiUserDataStatusRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetMultiUserDataStatusRequest::ByteSizeLong() const { + const TusGetMultiUserDataStatusRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetMultiUserDataStatusRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.TusUser users = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_users_size(); + for (const auto& msg : this_._internal_users()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // int32 slotId = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetMultiUserDataStatusRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetMultiUserDataStatusRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_users()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_users()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetMultiUserDataStatusRequest::CopyFrom(const TusGetMultiUserDataStatusRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetMultiUserDataStatusRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetMultiUserDataStatusRequest::InternalSwap(TusGetMultiUserDataStatusRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.users_.InternalSwap(&other->_impl_.users_); + swap(_impl_.slotid_, other->_impl_.slotid_); +} + +// =================================================================== + +class TusGetFriendsDataStatusRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_._has_bits_); +}; + +TusGetFriendsDataStatusRequest::TusGetFriendsDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetFriendsDataStatusRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusGetFriendsDataStatusRequest) +} +TusGetFriendsDataStatusRequest::TusGetFriendsDataStatusRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetFriendsDataStatusRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusGetFriendsDataStatusRequest_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE TusGetFriendsDataStatusRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void TusGetFriendsDataStatusRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, slotid_), + 0, + offsetof(Impl_, arraynum_) - + offsetof(Impl_, slotid_) + + sizeof(Impl_::arraynum_)); +} +TusGetFriendsDataStatusRequest::~TusGetFriendsDataStatusRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusGetFriendsDataStatusRequest) + SharedDtor(*this); +} +inline void TusGetFriendsDataStatusRequest::SharedDtor(MessageLite& self) { + TusGetFriendsDataStatusRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusGetFriendsDataStatusRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusGetFriendsDataStatusRequest(arena); +} +constexpr auto TusGetFriendsDataStatusRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TusGetFriendsDataStatusRequest), + alignof(TusGetFriendsDataStatusRequest)); +} +constexpr auto TusGetFriendsDataStatusRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<43>{ + { + &_TusGetFriendsDataStatusRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusGetFriendsDataStatusRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusGetFriendsDataStatusRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusGetFriendsDataStatusRequest::ByteSizeLong, + &TusGetFriendsDataStatusRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusGetFriendsDataStatusRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<43> TusGetFriendsDataStatusRequest_class_data_ = + TusGetFriendsDataStatusRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusGetFriendsDataStatusRequest::GetClassData() const { + return TusGetFriendsDataStatusRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 0, 2> +TusGetFriendsDataStatusRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + TusGetFriendsDataStatusRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusGetFriendsDataStatusRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 arrayNum = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.arraynum_)}}, + // int32 slotId = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.slotid_)}}, + // bool includeSelf = 2; + {::_pbi::TcParser::FastV8S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.includeself_)}}, + // int32 sortType = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.sorttype_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // int32 slotId = 1; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.slotid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // bool includeSelf = 2; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.includeself_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // int32 sortType = 3; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.sorttype_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // uint32 arrayNum = 4; + {PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.arraynum_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void TusGetFriendsDataStatusRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusGetFriendsDataStatusRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + ::memset(&_impl_.slotid_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.arraynum_) - + reinterpret_cast(&_impl_.slotid_)) + sizeof(_impl_.arraynum_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusGetFriendsDataStatusRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusGetFriendsDataStatusRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusGetFriendsDataStatusRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusGetFriendsDataStatusRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusGetFriendsDataStatusRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // int32 slotId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_slotid() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<1>( + stream, this_._internal_slotid(), target); + } + } + + // bool includeSelf = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_includeself() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_includeself(), target); + } + } + + // int32 sortType = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_sorttype() != 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>( + stream, this_._internal_sorttype(), target); + } + } + + // uint32 arrayNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_arraynum() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_arraynum(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusGetFriendsDataStatusRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusGetFriendsDataStatusRequest::ByteSizeLong(const MessageLite& base) { + const TusGetFriendsDataStatusRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusGetFriendsDataStatusRequest::ByteSizeLong() const { + const TusGetFriendsDataStatusRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusGetFriendsDataStatusRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // int32 slotId = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_slotid() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_slotid()); + } + } + // bool includeSelf = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_includeself() != 0) { + total_size += 2; + } + } + // int32 sortType = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_sorttype() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_sorttype()); + } + } + // uint32 arrayNum = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_arraynum() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_arraynum()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusGetFriendsDataStatusRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusGetFriendsDataStatusRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_slotid() != 0) { + _this->_impl_.slotid_ = from._impl_.slotid_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_includeself() != 0) { + _this->_impl_.includeself_ = from._impl_.includeself_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_sorttype() != 0) { + _this->_impl_.sorttype_ = from._impl_.sorttype_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_arraynum() != 0) { + _this->_impl_.arraynum_ = from._impl_.arraynum_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusGetFriendsDataStatusRequest::CopyFrom(const TusGetFriendsDataStatusRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusGetFriendsDataStatusRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusGetFriendsDataStatusRequest::InternalSwap(TusGetFriendsDataStatusRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.arraynum_) + + sizeof(TusGetFriendsDataStatusRequest::_impl_.arraynum_) + - PROTOBUF_FIELD_OFFSET(TusGetFriendsDataStatusRequest, _impl_.slotid_)>( + reinterpret_cast(&_impl_.slotid_), + reinterpret_cast(&other->_impl_.slotid_)); +} + +// =================================================================== + +class TusDeleteMultiSlotDataRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_._has_bits_); +}; + +TusDeleteMultiSlotDataRequest::TusDeleteMultiSlotDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDeleteMultiSlotDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.TusDeleteMultiSlotDataRequest) +} +PROTOBUF_NDEBUG_INLINE TusDeleteMultiSlotDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::TusDeleteMultiSlotDataRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + slotidarray_{visibility, arena, from.slotidarray_}, + _slotidarray_cached_byte_size_{0} {} + +TusDeleteMultiSlotDataRequest::TusDeleteMultiSlotDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const TusDeleteMultiSlotDataRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, TusDeleteMultiSlotDataRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TusDeleteMultiSlotDataRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.user_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.TusDeleteMultiSlotDataRequest) +} +PROTOBUF_NDEBUG_INLINE TusDeleteMultiSlotDataRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + slotidarray_{visibility, arena}, + _slotidarray_cached_byte_size_{0} {} + +inline void TusDeleteMultiSlotDataRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.user_ = {}; +} +TusDeleteMultiSlotDataRequest::~TusDeleteMultiSlotDataRequest() { + // @@protoc_insertion_point(destructor:np2_structs.TusDeleteMultiSlotDataRequest) + SharedDtor(*this); +} +inline void TusDeleteMultiSlotDataRequest::SharedDtor(MessageLite& self) { + TusDeleteMultiSlotDataRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.user_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL TusDeleteMultiSlotDataRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) TusDeleteMultiSlotDataRequest(arena); +} +constexpr auto TusDeleteMultiSlotDataRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_.slotidarray_) + + decltype(TusDeleteMultiSlotDataRequest::_impl_.slotidarray_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TusDeleteMultiSlotDataRequest), alignof(TusDeleteMultiSlotDataRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TusDeleteMultiSlotDataRequest::PlacementNew_, + sizeof(TusDeleteMultiSlotDataRequest), + alignof(TusDeleteMultiSlotDataRequest)); + } +} +constexpr auto TusDeleteMultiSlotDataRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<42>{ + { + &_TusDeleteMultiSlotDataRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TusDeleteMultiSlotDataRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TusDeleteMultiSlotDataRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TusDeleteMultiSlotDataRequest::ByteSizeLong, + &TusDeleteMultiSlotDataRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_._cached_size_), + true, + }, + "np2_structs.TusDeleteMultiSlotDataRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<42> TusDeleteMultiSlotDataRequest_class_data_ = + TusDeleteMultiSlotDataRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +TusDeleteMultiSlotDataRequest::GetClassData() const { + return TusDeleteMultiSlotDataRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +TusDeleteMultiSlotDataRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + TusDeleteMultiSlotDataRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::TusDeleteMultiSlotDataRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated int32 slotIdArray = 2; + {::_pbi::TcParser::FastV32P1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_.slotidarray_)}}, + // .np2_structs.TusUser user = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_.user_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.TusUser user = 1; + {PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_.user_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int32 slotIdArray = 2; + {PROTOBUF_FIELD_OFFSET(TusDeleteMultiSlotDataRequest, _impl_.slotidarray_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::TusUser>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void TusDeleteMultiSlotDataRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.TusDeleteMultiSlotDataRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.slotidarray_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.user_ != nullptr); + _impl_.user_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL TusDeleteMultiSlotDataRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const TusDeleteMultiSlotDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL TusDeleteMultiSlotDataRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const TusDeleteMultiSlotDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.TusDeleteMultiSlotDataRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.user_, this_._impl_.user_->GetCachedSize(), target, + stream); + } + + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + { + int byte_size = this_._impl_._slotidarray_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, this_._internal_slotidarray(), byte_size, target); + } + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.TusDeleteMultiSlotDataRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t TusDeleteMultiSlotDataRequest::ByteSizeLong(const MessageLite& base) { + const TusDeleteMultiSlotDataRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t TusDeleteMultiSlotDataRequest::ByteSizeLong() const { + const TusDeleteMultiSlotDataRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.TusDeleteMultiSlotDataRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated int32 slotIdArray = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize( + this_._internal_slotidarray(), 1, + this_._impl_._slotidarray_cached_byte_size_); + } + // .np2_structs.TusUser user = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.user_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void TusDeleteMultiSlotDataRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.TusDeleteMultiSlotDataRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_slotidarray()->MergeFrom(from._internal_slotidarray()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.user_ != nullptr); + if (_this->_impl_.user_ == nullptr) { + _this->_impl_.user_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.user_); + } else { + _this->_impl_.user_->MergeFrom(*from._impl_.user_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void TusDeleteMultiSlotDataRequest::CopyFrom(const TusDeleteMultiSlotDataRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.TusDeleteMultiSlotDataRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TusDeleteMultiSlotDataRequest::InternalSwap(TusDeleteMultiSlotDataRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.slotidarray_.InternalSwap(&other->_impl_.slotidarray_); + swap(_impl_.user_, other->_impl_.user_); +} + +// =================================================================== + +class SetPresenceRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_._has_bits_); +}; + +SetPresenceRequest::SetPresenceRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetPresenceRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SetPresenceRequest) +} +PROTOBUF_NDEBUG_INLINE SetPresenceRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SetPresenceRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + title_(arena, from.title_), + status_(arena, from.status_), + comment_(arena, from.comment_), + data_(arena, from.data_) {} + +SetPresenceRequest::SetPresenceRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SetPresenceRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetPresenceRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SetPresenceRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.SetPresenceRequest) +} +PROTOBUF_NDEBUG_INLINE SetPresenceRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + title_(arena), + status_(arena), + comment_(arena), + data_(arena) {} + +inline void SetPresenceRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +SetPresenceRequest::~SetPresenceRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SetPresenceRequest) + SharedDtor(*this); +} +inline void SetPresenceRequest::SharedDtor(MessageLite& self) { + SetPresenceRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.title_.Destroy(); + this_._impl_.status_.Destroy(); + this_._impl_.comment_.Destroy(); + this_._impl_.data_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SetPresenceRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SetPresenceRequest(arena); +} +constexpr auto SetPresenceRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SetPresenceRequest), + alignof(SetPresenceRequest)); +} +constexpr auto SetPresenceRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_SetPresenceRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SetPresenceRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SetPresenceRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SetPresenceRequest::ByteSizeLong, + &SetPresenceRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SetPresenceRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> SetPresenceRequest_class_data_ = + SetPresenceRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SetPresenceRequest::GetClassData() const { + return SetPresenceRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 57, 2> +SetPresenceRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + SetPresenceRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SetPresenceRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes data = 4; + {::_pbi::TcParser::FastBS1, + {34, 3, 0, + PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.data_)}}, + // string title = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.title_)}}, + // string status = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, + PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.status_)}}, + // string comment = 3; + {::_pbi::TcParser::FastUS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.comment_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string title = 1; + {PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.title_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string status = 2; + {PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.status_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string comment = 3; + {PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.comment_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes data = 4; + {PROTOBUF_FIELD_OFFSET(SetPresenceRequest, _impl_.data_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\36\5\6\7\0\0\0\0" + "np2_structs.SetPresenceRequest" + "title" + "status" + "comment" + }}, +}; +PROTOBUF_NOINLINE void SetPresenceRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SetPresenceRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.title_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.status_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.comment_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SetPresenceRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SetPresenceRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SetPresenceRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SetPresenceRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SetPresenceRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // string title = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_title().empty()) { + const ::std::string& _s = this_._internal_title(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.SetPresenceRequest.title"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + } + + // string status = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_status().empty()) { + const ::std::string& _s = this_._internal_status(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.SetPresenceRequest.status"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + } + + // string comment = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_comment().empty()) { + const ::std::string& _s = this_._internal_comment(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.SetPresenceRequest.comment"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + // bytes data = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SetPresenceRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SetPresenceRequest::ByteSizeLong(const MessageLite& base) { + const SetPresenceRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SetPresenceRequest::ByteSizeLong() const { + const SetPresenceRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SetPresenceRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // string title = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_title().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_title()); + } + } + // string status = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_status().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_status()); + } + } + // string comment = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_comment().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_comment()); + } + } + // bytes data = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SetPresenceRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SetPresenceRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_title().empty()) { + _this->_internal_set_title(from._internal_title()); + } else { + if (_this->_impl_.title_.IsDefault()) { + _this->_internal_set_title(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_status().empty()) { + _this->_internal_set_status(from._internal_status()); + } else { + if (_this->_impl_.status_.IsDefault()) { + _this->_internal_set_status(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_comment().empty()) { + _this->_internal_set_comment(from._internal_comment()); + } else { + if (_this->_impl_.comment_.IsDefault()) { + _this->_internal_set_comment(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SetPresenceRequest::CopyFrom(const SetPresenceRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SetPresenceRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SetPresenceRequest::InternalSwap(SetPresenceRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.title_, &other->_impl_.title_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.status_, &other->_impl_.status_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.comment_, &other->_impl_.comment_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); +} + +// =================================================================== + +class MatchingSearchCondition::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_._has_bits_); +}; + +MatchingSearchCondition::MatchingSearchCondition(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingSearchCondition_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingSearchCondition) +} +MatchingSearchCondition::MatchingSearchCondition( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingSearchCondition& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingSearchCondition_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(from._impl_) { + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} +PROTOBUF_NDEBUG_INLINE MatchingSearchCondition::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void MatchingSearchCondition::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, attr_type_), + 0, + offsetof(Impl_, comp_value_) - + offsetof(Impl_, attr_type_) + + sizeof(Impl_::comp_value_)); +} +MatchingSearchCondition::~MatchingSearchCondition() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingSearchCondition) + SharedDtor(*this); +} +inline void MatchingSearchCondition::SharedDtor(MessageLite& self) { + MatchingSearchCondition& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingSearchCondition::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingSearchCondition(arena); +} +constexpr auto MatchingSearchCondition::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(MatchingSearchCondition), + alignof(MatchingSearchCondition)); +} +constexpr auto MatchingSearchCondition::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<36>{ + { + &_MatchingSearchCondition_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingSearchCondition::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingSearchCondition::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingSearchCondition::ByteSizeLong, + &MatchingSearchCondition::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingSearchCondition", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<36> MatchingSearchCondition_class_data_ = + MatchingSearchCondition::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingSearchCondition::GetClassData() const { + return MatchingSearchCondition_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 0, 2> +MatchingSearchCondition::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + MatchingSearchCondition_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingSearchCondition>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 comp_value = 4; + {::_pbi::TcParser::FastV32S1, + {32, 3, 0, + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.comp_value_)}}, + // uint32 attr_type = 1; + {::_pbi::TcParser::FastV32S1, + {8, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.attr_type_)}}, + // uint32 attr_id = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.attr_id_)}}, + // uint32 comp_op = 3; + {::_pbi::TcParser::FastV32S1, + {24, 2, 0, + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.comp_op_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 attr_type = 1; + {PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.attr_type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 attr_id = 2; + {PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.attr_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 comp_op = 3; + {PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.comp_op_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 comp_value = 4; + {PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.comp_value_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void MatchingSearchCondition::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingSearchCondition) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + ::memset(&_impl_.attr_type_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.comp_value_) - + reinterpret_cast(&_impl_.attr_type_)) + sizeof(_impl_.comp_value_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingSearchCondition::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingSearchCondition& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingSearchCondition::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingSearchCondition& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingSearchCondition) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 attr_type = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_attr_type() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_attr_type(), target); + } + } + + // uint32 attr_id = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_attr_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_attr_id(), target); + } + } + + // uint32 comp_op = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_comp_op() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_comp_op(), target); + } + } + + // uint32 comp_value = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_comp_value() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 4, this_._internal_comp_value(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingSearchCondition) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingSearchCondition::ByteSizeLong(const MessageLite& base) { + const MatchingSearchCondition& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingSearchCondition::ByteSizeLong() const { + const MatchingSearchCondition& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingSearchCondition) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // uint32 attr_type = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_attr_type() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_attr_type()); + } + } + // uint32 attr_id = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_attr_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_attr_id()); + } + } + // uint32 comp_op = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_comp_op() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_comp_op()); + } + } + // uint32 comp_value = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_comp_value() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_comp_value()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingSearchCondition::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingSearchCondition) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_attr_type() != 0) { + _this->_impl_.attr_type_ = from._impl_.attr_type_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_attr_id() != 0) { + _this->_impl_.attr_id_ = from._impl_.attr_id_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_comp_op() != 0) { + _this->_impl_.comp_op_ = from._impl_.comp_op_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_comp_value() != 0) { + _this->_impl_.comp_value_ = from._impl_.comp_value_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingSearchCondition::CopyFrom(const MatchingSearchCondition& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingSearchCondition) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingSearchCondition::InternalSwap(MatchingSearchCondition* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.comp_value_) + + sizeof(MatchingSearchCondition::_impl_.comp_value_) + - PROTOBUF_FIELD_OFFSET(MatchingSearchCondition, _impl_.attr_type_)>( + reinterpret_cast(&_impl_.attr_type_), + reinterpret_cast(&other->_impl_.attr_type_)); +} + +// =================================================================== + +class MatchingAttr::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_._has_bits_); +}; + +MatchingAttr::MatchingAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingAttr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingAttr) +} +PROTOBUF_NDEBUG_INLINE MatchingAttr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingAttr& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + data_(arena, from.data_) {} + +MatchingAttr::MatchingAttr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingAttr& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingAttr_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingAttr* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, attr_type_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, attr_type_), + offsetof(Impl_, num_) - + offsetof(Impl_, attr_type_) + + sizeof(Impl_::num_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingAttr) +} +PROTOBUF_NDEBUG_INLINE MatchingAttr::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + data_(arena) {} + +inline void MatchingAttr::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, attr_type_), + 0, + offsetof(Impl_, num_) - + offsetof(Impl_, attr_type_) + + sizeof(Impl_::num_)); +} +MatchingAttr::~MatchingAttr() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingAttr) + SharedDtor(*this); +} +inline void MatchingAttr::SharedDtor(MessageLite& self) { + MatchingAttr& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.data_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingAttr::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingAttr(arena); +} +constexpr auto MatchingAttr::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(MatchingAttr), + alignof(MatchingAttr)); +} +constexpr auto MatchingAttr::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<25>{ + { + &_MatchingAttr_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingAttr::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingAttr::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingAttr::ByteSizeLong, + &MatchingAttr::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingAttr", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<25> MatchingAttr_class_data_ = + MatchingAttr::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingAttr::GetClassData() const { + return MatchingAttr_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 0, 2> +MatchingAttr::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + MatchingAttr_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingAttr>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes data = 4; + {::_pbi::TcParser::FastBS1, + {34, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.data_)}}, + // uint32 attr_type = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.attr_type_)}}, + // uint32 attr_id = 2; + {::_pbi::TcParser::FastV32S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.attr_id_)}}, + // uint32 num = 3; + {::_pbi::TcParser::FastV32S1, + {24, 3, 0, + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.num_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 attr_type = 1; + {PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.attr_type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 attr_id = 2; + {PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.attr_id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 num = 3; + {PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.num_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // bytes data = 4; + {PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void MatchingAttr::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingAttr) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.data_.ClearNonDefaultToEmpty(); + } + if (BatchCheckHasBit(cached_has_bits, 0x0000000eU)) { + ::memset(&_impl_.attr_type_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.num_) - + reinterpret_cast(&_impl_.attr_type_)) + sizeof(_impl_.num_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingAttr::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingAttr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingAttr::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingAttr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingAttr) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 attr_type = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_attr_type() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_attr_type(), target); + } + } + + // uint32 attr_id = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_attr_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_attr_id(), target); + } + } + + // uint32 num = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_num() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this_._internal_num(), target); + } + } + + // bytes data = 4; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + const ::std::string& _s = this_._internal_data(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingAttr) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingAttr::ByteSizeLong(const MessageLite& base) { + const MatchingAttr& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingAttr::ByteSizeLong() const { + const MatchingAttr& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingAttr) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // bytes data = 4; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_data().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_data()); + } + } + // uint32 attr_type = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_attr_type() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_attr_type()); + } + } + // uint32 attr_id = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_attr_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_attr_id()); + } + } + // uint32 num = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_num() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_num()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingAttr::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingAttr) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_data().empty()) { + _this->_internal_set_data(from._internal_data()); + } else { + if (_this->_impl_.data_.IsDefault()) { + _this->_internal_set_data(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_attr_type() != 0) { + _this->_impl_.attr_type_ = from._impl_.attr_type_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_attr_id() != 0) { + _this->_impl_.attr_id_ = from._impl_.attr_id_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_num() != 0) { + _this->_impl_.num_ = from._impl_.num_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingAttr::CopyFrom(const MatchingAttr& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingAttr) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingAttr::InternalSwap(MatchingAttr* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.num_) + + sizeof(MatchingAttr::_impl_.num_) + - PROTOBUF_FIELD_OFFSET(MatchingAttr, _impl_.attr_type_)>( + reinterpret_cast(&_impl_.attr_type_), + reinterpret_cast(&other->_impl_.attr_type_)); +} + +// =================================================================== + +class CreateRoomGUIRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_._has_bits_); +}; + +CreateRoomGUIRequest::CreateRoomGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateRoomGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.CreateRoomGUIRequest) +} +PROTOBUF_NDEBUG_INLINE CreateRoomGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::CreateRoomGUIRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + game_attrs_{visibility, arena, from.game_attrs_} {} + +CreateRoomGUIRequest::CreateRoomGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const CreateRoomGUIRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateRoomGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + CreateRoomGUIRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, total_slots_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, total_slots_), + offsetof(Impl_, stealth_) - + offsetof(Impl_, total_slots_) + + sizeof(Impl_::stealth_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.CreateRoomGUIRequest) +} +PROTOBUF_NDEBUG_INLINE CreateRoomGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + game_attrs_{visibility, arena} {} + +inline void CreateRoomGUIRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, total_slots_), + 0, + offsetof(Impl_, stealth_) - + offsetof(Impl_, total_slots_) + + sizeof(Impl_::stealth_)); +} +CreateRoomGUIRequest::~CreateRoomGUIRequest() { + // @@protoc_insertion_point(destructor:np2_structs.CreateRoomGUIRequest) + SharedDtor(*this); +} +inline void CreateRoomGUIRequest::SharedDtor(MessageLite& self) { + CreateRoomGUIRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL CreateRoomGUIRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) CreateRoomGUIRequest(arena); +} +constexpr auto CreateRoomGUIRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.game_attrs_) + + decltype(CreateRoomGUIRequest::_impl_.game_attrs_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(CreateRoomGUIRequest), alignof(CreateRoomGUIRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&CreateRoomGUIRequest::PlacementNew_, + sizeof(CreateRoomGUIRequest), + alignof(CreateRoomGUIRequest)); + } +} +constexpr auto CreateRoomGUIRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<33>{ + { + &_CreateRoomGUIRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &CreateRoomGUIRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &CreateRoomGUIRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &CreateRoomGUIRequest::ByteSizeLong, + &CreateRoomGUIRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_._cached_size_), + true, + }, + "np2_structs.CreateRoomGUIRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<33> CreateRoomGUIRequest_class_data_ = + CreateRoomGUIRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +CreateRoomGUIRequest::GetClassData() const { + return CreateRoomGUIRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 1, 0, 2> +CreateRoomGUIRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + CreateRoomGUIRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::CreateRoomGUIRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 total_slots = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.total_slots_)}}, + // uint32 private_slots = 2; + {::_pbi::TcParser::FastV32S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.private_slots_)}}, + // bool privilege_grant = 3; + {::_pbi::TcParser::FastV8S1, + {24, 3, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.privilege_grant_)}}, + // bool stealth = 4; + {::_pbi::TcParser::FastV8S1, + {32, 4, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.stealth_)}}, + // repeated .np2_structs.MatchingAttr game_attrs = 5; + {::_pbi::TcParser::FastMtR1, + {42, 0, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.game_attrs_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 total_slots = 1; + {PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.total_slots_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 private_slots = 2; + {PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.private_slots_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // bool privilege_grant = 3; + {PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.privilege_grant_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // bool stealth = 4; + {PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.stealth_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // repeated .np2_structs.MatchingAttr game_attrs = 5; + {PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.game_attrs_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void CreateRoomGUIRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.CreateRoomGUIRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.game_attrs_.Clear(); + } + if (BatchCheckHasBit(cached_has_bits, 0x0000001eU)) { + ::memset(&_impl_.total_slots_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.stealth_) - + reinterpret_cast(&_impl_.total_slots_)) + sizeof(_impl_.stealth_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL CreateRoomGUIRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const CreateRoomGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL CreateRoomGUIRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const CreateRoomGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.CreateRoomGUIRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 total_slots = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_total_slots() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_total_slots(), target); + } + } + + // uint32 private_slots = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_private_slots() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_private_slots(), target); + } + } + + // bool privilege_grant = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_privilege_grant() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_privilege_grant(), target); + } + } + + // bool stealth = 4; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_stealth() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this_._internal_stealth(), target); + } + } + + // repeated .np2_structs.MatchingAttr game_attrs = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_game_attrs_size()); + i < n; i++) { + const auto& repfield = this_._internal_game_attrs().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.CreateRoomGUIRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t CreateRoomGUIRequest::ByteSizeLong(const MessageLite& base) { + const CreateRoomGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t CreateRoomGUIRequest::ByteSizeLong() const { + const CreateRoomGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.CreateRoomGUIRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + // repeated .np2_structs.MatchingAttr game_attrs = 5; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_game_attrs_size(); + for (const auto& msg : this_._internal_game_attrs()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint32 total_slots = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_total_slots() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_total_slots()); + } + } + // uint32 private_slots = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_private_slots() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_private_slots()); + } + } + // bool privilege_grant = 3; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_privilege_grant() != 0) { + total_size += 2; + } + } + // bool stealth = 4; + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_stealth() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void CreateRoomGUIRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.CreateRoomGUIRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_game_attrs()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_game_attrs()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_total_slots() != 0) { + _this->_impl_.total_slots_ = from._impl_.total_slots_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_private_slots() != 0) { + _this->_impl_.private_slots_ = from._impl_.private_slots_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_privilege_grant() != 0) { + _this->_impl_.privilege_grant_ = from._impl_.privilege_grant_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (from._internal_stealth() != 0) { + _this->_impl_.stealth_ = from._impl_.stealth_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void CreateRoomGUIRequest::CopyFrom(const CreateRoomGUIRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.CreateRoomGUIRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void CreateRoomGUIRequest::InternalSwap(CreateRoomGUIRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.game_attrs_.InternalSwap(&other->_impl_.game_attrs_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.stealth_) + + sizeof(CreateRoomGUIRequest::_impl_.stealth_) + - PROTOBUF_FIELD_OFFSET(CreateRoomGUIRequest, _impl_.total_slots_)>( + reinterpret_cast(&_impl_.total_slots_), + reinterpret_cast(&other->_impl_.total_slots_)); +} + +// =================================================================== + +class GUIUserInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_._has_bits_); +}; + +GUIUserInfo::GUIUserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GUIUserInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GUIUserInfo) +} +PROTOBUF_NDEBUG_INLINE GUIUserInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GUIUserInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +GUIUserInfo::GUIUserInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GUIUserInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GUIUserInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GUIUserInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.info_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.info_) + : nullptr; + _impl_.owner_ = from._impl_.owner_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.GUIUserInfo) +} +PROTOBUF_NDEBUG_INLINE GUIUserInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void GUIUserInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, info_), + 0, + offsetof(Impl_, owner_) - + offsetof(Impl_, info_) + + sizeof(Impl_::owner_)); +} +GUIUserInfo::~GUIUserInfo() { + // @@protoc_insertion_point(destructor:np2_structs.GUIUserInfo) + SharedDtor(*this); +} +inline void GUIUserInfo::SharedDtor(MessageLite& self) { + GUIUserInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.info_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GUIUserInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GUIUserInfo(arena); +} +constexpr auto GUIUserInfo::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(GUIUserInfo), + alignof(GUIUserInfo)); +} +constexpr auto GUIUserInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<24>{ + { + &_GUIUserInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GUIUserInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GUIUserInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GUIUserInfo::ByteSizeLong, + &GUIUserInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_._cached_size_), + true, + }, + "np2_structs.GUIUserInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> GUIUserInfo_class_data_ = + GUIUserInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GUIUserInfo::GetClassData() const { + return GUIUserInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +GUIUserInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GUIUserInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GUIUserInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bool owner = 2; + {::_pbi::TcParser::FastV8S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_.owner_)}}, + // .np2_structs.UserInfo info = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_.info_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.UserInfo info = 1; + {PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_.info_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool owner = 2; + {PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_.owner_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::UserInfo>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GUIUserInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GUIUserInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.info_ != nullptr); + _impl_.info_->Clear(); + } + _impl_.owner_ = false; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GUIUserInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GUIUserInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GUIUserInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GUIUserInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GUIUserInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.UserInfo info = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.info_, this_._impl_.info_->GetCachedSize(), target, + stream); + } + + // bool owner = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_owner() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_owner(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GUIUserInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GUIUserInfo::ByteSizeLong(const MessageLite& base) { + const GUIUserInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GUIUserInfo::ByteSizeLong() const { + const GUIUserInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GUIUserInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.UserInfo info = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.info_); + } + // bool owner = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_owner() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GUIUserInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GUIUserInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.info_ != nullptr); + if (_this->_impl_.info_ == nullptr) { + _this->_impl_.info_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.info_); + } else { + _this->_impl_.info_->MergeFrom(*from._impl_.info_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_owner() != 0) { + _this->_impl_.owner_ = from._impl_.owner_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GUIUserInfo::CopyFrom(const GUIUserInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GUIUserInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GUIUserInfo::InternalSwap(GUIUserInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_.owner_) + + sizeof(GUIUserInfo::_impl_.owner_) + - PROTOBUF_FIELD_OFFSET(GUIUserInfo, _impl_.info_)>( + reinterpret_cast(&_impl_.info_), + reinterpret_cast(&other->_impl_.info_)); +} + +// =================================================================== + +class MatchingRoomStatus::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_._has_bits_); +}; + +MatchingRoomStatus::MatchingRoomStatus(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingRoomStatus_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingRoomStatus) +} +PROTOBUF_NDEBUG_INLINE MatchingRoomStatus::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingRoomStatus& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + members_{visibility, arena, from.members_}, + id_(arena, from.id_), + kick_actor_(arena, from.kick_actor_), + opt_(arena, from.opt_) {} + +MatchingRoomStatus::MatchingRoomStatus( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingRoomStatus& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingRoomStatus_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingRoomStatus* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingRoomStatus) +} +PROTOBUF_NDEBUG_INLINE MatchingRoomStatus::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + members_{visibility, arena}, + id_(arena), + kick_actor_(arena), + opt_(arena) {} + +inline void MatchingRoomStatus::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +MatchingRoomStatus::~MatchingRoomStatus() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingRoomStatus) + SharedDtor(*this); +} +inline void MatchingRoomStatus::SharedDtor(MessageLite& self) { + MatchingRoomStatus& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.id_.Destroy(); + this_._impl_.kick_actor_.Destroy(); + this_._impl_.opt_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingRoomStatus::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingRoomStatus(arena); +} +constexpr auto MatchingRoomStatus::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.members_) + + decltype(MatchingRoomStatus::_impl_.members_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(MatchingRoomStatus), alignof(MatchingRoomStatus), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&MatchingRoomStatus::PlacementNew_, + sizeof(MatchingRoomStatus), + alignof(MatchingRoomStatus)); + } +} +constexpr auto MatchingRoomStatus::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_MatchingRoomStatus_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingRoomStatus::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingRoomStatus::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingRoomStatus::ByteSizeLong, + &MatchingRoomStatus::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingRoomStatus", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> MatchingRoomStatus_class_data_ = + MatchingRoomStatus::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingRoomStatus::GetClassData() const { + return MatchingRoomStatus_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 49, 2> +MatchingRoomStatus::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + MatchingRoomStatus_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingRoomStatus>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes opt = 4; + {::_pbi::TcParser::FastBS1, + {34, 3, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.opt_)}}, + // bytes id = 1; + {::_pbi::TcParser::FastBS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.id_)}}, + // repeated .np2_structs.GUIUserInfo members = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.members_)}}, + // string kick_actor = 3; + {::_pbi::TcParser::FastUS1, + {26, 2, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.kick_actor_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes id = 1; + {PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .np2_structs.GUIUserInfo members = 2; + {PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.members_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // string kick_actor = 3; + {PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.kick_actor_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes opt = 4; + {PROTOBUF_FIELD_OFFSET(MatchingRoomStatus, _impl_.opt_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::GUIUserInfo>()}, + }}, + {{ + "\36\0\0\12\0\0\0\0" + "np2_structs.MatchingRoomStatus" + "kick_actor" + }}, +}; +PROTOBUF_NOINLINE void MatchingRoomStatus::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingRoomStatus) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.members_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.id_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + _impl_.kick_actor_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + _impl_.opt_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingRoomStatus::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingRoomStatus& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingRoomStatus::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingRoomStatus& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingRoomStatus) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes id = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_id().empty()) { + const ::std::string& _s = this_._internal_id(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + // repeated .np2_structs.GUIUserInfo members = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_members_size()); + i < n; i++) { + const auto& repfield = this_._internal_members().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // string kick_actor = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_kick_actor().empty()) { + const ::std::string& _s = this_._internal_kick_actor(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "np2_structs.MatchingRoomStatus.kick_actor"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + } + + // bytes opt = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_opt().empty()) { + const ::std::string& _s = this_._internal_opt(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingRoomStatus) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingRoomStatus::ByteSizeLong(const MessageLite& base) { + const MatchingRoomStatus& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingRoomStatus::ByteSizeLong() const { + const MatchingRoomStatus& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingRoomStatus) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // repeated .np2_structs.GUIUserInfo members = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_members_size(); + for (const auto& msg : this_._internal_members()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // bytes id = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_id().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_id()); + } + } + // string kick_actor = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!this_._internal_kick_actor().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_kick_actor()); + } + } + // bytes opt = 4; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!this_._internal_opt().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_opt()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingRoomStatus::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingRoomStatus) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_members()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_members()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_id().empty()) { + _this->_internal_set_id(from._internal_id()); + } else { + if (_this->_impl_.id_.IsDefault()) { + _this->_internal_set_id(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (!from._internal_kick_actor().empty()) { + _this->_internal_set_kick_actor(from._internal_kick_actor()); + } else { + if (_this->_impl_.kick_actor_.IsDefault()) { + _this->_internal_set_kick_actor(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (!from._internal_opt().empty()) { + _this->_internal_set_opt(from._internal_opt()); + } else { + if (_this->_impl_.opt_.IsDefault()) { + _this->_internal_set_opt(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingRoomStatus::CopyFrom(const MatchingRoomStatus& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingRoomStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingRoomStatus::InternalSwap(MatchingRoomStatus* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.members_.InternalSwap(&other->_impl_.members_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, &other->_impl_.id_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.kick_actor_, &other->_impl_.kick_actor_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.opt_, &other->_impl_.opt_, arena); +} + +// =================================================================== + +class GetRoomListGUIRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_._has_bits_); +}; + +GetRoomListGUIRequest::GetRoomListGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomListGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetRoomListGUIRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomListGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetRoomListGUIRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + conds_{visibility, arena, from.conds_}, + attrs_{visibility, arena, from.attrs_} {} + +GetRoomListGUIRequest::GetRoomListGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetRoomListGUIRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomListGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetRoomListGUIRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, range_start_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, range_start_), + offsetof(Impl_, range_max_) - + offsetof(Impl_, range_start_) + + sizeof(Impl_::range_max_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetRoomListGUIRequest) +} +PROTOBUF_NDEBUG_INLINE GetRoomListGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + conds_{visibility, arena}, + attrs_{visibility, arena} {} + +inline void GetRoomListGUIRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, range_start_), + 0, + offsetof(Impl_, range_max_) - + offsetof(Impl_, range_start_) + + sizeof(Impl_::range_max_)); +} +GetRoomListGUIRequest::~GetRoomListGUIRequest() { + // @@protoc_insertion_point(destructor:np2_structs.GetRoomListGUIRequest) + SharedDtor(*this); +} +inline void GetRoomListGUIRequest::SharedDtor(MessageLite& self) { + GetRoomListGUIRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetRoomListGUIRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetRoomListGUIRequest(arena); +} +constexpr auto GetRoomListGUIRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.conds_) + + decltype(GetRoomListGUIRequest::_impl_.conds_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.attrs_) + + decltype(GetRoomListGUIRequest::_impl_.attrs_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetRoomListGUIRequest), alignof(GetRoomListGUIRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetRoomListGUIRequest::PlacementNew_, + sizeof(GetRoomListGUIRequest), + alignof(GetRoomListGUIRequest)); + } +} +constexpr auto GetRoomListGUIRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<34>{ + { + &_GetRoomListGUIRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetRoomListGUIRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetRoomListGUIRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetRoomListGUIRequest::ByteSizeLong, + &GetRoomListGUIRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_._cached_size_), + true, + }, + "np2_structs.GetRoomListGUIRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<34> GetRoomListGUIRequest_class_data_ = + GetRoomListGUIRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetRoomListGUIRequest::GetClassData() const { + return GetRoomListGUIRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 2, 0, 2> +GetRoomListGUIRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetRoomListGUIRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetRoomListGUIRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.MatchingAttr attrs = 4; + {::_pbi::TcParser::FastMtR1, + {34, 1, 1, + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.attrs_)}}, + // uint32 range_start = 1; + {::_pbi::TcParser::FastV32S1, + {8, 2, 0, + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.range_start_)}}, + // uint32 range_max = 2; + {::_pbi::TcParser::FastV32S1, + {16, 3, 0, + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.range_max_)}}, + // repeated .np2_structs.MatchingSearchCondition conds = 3; + {::_pbi::TcParser::FastMtR1, + {26, 0, 0, + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.conds_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 range_start = 1; + {PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.range_start_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 range_max = 2; + {PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.range_max_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.MatchingSearchCondition conds = 3; + {PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.conds_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.MatchingAttr attrs = 4; + {PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.attrs_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingSearchCondition>()}, + {::_pbi::TcParser::GetTable<::np2_structs::MatchingAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetRoomListGUIRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetRoomListGUIRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.conds_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.attrs_.Clear(); + } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000000cU)) { + ::memset(&_impl_.range_start_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.range_max_) - + reinterpret_cast(&_impl_.range_start_)) + sizeof(_impl_.range_max_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetRoomListGUIRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetRoomListGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetRoomListGUIRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetRoomListGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetRoomListGUIRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 range_start = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_range_start() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_range_start(), target); + } + } + + // uint32 range_max = 2; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_range_max() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_range_max(), target); + } + } + + // repeated .np2_structs.MatchingSearchCondition conds = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_conds_size()); + i < n; i++) { + const auto& repfield = this_._internal_conds().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.MatchingAttr attrs = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attrs_size()); + i < n; i++) { + const auto& repfield = this_._internal_attrs().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetRoomListGUIRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetRoomListGUIRequest::ByteSizeLong(const MessageLite& base) { + const GetRoomListGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetRoomListGUIRequest::ByteSizeLong() const { + const GetRoomListGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetRoomListGUIRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + // repeated .np2_structs.MatchingSearchCondition conds = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_conds_size(); + for (const auto& msg : this_._internal_conds()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.MatchingAttr attrs = 4; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_attrs_size(); + for (const auto& msg : this_._internal_attrs()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint32 range_start = 1; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_range_start() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_range_start()); + } + } + // uint32 range_max = 2; + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_range_max() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_range_max()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetRoomListGUIRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetRoomListGUIRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_conds()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_conds()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_attrs()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attrs()); + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_range_start() != 0) { + _this->_impl_.range_start_ = from._impl_.range_start_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (from._internal_range_max() != 0) { + _this->_impl_.range_max_ = from._impl_.range_max_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetRoomListGUIRequest::CopyFrom(const GetRoomListGUIRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetRoomListGUIRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetRoomListGUIRequest::InternalSwap(GetRoomListGUIRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.conds_.InternalSwap(&other->_impl_.conds_); + _impl_.attrs_.InternalSwap(&other->_impl_.attrs_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.range_max_) + + sizeof(GetRoomListGUIRequest::_impl_.range_max_) + - PROTOBUF_FIELD_OFFSET(GetRoomListGUIRequest, _impl_.range_start_)>( + reinterpret_cast(&_impl_.range_start_), + reinterpret_cast(&other->_impl_.range_start_)); +} + +// =================================================================== + +class MatchingRoom::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_._has_bits_); +}; + +MatchingRoom::MatchingRoom(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingRoom_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingRoom) +} +PROTOBUF_NDEBUG_INLINE MatchingRoom::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingRoom& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + attr_{visibility, arena, from.attr_}, + id_(arena, from.id_) {} + +MatchingRoom::MatchingRoom( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingRoom& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingRoom_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingRoom* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingRoom) +} +PROTOBUF_NDEBUG_INLINE MatchingRoom::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + attr_{visibility, arena}, + id_(arena) {} + +inline void MatchingRoom::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +MatchingRoom::~MatchingRoom() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingRoom) + SharedDtor(*this); +} +inline void MatchingRoom::SharedDtor(MessageLite& self) { + MatchingRoom& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.id_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingRoom::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingRoom(arena); +} +constexpr auto MatchingRoom::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_.attr_) + + decltype(MatchingRoom::_impl_.attr_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(MatchingRoom), alignof(MatchingRoom), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&MatchingRoom::PlacementNew_, + sizeof(MatchingRoom), + alignof(MatchingRoom)); + } +} +constexpr auto MatchingRoom::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<25>{ + { + &_MatchingRoom_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingRoom::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingRoom::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingRoom::ByteSizeLong, + &MatchingRoom::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingRoom", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<25> MatchingRoom_class_data_ = + MatchingRoom::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingRoom::GetClassData() const { + return MatchingRoom_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +MatchingRoom::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + MatchingRoom_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingRoom>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.MatchingAttr attr = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_.attr_)}}, + // bytes id = 1; + {::_pbi::TcParser::FastBS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_.id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes id = 1; + {PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_.id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .np2_structs.MatchingAttr attr = 2; + {PROTOBUF_FIELD_OFFSET(MatchingRoom, _impl_.attr_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void MatchingRoom::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingRoom) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.attr_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + _impl_.id_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingRoom::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingRoom& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingRoom::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingRoom& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingRoom) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes id = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_id().empty()) { + const ::std::string& _s = this_._internal_id(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + // repeated .np2_structs.MatchingAttr attr = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attr_size()); + i < n; i++) { + const auto& repfield = this_._internal_attr().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingRoom) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingRoom::ByteSizeLong(const MessageLite& base) { + const MatchingRoom& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingRoom::ByteSizeLong() const { + const MatchingRoom& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingRoom) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.MatchingAttr attr = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_attr_size(); + for (const auto& msg : this_._internal_attr()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // bytes id = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!this_._internal_id().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_id()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingRoom::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingRoom) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_attr()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attr()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (!from._internal_id().empty()) { + _this->_internal_set_id(from._internal_id()); + } else { + if (_this->_impl_.id_.IsDefault()) { + _this->_internal_set_id(""); + } + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingRoom::CopyFrom(const MatchingRoom& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingRoom) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingRoom::InternalSwap(MatchingRoom* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.attr_.InternalSwap(&other->_impl_.attr_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, &other->_impl_.id_, arena); +} + +// =================================================================== + +class MatchingRoomList::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_._has_bits_); +}; + +MatchingRoomList::MatchingRoomList(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingRoomList_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingRoomList) +} +PROTOBUF_NDEBUG_INLINE MatchingRoomList::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingRoomList& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + rooms_{visibility, arena, from.rooms_} {} + +MatchingRoomList::MatchingRoomList( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingRoomList& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingRoomList_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingRoomList* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, start_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, start_), + offsetof(Impl_, total_) - + offsetof(Impl_, start_) + + sizeof(Impl_::total_)); + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingRoomList) +} +PROTOBUF_NDEBUG_INLINE MatchingRoomList::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + rooms_{visibility, arena} {} + +inline void MatchingRoomList::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, start_), + 0, + offsetof(Impl_, total_) - + offsetof(Impl_, start_) + + sizeof(Impl_::total_)); +} +MatchingRoomList::~MatchingRoomList() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingRoomList) + SharedDtor(*this); +} +inline void MatchingRoomList::SharedDtor(MessageLite& self) { + MatchingRoomList& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingRoomList::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingRoomList(arena); +} +constexpr auto MatchingRoomList::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.rooms_) + + decltype(MatchingRoomList::_impl_.rooms_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(MatchingRoomList), alignof(MatchingRoomList), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&MatchingRoomList::PlacementNew_, + sizeof(MatchingRoomList), + alignof(MatchingRoomList)); + } +} +constexpr auto MatchingRoomList::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<29>{ + { + &_MatchingRoomList_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingRoomList::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingRoomList::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingRoomList::ByteSizeLong, + &MatchingRoomList::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingRoomList", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<29> MatchingRoomList_class_data_ = + MatchingRoomList::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingRoomList::GetClassData() const { + return MatchingRoomList_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 0, 2> +MatchingRoomList::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + MatchingRoomList_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingRoomList>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint32 start = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.start_)}}, + // uint32 total = 2; + {::_pbi::TcParser::FastV32S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.total_)}}, + // repeated .np2_structs.MatchingRoom rooms = 3; + {::_pbi::TcParser::FastMtR1, + {26, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.rooms_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 start = 1; + {PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.start_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 total = 2; + {PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.total_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // repeated .np2_structs.MatchingRoom rooms = 3; + {PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.rooms_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingRoom>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void MatchingRoomList::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingRoomList) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.rooms_.Clear(); + } + if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) { + ::memset(&_impl_.start_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.total_) - + reinterpret_cast(&_impl_.start_)) + sizeof(_impl_.total_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingRoomList::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingRoomList& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingRoomList::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingRoomList& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingRoomList) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // uint32 start = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_start() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this_._internal_start(), target); + } + } + + // uint32 total = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_total() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_total(), target); + } + } + + // repeated .np2_structs.MatchingRoom rooms = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_rooms_size()); + i < n; i++) { + const auto& repfield = this_._internal_rooms().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingRoomList) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingRoomList::ByteSizeLong(const MessageLite& base) { + const MatchingRoomList& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingRoomList::ByteSizeLong() const { + const MatchingRoomList& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingRoomList) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // repeated .np2_structs.MatchingRoom rooms = 3; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_rooms_size(); + for (const auto& msg : this_._internal_rooms()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint32 start = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_start() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_start()); + } + } + // uint32 total = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_total() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_total()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingRoomList::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingRoomList) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_rooms()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_rooms()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_start() != 0) { + _this->_impl_.start_ = from._impl_.start_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_total() != 0) { + _this->_impl_.total_ = from._impl_.total_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingRoomList::CopyFrom(const MatchingRoomList& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingRoomList) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingRoomList::InternalSwap(MatchingRoomList* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.rooms_.InternalSwap(&other->_impl_.rooms_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.total_) + + sizeof(MatchingRoomList::_impl_.total_) + - PROTOBUF_FIELD_OFFSET(MatchingRoomList, _impl_.start_)>( + reinterpret_cast(&_impl_.start_), + reinterpret_cast(&other->_impl_.start_)); +} + +// =================================================================== + +class MatchingGuiRoomId::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingGuiRoomId, _impl_._has_bits_); +}; + +MatchingGuiRoomId::MatchingGuiRoomId(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingGuiRoomId_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingGuiRoomId) +} +PROTOBUF_NDEBUG_INLINE MatchingGuiRoomId::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingGuiRoomId& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + id_(arena, from.id_) {} + +MatchingGuiRoomId::MatchingGuiRoomId( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingGuiRoomId& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingGuiRoomId_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingGuiRoomId* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingGuiRoomId) +} +PROTOBUF_NDEBUG_INLINE MatchingGuiRoomId::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + id_(arena) {} + +inline void MatchingGuiRoomId::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +MatchingGuiRoomId::~MatchingGuiRoomId() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingGuiRoomId) + SharedDtor(*this); +} +inline void MatchingGuiRoomId::SharedDtor(MessageLite& self) { + MatchingGuiRoomId& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.id_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingGuiRoomId::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingGuiRoomId(arena); +} +constexpr auto MatchingGuiRoomId::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(MatchingGuiRoomId), + alignof(MatchingGuiRoomId)); +} +constexpr auto MatchingGuiRoomId::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<30>{ + { + &_MatchingGuiRoomId_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingGuiRoomId::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingGuiRoomId::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingGuiRoomId::ByteSizeLong, + &MatchingGuiRoomId::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingGuiRoomId, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingGuiRoomId", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<30> MatchingGuiRoomId_class_data_ = + MatchingGuiRoomId::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingGuiRoomId::GetClassData() const { + return MatchingGuiRoomId_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> +MatchingGuiRoomId::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingGuiRoomId, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + MatchingGuiRoomId_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingGuiRoomId>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bytes id = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(MatchingGuiRoomId, _impl_.id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes id = 1; + {PROTOBUF_FIELD_OFFSET(MatchingGuiRoomId, _impl_.id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void MatchingGuiRoomId::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingGuiRoomId) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.id_.ClearNonDefaultToEmpty(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingGuiRoomId::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingGuiRoomId& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingGuiRoomId::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingGuiRoomId& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingGuiRoomId) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes id = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_id().empty()) { + const ::std::string& _s = this_._internal_id(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingGuiRoomId) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingGuiRoomId::ByteSizeLong(const MessageLite& base) { + const MatchingGuiRoomId& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingGuiRoomId::ByteSizeLong() const { + const MatchingGuiRoomId& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingGuiRoomId) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // bytes id = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_id().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_id()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingGuiRoomId::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingGuiRoomId) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_id().empty()) { + _this->_internal_set_id(from._internal_id()); + } else { + if (_this->_impl_.id_.IsDefault()) { + _this->_internal_set_id(""); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingGuiRoomId::CopyFrom(const MatchingGuiRoomId& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingGuiRoomId) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingGuiRoomId::InternalSwap(MatchingGuiRoomId* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, &other->_impl_.id_, arena); +} + +// =================================================================== + +class SetRoomSearchFlagGUI::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_._has_bits_); +}; + +SetRoomSearchFlagGUI::SetRoomSearchFlagGUI(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomSearchFlagGUI_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SetRoomSearchFlagGUI) +} +PROTOBUF_NDEBUG_INLINE SetRoomSearchFlagGUI::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SetRoomSearchFlagGUI& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + roomid_(arena, from.roomid_) {} + +SetRoomSearchFlagGUI::SetRoomSearchFlagGUI( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SetRoomSearchFlagGUI& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SetRoomSearchFlagGUI_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SetRoomSearchFlagGUI* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.stealth_ = from._impl_.stealth_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.SetRoomSearchFlagGUI) +} +PROTOBUF_NDEBUG_INLINE SetRoomSearchFlagGUI::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + roomid_(arena) {} + +inline void SetRoomSearchFlagGUI::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.stealth_ = {}; +} +SetRoomSearchFlagGUI::~SetRoomSearchFlagGUI() { + // @@protoc_insertion_point(destructor:np2_structs.SetRoomSearchFlagGUI) + SharedDtor(*this); +} +inline void SetRoomSearchFlagGUI::SharedDtor(MessageLite& self) { + SetRoomSearchFlagGUI& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.roomid_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SetRoomSearchFlagGUI::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SetRoomSearchFlagGUI(arena); +} +constexpr auto SetRoomSearchFlagGUI::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SetRoomSearchFlagGUI), + alignof(SetRoomSearchFlagGUI)); +} +constexpr auto SetRoomSearchFlagGUI::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<33>{ + { + &_SetRoomSearchFlagGUI_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SetRoomSearchFlagGUI::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SetRoomSearchFlagGUI::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SetRoomSearchFlagGUI::ByteSizeLong, + &SetRoomSearchFlagGUI::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_._cached_size_), + true, + }, + "np2_structs.SetRoomSearchFlagGUI", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<33> SetRoomSearchFlagGUI_class_data_ = + SetRoomSearchFlagGUI::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SetRoomSearchFlagGUI::GetClassData() const { + return SetRoomSearchFlagGUI_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> +SetRoomSearchFlagGUI::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + SetRoomSearchFlagGUI_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SetRoomSearchFlagGUI>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // bool stealth = 2; + {::_pbi::TcParser::FastV8S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_.stealth_)}}, + // bytes roomid = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_.roomid_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes roomid = 1; + {PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_.roomid_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // bool stealth = 2; + {PROTOBUF_FIELD_OFFSET(SetRoomSearchFlagGUI, _impl_.stealth_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + }}, + // no aux_entries + {{ + }}, +}; +PROTOBUF_NOINLINE void SetRoomSearchFlagGUI::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SetRoomSearchFlagGUI) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + _impl_.roomid_.ClearNonDefaultToEmpty(); + } + _impl_.stealth_ = false; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SetRoomSearchFlagGUI::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SetRoomSearchFlagGUI& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SetRoomSearchFlagGUI::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SetRoomSearchFlagGUI& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SetRoomSearchFlagGUI) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // bytes roomid = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_roomid().empty()) { + const ::std::string& _s = this_._internal_roomid(); + target = stream->WriteBytesMaybeAliased(1, _s, target); + } + } + + // bool stealth = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_stealth() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_stealth(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SetRoomSearchFlagGUI) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SetRoomSearchFlagGUI::ByteSizeLong(const MessageLite& base) { + const SetRoomSearchFlagGUI& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SetRoomSearchFlagGUI::ByteSizeLong() const { + const SetRoomSearchFlagGUI& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SetRoomSearchFlagGUI) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // bytes roomid = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!this_._internal_roomid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_roomid()); + } + } + // bool stealth = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_stealth() != 0) { + total_size += 2; + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SetRoomSearchFlagGUI::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SetRoomSearchFlagGUI) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (!from._internal_roomid().empty()) { + _this->_internal_set_roomid(from._internal_roomid()); + } else { + if (_this->_impl_.roomid_.IsDefault()) { + _this->_internal_set_roomid(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_stealth() != 0) { + _this->_impl_.stealth_ = from._impl_.stealth_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SetRoomSearchFlagGUI::CopyFrom(const SetRoomSearchFlagGUI& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SetRoomSearchFlagGUI) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SetRoomSearchFlagGUI::InternalSwap(SetRoomSearchFlagGUI* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.roomid_, &other->_impl_.roomid_, arena); + swap(_impl_.stealth_, other->_impl_.stealth_); +} + +// =================================================================== + +class QuickMatchGUIRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_._has_bits_); +}; + +QuickMatchGUIRequest::QuickMatchGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, QuickMatchGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.QuickMatchGUIRequest) +} +PROTOBUF_NDEBUG_INLINE QuickMatchGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::QuickMatchGUIRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + conds_{visibility, arena, from.conds_} {} + +QuickMatchGUIRequest::QuickMatchGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const QuickMatchGUIRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, QuickMatchGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + QuickMatchGUIRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.available_num_ = from._impl_.available_num_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.QuickMatchGUIRequest) +} +PROTOBUF_NDEBUG_INLINE QuickMatchGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + conds_{visibility, arena} {} + +inline void QuickMatchGUIRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.available_num_ = {}; +} +QuickMatchGUIRequest::~QuickMatchGUIRequest() { + // @@protoc_insertion_point(destructor:np2_structs.QuickMatchGUIRequest) + SharedDtor(*this); +} +inline void QuickMatchGUIRequest::SharedDtor(MessageLite& self) { + QuickMatchGUIRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL QuickMatchGUIRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) QuickMatchGUIRequest(arena); +} +constexpr auto QuickMatchGUIRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_.conds_) + + decltype(QuickMatchGUIRequest::_impl_.conds_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(QuickMatchGUIRequest), alignof(QuickMatchGUIRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&QuickMatchGUIRequest::PlacementNew_, + sizeof(QuickMatchGUIRequest), + alignof(QuickMatchGUIRequest)); + } +} +constexpr auto QuickMatchGUIRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<33>{ + { + &_QuickMatchGUIRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &QuickMatchGUIRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &QuickMatchGUIRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &QuickMatchGUIRequest::ByteSizeLong, + &QuickMatchGUIRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_._cached_size_), + true, + }, + "np2_structs.QuickMatchGUIRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<33> QuickMatchGUIRequest_class_data_ = + QuickMatchGUIRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +QuickMatchGUIRequest::GetClassData() const { + return QuickMatchGUIRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> +QuickMatchGUIRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + QuickMatchGUIRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::QuickMatchGUIRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // uint32 available_num = 2; + {::_pbi::TcParser::FastV32S1, + {16, 1, 0, + PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_.available_num_)}}, + // repeated .np2_structs.MatchingSearchCondition conds = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_.conds_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.MatchingSearchCondition conds = 1; + {PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_.conds_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 available_num = 2; + {PROTOBUF_FIELD_OFFSET(QuickMatchGUIRequest, _impl_.available_num_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingSearchCondition>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void QuickMatchGUIRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.QuickMatchGUIRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.conds_.Clear(); + } + _impl_.available_num_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL QuickMatchGUIRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const QuickMatchGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL QuickMatchGUIRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const QuickMatchGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.QuickMatchGUIRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.MatchingSearchCondition conds = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_conds_size()); + i < n; i++) { + const auto& repfield = this_._internal_conds().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // uint32 available_num = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_available_num() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 2, this_._internal_available_num(), target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.QuickMatchGUIRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t QuickMatchGUIRequest::ByteSizeLong(const MessageLite& base) { + const QuickMatchGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t QuickMatchGUIRequest::ByteSizeLong() const { + const QuickMatchGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.QuickMatchGUIRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.MatchingSearchCondition conds = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_conds_size(); + for (const auto& msg : this_._internal_conds()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // uint32 available_num = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_available_num() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this_._internal_available_num()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void QuickMatchGUIRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.QuickMatchGUIRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_conds()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_conds()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (from._internal_available_num() != 0) { + _this->_impl_.available_num_ = from._impl_.available_num_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void QuickMatchGUIRequest::CopyFrom(const QuickMatchGUIRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.QuickMatchGUIRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void QuickMatchGUIRequest::InternalSwap(QuickMatchGUIRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.conds_.InternalSwap(&other->_impl_.conds_); + swap(_impl_.available_num_, other->_impl_.available_num_); +} + +// =================================================================== + +class SearchJoinRoomGUIRequest::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_._has_bits_); +}; + +SearchJoinRoomGUIRequest::SearchJoinRoomGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SearchJoinRoomGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.SearchJoinRoomGUIRequest) +} +PROTOBUF_NDEBUG_INLINE SearchJoinRoomGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::SearchJoinRoomGUIRequest& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + conds_{visibility, arena, from.conds_}, + attrs_{visibility, arena, from.attrs_} {} + +SearchJoinRoomGUIRequest::SearchJoinRoomGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const SearchJoinRoomGUIRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, SearchJoinRoomGUIRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SearchJoinRoomGUIRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.SearchJoinRoomGUIRequest) +} +PROTOBUF_NDEBUG_INLINE SearchJoinRoomGUIRequest::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + conds_{visibility, arena}, + attrs_{visibility, arena} {} + +inline void SearchJoinRoomGUIRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +SearchJoinRoomGUIRequest::~SearchJoinRoomGUIRequest() { + // @@protoc_insertion_point(destructor:np2_structs.SearchJoinRoomGUIRequest) + SharedDtor(*this); +} +inline void SearchJoinRoomGUIRequest::SharedDtor(MessageLite& self) { + SearchJoinRoomGUIRequest& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) SearchJoinRoomGUIRequest(arena); +} +constexpr auto SearchJoinRoomGUIRequest::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_.conds_) + + decltype(SearchJoinRoomGUIRequest::_impl_.conds_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_.attrs_) + + decltype(SearchJoinRoomGUIRequest::_impl_.attrs_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SearchJoinRoomGUIRequest), alignof(SearchJoinRoomGUIRequest), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SearchJoinRoomGUIRequest::PlacementNew_, + sizeof(SearchJoinRoomGUIRequest), + alignof(SearchJoinRoomGUIRequest)); + } +} +constexpr auto SearchJoinRoomGUIRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<37>{ + { + &_SearchJoinRoomGUIRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SearchJoinRoomGUIRequest::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SearchJoinRoomGUIRequest::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SearchJoinRoomGUIRequest::ByteSizeLong, + &SearchJoinRoomGUIRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_._cached_size_), + true, + }, + "np2_structs.SearchJoinRoomGUIRequest", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<37> SearchJoinRoomGUIRequest_class_data_ = + SearchJoinRoomGUIRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +SearchJoinRoomGUIRequest::GetClassData() const { + return SearchJoinRoomGUIRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +SearchJoinRoomGUIRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + SearchJoinRoomGUIRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::SearchJoinRoomGUIRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.MatchingAttr attrs = 2; + {::_pbi::TcParser::FastMtR1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_.attrs_)}}, + // repeated .np2_structs.MatchingSearchCondition conds = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_.conds_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.MatchingSearchCondition conds = 1; + {PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_.conds_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.MatchingAttr attrs = 2; + {PROTOBUF_FIELD_OFFSET(SearchJoinRoomGUIRequest, _impl_.attrs_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingSearchCondition>()}, + {::_pbi::TcParser::GetTable<::np2_structs::MatchingAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void SearchJoinRoomGUIRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.SearchJoinRoomGUIRequest) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.conds_.Clear(); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _impl_.attrs_.Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const SearchJoinRoomGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const SearchJoinRoomGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.SearchJoinRoomGUIRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.MatchingSearchCondition conds = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_conds_size()); + i < n; i++) { + const auto& repfield = this_._internal_conds().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + // repeated .np2_structs.MatchingAttr attrs = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attrs_size()); + i < n; i++) { + const auto& repfield = this_._internal_attrs().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.SearchJoinRoomGUIRequest) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t SearchJoinRoomGUIRequest::ByteSizeLong(const MessageLite& base) { + const SearchJoinRoomGUIRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t SearchJoinRoomGUIRequest::ByteSizeLong() const { + const SearchJoinRoomGUIRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.SearchJoinRoomGUIRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.MatchingSearchCondition conds = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_conds_size(); + for (const auto& msg : this_._internal_conds()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .np2_structs.MatchingAttr attrs = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + total_size += 1UL * this_._internal_attrs_size(); + for (const auto& msg : this_._internal_attrs()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void SearchJoinRoomGUIRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.SearchJoinRoomGUIRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_conds()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_conds()); + } + if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) { + _this->_internal_mutable_attrs()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attrs()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void SearchJoinRoomGUIRequest::CopyFrom(const SearchJoinRoomGUIRequest& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.SearchJoinRoomGUIRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SearchJoinRoomGUIRequest::InternalSwap(SearchJoinRoomGUIRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.conds_.InternalSwap(&other->_impl_.conds_); + _impl_.attrs_.InternalSwap(&other->_impl_.attrs_); +} + +// =================================================================== + +class MatchingSearchJoinRoomInfo::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_._has_bits_); +}; + +MatchingSearchJoinRoomInfo::MatchingSearchJoinRoomInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingSearchJoinRoomInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.MatchingSearchJoinRoomInfo) +} +PROTOBUF_NDEBUG_INLINE MatchingSearchJoinRoomInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::MatchingSearchJoinRoomInfo& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + attr_{visibility, arena, from.attr_} {} + +MatchingSearchJoinRoomInfo::MatchingSearchJoinRoomInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const MatchingSearchJoinRoomInfo& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, MatchingSearchJoinRoomInfo_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + MatchingSearchJoinRoomInfo* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.room_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.room_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.MatchingSearchJoinRoomInfo) +} +PROTOBUF_NDEBUG_INLINE MatchingSearchJoinRoomInfo::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + attr_{visibility, arena} {} + +inline void MatchingSearchJoinRoomInfo::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.room_ = {}; +} +MatchingSearchJoinRoomInfo::~MatchingSearchJoinRoomInfo() { + // @@protoc_insertion_point(destructor:np2_structs.MatchingSearchJoinRoomInfo) + SharedDtor(*this); +} +inline void MatchingSearchJoinRoomInfo::SharedDtor(MessageLite& self) { + MatchingSearchJoinRoomInfo& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.room_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) MatchingSearchJoinRoomInfo(arena); +} +constexpr auto MatchingSearchJoinRoomInfo::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_.attr_) + + decltype(MatchingSearchJoinRoomInfo::_impl_.attr_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(MatchingSearchJoinRoomInfo), alignof(MatchingSearchJoinRoomInfo), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&MatchingSearchJoinRoomInfo::PlacementNew_, + sizeof(MatchingSearchJoinRoomInfo), + alignof(MatchingSearchJoinRoomInfo)); + } +} +constexpr auto MatchingSearchJoinRoomInfo::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<39>{ + { + &_MatchingSearchJoinRoomInfo_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MatchingSearchJoinRoomInfo::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &MatchingSearchJoinRoomInfo::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &MatchingSearchJoinRoomInfo::ByteSizeLong, + &MatchingSearchJoinRoomInfo::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_._cached_size_), + true, + }, + "np2_structs.MatchingSearchJoinRoomInfo", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<39> MatchingSearchJoinRoomInfo_class_data_ = + MatchingSearchJoinRoomInfo::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +MatchingSearchJoinRoomInfo::GetClassData() const { + return MatchingSearchJoinRoomInfo_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +MatchingSearchJoinRoomInfo::_table_ = { + { + PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + MatchingSearchJoinRoomInfo_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::MatchingSearchJoinRoomInfo>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.MatchingAttr attr = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 1, + PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_.attr_)}}, + // .np2_structs.MatchingRoomStatus room = 1; + {::_pbi::TcParser::FastMtS1, + {10, 1, 0, + PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_.room_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.MatchingRoomStatus room = 1; + {PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_.room_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .np2_structs.MatchingAttr attr = 2; + {PROTOBUF_FIELD_OFFSET(MatchingSearchJoinRoomInfo, _impl_.attr_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::MatchingRoomStatus>()}, + {::_pbi::TcParser::GetTable<::np2_structs::MatchingAttr>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void MatchingSearchJoinRoomInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.MatchingSearchJoinRoomInfo) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.attr_.Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.room_ != nullptr); + _impl_.room_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const MatchingSearchJoinRoomInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const MatchingSearchJoinRoomInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.MatchingSearchJoinRoomInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.MatchingRoomStatus room = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.room_, this_._impl_.room_->GetCachedSize(), target, + stream); + } + + // repeated .np2_structs.MatchingAttr attr = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_attr_size()); + i < n; i++) { + const auto& repfield = this_._internal_attr().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.MatchingSearchJoinRoomInfo) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t MatchingSearchJoinRoomInfo::ByteSizeLong(const MessageLite& base) { + const MatchingSearchJoinRoomInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t MatchingSearchJoinRoomInfo::ByteSizeLong() const { + const MatchingSearchJoinRoomInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.MatchingSearchJoinRoomInfo) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // repeated .np2_structs.MatchingAttr attr = 2; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_attr_size(); + for (const auto& msg : this_._internal_attr()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // .np2_structs.MatchingRoomStatus room = 1; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.room_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void MatchingSearchJoinRoomInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.MatchingSearchJoinRoomInfo) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_attr()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_attr()); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.room_ != nullptr); + if (_this->_impl_.room_ == nullptr) { + _this->_impl_.room_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.room_); + } else { + _this->_impl_.room_->MergeFrom(*from._impl_.room_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void MatchingSearchJoinRoomInfo::CopyFrom(const MatchingSearchJoinRoomInfo& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.MatchingSearchJoinRoomInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MatchingSearchJoinRoomInfo::InternalSwap(MatchingSearchJoinRoomInfo* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.attr_.InternalSwap(&other->_impl_.attr_); + swap(_impl_.room_, other->_impl_.room_); +} + +// =================================================================== + +class RoomMemberDataExternal::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_._has_bits_); +}; + +RoomMemberDataExternal::RoomMemberDataExternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberDataExternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.RoomMemberDataExternal) +} +PROTOBUF_NDEBUG_INLINE RoomMemberDataExternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::RoomMemberDataExternal& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +RoomMemberDataExternal::RoomMemberDataExternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const RoomMemberDataExternal& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, RoomMemberDataExternal_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + RoomMemberDataExternal* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.userinfo_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.userinfo_) + : nullptr; + _impl_.role_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.role_) + : nullptr; + _impl_.joindate_ = from._impl_.joindate_; + + // @@protoc_insertion_point(copy_constructor:np2_structs.RoomMemberDataExternal) +} +PROTOBUF_NDEBUG_INLINE RoomMemberDataExternal::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void RoomMemberDataExternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, userinfo_), + 0, + offsetof(Impl_, joindate_) - + offsetof(Impl_, userinfo_) + + sizeof(Impl_::joindate_)); +} +RoomMemberDataExternal::~RoomMemberDataExternal() { + // @@protoc_insertion_point(destructor:np2_structs.RoomMemberDataExternal) + SharedDtor(*this); +} +inline void RoomMemberDataExternal::SharedDtor(MessageLite& self) { + RoomMemberDataExternal& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.userinfo_; + delete this_._impl_.role_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL RoomMemberDataExternal::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) RoomMemberDataExternal(arena); +} +constexpr auto RoomMemberDataExternal::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(RoomMemberDataExternal), + alignof(RoomMemberDataExternal)); +} +constexpr auto RoomMemberDataExternal::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<35>{ + { + &_RoomMemberDataExternal_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &RoomMemberDataExternal::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &RoomMemberDataExternal::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &RoomMemberDataExternal::ByteSizeLong, + &RoomMemberDataExternal::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_._cached_size_), + true, + }, + "np2_structs.RoomMemberDataExternal", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<35> RoomMemberDataExternal_class_data_ = + RoomMemberDataExternal::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +RoomMemberDataExternal::GetClassData() const { + return RoomMemberDataExternal_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> +RoomMemberDataExternal::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + RoomMemberDataExternal_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataExternal>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .np2_structs.UserInfo userInfo = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.userinfo_)}}, + // uint64 joinDate = 2; + {::_pbi::TcParser::FastV64S1, + {16, 2, 0, + PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.joindate_)}}, + // .np2_structs.uint8 role = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 1, + PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.role_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.UserInfo userInfo = 1; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.userinfo_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 joinDate = 2; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.joindate_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // .np2_structs.uint8 role = 3; + {PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.role_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::UserInfo>()}, + {::_pbi::TcParser::GetTable<::np2_structs::uint8>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void RoomMemberDataExternal::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.RoomMemberDataExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.userinfo_ != nullptr); + _impl_.userinfo_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.role_ != nullptr); + _impl_.role_->Clear(); + } + } + _impl_.joindate_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL RoomMemberDataExternal::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const RoomMemberDataExternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL RoomMemberDataExternal::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const RoomMemberDataExternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.RoomMemberDataExternal) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.UserInfo userInfo = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.userinfo_, this_._impl_.userinfo_->GetCachedSize(), target, + stream); + } + + // uint64 joinDate = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_joindate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this_._internal_joindate(), target); + } + } + + // .np2_structs.uint8 role = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.role_, this_._impl_.role_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.RoomMemberDataExternal) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t RoomMemberDataExternal::ByteSizeLong(const MessageLite& base) { + const RoomMemberDataExternal& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t RoomMemberDataExternal::ByteSizeLong() const { + const RoomMemberDataExternal& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.RoomMemberDataExternal) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + // .np2_structs.UserInfo userInfo = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.userinfo_); + } + // .np2_structs.uint8 role = 3; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.role_); + } + // uint64 joinDate = 2; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_joindate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_joindate()); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void RoomMemberDataExternal::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.RoomMemberDataExternal) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.userinfo_ != nullptr); + if (_this->_impl_.userinfo_ == nullptr) { + _this->_impl_.userinfo_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.userinfo_); + } else { + _this->_impl_.userinfo_->MergeFrom(*from._impl_.userinfo_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.role_ != nullptr); + if (_this->_impl_.role_ == nullptr) { + _this->_impl_.role_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.role_); + } else { + _this->_impl_.role_->MergeFrom(*from._impl_.role_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (from._internal_joindate() != 0) { + _this->_impl_.joindate_ = from._impl_.joindate_; + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void RoomMemberDataExternal::CopyFrom(const RoomMemberDataExternal& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.RoomMemberDataExternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void RoomMemberDataExternal::InternalSwap(RoomMemberDataExternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.joindate_) + + sizeof(RoomMemberDataExternal::_impl_.joindate_) + - PROTOBUF_FIELD_OFFSET(RoomMemberDataExternal, _impl_.userinfo_)>( + reinterpret_cast(&_impl_.userinfo_), + reinterpret_cast(&other->_impl_.userinfo_)); +} + +// =================================================================== + +class GetRoomMemberDataExternalListResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRoomMemberDataExternalListResponse, _impl_._has_bits_); +}; + +GetRoomMemberDataExternalListResponse::GetRoomMemberDataExternalListResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomMemberDataExternalListResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.GetRoomMemberDataExternalListResponse) +} +PROTOBUF_NDEBUG_INLINE GetRoomMemberDataExternalListResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::GetRoomMemberDataExternalListResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + members_{visibility, arena, from.members_} {} + +GetRoomMemberDataExternalListResponse::GetRoomMemberDataExternalListResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const GetRoomMemberDataExternalListResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, GetRoomMemberDataExternalListResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GetRoomMemberDataExternalListResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:np2_structs.GetRoomMemberDataExternalListResponse) +} +PROTOBUF_NDEBUG_INLINE GetRoomMemberDataExternalListResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + members_{visibility, arena} {} + +inline void GetRoomMemberDataExternalListResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +GetRoomMemberDataExternalListResponse::~GetRoomMemberDataExternalListResponse() { + // @@protoc_insertion_point(destructor:np2_structs.GetRoomMemberDataExternalListResponse) + SharedDtor(*this); +} +inline void GetRoomMemberDataExternalListResponse::SharedDtor(MessageLite& self) { + GetRoomMemberDataExternalListResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL GetRoomMemberDataExternalListResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) GetRoomMemberDataExternalListResponse(arena); +} +constexpr auto GetRoomMemberDataExternalListResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataExternalListResponse, _impl_.members_) + + decltype(GetRoomMemberDataExternalListResponse::_impl_.members_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(GetRoomMemberDataExternalListResponse), alignof(GetRoomMemberDataExternalListResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GetRoomMemberDataExternalListResponse::PlacementNew_, + sizeof(GetRoomMemberDataExternalListResponse), + alignof(GetRoomMemberDataExternalListResponse)); + } +} +constexpr auto GetRoomMemberDataExternalListResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<50>{ + { + &_GetRoomMemberDataExternalListResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GetRoomMemberDataExternalListResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GetRoomMemberDataExternalListResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GetRoomMemberDataExternalListResponse::ByteSizeLong, + &GetRoomMemberDataExternalListResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataExternalListResponse, _impl_._cached_size_), + true, + }, + "np2_structs.GetRoomMemberDataExternalListResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<50> GetRoomMemberDataExternalListResponse_class_data_ = + GetRoomMemberDataExternalListResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +GetRoomMemberDataExternalListResponse::GetClassData() const { + return GetRoomMemberDataExternalListResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> +GetRoomMemberDataExternalListResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataExternalListResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + GetRoomMemberDataExternalListResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::GetRoomMemberDataExternalListResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .np2_structs.RoomMemberDataExternal members = 1; + {::_pbi::TcParser::FastMtR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(GetRoomMemberDataExternalListResponse, _impl_.members_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .np2_structs.RoomMemberDataExternal members = 1; + {PROTOBUF_FIELD_OFFSET(GetRoomMemberDataExternalListResponse, _impl_.members_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomMemberDataExternal>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void GetRoomMemberDataExternalListResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.GetRoomMemberDataExternalListResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.members_.Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL GetRoomMemberDataExternalListResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const GetRoomMemberDataExternalListResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL GetRoomMemberDataExternalListResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const GetRoomMemberDataExternalListResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.GetRoomMemberDataExternalListResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated .np2_structs.RoomMemberDataExternal members = 1; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (unsigned i = 0, n = static_cast( + this_._internal_members_size()); + i < n; i++) { + const auto& repfield = this_._internal_members().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.GetRoomMemberDataExternalListResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t GetRoomMemberDataExternalListResponse::ByteSizeLong(const MessageLite& base) { + const GetRoomMemberDataExternalListResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t GetRoomMemberDataExternalListResponse::ByteSizeLong() const { + const GetRoomMemberDataExternalListResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.GetRoomMemberDataExternalListResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .np2_structs.RoomMemberDataExternal members = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += 1UL * this_._internal_members_size(); + for (const auto& msg : this_._internal_members()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void GetRoomMemberDataExternalListResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.GetRoomMemberDataExternalListResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_members()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_members()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void GetRoomMemberDataExternalListResponse::CopyFrom(const GetRoomMemberDataExternalListResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.GetRoomMemberDataExternalListResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GetRoomMemberDataExternalListResponse::InternalSwap(GetRoomMemberDataExternalListResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.members_.InternalSwap(&other->_impl_.members_); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace np2_structs +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +#include "google/protobuf/port_undef.inc" diff --git a/rpcs3/Emu/NP/generated/np2_structs.pb.h b/rpcs3/Emu/NP/generated/np2_structs.pb.h new file mode 100644 index 0000000000..4e435b3b07 --- /dev/null +++ b/rpcs3/Emu/NP/generated/np2_structs.pb.h @@ -0,0 +1,39310 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: np2_structs.proto +// Protobuf C++ Version: 6.33.4 + +#ifndef np2_5fstructs_2eproto_2epb_2eh +#define np2_5fstructs_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 6033004 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/message_lite.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_np2_5fstructs_2eproto + +namespace google { +namespace protobuf { +namespace internal { +template +::absl::string_view GetAnyMessageName(); +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_np2_5fstructs_2eproto { + static const ::uint32_t offsets[]; +}; +namespace np2_structs { +class BinAttr; +struct BinAttrDefaultTypeInternal; +extern BinAttrDefaultTypeInternal _BinAttr_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<20> BinAttr_class_data_; +class BinAttrInternal; +struct BinAttrInternalDefaultTypeInternal; +extern BinAttrInternalDefaultTypeInternal _BinAttrInternal_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<28> BinAttrInternal_class_data_; +class BinSearchFilter; +struct BinSearchFilterDefaultTypeInternal; +extern BinSearchFilterDefaultTypeInternal _BinSearchFilter_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<28> BinSearchFilter_class_data_; +class BoardInfo; +struct BoardInfoDefaultTypeInternal; +extern BoardInfoDefaultTypeInternal _BoardInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<22> BoardInfo_class_data_; +class CreateJoinRoomRequest; +struct CreateJoinRoomRequestDefaultTypeInternal; +extern CreateJoinRoomRequestDefaultTypeInternal _CreateJoinRoomRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<34> CreateJoinRoomRequest_class_data_; +class CreateRoomGUIRequest; +struct CreateRoomGUIRequestDefaultTypeInternal; +extern CreateRoomGUIRequestDefaultTypeInternal _CreateRoomGUIRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<33> CreateRoomGUIRequest_class_data_; +class CreateRoomResponse; +struct CreateRoomResponseDefaultTypeInternal; +extern CreateRoomResponseDefaultTypeInternal _CreateRoomResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> CreateRoomResponse_class_data_; +class GUIUserInfo; +struct GUIUserInfoDefaultTypeInternal; +extern GUIUserInfoDefaultTypeInternal _GUIUserInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<24> GUIUserInfo_class_data_; +class GetPingInfoResponse; +struct GetPingInfoResponseDefaultTypeInternal; +extern GetPingInfoResponseDefaultTypeInternal _GetPingInfoResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<32> GetPingInfoResponse_class_data_; +class GetRoomDataExternalListRequest; +struct GetRoomDataExternalListRequestDefaultTypeInternal; +extern GetRoomDataExternalListRequestDefaultTypeInternal _GetRoomDataExternalListRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<43> GetRoomDataExternalListRequest_class_data_; +class GetRoomDataExternalListResponse; +struct GetRoomDataExternalListResponseDefaultTypeInternal; +extern GetRoomDataExternalListResponseDefaultTypeInternal _GetRoomDataExternalListResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<44> GetRoomDataExternalListResponse_class_data_; +class GetRoomDataInternalRequest; +struct GetRoomDataInternalRequestDefaultTypeInternal; +extern GetRoomDataInternalRequestDefaultTypeInternal _GetRoomDataInternalRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> GetRoomDataInternalRequest_class_data_; +class GetRoomListGUIRequest; +struct GetRoomListGUIRequestDefaultTypeInternal; +extern GetRoomListGUIRequestDefaultTypeInternal _GetRoomListGUIRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<34> GetRoomListGUIRequest_class_data_; +class GetRoomMemberDataExternalListResponse; +struct GetRoomMemberDataExternalListResponseDefaultTypeInternal; +extern GetRoomMemberDataExternalListResponseDefaultTypeInternal _GetRoomMemberDataExternalListResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<50> GetRoomMemberDataExternalListResponse_class_data_; +class GetRoomMemberDataInternalRequest; +struct GetRoomMemberDataInternalRequestDefaultTypeInternal; +extern GetRoomMemberDataInternalRequestDefaultTypeInternal _GetRoomMemberDataInternalRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<45> GetRoomMemberDataInternalRequest_class_data_; +class GetScoreFriendsRequest; +struct GetScoreFriendsRequestDefaultTypeInternal; +extern GetScoreFriendsRequestDefaultTypeInternal _GetScoreFriendsRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<35> GetScoreFriendsRequest_class_data_; +class GetScoreGameDataRequest; +struct GetScoreGameDataRequestDefaultTypeInternal; +extern GetScoreGameDataRequestDefaultTypeInternal _GetScoreGameDataRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<36> GetScoreGameDataRequest_class_data_; +class GetScoreNpIdRequest; +struct GetScoreNpIdRequestDefaultTypeInternal; +extern GetScoreNpIdRequestDefaultTypeInternal _GetScoreNpIdRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<32> GetScoreNpIdRequest_class_data_; +class GetScoreRangeRequest; +struct GetScoreRangeRequestDefaultTypeInternal; +extern GetScoreRangeRequestDefaultTypeInternal _GetScoreRangeRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<33> GetScoreRangeRequest_class_data_; +class GetScoreResponse; +struct GetScoreResponseDefaultTypeInternal; +extern GetScoreResponseDefaultTypeInternal _GetScoreResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<29> GetScoreResponse_class_data_; +class GroupConfig; +struct GroupConfigDefaultTypeInternal; +extern GroupConfigDefaultTypeInternal _GroupConfig_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<24> GroupConfig_class_data_; +class IntAttr; +struct IntAttrDefaultTypeInternal; +extern IntAttrDefaultTypeInternal _IntAttr_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<20> IntAttr_class_data_; +class IntSearchFilter; +struct IntSearchFilterDefaultTypeInternal; +extern IntSearchFilterDefaultTypeInternal _IntSearchFilter_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<28> IntSearchFilter_class_data_; +class JoinRoomRequest; +struct JoinRoomRequestDefaultTypeInternal; +extern JoinRoomRequestDefaultTypeInternal _JoinRoomRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<28> JoinRoomRequest_class_data_; +class JoinRoomResponse; +struct JoinRoomResponseDefaultTypeInternal; +extern JoinRoomResponseDefaultTypeInternal _JoinRoomResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<29> JoinRoomResponse_class_data_; +class LeaveRoomRequest; +struct LeaveRoomRequestDefaultTypeInternal; +extern LeaveRoomRequestDefaultTypeInternal _LeaveRoomRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<29> LeaveRoomRequest_class_data_; +class Matching2SignalingInfo; +struct Matching2SignalingInfoDefaultTypeInternal; +extern Matching2SignalingInfoDefaultTypeInternal _Matching2SignalingInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<35> Matching2SignalingInfo_class_data_; +class MatchingAttr; +struct MatchingAttrDefaultTypeInternal; +extern MatchingAttrDefaultTypeInternal _MatchingAttr_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<25> MatchingAttr_class_data_; +class MatchingGuiRoomId; +struct MatchingGuiRoomIdDefaultTypeInternal; +extern MatchingGuiRoomIdDefaultTypeInternal _MatchingGuiRoomId_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<30> MatchingGuiRoomId_class_data_; +class MatchingRoom; +struct MatchingRoomDefaultTypeInternal; +extern MatchingRoomDefaultTypeInternal _MatchingRoom_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<25> MatchingRoom_class_data_; +class MatchingRoomList; +struct MatchingRoomListDefaultTypeInternal; +extern MatchingRoomListDefaultTypeInternal _MatchingRoomList_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<29> MatchingRoomList_class_data_; +class MatchingRoomStatus; +struct MatchingRoomStatusDefaultTypeInternal; +extern MatchingRoomStatusDefaultTypeInternal _MatchingRoomStatus_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> MatchingRoomStatus_class_data_; +class MatchingSearchCondition; +struct MatchingSearchConditionDefaultTypeInternal; +extern MatchingSearchConditionDefaultTypeInternal _MatchingSearchCondition_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<36> MatchingSearchCondition_class_data_; +class MatchingSearchJoinRoomInfo; +struct MatchingSearchJoinRoomInfoDefaultTypeInternal; +extern MatchingSearchJoinRoomInfoDefaultTypeInternal _MatchingSearchJoinRoomInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> MatchingSearchJoinRoomInfo_class_data_; +class MatchingSignalingInfo; +struct MatchingSignalingInfoDefaultTypeInternal; +extern MatchingSignalingInfoDefaultTypeInternal _MatchingSignalingInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<34> MatchingSignalingInfo_class_data_; +class MessageDetails; +struct MessageDetailsDefaultTypeInternal; +extern MessageDetailsDefaultTypeInternal _MessageDetails_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<27> MessageDetails_class_data_; +class NotificationUserJoinedRoom; +struct NotificationUserJoinedRoomDefaultTypeInternal; +extern NotificationUserJoinedRoomDefaultTypeInternal _NotificationUserJoinedRoom_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> NotificationUserJoinedRoom_class_data_; +class OptParam; +struct OptParamDefaultTypeInternal; +extern OptParamDefaultTypeInternal _OptParam_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<21> OptParam_class_data_; +class PresenceOptionData; +struct PresenceOptionDataDefaultTypeInternal; +extern PresenceOptionDataDefaultTypeInternal _PresenceOptionData_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> PresenceOptionData_class_data_; +class QuickMatchGUIRequest; +struct QuickMatchGUIRequestDefaultTypeInternal; +extern QuickMatchGUIRequestDefaultTypeInternal _QuickMatchGUIRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<33> QuickMatchGUIRequest_class_data_; +class RecordScoreGameDataRequest; +struct RecordScoreGameDataRequestDefaultTypeInternal; +extern RecordScoreGameDataRequestDefaultTypeInternal _RecordScoreGameDataRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> RecordScoreGameDataRequest_class_data_; +class RecordScoreRequest; +struct RecordScoreRequestDefaultTypeInternal; +extern RecordScoreRequestDefaultTypeInternal _RecordScoreRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> RecordScoreRequest_class_data_; +class RoomDataExternal; +struct RoomDataExternalDefaultTypeInternal; +extern RoomDataExternalDefaultTypeInternal _RoomDataExternal_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<29> RoomDataExternal_class_data_; +class RoomDataInternal; +struct RoomDataInternalDefaultTypeInternal; +extern RoomDataInternalDefaultTypeInternal _RoomDataInternal_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<29> RoomDataInternal_class_data_; +class RoomDataInternalUpdateInfo; +struct RoomDataInternalUpdateInfoDefaultTypeInternal; +extern RoomDataInternalUpdateInfoDefaultTypeInternal _RoomDataInternalUpdateInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> RoomDataInternalUpdateInfo_class_data_; +class RoomGroup; +struct RoomGroupDefaultTypeInternal; +extern RoomGroupDefaultTypeInternal _RoomGroup_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<22> RoomGroup_class_data_; +class RoomGroupPasswordConfig; +struct RoomGroupPasswordConfigDefaultTypeInternal; +extern RoomGroupPasswordConfigDefaultTypeInternal _RoomGroupPasswordConfig_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<36> RoomGroupPasswordConfig_class_data_; +class RoomMemberBinAttrInternal; +struct RoomMemberBinAttrInternalDefaultTypeInternal; +extern RoomMemberBinAttrInternalDefaultTypeInternal _RoomMemberBinAttrInternal_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<38> RoomMemberBinAttrInternal_class_data_; +class RoomMemberDataExternal; +struct RoomMemberDataExternalDefaultTypeInternal; +extern RoomMemberDataExternalDefaultTypeInternal _RoomMemberDataExternal_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<35> RoomMemberDataExternal_class_data_; +class RoomMemberDataInternal; +struct RoomMemberDataInternalDefaultTypeInternal; +extern RoomMemberDataInternalDefaultTypeInternal _RoomMemberDataInternal_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<35> RoomMemberDataInternal_class_data_; +class RoomMemberDataInternalUpdateInfo; +struct RoomMemberDataInternalUpdateInfoDefaultTypeInternal; +extern RoomMemberDataInternalUpdateInfoDefaultTypeInternal _RoomMemberDataInternalUpdateInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<45> RoomMemberDataInternalUpdateInfo_class_data_; +class RoomMemberUpdateInfo; +struct RoomMemberUpdateInfoDefaultTypeInternal; +extern RoomMemberUpdateInfoDefaultTypeInternal _RoomMemberUpdateInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<33> RoomMemberUpdateInfo_class_data_; +class RoomMessageInfo; +struct RoomMessageInfoDefaultTypeInternal; +extern RoomMessageInfoDefaultTypeInternal _RoomMessageInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<28> RoomMessageInfo_class_data_; +class RoomUpdateInfo; +struct RoomUpdateInfoDefaultTypeInternal; +extern RoomUpdateInfoDefaultTypeInternal _RoomUpdateInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<27> RoomUpdateInfo_class_data_; +class ScoreInfo; +struct ScoreInfoDefaultTypeInternal; +extern ScoreInfoDefaultTypeInternal _ScoreInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<22> ScoreInfo_class_data_; +class ScoreNpIdPcId; +struct ScoreNpIdPcIdDefaultTypeInternal; +extern ScoreNpIdPcIdDefaultTypeInternal _ScoreNpIdPcId_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<26> ScoreNpIdPcId_class_data_; +class ScoreRankData; +struct ScoreRankDataDefaultTypeInternal; +extern ScoreRankDataDefaultTypeInternal _ScoreRankData_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<26> ScoreRankData_class_data_; +class SearchJoinRoomGUIRequest; +struct SearchJoinRoomGUIRequestDefaultTypeInternal; +extern SearchJoinRoomGUIRequestDefaultTypeInternal _SearchJoinRoomGUIRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<37> SearchJoinRoomGUIRequest_class_data_; +class SearchRoomRequest; +struct SearchRoomRequestDefaultTypeInternal; +extern SearchRoomRequestDefaultTypeInternal _SearchRoomRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<30> SearchRoomRequest_class_data_; +class SearchRoomResponse; +struct SearchRoomResponseDefaultTypeInternal; +extern SearchRoomResponseDefaultTypeInternal _SearchRoomResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> SearchRoomResponse_class_data_; +class SendMessageRequest; +struct SendMessageRequestDefaultTypeInternal; +extern SendMessageRequestDefaultTypeInternal _SendMessageRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> SendMessageRequest_class_data_; +class SendRoomMessageRequest; +struct SendRoomMessageRequestDefaultTypeInternal; +extern SendRoomMessageRequestDefaultTypeInternal _SendRoomMessageRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<35> SendRoomMessageRequest_class_data_; +class SetPresenceRequest; +struct SetPresenceRequestDefaultTypeInternal; +extern SetPresenceRequestDefaultTypeInternal _SetPresenceRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> SetPresenceRequest_class_data_; +class SetRoomDataExternalRequest; +struct SetRoomDataExternalRequestDefaultTypeInternal; +extern SetRoomDataExternalRequestDefaultTypeInternal _SetRoomDataExternalRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> SetRoomDataExternalRequest_class_data_; +class SetRoomDataInternalRequest; +struct SetRoomDataInternalRequestDefaultTypeInternal; +extern SetRoomDataInternalRequestDefaultTypeInternal _SetRoomDataInternalRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<39> SetRoomDataInternalRequest_class_data_; +class SetRoomMemberDataInternalRequest; +struct SetRoomMemberDataInternalRequestDefaultTypeInternal; +extern SetRoomMemberDataInternalRequestDefaultTypeInternal _SetRoomMemberDataInternalRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<45> SetRoomMemberDataInternalRequest_class_data_; +class SetRoomSearchFlagGUI; +struct SetRoomSearchFlagGUIDefaultTypeInternal; +extern SetRoomSearchFlagGUIDefaultTypeInternal _SetRoomSearchFlagGUI_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<33> SetRoomSearchFlagGUI_class_data_; +class SetUserInfo; +struct SetUserInfoDefaultTypeInternal; +extern SetUserInfoDefaultTypeInternal _SetUserInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<24> SetUserInfo_class_data_; +class SignalingAddr; +struct SignalingAddrDefaultTypeInternal; +extern SignalingAddrDefaultTypeInternal _SignalingAddr_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<26> SignalingAddr_class_data_; +class TusAddAndGetVariableRequest; +struct TusAddAndGetVariableRequestDefaultTypeInternal; +extern TusAddAndGetVariableRequestDefaultTypeInternal _TusAddAndGetVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<40> TusAddAndGetVariableRequest_class_data_; +class TusData; +struct TusDataDefaultTypeInternal; +extern TusDataDefaultTypeInternal _TusData_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<20> TusData_class_data_; +class TusDataStatus; +struct TusDataStatusDefaultTypeInternal; +extern TusDataStatusDefaultTypeInternal _TusDataStatus_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<26> TusDataStatus_class_data_; +class TusDataStatusResponse; +struct TusDataStatusResponseDefaultTypeInternal; +extern TusDataStatusResponseDefaultTypeInternal _TusDataStatusResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<34> TusDataStatusResponse_class_data_; +class TusDeleteMultiSlotDataRequest; +struct TusDeleteMultiSlotDataRequestDefaultTypeInternal; +extern TusDeleteMultiSlotDataRequestDefaultTypeInternal _TusDeleteMultiSlotDataRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<42> TusDeleteMultiSlotDataRequest_class_data_; +class TusDeleteMultiSlotVariableRequest; +struct TusDeleteMultiSlotVariableRequestDefaultTypeInternal; +extern TusDeleteMultiSlotVariableRequestDefaultTypeInternal _TusDeleteMultiSlotVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<46> TusDeleteMultiSlotVariableRequest_class_data_; +class TusGetDataRequest; +struct TusGetDataRequestDefaultTypeInternal; +extern TusGetDataRequestDefaultTypeInternal _TusGetDataRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<30> TusGetDataRequest_class_data_; +class TusGetFriendsDataStatusRequest; +struct TusGetFriendsDataStatusRequestDefaultTypeInternal; +extern TusGetFriendsDataStatusRequestDefaultTypeInternal _TusGetFriendsDataStatusRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<43> TusGetFriendsDataStatusRequest_class_data_; +class TusGetFriendsVariableRequest; +struct TusGetFriendsVariableRequestDefaultTypeInternal; +extern TusGetFriendsVariableRequestDefaultTypeInternal _TusGetFriendsVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<41> TusGetFriendsVariableRequest_class_data_; +class TusGetMultiSlotDataStatusRequest; +struct TusGetMultiSlotDataStatusRequestDefaultTypeInternal; +extern TusGetMultiSlotDataStatusRequestDefaultTypeInternal _TusGetMultiSlotDataStatusRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<45> TusGetMultiSlotDataStatusRequest_class_data_; +class TusGetMultiSlotVariableRequest; +struct TusGetMultiSlotVariableRequestDefaultTypeInternal; +extern TusGetMultiSlotVariableRequestDefaultTypeInternal _TusGetMultiSlotVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<43> TusGetMultiSlotVariableRequest_class_data_; +class TusGetMultiUserDataStatusRequest; +struct TusGetMultiUserDataStatusRequestDefaultTypeInternal; +extern TusGetMultiUserDataStatusRequestDefaultTypeInternal _TusGetMultiUserDataStatusRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<45> TusGetMultiUserDataStatusRequest_class_data_; +class TusGetMultiUserVariableRequest; +struct TusGetMultiUserVariableRequestDefaultTypeInternal; +extern TusGetMultiUserVariableRequestDefaultTypeInternal _TusGetMultiUserVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<43> TusGetMultiUserVariableRequest_class_data_; +class TusSetDataRequest; +struct TusSetDataRequestDefaultTypeInternal; +extern TusSetDataRequestDefaultTypeInternal _TusSetDataRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<30> TusSetDataRequest_class_data_; +class TusSetMultiSlotVariableRequest; +struct TusSetMultiSlotVariableRequestDefaultTypeInternal; +extern TusSetMultiSlotVariableRequestDefaultTypeInternal _TusSetMultiSlotVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<43> TusSetMultiSlotVariableRequest_class_data_; +class TusTryAndSetVariableRequest; +struct TusTryAndSetVariableRequestDefaultTypeInternal; +extern TusTryAndSetVariableRequestDefaultTypeInternal _TusTryAndSetVariableRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<40> TusTryAndSetVariableRequest_class_data_; +class TusUser; +struct TusUserDefaultTypeInternal; +extern TusUserDefaultTypeInternal _TusUser_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<20> TusUser_class_data_; +class TusVarResponse; +struct TusVarResponseDefaultTypeInternal; +extern TusVarResponseDefaultTypeInternal _TusVarResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<27> TusVarResponse_class_data_; +class TusVariable; +struct TusVariableDefaultTypeInternal; +extern TusVariableDefaultTypeInternal _TusVariable_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<24> TusVariable_class_data_; +class UserInfo; +struct UserInfoDefaultTypeInternal; +extern UserInfoDefaultTypeInternal _UserInfo_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<21> UserInfo_class_data_; +class uint16; +struct uint16DefaultTypeInternal; +extern uint16DefaultTypeInternal _uint16_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<19> uint16_class_data_; +class uint8; +struct uint8DefaultTypeInternal; +extern uint8DefaultTypeInternal _uint8_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<18> uint8_class_data_; +} // namespace np2_structs +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace np2_structs { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class uint8 final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.uint8) */ { + public: + inline uint8() : uint8(nullptr) {} + ~uint8() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(uint8* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(uint8)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR uint8(::google::protobuf::internal::ConstantInitialized); + + inline uint8(const uint8& from) : uint8(nullptr, from) {} + inline uint8(uint8&& from) noexcept + : uint8(nullptr, ::std::move(from)) {} + inline uint8& operator=(const uint8& from) { + CopyFrom(from); + return *this; + } + inline uint8& operator=(uint8&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const uint8& default_instance() { + return *reinterpret_cast( + &_uint8_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(uint8& a, uint8& b) { a.Swap(&b); } + inline void Swap(uint8* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(uint8* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + uint8* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const uint8& from); + void MergeFrom(const uint8& from) { uint8::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(uint8* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.uint8"; } + + explicit uint8(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + uint8(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const uint8& from); + uint8( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, uint8&& from) noexcept + : uint8(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; + // uint32 value = 1; + void clear_value() ; + ::uint32_t value() const; + void set_value(::uint32_t value); + + private: + ::uint32_t _internal_value() const; + void _internal_set_value(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.uint8) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const uint8& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t value_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<18> uint8_class_data_; +// ------------------------------------------------------------------- + +class uint16 final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.uint16) */ { + public: + inline uint16() : uint16(nullptr) {} + ~uint16() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(uint16* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(uint16)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR uint16(::google::protobuf::internal::ConstantInitialized); + + inline uint16(const uint16& from) : uint16(nullptr, from) {} + inline uint16(uint16&& from) noexcept + : uint16(nullptr, ::std::move(from)) {} + inline uint16& operator=(const uint16& from) { + CopyFrom(from); + return *this; + } + inline uint16& operator=(uint16&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const uint16& default_instance() { + return *reinterpret_cast( + &_uint16_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(uint16& a, uint16& b) { a.Swap(&b); } + inline void Swap(uint16* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(uint16* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + uint16* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const uint16& from); + void MergeFrom(const uint16& from) { uint16::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(uint16* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.uint16"; } + + explicit uint16(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + uint16(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const uint16& from); + uint16( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, uint16&& from) noexcept + : uint16(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; + // uint32 value = 1; + void clear_value() ; + ::uint32_t value() const; + void set_value(::uint32_t value); + + private: + ::uint32_t _internal_value() const; + void _internal_set_value(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.uint16) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const uint16& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t value_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<19> uint16_class_data_; +// ------------------------------------------------------------------- + +class UserInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.UserInfo) */ { + public: + inline UserInfo() : UserInfo(nullptr) {} + ~UserInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(UserInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(UserInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR UserInfo(::google::protobuf::internal::ConstantInitialized); + + inline UserInfo(const UserInfo& from) : UserInfo(nullptr, from) {} + inline UserInfo(UserInfo&& from) noexcept + : UserInfo(nullptr, ::std::move(from)) {} + inline UserInfo& operator=(const UserInfo& from) { + CopyFrom(from); + return *this; + } + inline UserInfo& operator=(UserInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const UserInfo& default_instance() { + return *reinterpret_cast( + &_UserInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 11; + friend void swap(UserInfo& a, UserInfo& b) { a.Swap(&b); } + inline void Swap(UserInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UserInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UserInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const UserInfo& from); + void MergeFrom(const UserInfo& from) { UserInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(UserInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.UserInfo"; } + + explicit UserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + UserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UserInfo& from); + UserInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, UserInfo&& from) noexcept + : UserInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpIdFieldNumber = 1, + kOnlineNameFieldNumber = 2, + kAvatarUrlFieldNumber = 3, + }; + // string npId = 1; + void clear_npid() ; + const ::std::string& npid() const; + template + void set_npid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_npid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_npid(); + void set_allocated_npid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_npid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_npid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_npid(); + + public: + // string onlineName = 2; + void clear_onlinename() ; + const ::std::string& onlinename() const; + template + void set_onlinename(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_onlinename(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_onlinename(); + void set_allocated_onlinename(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_onlinename() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_onlinename(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_onlinename(); + + public: + // string avatarUrl = 3; + void clear_avatarurl() ; + const ::std::string& avatarurl() const; + template + void set_avatarurl(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_avatarurl(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_avatarurl(); + void set_allocated_avatarurl(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_avatarurl() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_avatarurl(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_avatarurl(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.UserInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 52, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const UserInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr npid_; + ::google::protobuf::internal::ArenaStringPtr onlinename_; + ::google::protobuf::internal::ArenaStringPtr avatarurl_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<21> UserInfo_class_data_; +// ------------------------------------------------------------------- + +class TusVariable final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusVariable) */ { + public: + inline TusVariable() : TusVariable(nullptr) {} + ~TusVariable() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusVariable* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusVariable)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusVariable(::google::protobuf::internal::ConstantInitialized); + + inline TusVariable(const TusVariable& from) : TusVariable(nullptr, from) {} + inline TusVariable(TusVariable&& from) noexcept + : TusVariable(nullptr, ::std::move(from)) {} + inline TusVariable& operator=(const TusVariable& from) { + CopyFrom(from); + return *this; + } + inline TusVariable& operator=(TusVariable&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusVariable& default_instance() { + return *reinterpret_cast( + &_TusVariable_default_instance_); + } + static constexpr int kIndexInFileMessages = 57; + friend void swap(TusVariable& a, TusVariable& b) { a.Swap(&b); } + inline void Swap(TusVariable* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusVariable* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusVariable* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusVariable& from); + void MergeFrom(const TusVariable& from) { TusVariable::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusVariable* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusVariable"; } + + explicit TusVariable(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusVariable(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusVariable& from); + TusVariable( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusVariable&& from) noexcept + : TusVariable(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kOwnerIdFieldNumber = 1, + kLastChangedAuthorIdFieldNumber = 4, + kLastChangedDateFieldNumber = 3, + kVariableFieldNumber = 5, + kOldVariableFieldNumber = 6, + kHasDataFieldNumber = 2, + }; + // string ownerId = 1; + void clear_ownerid() ; + const ::std::string& ownerid() const; + template + void set_ownerid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_ownerid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_ownerid(); + void set_allocated_ownerid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_ownerid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_ownerid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_ownerid(); + + public: + // string lastChangedAuthorId = 4; + void clear_lastchangedauthorid() ; + const ::std::string& lastchangedauthorid() const; + template + void set_lastchangedauthorid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_lastchangedauthorid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_lastchangedauthorid(); + void set_allocated_lastchangedauthorid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_lastchangedauthorid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_lastchangedauthorid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_lastchangedauthorid(); + + public: + // uint64 lastChangedDate = 3; + void clear_lastchangeddate() ; + ::uint64_t lastchangeddate() const; + void set_lastchangeddate(::uint64_t value); + + private: + ::uint64_t _internal_lastchangeddate() const; + void _internal_set_lastchangeddate(::uint64_t value); + + public: + // int64 variable = 5; + void clear_variable() ; + ::int64_t variable() const; + void set_variable(::int64_t value); + + private: + ::int64_t _internal_variable() const; + void _internal_set_variable(::int64_t value); + + public: + // int64 oldVariable = 6; + void clear_oldvariable() ; + ::int64_t oldvariable() const; + void set_oldvariable(::int64_t value); + + private: + ::int64_t _internal_oldvariable() const; + void _internal_set_oldvariable(::int64_t value); + + public: + // bool hasData = 2; + void clear_hasdata() ; + bool hasdata() const; + void set_hasdata(bool value); + + private: + bool _internal_hasdata() const; + void _internal_set_hasdata(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusVariable) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 6, + 0, 58, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusVariable& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr ownerid_; + ::google::protobuf::internal::ArenaStringPtr lastchangedauthorid_; + ::uint64_t lastchangeddate_; + ::int64_t variable_; + ::int64_t oldvariable_; + bool hasdata_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<24> TusVariable_class_data_; +// ------------------------------------------------------------------- + +class TusUser final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusUser) */ { + public: + inline TusUser() : TusUser(nullptr) {} + ~TusUser() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusUser* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusUser)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusUser(::google::protobuf::internal::ConstantInitialized); + + inline TusUser(const TusUser& from) : TusUser(nullptr, from) {} + inline TusUser(TusUser&& from) noexcept + : TusUser(nullptr, ::std::move(from)) {} + inline TusUser& operator=(const TusUser& from) { + CopyFrom(from); + return *this; + } + inline TusUser& operator=(TusUser&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusUser& default_instance() { + return *reinterpret_cast( + &_TusUser_default_instance_); + } + static constexpr int kIndexInFileMessages = 56; + friend void swap(TusUser& a, TusUser& b) { a.Swap(&b); } + inline void Swap(TusUser* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusUser* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusUser* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusUser& from); + void MergeFrom(const TusUser& from) { TusUser::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusUser* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusUser"; } + + explicit TusUser(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusUser(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusUser& from); + TusUser( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusUser&& from) noexcept + : TusUser(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpidFieldNumber = 2, + kVuserFieldNumber = 1, + }; + // string npid = 2; + void clear_npid() ; + const ::std::string& npid() const; + template + void set_npid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_npid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_npid(); + void set_allocated_npid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_npid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_npid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_npid(); + + public: + // bool vuser = 1; + void clear_vuser() ; + bool vuser() const; + void set_vuser(bool value); + + private: + bool _internal_vuser() const; + void _internal_set_vuser(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusUser) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 32, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusUser& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr npid_; + bool vuser_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<20> TusUser_class_data_; +// ------------------------------------------------------------------- + +class TusGetFriendsVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetFriendsVariableRequest) */ { + public: + inline TusGetFriendsVariableRequest() : TusGetFriendsVariableRequest(nullptr) {} + ~TusGetFriendsVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetFriendsVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetFriendsVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetFriendsVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetFriendsVariableRequest(const TusGetFriendsVariableRequest& from) : TusGetFriendsVariableRequest(nullptr, from) {} + inline TusGetFriendsVariableRequest(TusGetFriendsVariableRequest&& from) noexcept + : TusGetFriendsVariableRequest(nullptr, ::std::move(from)) {} + inline TusGetFriendsVariableRequest& operator=(const TusGetFriendsVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetFriendsVariableRequest& operator=(TusGetFriendsVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetFriendsVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusGetFriendsVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 62; + friend void swap(TusGetFriendsVariableRequest& a, TusGetFriendsVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusGetFriendsVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetFriendsVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetFriendsVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetFriendsVariableRequest& from); + void MergeFrom(const TusGetFriendsVariableRequest& from) { TusGetFriendsVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetFriendsVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetFriendsVariableRequest"; } + + explicit TusGetFriendsVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetFriendsVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetFriendsVariableRequest& from); + TusGetFriendsVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetFriendsVariableRequest&& from) noexcept + : TusGetFriendsVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdFieldNumber = 1, + kIncludeSelfFieldNumber = 2, + kSortTypeFieldNumber = 3, + kArrayNumFieldNumber = 4, + }; + // int32 slotId = 1; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // bool includeSelf = 2; + void clear_includeself() ; + bool includeself() const; + void set_includeself(bool value); + + private: + bool _internal_includeself() const; + void _internal_set_includeself(bool value); + + public: + // int32 sortType = 3; + void clear_sorttype() ; + ::int32_t sorttype() const; + void set_sorttype(::int32_t value); + + private: + ::int32_t _internal_sorttype() const; + void _internal_set_sorttype(::int32_t value); + + public: + // uint32 arrayNum = 4; + void clear_arraynum() ; + ::uint32_t arraynum() const; + void set_arraynum(::uint32_t value); + + private: + ::uint32_t _internal_arraynum() const; + void _internal_set_arraynum(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetFriendsVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetFriendsVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::int32_t slotid_; + bool includeself_; + ::int32_t sorttype_; + ::uint32_t arraynum_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<41> TusGetFriendsVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class TusGetFriendsDataStatusRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetFriendsDataStatusRequest) */ { + public: + inline TusGetFriendsDataStatusRequest() : TusGetFriendsDataStatusRequest(nullptr) {} + ~TusGetFriendsDataStatusRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetFriendsDataStatusRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetFriendsDataStatusRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetFriendsDataStatusRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetFriendsDataStatusRequest(const TusGetFriendsDataStatusRequest& from) : TusGetFriendsDataStatusRequest(nullptr, from) {} + inline TusGetFriendsDataStatusRequest(TusGetFriendsDataStatusRequest&& from) noexcept + : TusGetFriendsDataStatusRequest(nullptr, ::std::move(from)) {} + inline TusGetFriendsDataStatusRequest& operator=(const TusGetFriendsDataStatusRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetFriendsDataStatusRequest& operator=(TusGetFriendsDataStatusRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetFriendsDataStatusRequest& default_instance() { + return *reinterpret_cast( + &_TusGetFriendsDataStatusRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 73; + friend void swap(TusGetFriendsDataStatusRequest& a, TusGetFriendsDataStatusRequest& b) { a.Swap(&b); } + inline void Swap(TusGetFriendsDataStatusRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetFriendsDataStatusRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetFriendsDataStatusRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetFriendsDataStatusRequest& from); + void MergeFrom(const TusGetFriendsDataStatusRequest& from) { TusGetFriendsDataStatusRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetFriendsDataStatusRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetFriendsDataStatusRequest"; } + + explicit TusGetFriendsDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetFriendsDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetFriendsDataStatusRequest& from); + TusGetFriendsDataStatusRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetFriendsDataStatusRequest&& from) noexcept + : TusGetFriendsDataStatusRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdFieldNumber = 1, + kIncludeSelfFieldNumber = 2, + kSortTypeFieldNumber = 3, + kArrayNumFieldNumber = 4, + }; + // int32 slotId = 1; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // bool includeSelf = 2; + void clear_includeself() ; + bool includeself() const; + void set_includeself(bool value); + + private: + bool _internal_includeself() const; + void _internal_set_includeself(bool value); + + public: + // int32 sortType = 3; + void clear_sorttype() ; + ::int32_t sorttype() const; + void set_sorttype(::int32_t value); + + private: + ::int32_t _internal_sorttype() const; + void _internal_set_sorttype(::int32_t value); + + public: + // uint32 arrayNum = 4; + void clear_arraynum() ; + ::uint32_t arraynum() const; + void set_arraynum(::uint32_t value); + + private: + ::uint32_t _internal_arraynum() const; + void _internal_set_arraynum(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetFriendsDataStatusRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetFriendsDataStatusRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::int32_t slotid_; + bool includeself_; + ::int32_t sorttype_; + ::uint32_t arraynum_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<43> TusGetFriendsDataStatusRequest_class_data_; +// ------------------------------------------------------------------- + +class TusDataStatus final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusDataStatus) */ { + public: + inline TusDataStatus() : TusDataStatus(nullptr) {} + ~TusDataStatus() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusDataStatus* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusDataStatus)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusDataStatus(::google::protobuf::internal::ConstantInitialized); + + inline TusDataStatus(const TusDataStatus& from) : TusDataStatus(nullptr, from) {} + inline TusDataStatus(TusDataStatus&& from) noexcept + : TusDataStatus(nullptr, ::std::move(from)) {} + inline TusDataStatus& operator=(const TusDataStatus& from) { + CopyFrom(from); + return *this; + } + inline TusDataStatus& operator=(TusDataStatus&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusDataStatus& default_instance() { + return *reinterpret_cast( + &_TusDataStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = 67; + friend void swap(TusDataStatus& a, TusDataStatus& b) { a.Swap(&b); } + inline void Swap(TusDataStatus* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusDataStatus* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusDataStatus* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusDataStatus& from); + void MergeFrom(const TusDataStatus& from) { TusDataStatus::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusDataStatus* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusDataStatus"; } + + explicit TusDataStatus(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusDataStatus(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusDataStatus& from); + TusDataStatus( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusDataStatus&& from) noexcept + : TusDataStatus(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kOwnerIdFieldNumber = 1, + kLastChangedAuthorIdFieldNumber = 4, + kInfoFieldNumber = 5, + kLastChangedDateFieldNumber = 3, + kHasDataFieldNumber = 2, + }; + // string ownerId = 1; + void clear_ownerid() ; + const ::std::string& ownerid() const; + template + void set_ownerid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_ownerid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_ownerid(); + void set_allocated_ownerid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_ownerid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_ownerid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_ownerid(); + + public: + // string lastChangedAuthorId = 4; + void clear_lastchangedauthorid() ; + const ::std::string& lastchangedauthorid() const; + template + void set_lastchangedauthorid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_lastchangedauthorid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_lastchangedauthorid(); + void set_allocated_lastchangedauthorid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_lastchangedauthorid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_lastchangedauthorid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_lastchangedauthorid(); + + public: + // bytes info = 5; + void clear_info() ; + const ::std::string& info() const; + template + void set_info(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_info(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_info(); + void set_allocated_info(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_info() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_info(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_info(); + + public: + // uint64 lastChangedDate = 3; + void clear_lastchangeddate() ; + ::uint64_t lastchangeddate() const; + void set_lastchangeddate(::uint64_t value); + + private: + ::uint64_t _internal_lastchangeddate() const; + void _internal_set_lastchangeddate(::uint64_t value); + + public: + // bool hasData = 2; + void clear_hasdata() ; + bool hasdata() const; + void set_hasdata(bool value); + + private: + bool _internal_hasdata() const; + void _internal_set_hasdata(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusDataStatus) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 60, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusDataStatus& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr ownerid_; + ::google::protobuf::internal::ArenaStringPtr lastchangedauthorid_; + ::google::protobuf::internal::ArenaStringPtr info_; + ::uint64_t lastchangeddate_; + bool hasdata_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<26> TusDataStatus_class_data_; +// ------------------------------------------------------------------- + +class SetRoomSearchFlagGUI final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SetRoomSearchFlagGUI) */ { + public: + inline SetRoomSearchFlagGUI() : SetRoomSearchFlagGUI(nullptr) {} + ~SetRoomSearchFlagGUI() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SetRoomSearchFlagGUI* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SetRoomSearchFlagGUI)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SetRoomSearchFlagGUI(::google::protobuf::internal::ConstantInitialized); + + inline SetRoomSearchFlagGUI(const SetRoomSearchFlagGUI& from) : SetRoomSearchFlagGUI(nullptr, from) {} + inline SetRoomSearchFlagGUI(SetRoomSearchFlagGUI&& from) noexcept + : SetRoomSearchFlagGUI(nullptr, ::std::move(from)) {} + inline SetRoomSearchFlagGUI& operator=(const SetRoomSearchFlagGUI& from) { + CopyFrom(from); + return *this; + } + inline SetRoomSearchFlagGUI& operator=(SetRoomSearchFlagGUI&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SetRoomSearchFlagGUI& default_instance() { + return *reinterpret_cast( + &_SetRoomSearchFlagGUI_default_instance_); + } + static constexpr int kIndexInFileMessages = 85; + friend void swap(SetRoomSearchFlagGUI& a, SetRoomSearchFlagGUI& b) { a.Swap(&b); } + inline void Swap(SetRoomSearchFlagGUI* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SetRoomSearchFlagGUI* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SetRoomSearchFlagGUI* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SetRoomSearchFlagGUI& from); + void MergeFrom(const SetRoomSearchFlagGUI& from) { SetRoomSearchFlagGUI::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SetRoomSearchFlagGUI* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SetRoomSearchFlagGUI"; } + + explicit SetRoomSearchFlagGUI(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SetRoomSearchFlagGUI(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SetRoomSearchFlagGUI& from); + SetRoomSearchFlagGUI( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SetRoomSearchFlagGUI&& from) noexcept + : SetRoomSearchFlagGUI(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomidFieldNumber = 1, + kStealthFieldNumber = 2, + }; + // bytes roomid = 1; + void clear_roomid() ; + const ::std::string& roomid() const; + template + void set_roomid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_roomid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_roomid(); + void set_allocated_roomid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_roomid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_roomid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_roomid(); + + public: + // bool stealth = 2; + void clear_stealth() ; + bool stealth() const; + void set_stealth(bool value); + + private: + bool _internal_stealth() const; + void _internal_set_stealth(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SetRoomSearchFlagGUI) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SetRoomSearchFlagGUI& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr roomid_; + bool stealth_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<33> SetRoomSearchFlagGUI_class_data_; +// ------------------------------------------------------------------- + +class SetPresenceRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SetPresenceRequest) */ { + public: + inline SetPresenceRequest() : SetPresenceRequest(nullptr) {} + ~SetPresenceRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SetPresenceRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SetPresenceRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SetPresenceRequest(::google::protobuf::internal::ConstantInitialized); + + inline SetPresenceRequest(const SetPresenceRequest& from) : SetPresenceRequest(nullptr, from) {} + inline SetPresenceRequest(SetPresenceRequest&& from) noexcept + : SetPresenceRequest(nullptr, ::std::move(from)) {} + inline SetPresenceRequest& operator=(const SetPresenceRequest& from) { + CopyFrom(from); + return *this; + } + inline SetPresenceRequest& operator=(SetPresenceRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SetPresenceRequest& default_instance() { + return *reinterpret_cast( + &_SetPresenceRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 75; + friend void swap(SetPresenceRequest& a, SetPresenceRequest& b) { a.Swap(&b); } + inline void Swap(SetPresenceRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SetPresenceRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SetPresenceRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SetPresenceRequest& from); + void MergeFrom(const SetPresenceRequest& from) { SetPresenceRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SetPresenceRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SetPresenceRequest"; } + + explicit SetPresenceRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SetPresenceRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SetPresenceRequest& from); + SetPresenceRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SetPresenceRequest&& from) noexcept + : SetPresenceRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kTitleFieldNumber = 1, + kStatusFieldNumber = 2, + kCommentFieldNumber = 3, + kDataFieldNumber = 4, + }; + // string title = 1; + void clear_title() ; + const ::std::string& title() const; + template + void set_title(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_title(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_title(); + void set_allocated_title(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_title() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_title(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_title(); + + public: + // string status = 2; + void clear_status() ; + const ::std::string& status() const; + template + void set_status(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_status(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_status(); + void set_allocated_status(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_status() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_status(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_status(); + + public: + // string comment = 3; + void clear_comment() ; + const ::std::string& comment() const; + template + void set_comment(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_comment(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_comment(); + void set_allocated_comment(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_comment() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_comment(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_comment(); + + public: + // bytes data = 4; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SetPresenceRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 57, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SetPresenceRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr title_; + ::google::protobuf::internal::ArenaStringPtr status_; + ::google::protobuf::internal::ArenaStringPtr comment_; + ::google::protobuf::internal::ArenaStringPtr data_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> SetPresenceRequest_class_data_; +// ------------------------------------------------------------------- + +class SendMessageRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SendMessageRequest) */ { + public: + inline SendMessageRequest() : SendMessageRequest(nullptr) {} + ~SendMessageRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SendMessageRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SendMessageRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SendMessageRequest(::google::protobuf::internal::ConstantInitialized); + + inline SendMessageRequest(const SendMessageRequest& from) : SendMessageRequest(nullptr, from) {} + inline SendMessageRequest(SendMessageRequest&& from) noexcept + : SendMessageRequest(nullptr, ::std::move(from)) {} + inline SendMessageRequest& operator=(const SendMessageRequest& from) { + CopyFrom(from); + return *this; + } + inline SendMessageRequest& operator=(SendMessageRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SendMessageRequest& default_instance() { + return *reinterpret_cast( + &_SendMessageRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 44; + friend void swap(SendMessageRequest& a, SendMessageRequest& b) { a.Swap(&b); } + inline void Swap(SendMessageRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendMessageRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendMessageRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SendMessageRequest& from); + void MergeFrom(const SendMessageRequest& from) { SendMessageRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SendMessageRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SendMessageRequest"; } + + explicit SendMessageRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SendMessageRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SendMessageRequest& from); + SendMessageRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SendMessageRequest&& from) noexcept + : SendMessageRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpidsFieldNumber = 2, + kMessageFieldNumber = 1, + }; + // repeated string npids = 2; + int npids_size() const; + private: + int _internal_npids_size() const; + + public: + void clear_npids() ; + const ::std::string& npids(int index) const; + ::std::string* PROTOBUF_NONNULL mutable_npids(int index); + template + void set_npids(int index, Arg_&& value, Args_... args); + ::std::string* PROTOBUF_NONNULL add_npids(); + template + void add_npids(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField<::std::string>& npids() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL mutable_npids(); + + private: + const ::google::protobuf::RepeatedPtrField<::std::string>& _internal_npids() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL _internal_mutable_npids(); + + public: + // bytes message = 1; + void clear_message() ; + const ::std::string& message() const; + template + void set_message(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_message(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_message(); + void set_allocated_message(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_message() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_message(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_message(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SendMessageRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 44, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SendMessageRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField<::std::string> npids_; + ::google::protobuf::internal::ArenaStringPtr message_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> SendMessageRequest_class_data_; +// ------------------------------------------------------------------- + +class ScoreRankData final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.ScoreRankData) */ { + public: + inline ScoreRankData() : ScoreRankData(nullptr) {} + ~ScoreRankData() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ScoreRankData* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ScoreRankData)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ScoreRankData(::google::protobuf::internal::ConstantInitialized); + + inline ScoreRankData(const ScoreRankData& from) : ScoreRankData(nullptr, from) {} + inline ScoreRankData(ScoreRankData&& from) noexcept + : ScoreRankData(nullptr, ::std::move(from)) {} + inline ScoreRankData& operator=(const ScoreRankData& from) { + CopyFrom(from); + return *this; + } + inline ScoreRankData& operator=(ScoreRankData&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const ScoreRankData& default_instance() { + return *reinterpret_cast( + &_ScoreRankData_default_instance_); + } + static constexpr int kIndexInFileMessages = 51; + friend void swap(ScoreRankData& a, ScoreRankData& b) { a.Swap(&b); } + inline void Swap(ScoreRankData* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ScoreRankData* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ScoreRankData* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const ScoreRankData& from); + void MergeFrom(const ScoreRankData& from) { ScoreRankData::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ScoreRankData* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.ScoreRankData"; } + + explicit ScoreRankData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ScoreRankData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ScoreRankData& from); + ScoreRankData( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ScoreRankData&& from) noexcept + : ScoreRankData(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpIdFieldNumber = 1, + kOnlineNameFieldNumber = 2, + kPcIdFieldNumber = 3, + kRankFieldNumber = 4, + kScoreFieldNumber = 5, + kRecordDateFieldNumber = 7, + kHasGameDataFieldNumber = 6, + }; + // string npId = 1; + void clear_npid() ; + const ::std::string& npid() const; + template + void set_npid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_npid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_npid(); + void set_allocated_npid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_npid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_npid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_npid(); + + public: + // string onlineName = 2; + void clear_onlinename() ; + const ::std::string& onlinename() const; + template + void set_onlinename(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_onlinename(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_onlinename(); + void set_allocated_onlinename(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_onlinename() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_onlinename(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_onlinename(); + + public: + // int32 pcId = 3; + void clear_pcid() ; + ::int32_t pcid() const; + void set_pcid(::int32_t value); + + private: + ::int32_t _internal_pcid() const; + void _internal_set_pcid(::int32_t value); + + public: + // uint32 rank = 4; + void clear_rank() ; + ::uint32_t rank() const; + void set_rank(::uint32_t value); + + private: + ::uint32_t _internal_rank() const; + void _internal_set_rank(::uint32_t value); + + public: + // int64 score = 5; + void clear_score() ; + ::int64_t score() const; + void set_score(::int64_t value); + + private: + ::int64_t _internal_score() const; + void _internal_set_score(::int64_t value); + + public: + // uint64 recordDate = 7; + void clear_recorddate() ; + ::uint64_t recorddate() const; + void set_recorddate(::uint64_t value); + + private: + ::uint64_t _internal_recorddate() const; + void _internal_set_recorddate(::uint64_t value); + + public: + // bool hasGameData = 6; + void clear_hasgamedata() ; + bool hasgamedata() const; + void set_hasgamedata(bool value); + + private: + bool _internal_hasgamedata() const; + void _internal_set_hasgamedata(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.ScoreRankData) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 7, + 0, 48, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ScoreRankData& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr npid_; + ::google::protobuf::internal::ArenaStringPtr onlinename_; + ::int32_t pcid_; + ::uint32_t rank_; + ::int64_t score_; + ::uint64_t recorddate_; + bool hasgamedata_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<26> ScoreRankData_class_data_; +// ------------------------------------------------------------------- + +class ScoreNpIdPcId final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.ScoreNpIdPcId) */ { + public: + inline ScoreNpIdPcId() : ScoreNpIdPcId(nullptr) {} + ~ScoreNpIdPcId() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ScoreNpIdPcId* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ScoreNpIdPcId)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ScoreNpIdPcId(::google::protobuf::internal::ConstantInitialized); + + inline ScoreNpIdPcId(const ScoreNpIdPcId& from) : ScoreNpIdPcId(nullptr, from) {} + inline ScoreNpIdPcId(ScoreNpIdPcId&& from) noexcept + : ScoreNpIdPcId(nullptr, ::std::move(from)) {} + inline ScoreNpIdPcId& operator=(const ScoreNpIdPcId& from) { + CopyFrom(from); + return *this; + } + inline ScoreNpIdPcId& operator=(ScoreNpIdPcId&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const ScoreNpIdPcId& default_instance() { + return *reinterpret_cast( + &_ScoreNpIdPcId_default_instance_); + } + static constexpr int kIndexInFileMessages = 48; + friend void swap(ScoreNpIdPcId& a, ScoreNpIdPcId& b) { a.Swap(&b); } + inline void Swap(ScoreNpIdPcId* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ScoreNpIdPcId* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ScoreNpIdPcId* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const ScoreNpIdPcId& from); + void MergeFrom(const ScoreNpIdPcId& from) { ScoreNpIdPcId::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ScoreNpIdPcId* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.ScoreNpIdPcId"; } + + explicit ScoreNpIdPcId(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ScoreNpIdPcId(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ScoreNpIdPcId& from); + ScoreNpIdPcId( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ScoreNpIdPcId&& from) noexcept + : ScoreNpIdPcId(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpidFieldNumber = 1, + kPcIdFieldNumber = 2, + }; + // string npid = 1; + void clear_npid() ; + const ::std::string& npid() const; + template + void set_npid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_npid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_npid(); + void set_allocated_npid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_npid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_npid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_npid(); + + public: + // int32 pcId = 2; + void clear_pcid() ; + ::int32_t pcid() const; + void set_pcid(::int32_t value); + + private: + ::int32_t _internal_pcid() const; + void _internal_set_pcid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.ScoreNpIdPcId) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 38, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ScoreNpIdPcId& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr npid_; + ::int32_t pcid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<26> ScoreNpIdPcId_class_data_; +// ------------------------------------------------------------------- + +class ScoreInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.ScoreInfo) */ { + public: + inline ScoreInfo() : ScoreInfo(nullptr) {} + ~ScoreInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ScoreInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ScoreInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ScoreInfo(::google::protobuf::internal::ConstantInitialized); + + inline ScoreInfo(const ScoreInfo& from) : ScoreInfo(nullptr, from) {} + inline ScoreInfo(ScoreInfo&& from) noexcept + : ScoreInfo(nullptr, ::std::move(from)) {} + inline ScoreInfo& operator=(const ScoreInfo& from) { + CopyFrom(from); + return *this; + } + inline ScoreInfo& operator=(ScoreInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const ScoreInfo& default_instance() { + return *reinterpret_cast( + &_ScoreInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 52; + friend void swap(ScoreInfo& a, ScoreInfo& b) { a.Swap(&b); } + inline void Swap(ScoreInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ScoreInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ScoreInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const ScoreInfo& from); + void MergeFrom(const ScoreInfo& from) { ScoreInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ScoreInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.ScoreInfo"; } + + explicit ScoreInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ScoreInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ScoreInfo& from); + ScoreInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ScoreInfo&& from) noexcept + : ScoreInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDataFieldNumber = 1, + }; + // bytes data = 1; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.ScoreInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ScoreInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr data_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<22> ScoreInfo_class_data_; +// ------------------------------------------------------------------- + +class RecordScoreRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RecordScoreRequest) */ { + public: + inline RecordScoreRequest() : RecordScoreRequest(nullptr) {} + ~RecordScoreRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RecordScoreRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RecordScoreRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RecordScoreRequest(::google::protobuf::internal::ConstantInitialized); + + inline RecordScoreRequest(const RecordScoreRequest& from) : RecordScoreRequest(nullptr, from) {} + inline RecordScoreRequest(RecordScoreRequest&& from) noexcept + : RecordScoreRequest(nullptr, ::std::move(from)) {} + inline RecordScoreRequest& operator=(const RecordScoreRequest& from) { + CopyFrom(from); + return *this; + } + inline RecordScoreRequest& operator=(RecordScoreRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RecordScoreRequest& default_instance() { + return *reinterpret_cast( + &_RecordScoreRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 46; + friend void swap(RecordScoreRequest& a, RecordScoreRequest& b) { a.Swap(&b); } + inline void Swap(RecordScoreRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecordScoreRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecordScoreRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RecordScoreRequest& from); + void MergeFrom(const RecordScoreRequest& from) { RecordScoreRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RecordScoreRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RecordScoreRequest"; } + + explicit RecordScoreRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RecordScoreRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RecordScoreRequest& from); + RecordScoreRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RecordScoreRequest&& from) noexcept + : RecordScoreRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kCommentFieldNumber = 4, + kDataFieldNumber = 5, + kBoardIdFieldNumber = 1, + kPcIdFieldNumber = 2, + kScoreFieldNumber = 3, + }; + // string comment = 4; + void clear_comment() ; + const ::std::string& comment() const; + template + void set_comment(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_comment(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_comment(); + void set_allocated_comment(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_comment() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_comment(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_comment(); + + public: + // bytes data = 5; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // uint32 boardId = 1; + void clear_boardid() ; + ::uint32_t boardid() const; + void set_boardid(::uint32_t value); + + private: + ::uint32_t _internal_boardid() const; + void _internal_set_boardid(::uint32_t value); + + public: + // int32 pcId = 2; + void clear_pcid() ; + ::int32_t pcid() const; + void set_pcid(::int32_t value); + + private: + ::int32_t _internal_pcid() const; + void _internal_set_pcid(::int32_t value); + + public: + // int64 score = 3; + void clear_score() ; + ::int64_t score() const; + void set_score(::int64_t value); + + private: + ::int64_t _internal_score() const; + void _internal_set_score(::int64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RecordScoreRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 46, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RecordScoreRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr comment_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::uint32_t boardid_; + ::int32_t pcid_; + ::int64_t score_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> RecordScoreRequest_class_data_; +// ------------------------------------------------------------------- + +class RecordScoreGameDataRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RecordScoreGameDataRequest) */ { + public: + inline RecordScoreGameDataRequest() : RecordScoreGameDataRequest(nullptr) {} + ~RecordScoreGameDataRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RecordScoreGameDataRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RecordScoreGameDataRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RecordScoreGameDataRequest(::google::protobuf::internal::ConstantInitialized); + + inline RecordScoreGameDataRequest(const RecordScoreGameDataRequest& from) : RecordScoreGameDataRequest(nullptr, from) {} + inline RecordScoreGameDataRequest(RecordScoreGameDataRequest&& from) noexcept + : RecordScoreGameDataRequest(nullptr, ::std::move(from)) {} + inline RecordScoreGameDataRequest& operator=(const RecordScoreGameDataRequest& from) { + CopyFrom(from); + return *this; + } + inline RecordScoreGameDataRequest& operator=(RecordScoreGameDataRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RecordScoreGameDataRequest& default_instance() { + return *reinterpret_cast( + &_RecordScoreGameDataRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 54; + friend void swap(RecordScoreGameDataRequest& a, RecordScoreGameDataRequest& b) { a.Swap(&b); } + inline void Swap(RecordScoreGameDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecordScoreGameDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecordScoreGameDataRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RecordScoreGameDataRequest& from); + void MergeFrom(const RecordScoreGameDataRequest& from) { RecordScoreGameDataRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RecordScoreGameDataRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RecordScoreGameDataRequest"; } + + explicit RecordScoreGameDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RecordScoreGameDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RecordScoreGameDataRequest& from); + RecordScoreGameDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RecordScoreGameDataRequest&& from) noexcept + : RecordScoreGameDataRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kBoardIdFieldNumber = 1, + kPcIdFieldNumber = 2, + kScoreFieldNumber = 3, + }; + // uint32 boardId = 1; + void clear_boardid() ; + ::uint32_t boardid() const; + void set_boardid(::uint32_t value); + + private: + ::uint32_t _internal_boardid() const; + void _internal_set_boardid(::uint32_t value); + + public: + // int32 pcId = 2; + void clear_pcid() ; + ::int32_t pcid() const; + void set_pcid(::int32_t value); + + private: + ::int32_t _internal_pcid() const; + void _internal_set_pcid(::int32_t value); + + public: + // int64 score = 3; + void clear_score() ; + ::int64_t score() const; + void set_score(::int64_t value); + + private: + ::int64_t _internal_score() const; + void _internal_set_score(::int64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RecordScoreGameDataRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RecordScoreGameDataRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t boardid_; + ::int32_t pcid_; + ::int64_t score_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> RecordScoreGameDataRequest_class_data_; +// ------------------------------------------------------------------- + +class PresenceOptionData final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.PresenceOptionData) */ { + public: + inline PresenceOptionData() : PresenceOptionData(nullptr) {} + ~PresenceOptionData() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(PresenceOptionData* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(PresenceOptionData)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR PresenceOptionData(::google::protobuf::internal::ConstantInitialized); + + inline PresenceOptionData(const PresenceOptionData& from) : PresenceOptionData(nullptr, from) {} + inline PresenceOptionData(PresenceOptionData&& from) noexcept + : PresenceOptionData(nullptr, ::std::move(from)) {} + inline PresenceOptionData& operator=(const PresenceOptionData& from) { + CopyFrom(from); + return *this; + } + inline PresenceOptionData& operator=(PresenceOptionData&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const PresenceOptionData& default_instance() { + return *reinterpret_cast( + &_PresenceOptionData_default_instance_); + } + static constexpr int kIndexInFileMessages = 18; + friend void swap(PresenceOptionData& a, PresenceOptionData& b) { a.Swap(&b); } + inline void Swap(PresenceOptionData* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PresenceOptionData* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PresenceOptionData* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const PresenceOptionData& from); + void MergeFrom(const PresenceOptionData& from) { PresenceOptionData::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(PresenceOptionData* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.PresenceOptionData"; } + + explicit PresenceOptionData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + PresenceOptionData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PresenceOptionData& from); + PresenceOptionData( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PresenceOptionData&& from) noexcept + : PresenceOptionData(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDataFieldNumber = 1, + kLenFieldNumber = 2, + }; + // bytes data = 1; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // uint32 len = 2; + void clear_len() ; + ::uint32_t len() const; + void set_len(::uint32_t value); + + private: + ::uint32_t _internal_len() const; + void _internal_set_len(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.PresenceOptionData) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const PresenceOptionData& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::uint32_t len_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> PresenceOptionData_class_data_; +// ------------------------------------------------------------------- + +class MatchingSearchCondition final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingSearchCondition) */ { + public: + inline MatchingSearchCondition() : MatchingSearchCondition(nullptr) {} + ~MatchingSearchCondition() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingSearchCondition* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingSearchCondition)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingSearchCondition(::google::protobuf::internal::ConstantInitialized); + + inline MatchingSearchCondition(const MatchingSearchCondition& from) : MatchingSearchCondition(nullptr, from) {} + inline MatchingSearchCondition(MatchingSearchCondition&& from) noexcept + : MatchingSearchCondition(nullptr, ::std::move(from)) {} + inline MatchingSearchCondition& operator=(const MatchingSearchCondition& from) { + CopyFrom(from); + return *this; + } + inline MatchingSearchCondition& operator=(MatchingSearchCondition&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingSearchCondition& default_instance() { + return *reinterpret_cast( + &_MatchingSearchCondition_default_instance_); + } + static constexpr int kIndexInFileMessages = 76; + friend void swap(MatchingSearchCondition& a, MatchingSearchCondition& b) { a.Swap(&b); } + inline void Swap(MatchingSearchCondition* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingSearchCondition* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingSearchCondition* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingSearchCondition& from); + void MergeFrom(const MatchingSearchCondition& from) { MatchingSearchCondition::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingSearchCondition* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingSearchCondition"; } + + explicit MatchingSearchCondition(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingSearchCondition(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingSearchCondition& from); + MatchingSearchCondition( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingSearchCondition&& from) noexcept + : MatchingSearchCondition(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kAttrTypeFieldNumber = 1, + kAttrIdFieldNumber = 2, + kCompOpFieldNumber = 3, + kCompValueFieldNumber = 4, + }; + // uint32 attr_type = 1; + void clear_attr_type() ; + ::uint32_t attr_type() const; + void set_attr_type(::uint32_t value); + + private: + ::uint32_t _internal_attr_type() const; + void _internal_set_attr_type(::uint32_t value); + + public: + // uint32 attr_id = 2; + void clear_attr_id() ; + ::uint32_t attr_id() const; + void set_attr_id(::uint32_t value); + + private: + ::uint32_t _internal_attr_id() const; + void _internal_set_attr_id(::uint32_t value); + + public: + // uint32 comp_op = 3; + void clear_comp_op() ; + ::uint32_t comp_op() const; + void set_comp_op(::uint32_t value); + + private: + ::uint32_t _internal_comp_op() const; + void _internal_set_comp_op(::uint32_t value); + + public: + // uint32 comp_value = 4; + void clear_comp_value() ; + ::uint32_t comp_value() const; + void set_comp_value(::uint32_t value); + + private: + ::uint32_t _internal_comp_value() const; + void _internal_set_comp_value(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingSearchCondition) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingSearchCondition& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t attr_type_; + ::uint32_t attr_id_; + ::uint32_t comp_op_; + ::uint32_t comp_value_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<36> MatchingSearchCondition_class_data_; +// ------------------------------------------------------------------- + +class MatchingGuiRoomId final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingGuiRoomId) */ { + public: + inline MatchingGuiRoomId() : MatchingGuiRoomId(nullptr) {} + ~MatchingGuiRoomId() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingGuiRoomId* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingGuiRoomId)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingGuiRoomId(::google::protobuf::internal::ConstantInitialized); + + inline MatchingGuiRoomId(const MatchingGuiRoomId& from) : MatchingGuiRoomId(nullptr, from) {} + inline MatchingGuiRoomId(MatchingGuiRoomId&& from) noexcept + : MatchingGuiRoomId(nullptr, ::std::move(from)) {} + inline MatchingGuiRoomId& operator=(const MatchingGuiRoomId& from) { + CopyFrom(from); + return *this; + } + inline MatchingGuiRoomId& operator=(MatchingGuiRoomId&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingGuiRoomId& default_instance() { + return *reinterpret_cast( + &_MatchingGuiRoomId_default_instance_); + } + static constexpr int kIndexInFileMessages = 84; + friend void swap(MatchingGuiRoomId& a, MatchingGuiRoomId& b) { a.Swap(&b); } + inline void Swap(MatchingGuiRoomId* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingGuiRoomId* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingGuiRoomId* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingGuiRoomId& from); + void MergeFrom(const MatchingGuiRoomId& from) { MatchingGuiRoomId::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingGuiRoomId* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingGuiRoomId"; } + + explicit MatchingGuiRoomId(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingGuiRoomId(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingGuiRoomId& from); + MatchingGuiRoomId( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingGuiRoomId&& from) noexcept + : MatchingGuiRoomId(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIdFieldNumber = 1, + }; + // bytes id = 1; + void clear_id() ; + const ::std::string& id() const; + template + void set_id(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_id(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_id(); + void set_allocated_id(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_id() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_id(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_id(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingGuiRoomId) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingGuiRoomId& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr id_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<30> MatchingGuiRoomId_class_data_; +// ------------------------------------------------------------------- + +class MatchingAttr final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingAttr) */ { + public: + inline MatchingAttr() : MatchingAttr(nullptr) {} + ~MatchingAttr() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingAttr* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingAttr)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingAttr(::google::protobuf::internal::ConstantInitialized); + + inline MatchingAttr(const MatchingAttr& from) : MatchingAttr(nullptr, from) {} + inline MatchingAttr(MatchingAttr&& from) noexcept + : MatchingAttr(nullptr, ::std::move(from)) {} + inline MatchingAttr& operator=(const MatchingAttr& from) { + CopyFrom(from); + return *this; + } + inline MatchingAttr& operator=(MatchingAttr&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingAttr& default_instance() { + return *reinterpret_cast( + &_MatchingAttr_default_instance_); + } + static constexpr int kIndexInFileMessages = 77; + friend void swap(MatchingAttr& a, MatchingAttr& b) { a.Swap(&b); } + inline void Swap(MatchingAttr* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingAttr* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingAttr* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingAttr& from); + void MergeFrom(const MatchingAttr& from) { MatchingAttr::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingAttr* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingAttr"; } + + explicit MatchingAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingAttr& from); + MatchingAttr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingAttr&& from) noexcept + : MatchingAttr(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDataFieldNumber = 4, + kAttrTypeFieldNumber = 1, + kAttrIdFieldNumber = 2, + kNumFieldNumber = 3, + }; + // bytes data = 4; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // uint32 attr_type = 1; + void clear_attr_type() ; + ::uint32_t attr_type() const; + void set_attr_type(::uint32_t value); + + private: + ::uint32_t _internal_attr_type() const; + void _internal_set_attr_type(::uint32_t value); + + public: + // uint32 attr_id = 2; + void clear_attr_id() ; + ::uint32_t attr_id() const; + void set_attr_id(::uint32_t value); + + private: + ::uint32_t _internal_attr_id() const; + void _internal_set_attr_id(::uint32_t value); + + public: + // uint32 num = 3; + void clear_num() ; + ::uint32_t num() const; + void set_num(::uint32_t value); + + private: + ::uint32_t _internal_num() const; + void _internal_set_num(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingAttr) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingAttr& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::uint32_t attr_type_; + ::uint32_t attr_id_; + ::uint32_t num_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<25> MatchingAttr_class_data_; +// ------------------------------------------------------------------- + +class GroupConfig final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GroupConfig) */ { + public: + inline GroupConfig() : GroupConfig(nullptr) {} + ~GroupConfig() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GroupConfig* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GroupConfig)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GroupConfig(::google::protobuf::internal::ConstantInitialized); + + inline GroupConfig(const GroupConfig& from) : GroupConfig(nullptr, from) {} + inline GroupConfig(GroupConfig&& from) noexcept + : GroupConfig(nullptr, ::std::move(from)) {} + inline GroupConfig& operator=(const GroupConfig& from) { + CopyFrom(from); + return *this; + } + inline GroupConfig& operator=(GroupConfig&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GroupConfig& default_instance() { + return *reinterpret_cast( + &_GroupConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = 10; + friend void swap(GroupConfig& a, GroupConfig& b) { a.Swap(&b); } + inline void Swap(GroupConfig* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GroupConfig* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GroupConfig* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GroupConfig& from); + void MergeFrom(const GroupConfig& from) { GroupConfig::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GroupConfig* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GroupConfig"; } + + explicit GroupConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GroupConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GroupConfig& from); + GroupConfig( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GroupConfig&& from) noexcept + : GroupConfig(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kLabelFieldNumber = 2, + kSlotNumFieldNumber = 1, + kWithPasswordFieldNumber = 3, + }; + // bytes label = 2; + void clear_label() ; + const ::std::string& label() const; + template + void set_label(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_label(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_label(); + void set_allocated_label(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_label() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_label(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_label(); + + public: + // uint32 slotNum = 1; + void clear_slotnum() ; + ::uint32_t slotnum() const; + void set_slotnum(::uint32_t value); + + private: + ::uint32_t _internal_slotnum() const; + void _internal_set_slotnum(::uint32_t value); + + public: + // bool withPassword = 3; + void clear_withpassword() ; + bool withpassword() const; + void set_withpassword(bool value); + + private: + bool _internal_withpassword() const; + void _internal_set_withpassword(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GroupConfig) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GroupConfig& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr label_; + ::uint32_t slotnum_; + bool withpassword_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<24> GroupConfig_class_data_; +// ------------------------------------------------------------------- + +class GetScoreRangeRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetScoreRangeRequest) */ { + public: + inline GetScoreRangeRequest() : GetScoreRangeRequest(nullptr) {} + ~GetScoreRangeRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetScoreRangeRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetScoreRangeRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetScoreRangeRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetScoreRangeRequest(const GetScoreRangeRequest& from) : GetScoreRangeRequest(nullptr, from) {} + inline GetScoreRangeRequest(GetScoreRangeRequest&& from) noexcept + : GetScoreRangeRequest(nullptr, ::std::move(from)) {} + inline GetScoreRangeRequest& operator=(const GetScoreRangeRequest& from) { + CopyFrom(from); + return *this; + } + inline GetScoreRangeRequest& operator=(GetScoreRangeRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetScoreRangeRequest& default_instance() { + return *reinterpret_cast( + &_GetScoreRangeRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 47; + friend void swap(GetScoreRangeRequest& a, GetScoreRangeRequest& b) { a.Swap(&b); } + inline void Swap(GetScoreRangeRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetScoreRangeRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetScoreRangeRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetScoreRangeRequest& from); + void MergeFrom(const GetScoreRangeRequest& from) { GetScoreRangeRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetScoreRangeRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetScoreRangeRequest"; } + + explicit GetScoreRangeRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetScoreRangeRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreRangeRequest& from); + GetScoreRangeRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetScoreRangeRequest&& from) noexcept + : GetScoreRangeRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kBoardIdFieldNumber = 1, + kStartRankFieldNumber = 2, + kNumRanksFieldNumber = 3, + kWithCommentFieldNumber = 4, + kWithGameInfoFieldNumber = 5, + }; + // uint32 boardId = 1; + void clear_boardid() ; + ::uint32_t boardid() const; + void set_boardid(::uint32_t value); + + private: + ::uint32_t _internal_boardid() const; + void _internal_set_boardid(::uint32_t value); + + public: + // uint32 startRank = 2; + void clear_startrank() ; + ::uint32_t startrank() const; + void set_startrank(::uint32_t value); + + private: + ::uint32_t _internal_startrank() const; + void _internal_set_startrank(::uint32_t value); + + public: + // uint32 numRanks = 3; + void clear_numranks() ; + ::uint32_t numranks() const; + void set_numranks(::uint32_t value); + + private: + ::uint32_t _internal_numranks() const; + void _internal_set_numranks(::uint32_t value); + + public: + // bool withComment = 4; + void clear_withcomment() ; + bool withcomment() const; + void set_withcomment(bool value); + + private: + bool _internal_withcomment() const; + void _internal_set_withcomment(bool value); + + public: + // bool withGameInfo = 5; + void clear_withgameinfo() ; + bool withgameinfo() const; + void set_withgameinfo(bool value); + + private: + bool _internal_withgameinfo() const; + void _internal_set_withgameinfo(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetScoreRangeRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetScoreRangeRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t boardid_; + ::uint32_t startrank_; + ::uint32_t numranks_; + bool withcomment_; + bool withgameinfo_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<33> GetScoreRangeRequest_class_data_; +// ------------------------------------------------------------------- + +class GetScoreGameDataRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetScoreGameDataRequest) */ { + public: + inline GetScoreGameDataRequest() : GetScoreGameDataRequest(nullptr) {} + ~GetScoreGameDataRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetScoreGameDataRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetScoreGameDataRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetScoreGameDataRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetScoreGameDataRequest(const GetScoreGameDataRequest& from) : GetScoreGameDataRequest(nullptr, from) {} + inline GetScoreGameDataRequest(GetScoreGameDataRequest&& from) noexcept + : GetScoreGameDataRequest(nullptr, ::std::move(from)) {} + inline GetScoreGameDataRequest& operator=(const GetScoreGameDataRequest& from) { + CopyFrom(from); + return *this; + } + inline GetScoreGameDataRequest& operator=(GetScoreGameDataRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetScoreGameDataRequest& default_instance() { + return *reinterpret_cast( + &_GetScoreGameDataRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 55; + friend void swap(GetScoreGameDataRequest& a, GetScoreGameDataRequest& b) { a.Swap(&b); } + inline void Swap(GetScoreGameDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetScoreGameDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetScoreGameDataRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetScoreGameDataRequest& from); + void MergeFrom(const GetScoreGameDataRequest& from) { GetScoreGameDataRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetScoreGameDataRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetScoreGameDataRequest"; } + + explicit GetScoreGameDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetScoreGameDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreGameDataRequest& from); + GetScoreGameDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetScoreGameDataRequest&& from) noexcept + : GetScoreGameDataRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpIdFieldNumber = 2, + kBoardIdFieldNumber = 1, + kPcIdFieldNumber = 3, + }; + // string npId = 2; + void clear_npid() ; + const ::std::string& npid() const; + template + void set_npid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_npid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_npid(); + void set_allocated_npid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_npid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_npid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_npid(); + + public: + // uint32 boardId = 1; + void clear_boardid() ; + ::uint32_t boardid() const; + void set_boardid(::uint32_t value); + + private: + ::uint32_t _internal_boardid() const; + void _internal_set_boardid(::uint32_t value); + + public: + // int32 pcId = 3; + void clear_pcid() ; + ::int32_t pcid() const; + void set_pcid(::int32_t value); + + private: + ::int32_t _internal_pcid() const; + void _internal_set_pcid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetScoreGameDataRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 0, 48, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetScoreGameDataRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr npid_; + ::uint32_t boardid_; + ::int32_t pcid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<36> GetScoreGameDataRequest_class_data_; +// ------------------------------------------------------------------- + +class GetScoreFriendsRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetScoreFriendsRequest) */ { + public: + inline GetScoreFriendsRequest() : GetScoreFriendsRequest(nullptr) {} + ~GetScoreFriendsRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetScoreFriendsRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetScoreFriendsRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetScoreFriendsRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetScoreFriendsRequest(const GetScoreFriendsRequest& from) : GetScoreFriendsRequest(nullptr, from) {} + inline GetScoreFriendsRequest(GetScoreFriendsRequest&& from) noexcept + : GetScoreFriendsRequest(nullptr, ::std::move(from)) {} + inline GetScoreFriendsRequest& operator=(const GetScoreFriendsRequest& from) { + CopyFrom(from); + return *this; + } + inline GetScoreFriendsRequest& operator=(GetScoreFriendsRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetScoreFriendsRequest& default_instance() { + return *reinterpret_cast( + &_GetScoreFriendsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 50; + friend void swap(GetScoreFriendsRequest& a, GetScoreFriendsRequest& b) { a.Swap(&b); } + inline void Swap(GetScoreFriendsRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetScoreFriendsRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetScoreFriendsRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetScoreFriendsRequest& from); + void MergeFrom(const GetScoreFriendsRequest& from) { GetScoreFriendsRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetScoreFriendsRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetScoreFriendsRequest"; } + + explicit GetScoreFriendsRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetScoreFriendsRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreFriendsRequest& from); + GetScoreFriendsRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetScoreFriendsRequest&& from) noexcept + : GetScoreFriendsRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kBoardIdFieldNumber = 1, + kMaxFieldNumber = 3, + kIncludeSelfFieldNumber = 2, + kWithCommentFieldNumber = 4, + kWithGameInfoFieldNumber = 5, + }; + // uint32 boardId = 1; + void clear_boardid() ; + ::uint32_t boardid() const; + void set_boardid(::uint32_t value); + + private: + ::uint32_t _internal_boardid() const; + void _internal_set_boardid(::uint32_t value); + + public: + // uint32 max = 3; + void clear_max() ; + ::uint32_t max() const; + void set_max(::uint32_t value); + + private: + ::uint32_t _internal_max() const; + void _internal_set_max(::uint32_t value); + + public: + // bool include_self = 2; + void clear_include_self() ; + bool include_self() const; + void set_include_self(bool value); + + private: + bool _internal_include_self() const; + void _internal_set_include_self(bool value); + + public: + // bool withComment = 4; + void clear_withcomment() ; + bool withcomment() const; + void set_withcomment(bool value); + + private: + bool _internal_withcomment() const; + void _internal_set_withcomment(bool value); + + public: + // bool withGameInfo = 5; + void clear_withgameinfo() ; + bool withgameinfo() const; + void set_withgameinfo(bool value); + + private: + bool _internal_withgameinfo() const; + void _internal_set_withgameinfo(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetScoreFriendsRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetScoreFriendsRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t boardid_; + ::uint32_t max_; + bool include_self_; + bool withcomment_; + bool withgameinfo_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<35> GetScoreFriendsRequest_class_data_; +// ------------------------------------------------------------------- + +class BoardInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.BoardInfo) */ { + public: + inline BoardInfo() : BoardInfo(nullptr) {} + ~BoardInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(BoardInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(BoardInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR BoardInfo(::google::protobuf::internal::ConstantInitialized); + + inline BoardInfo(const BoardInfo& from) : BoardInfo(nullptr, from) {} + inline BoardInfo(BoardInfo&& from) noexcept + : BoardInfo(nullptr, ::std::move(from)) {} + inline BoardInfo& operator=(const BoardInfo& from) { + CopyFrom(from); + return *this; + } + inline BoardInfo& operator=(BoardInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const BoardInfo& default_instance() { + return *reinterpret_cast( + &_BoardInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 45; + friend void swap(BoardInfo& a, BoardInfo& b) { a.Swap(&b); } + inline void Swap(BoardInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BoardInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BoardInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const BoardInfo& from); + void MergeFrom(const BoardInfo& from) { BoardInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(BoardInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.BoardInfo"; } + + explicit BoardInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + BoardInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BoardInfo& from); + BoardInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, BoardInfo&& from) noexcept + : BoardInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRankLimitFieldNumber = 1, + kUpdateModeFieldNumber = 2, + kSortModeFieldNumber = 3, + kUploadNumLimitFieldNumber = 4, + kUploadSizeLimitFieldNumber = 5, + }; + // uint32 rankLimit = 1; + void clear_ranklimit() ; + ::uint32_t ranklimit() const; + void set_ranklimit(::uint32_t value); + + private: + ::uint32_t _internal_ranklimit() const; + void _internal_set_ranklimit(::uint32_t value); + + public: + // uint32 updateMode = 2; + void clear_updatemode() ; + ::uint32_t updatemode() const; + void set_updatemode(::uint32_t value); + + private: + ::uint32_t _internal_updatemode() const; + void _internal_set_updatemode(::uint32_t value); + + public: + // uint32 sortMode = 3; + void clear_sortmode() ; + ::uint32_t sortmode() const; + void set_sortmode(::uint32_t value); + + private: + ::uint32_t _internal_sortmode() const; + void _internal_set_sortmode(::uint32_t value); + + public: + // uint32 uploadNumLimit = 4; + void clear_uploadnumlimit() ; + ::uint32_t uploadnumlimit() const; + void set_uploadnumlimit(::uint32_t value); + + private: + ::uint32_t _internal_uploadnumlimit() const; + void _internal_set_uploadnumlimit(::uint32_t value); + + public: + // uint32 uploadSizeLimit = 5; + void clear_uploadsizelimit() ; + ::uint32_t uploadsizelimit() const; + void set_uploadsizelimit(::uint32_t value); + + private: + ::uint32_t _internal_uploadsizelimit() const; + void _internal_set_uploadsizelimit(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.BoardInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const BoardInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t ranklimit_; + ::uint32_t updatemode_; + ::uint32_t sortmode_; + ::uint32_t uploadnumlimit_; + ::uint32_t uploadsizelimit_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<22> BoardInfo_class_data_; +// ------------------------------------------------------------------- + +class TusVarResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusVarResponse) */ { + public: + inline TusVarResponse() : TusVarResponse(nullptr) {} + ~TusVarResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusVarResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusVarResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusVarResponse(::google::protobuf::internal::ConstantInitialized); + + inline TusVarResponse(const TusVarResponse& from) : TusVarResponse(nullptr, from) {} + inline TusVarResponse(TusVarResponse&& from) noexcept + : TusVarResponse(nullptr, ::std::move(from)) {} + inline TusVarResponse& operator=(const TusVarResponse& from) { + CopyFrom(from); + return *this; + } + inline TusVarResponse& operator=(TusVarResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusVarResponse& default_instance() { + return *reinterpret_cast( + &_TusVarResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 58; + friend void swap(TusVarResponse& a, TusVarResponse& b) { a.Swap(&b); } + inline void Swap(TusVarResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusVarResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusVarResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusVarResponse& from); + void MergeFrom(const TusVarResponse& from) { TusVarResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusVarResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusVarResponse"; } + + explicit TusVarResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusVarResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusVarResponse& from); + TusVarResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusVarResponse&& from) noexcept + : TusVarResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kVarsFieldNumber = 1, + }; + // repeated .np2_structs.TusVariable vars = 1; + int vars_size() const; + private: + int _internal_vars_size() const; + + public: + void clear_vars() ; + ::np2_structs::TusVariable* PROTOBUF_NONNULL mutable_vars(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>* PROTOBUF_NONNULL mutable_vars(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>& _internal_vars() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>* PROTOBUF_NONNULL _internal_mutable_vars(); + public: + const ::np2_structs::TusVariable& vars(int index) const; + ::np2_structs::TusVariable* PROTOBUF_NONNULL add_vars(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>& vars() const; + // @@protoc_insertion_point(class_scope:np2_structs.TusVarResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusVarResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::TusVariable > vars_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<27> TusVarResponse_class_data_; +// ------------------------------------------------------------------- + +class TusTryAndSetVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusTryAndSetVariableRequest) */ { + public: + inline TusTryAndSetVariableRequest() : TusTryAndSetVariableRequest(nullptr) {} + ~TusTryAndSetVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusTryAndSetVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusTryAndSetVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusTryAndSetVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusTryAndSetVariableRequest(const TusTryAndSetVariableRequest& from) : TusTryAndSetVariableRequest(nullptr, from) {} + inline TusTryAndSetVariableRequest(TusTryAndSetVariableRequest&& from) noexcept + : TusTryAndSetVariableRequest(nullptr, ::std::move(from)) {} + inline TusTryAndSetVariableRequest& operator=(const TusTryAndSetVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusTryAndSetVariableRequest& operator=(TusTryAndSetVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusTryAndSetVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusTryAndSetVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 64; + friend void swap(TusTryAndSetVariableRequest& a, TusTryAndSetVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusTryAndSetVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusTryAndSetVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusTryAndSetVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusTryAndSetVariableRequest& from); + void MergeFrom(const TusTryAndSetVariableRequest& from) { TusTryAndSetVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusTryAndSetVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusTryAndSetVariableRequest"; } + + explicit TusTryAndSetVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusTryAndSetVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusTryAndSetVariableRequest& from); + TusTryAndSetVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusTryAndSetVariableRequest&& from) noexcept + : TusTryAndSetVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIsLastChangedDateFieldNumber = 5, + kCompareValueFieldNumber = 7, + kIsLastChangedAuthorIdFieldNumber = 6, + kUserFieldNumber = 1, + kSlotIdFieldNumber = 2, + kOpeTypeFieldNumber = 3, + kVariableFieldNumber = 4, + }; + // repeated uint64 isLastChangedDate = 5; + int islastchangeddate_size() const; + private: + int _internal_islastchangeddate_size() const; + + public: + void clear_islastchangeddate() ; + ::uint64_t islastchangeddate(int index) const; + void set_islastchangeddate(int index, ::uint64_t value); + void add_islastchangeddate(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& islastchangeddate() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL mutable_islastchangeddate(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_islastchangeddate() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL _internal_mutable_islastchangeddate(); + + public: + // repeated int64 compareValue = 7; + int comparevalue_size() const; + private: + int _internal_comparevalue_size() const; + + public: + void clear_comparevalue() ; + ::int64_t comparevalue(int index) const; + void set_comparevalue(int index, ::int64_t value); + void add_comparevalue(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& comparevalue() const; + ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL mutable_comparevalue(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_comparevalue() const; + ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL _internal_mutable_comparevalue(); + + public: + // string isLastChangedAuthorId = 6; + void clear_islastchangedauthorid() ; + const ::std::string& islastchangedauthorid() const; + template + void set_islastchangedauthorid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_islastchangedauthorid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_islastchangedauthorid(); + void set_allocated_islastchangedauthorid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_islastchangedauthorid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_islastchangedauthorid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_islastchangedauthorid(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // int32 slotId = 2; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // int32 opeType = 3; + void clear_opetype() ; + ::int32_t opetype() const; + void set_opetype(::int32_t value); + + private: + ::int32_t _internal_opetype() const; + void _internal_set_opetype(::int32_t value); + + public: + // int64 variable = 4; + void clear_variable() ; + ::int64_t variable() const; + void set_variable(::int64_t value); + + private: + ::int64_t _internal_variable() const; + void _internal_set_variable(::int64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusTryAndSetVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 7, + 1, 69, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusTryAndSetVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> islastchangeddate_; + ::google::protobuf::internal::CachedSize _islastchangeddate_cached_byte_size_; + ::google::protobuf::RepeatedField<::int64_t> comparevalue_; + ::google::protobuf::internal::CachedSize _comparevalue_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr islastchangedauthorid_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + ::int32_t slotid_; + ::int32_t opetype_; + ::int64_t variable_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<40> TusTryAndSetVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class TusSetMultiSlotVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusSetMultiSlotVariableRequest) */ { + public: + inline TusSetMultiSlotVariableRequest() : TusSetMultiSlotVariableRequest(nullptr) {} + ~TusSetMultiSlotVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusSetMultiSlotVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusSetMultiSlotVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusSetMultiSlotVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusSetMultiSlotVariableRequest(const TusSetMultiSlotVariableRequest& from) : TusSetMultiSlotVariableRequest(nullptr, from) {} + inline TusSetMultiSlotVariableRequest(TusSetMultiSlotVariableRequest&& from) noexcept + : TusSetMultiSlotVariableRequest(nullptr, ::std::move(from)) {} + inline TusSetMultiSlotVariableRequest& operator=(const TusSetMultiSlotVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusSetMultiSlotVariableRequest& operator=(TusSetMultiSlotVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusSetMultiSlotVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusSetMultiSlotVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 59; + friend void swap(TusSetMultiSlotVariableRequest& a, TusSetMultiSlotVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusSetMultiSlotVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusSetMultiSlotVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusSetMultiSlotVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusSetMultiSlotVariableRequest& from); + void MergeFrom(const TusSetMultiSlotVariableRequest& from) { TusSetMultiSlotVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusSetMultiSlotVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusSetMultiSlotVariableRequest"; } + + explicit TusSetMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusSetMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusSetMultiSlotVariableRequest& from); + TusSetMultiSlotVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusSetMultiSlotVariableRequest&& from) noexcept + : TusSetMultiSlotVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdArrayFieldNumber = 2, + kVariableArrayFieldNumber = 3, + kUserFieldNumber = 1, + }; + // repeated int32 slotIdArray = 2; + int slotidarray_size() const; + private: + int _internal_slotidarray_size() const; + + public: + void clear_slotidarray() ; + ::int32_t slotidarray(int index) const; + void set_slotidarray(int index, ::int32_t value); + void add_slotidarray(::int32_t value); + const ::google::protobuf::RepeatedField<::int32_t>& slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL mutable_slotidarray(); + + private: + const ::google::protobuf::RepeatedField<::int32_t>& _internal_slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL _internal_mutable_slotidarray(); + + public: + // repeated int64 variableArray = 3; + int variablearray_size() const; + private: + int _internal_variablearray_size() const; + + public: + void clear_variablearray() ; + ::int64_t variablearray(int index) const; + void set_variablearray(int index, ::int64_t value); + void add_variablearray(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& variablearray() const; + ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL mutable_variablearray(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_variablearray() const; + ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL _internal_mutable_variablearray(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusSetMultiSlotVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusSetMultiSlotVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int32_t> slotidarray_; + ::google::protobuf::internal::CachedSize _slotidarray_cached_byte_size_; + ::google::protobuf::RepeatedField<::int64_t> variablearray_; + ::google::protobuf::internal::CachedSize _variablearray_cached_byte_size_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<43> TusSetMultiSlotVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class TusSetDataRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusSetDataRequest) */ { + public: + inline TusSetDataRequest() : TusSetDataRequest(nullptr) {} + ~TusSetDataRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusSetDataRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusSetDataRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusSetDataRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusSetDataRequest(const TusSetDataRequest& from) : TusSetDataRequest(nullptr, from) {} + inline TusSetDataRequest(TusSetDataRequest&& from) noexcept + : TusSetDataRequest(nullptr, ::std::move(from)) {} + inline TusSetDataRequest& operator=(const TusSetDataRequest& from) { + CopyFrom(from); + return *this; + } + inline TusSetDataRequest& operator=(TusSetDataRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusSetDataRequest& default_instance() { + return *reinterpret_cast( + &_TusSetDataRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 66; + friend void swap(TusSetDataRequest& a, TusSetDataRequest& b) { a.Swap(&b); } + inline void Swap(TusSetDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusSetDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusSetDataRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusSetDataRequest& from); + void MergeFrom(const TusSetDataRequest& from) { TusSetDataRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusSetDataRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusSetDataRequest"; } + + explicit TusSetDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusSetDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusSetDataRequest& from); + TusSetDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusSetDataRequest&& from) noexcept + : TusSetDataRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIsLastChangedDateFieldNumber = 5, + kDataFieldNumber = 3, + kInfoFieldNumber = 4, + kIsLastChangedAuthorIdFieldNumber = 6, + kUserFieldNumber = 1, + kSlotIdFieldNumber = 2, + }; + // repeated uint64 isLastChangedDate = 5; + int islastchangeddate_size() const; + private: + int _internal_islastchangeddate_size() const; + + public: + void clear_islastchangeddate() ; + ::uint64_t islastchangeddate(int index) const; + void set_islastchangeddate(int index, ::uint64_t value); + void add_islastchangeddate(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& islastchangeddate() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL mutable_islastchangeddate(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_islastchangeddate() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL _internal_mutable_islastchangeddate(); + + public: + // bytes data = 3; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // bytes info = 4; + void clear_info() ; + const ::std::string& info() const; + template + void set_info(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_info(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_info(); + void set_allocated_info(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_info() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_info(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_info(); + + public: + // string isLastChangedAuthorId = 6; + void clear_islastchangedauthorid() ; + const ::std::string& islastchangedauthorid() const; + template + void set_islastchangedauthorid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_islastchangedauthorid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_islastchangedauthorid(); + void set_allocated_islastchangedauthorid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_islastchangedauthorid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_islastchangedauthorid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_islastchangedauthorid(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // int32 slotId = 2; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusSetDataRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 6, + 1, 59, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusSetDataRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> islastchangeddate_; + ::google::protobuf::internal::CachedSize _islastchangeddate_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::google::protobuf::internal::ArenaStringPtr info_; + ::google::protobuf::internal::ArenaStringPtr islastchangedauthorid_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + ::int32_t slotid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<30> TusSetDataRequest_class_data_; +// ------------------------------------------------------------------- + +class TusGetMultiUserVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetMultiUserVariableRequest) */ { + public: + inline TusGetMultiUserVariableRequest() : TusGetMultiUserVariableRequest(nullptr) {} + ~TusGetMultiUserVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetMultiUserVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetMultiUserVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetMultiUserVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetMultiUserVariableRequest(const TusGetMultiUserVariableRequest& from) : TusGetMultiUserVariableRequest(nullptr, from) {} + inline TusGetMultiUserVariableRequest(TusGetMultiUserVariableRequest&& from) noexcept + : TusGetMultiUserVariableRequest(nullptr, ::std::move(from)) {} + inline TusGetMultiUserVariableRequest& operator=(const TusGetMultiUserVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetMultiUserVariableRequest& operator=(TusGetMultiUserVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetMultiUserVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusGetMultiUserVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 61; + friend void swap(TusGetMultiUserVariableRequest& a, TusGetMultiUserVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusGetMultiUserVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetMultiUserVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetMultiUserVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetMultiUserVariableRequest& from); + void MergeFrom(const TusGetMultiUserVariableRequest& from) { TusGetMultiUserVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetMultiUserVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetMultiUserVariableRequest"; } + + explicit TusGetMultiUserVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetMultiUserVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetMultiUserVariableRequest& from); + TusGetMultiUserVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetMultiUserVariableRequest&& from) noexcept + : TusGetMultiUserVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUsersFieldNumber = 1, + kSlotIdFieldNumber = 2, + }; + // repeated .np2_structs.TusUser users = 1; + int users_size() const; + private: + int _internal_users_size() const; + + public: + void clear_users() ; + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_users(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL mutable_users(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& _internal_users() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL _internal_mutable_users(); + public: + const ::np2_structs::TusUser& users(int index) const; + ::np2_structs::TusUser* PROTOBUF_NONNULL add_users(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& users() const; + // int32 slotId = 2; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetMultiUserVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetMultiUserVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::TusUser > users_; + ::int32_t slotid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<43> TusGetMultiUserVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class TusGetMultiUserDataStatusRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetMultiUserDataStatusRequest) */ { + public: + inline TusGetMultiUserDataStatusRequest() : TusGetMultiUserDataStatusRequest(nullptr) {} + ~TusGetMultiUserDataStatusRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetMultiUserDataStatusRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetMultiUserDataStatusRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetMultiUserDataStatusRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetMultiUserDataStatusRequest(const TusGetMultiUserDataStatusRequest& from) : TusGetMultiUserDataStatusRequest(nullptr, from) {} + inline TusGetMultiUserDataStatusRequest(TusGetMultiUserDataStatusRequest&& from) noexcept + : TusGetMultiUserDataStatusRequest(nullptr, ::std::move(from)) {} + inline TusGetMultiUserDataStatusRequest& operator=(const TusGetMultiUserDataStatusRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetMultiUserDataStatusRequest& operator=(TusGetMultiUserDataStatusRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetMultiUserDataStatusRequest& default_instance() { + return *reinterpret_cast( + &_TusGetMultiUserDataStatusRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 72; + friend void swap(TusGetMultiUserDataStatusRequest& a, TusGetMultiUserDataStatusRequest& b) { a.Swap(&b); } + inline void Swap(TusGetMultiUserDataStatusRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetMultiUserDataStatusRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetMultiUserDataStatusRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetMultiUserDataStatusRequest& from); + void MergeFrom(const TusGetMultiUserDataStatusRequest& from) { TusGetMultiUserDataStatusRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetMultiUserDataStatusRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetMultiUserDataStatusRequest"; } + + explicit TusGetMultiUserDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetMultiUserDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetMultiUserDataStatusRequest& from); + TusGetMultiUserDataStatusRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetMultiUserDataStatusRequest&& from) noexcept + : TusGetMultiUserDataStatusRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUsersFieldNumber = 1, + kSlotIdFieldNumber = 2, + }; + // repeated .np2_structs.TusUser users = 1; + int users_size() const; + private: + int _internal_users_size() const; + + public: + void clear_users() ; + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_users(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL mutable_users(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& _internal_users() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL _internal_mutable_users(); + public: + const ::np2_structs::TusUser& users(int index) const; + ::np2_structs::TusUser* PROTOBUF_NONNULL add_users(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& users() const; + // int32 slotId = 2; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetMultiUserDataStatusRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetMultiUserDataStatusRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::TusUser > users_; + ::int32_t slotid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<45> TusGetMultiUserDataStatusRequest_class_data_; +// ------------------------------------------------------------------- + +class TusGetMultiSlotVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetMultiSlotVariableRequest) */ { + public: + inline TusGetMultiSlotVariableRequest() : TusGetMultiSlotVariableRequest(nullptr) {} + ~TusGetMultiSlotVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetMultiSlotVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetMultiSlotVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetMultiSlotVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetMultiSlotVariableRequest(const TusGetMultiSlotVariableRequest& from) : TusGetMultiSlotVariableRequest(nullptr, from) {} + inline TusGetMultiSlotVariableRequest(TusGetMultiSlotVariableRequest&& from) noexcept + : TusGetMultiSlotVariableRequest(nullptr, ::std::move(from)) {} + inline TusGetMultiSlotVariableRequest& operator=(const TusGetMultiSlotVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetMultiSlotVariableRequest& operator=(TusGetMultiSlotVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetMultiSlotVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusGetMultiSlotVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 60; + friend void swap(TusGetMultiSlotVariableRequest& a, TusGetMultiSlotVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusGetMultiSlotVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetMultiSlotVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetMultiSlotVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetMultiSlotVariableRequest& from); + void MergeFrom(const TusGetMultiSlotVariableRequest& from) { TusGetMultiSlotVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetMultiSlotVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetMultiSlotVariableRequest"; } + + explicit TusGetMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetMultiSlotVariableRequest& from); + TusGetMultiSlotVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetMultiSlotVariableRequest&& from) noexcept + : TusGetMultiSlotVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdArrayFieldNumber = 2, + kUserFieldNumber = 1, + }; + // repeated int32 slotIdArray = 2; + int slotidarray_size() const; + private: + int _internal_slotidarray_size() const; + + public: + void clear_slotidarray() ; + ::int32_t slotidarray(int index) const; + void set_slotidarray(int index, ::int32_t value); + void add_slotidarray(::int32_t value); + const ::google::protobuf::RepeatedField<::int32_t>& slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL mutable_slotidarray(); + + private: + const ::google::protobuf::RepeatedField<::int32_t>& _internal_slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL _internal_mutable_slotidarray(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetMultiSlotVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetMultiSlotVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int32_t> slotidarray_; + ::google::protobuf::internal::CachedSize _slotidarray_cached_byte_size_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<43> TusGetMultiSlotVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class TusGetMultiSlotDataStatusRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetMultiSlotDataStatusRequest) */ { + public: + inline TusGetMultiSlotDataStatusRequest() : TusGetMultiSlotDataStatusRequest(nullptr) {} + ~TusGetMultiSlotDataStatusRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetMultiSlotDataStatusRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetMultiSlotDataStatusRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetMultiSlotDataStatusRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetMultiSlotDataStatusRequest(const TusGetMultiSlotDataStatusRequest& from) : TusGetMultiSlotDataStatusRequest(nullptr, from) {} + inline TusGetMultiSlotDataStatusRequest(TusGetMultiSlotDataStatusRequest&& from) noexcept + : TusGetMultiSlotDataStatusRequest(nullptr, ::std::move(from)) {} + inline TusGetMultiSlotDataStatusRequest& operator=(const TusGetMultiSlotDataStatusRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetMultiSlotDataStatusRequest& operator=(TusGetMultiSlotDataStatusRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetMultiSlotDataStatusRequest& default_instance() { + return *reinterpret_cast( + &_TusGetMultiSlotDataStatusRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 71; + friend void swap(TusGetMultiSlotDataStatusRequest& a, TusGetMultiSlotDataStatusRequest& b) { a.Swap(&b); } + inline void Swap(TusGetMultiSlotDataStatusRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetMultiSlotDataStatusRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetMultiSlotDataStatusRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetMultiSlotDataStatusRequest& from); + void MergeFrom(const TusGetMultiSlotDataStatusRequest& from) { TusGetMultiSlotDataStatusRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetMultiSlotDataStatusRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetMultiSlotDataStatusRequest"; } + + explicit TusGetMultiSlotDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetMultiSlotDataStatusRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetMultiSlotDataStatusRequest& from); + TusGetMultiSlotDataStatusRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetMultiSlotDataStatusRequest&& from) noexcept + : TusGetMultiSlotDataStatusRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdArrayFieldNumber = 2, + kUserFieldNumber = 1, + }; + // repeated int32 slotIdArray = 2; + int slotidarray_size() const; + private: + int _internal_slotidarray_size() const; + + public: + void clear_slotidarray() ; + ::int32_t slotidarray(int index) const; + void set_slotidarray(int index, ::int32_t value); + void add_slotidarray(::int32_t value); + const ::google::protobuf::RepeatedField<::int32_t>& slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL mutable_slotidarray(); + + private: + const ::google::protobuf::RepeatedField<::int32_t>& _internal_slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL _internal_mutable_slotidarray(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetMultiSlotDataStatusRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetMultiSlotDataStatusRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int32_t> slotidarray_; + ::google::protobuf::internal::CachedSize _slotidarray_cached_byte_size_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<45> TusGetMultiSlotDataStatusRequest_class_data_; +// ------------------------------------------------------------------- + +class TusGetDataRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusGetDataRequest) */ { + public: + inline TusGetDataRequest() : TusGetDataRequest(nullptr) {} + ~TusGetDataRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusGetDataRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusGetDataRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusGetDataRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusGetDataRequest(const TusGetDataRequest& from) : TusGetDataRequest(nullptr, from) {} + inline TusGetDataRequest(TusGetDataRequest&& from) noexcept + : TusGetDataRequest(nullptr, ::std::move(from)) {} + inline TusGetDataRequest& operator=(const TusGetDataRequest& from) { + CopyFrom(from); + return *this; + } + inline TusGetDataRequest& operator=(TusGetDataRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusGetDataRequest& default_instance() { + return *reinterpret_cast( + &_TusGetDataRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 70; + friend void swap(TusGetDataRequest& a, TusGetDataRequest& b) { a.Swap(&b); } + inline void Swap(TusGetDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusGetDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusGetDataRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusGetDataRequest& from); + void MergeFrom(const TusGetDataRequest& from) { TusGetDataRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusGetDataRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusGetDataRequest"; } + + explicit TusGetDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusGetDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusGetDataRequest& from); + TusGetDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusGetDataRequest&& from) noexcept + : TusGetDataRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUserFieldNumber = 1, + kSlotIdFieldNumber = 2, + }; + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // int32 slotId = 2; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusGetDataRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusGetDataRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + ::int32_t slotid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<30> TusGetDataRequest_class_data_; +// ------------------------------------------------------------------- + +class TusDeleteMultiSlotVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusDeleteMultiSlotVariableRequest) */ { + public: + inline TusDeleteMultiSlotVariableRequest() : TusDeleteMultiSlotVariableRequest(nullptr) {} + ~TusDeleteMultiSlotVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusDeleteMultiSlotVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusDeleteMultiSlotVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusDeleteMultiSlotVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusDeleteMultiSlotVariableRequest(const TusDeleteMultiSlotVariableRequest& from) : TusDeleteMultiSlotVariableRequest(nullptr, from) {} + inline TusDeleteMultiSlotVariableRequest(TusDeleteMultiSlotVariableRequest&& from) noexcept + : TusDeleteMultiSlotVariableRequest(nullptr, ::std::move(from)) {} + inline TusDeleteMultiSlotVariableRequest& operator=(const TusDeleteMultiSlotVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusDeleteMultiSlotVariableRequest& operator=(TusDeleteMultiSlotVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusDeleteMultiSlotVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusDeleteMultiSlotVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 65; + friend void swap(TusDeleteMultiSlotVariableRequest& a, TusDeleteMultiSlotVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusDeleteMultiSlotVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusDeleteMultiSlotVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusDeleteMultiSlotVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusDeleteMultiSlotVariableRequest& from); + void MergeFrom(const TusDeleteMultiSlotVariableRequest& from) { TusDeleteMultiSlotVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusDeleteMultiSlotVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusDeleteMultiSlotVariableRequest"; } + + explicit TusDeleteMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusDeleteMultiSlotVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusDeleteMultiSlotVariableRequest& from); + TusDeleteMultiSlotVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusDeleteMultiSlotVariableRequest&& from) noexcept + : TusDeleteMultiSlotVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdArrayFieldNumber = 2, + kUserFieldNumber = 1, + }; + // repeated int32 slotIdArray = 2; + int slotidarray_size() const; + private: + int _internal_slotidarray_size() const; + + public: + void clear_slotidarray() ; + ::int32_t slotidarray(int index) const; + void set_slotidarray(int index, ::int32_t value); + void add_slotidarray(::int32_t value); + const ::google::protobuf::RepeatedField<::int32_t>& slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL mutable_slotidarray(); + + private: + const ::google::protobuf::RepeatedField<::int32_t>& _internal_slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL _internal_mutable_slotidarray(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusDeleteMultiSlotVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusDeleteMultiSlotVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int32_t> slotidarray_; + ::google::protobuf::internal::CachedSize _slotidarray_cached_byte_size_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<46> TusDeleteMultiSlotVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class TusDeleteMultiSlotDataRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusDeleteMultiSlotDataRequest) */ { + public: + inline TusDeleteMultiSlotDataRequest() : TusDeleteMultiSlotDataRequest(nullptr) {} + ~TusDeleteMultiSlotDataRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusDeleteMultiSlotDataRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusDeleteMultiSlotDataRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusDeleteMultiSlotDataRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusDeleteMultiSlotDataRequest(const TusDeleteMultiSlotDataRequest& from) : TusDeleteMultiSlotDataRequest(nullptr, from) {} + inline TusDeleteMultiSlotDataRequest(TusDeleteMultiSlotDataRequest&& from) noexcept + : TusDeleteMultiSlotDataRequest(nullptr, ::std::move(from)) {} + inline TusDeleteMultiSlotDataRequest& operator=(const TusDeleteMultiSlotDataRequest& from) { + CopyFrom(from); + return *this; + } + inline TusDeleteMultiSlotDataRequest& operator=(TusDeleteMultiSlotDataRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusDeleteMultiSlotDataRequest& default_instance() { + return *reinterpret_cast( + &_TusDeleteMultiSlotDataRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 74; + friend void swap(TusDeleteMultiSlotDataRequest& a, TusDeleteMultiSlotDataRequest& b) { a.Swap(&b); } + inline void Swap(TusDeleteMultiSlotDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusDeleteMultiSlotDataRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusDeleteMultiSlotDataRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusDeleteMultiSlotDataRequest& from); + void MergeFrom(const TusDeleteMultiSlotDataRequest& from) { TusDeleteMultiSlotDataRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusDeleteMultiSlotDataRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusDeleteMultiSlotDataRequest"; } + + explicit TusDeleteMultiSlotDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusDeleteMultiSlotDataRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusDeleteMultiSlotDataRequest& from); + TusDeleteMultiSlotDataRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusDeleteMultiSlotDataRequest&& from) noexcept + : TusDeleteMultiSlotDataRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSlotIdArrayFieldNumber = 2, + kUserFieldNumber = 1, + }; + // repeated int32 slotIdArray = 2; + int slotidarray_size() const; + private: + int _internal_slotidarray_size() const; + + public: + void clear_slotidarray() ; + ::int32_t slotidarray(int index) const; + void set_slotidarray(int index, ::int32_t value); + void add_slotidarray(::int32_t value); + const ::google::protobuf::RepeatedField<::int32_t>& slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL mutable_slotidarray(); + + private: + const ::google::protobuf::RepeatedField<::int32_t>& _internal_slotidarray() const; + ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL _internal_mutable_slotidarray(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusDeleteMultiSlotDataRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusDeleteMultiSlotDataRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int32_t> slotidarray_; + ::google::protobuf::internal::CachedSize _slotidarray_cached_byte_size_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<42> TusDeleteMultiSlotDataRequest_class_data_; +// ------------------------------------------------------------------- + +class TusDataStatusResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusDataStatusResponse) */ { + public: + inline TusDataStatusResponse() : TusDataStatusResponse(nullptr) {} + ~TusDataStatusResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusDataStatusResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusDataStatusResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusDataStatusResponse(::google::protobuf::internal::ConstantInitialized); + + inline TusDataStatusResponse(const TusDataStatusResponse& from) : TusDataStatusResponse(nullptr, from) {} + inline TusDataStatusResponse(TusDataStatusResponse&& from) noexcept + : TusDataStatusResponse(nullptr, ::std::move(from)) {} + inline TusDataStatusResponse& operator=(const TusDataStatusResponse& from) { + CopyFrom(from); + return *this; + } + inline TusDataStatusResponse& operator=(TusDataStatusResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusDataStatusResponse& default_instance() { + return *reinterpret_cast( + &_TusDataStatusResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 69; + friend void swap(TusDataStatusResponse& a, TusDataStatusResponse& b) { a.Swap(&b); } + inline void Swap(TusDataStatusResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusDataStatusResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusDataStatusResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusDataStatusResponse& from); + void MergeFrom(const TusDataStatusResponse& from) { TusDataStatusResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusDataStatusResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusDataStatusResponse"; } + + explicit TusDataStatusResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusDataStatusResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusDataStatusResponse& from); + TusDataStatusResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusDataStatusResponse&& from) noexcept + : TusDataStatusResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kStatusFieldNumber = 1, + }; + // repeated .np2_structs.TusDataStatus status = 1; + int status_size() const; + private: + int _internal_status_size() const; + + public: + void clear_status() ; + ::np2_structs::TusDataStatus* PROTOBUF_NONNULL mutable_status(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>* PROTOBUF_NONNULL mutable_status(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>& _internal_status() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>* PROTOBUF_NONNULL _internal_mutable_status(); + public: + const ::np2_structs::TusDataStatus& status(int index) const; + ::np2_structs::TusDataStatus* PROTOBUF_NONNULL add_status(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>& status() const; + // @@protoc_insertion_point(class_scope:np2_structs.TusDataStatusResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusDataStatusResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::TusDataStatus > status_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<34> TusDataStatusResponse_class_data_; +// ------------------------------------------------------------------- + +class TusData final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusData) */ { + public: + inline TusData() : TusData(nullptr) {} + ~TusData() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusData* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusData)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusData(::google::protobuf::internal::ConstantInitialized); + + inline TusData(const TusData& from) : TusData(nullptr, from) {} + inline TusData(TusData&& from) noexcept + : TusData(nullptr, ::std::move(from)) {} + inline TusData& operator=(const TusData& from) { + CopyFrom(from); + return *this; + } + inline TusData& operator=(TusData&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusData& default_instance() { + return *reinterpret_cast( + &_TusData_default_instance_); + } + static constexpr int kIndexInFileMessages = 68; + friend void swap(TusData& a, TusData& b) { a.Swap(&b); } + inline void Swap(TusData* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusData* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusData* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusData& from); + void MergeFrom(const TusData& from) { TusData::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusData* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusData"; } + + explicit TusData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusData& from); + TusData( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusData&& from) noexcept + : TusData(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDataFieldNumber = 2, + kStatusFieldNumber = 1, + }; + // bytes data = 2; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // .np2_structs.TusDataStatus status = 1; + bool has_status() const; + void clear_status() ; + const ::np2_structs::TusDataStatus& status() const; + [[nodiscard]] ::np2_structs::TusDataStatus* PROTOBUF_NULLABLE release_status(); + ::np2_structs::TusDataStatus* PROTOBUF_NONNULL mutable_status(); + void set_allocated_status(::np2_structs::TusDataStatus* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_status(::np2_structs::TusDataStatus* PROTOBUF_NULLABLE value); + ::np2_structs::TusDataStatus* PROTOBUF_NULLABLE unsafe_arena_release_status(); + + private: + const ::np2_structs::TusDataStatus& _internal_status() const; + ::np2_structs::TusDataStatus* PROTOBUF_NONNULL _internal_mutable_status(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusData) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusData& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::np2_structs::TusDataStatus* PROTOBUF_NULLABLE status_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<20> TusData_class_data_; +// ------------------------------------------------------------------- + +class TusAddAndGetVariableRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.TusAddAndGetVariableRequest) */ { + public: + inline TusAddAndGetVariableRequest() : TusAddAndGetVariableRequest(nullptr) {} + ~TusAddAndGetVariableRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TusAddAndGetVariableRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TusAddAndGetVariableRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TusAddAndGetVariableRequest(::google::protobuf::internal::ConstantInitialized); + + inline TusAddAndGetVariableRequest(const TusAddAndGetVariableRequest& from) : TusAddAndGetVariableRequest(nullptr, from) {} + inline TusAddAndGetVariableRequest(TusAddAndGetVariableRequest&& from) noexcept + : TusAddAndGetVariableRequest(nullptr, ::std::move(from)) {} + inline TusAddAndGetVariableRequest& operator=(const TusAddAndGetVariableRequest& from) { + CopyFrom(from); + return *this; + } + inline TusAddAndGetVariableRequest& operator=(TusAddAndGetVariableRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const TusAddAndGetVariableRequest& default_instance() { + return *reinterpret_cast( + &_TusAddAndGetVariableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 63; + friend void swap(TusAddAndGetVariableRequest& a, TusAddAndGetVariableRequest& b) { a.Swap(&b); } + inline void Swap(TusAddAndGetVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TusAddAndGetVariableRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TusAddAndGetVariableRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TusAddAndGetVariableRequest& from); + void MergeFrom(const TusAddAndGetVariableRequest& from) { TusAddAndGetVariableRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TusAddAndGetVariableRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.TusAddAndGetVariableRequest"; } + + explicit TusAddAndGetVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + TusAddAndGetVariableRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TusAddAndGetVariableRequest& from); + TusAddAndGetVariableRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TusAddAndGetVariableRequest&& from) noexcept + : TusAddAndGetVariableRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIsLastChangedDateFieldNumber = 4, + kIsLastChangedAuthorIdFieldNumber = 5, + kUserFieldNumber = 1, + kInVariableFieldNumber = 3, + kSlotIdFieldNumber = 2, + }; + // repeated uint64 isLastChangedDate = 4; + int islastchangeddate_size() const; + private: + int _internal_islastchangeddate_size() const; + + public: + void clear_islastchangeddate() ; + ::uint64_t islastchangeddate(int index) const; + void set_islastchangeddate(int index, ::uint64_t value); + void add_islastchangeddate(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& islastchangeddate() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL mutable_islastchangeddate(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_islastchangeddate() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL _internal_mutable_islastchangeddate(); + + public: + // string isLastChangedAuthorId = 5; + void clear_islastchangedauthorid() ; + const ::std::string& islastchangedauthorid() const; + template + void set_islastchangedauthorid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_islastchangedauthorid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_islastchangedauthorid(); + void set_allocated_islastchangedauthorid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_islastchangedauthorid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_islastchangedauthorid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_islastchangedauthorid(); + + public: + // .np2_structs.TusUser user = 1; + bool has_user() const; + void clear_user() ; + const ::np2_structs::TusUser& user() const; + [[nodiscard]] ::np2_structs::TusUser* PROTOBUF_NULLABLE release_user(); + ::np2_structs::TusUser* PROTOBUF_NONNULL mutable_user(); + void set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value); + ::np2_structs::TusUser* PROTOBUF_NULLABLE unsafe_arena_release_user(); + + private: + const ::np2_structs::TusUser& _internal_user() const; + ::np2_structs::TusUser* PROTOBUF_NONNULL _internal_mutable_user(); + + public: + // int64 inVariable = 3; + void clear_invariable() ; + ::int64_t invariable() const; + void set_invariable(::int64_t value); + + private: + ::int64_t _internal_invariable() const; + void _internal_set_invariable(::int64_t value); + + public: + // int32 slotId = 2; + void clear_slotid() ; + ::int32_t slotid() const; + void set_slotid(::int32_t value); + + private: + ::int32_t _internal_slotid() const; + void _internal_set_slotid(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.TusAddAndGetVariableRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 1, 69, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const TusAddAndGetVariableRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> islastchangeddate_; + ::google::protobuf::internal::CachedSize _islastchangeddate_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr islastchangedauthorid_; + ::np2_structs::TusUser* PROTOBUF_NULLABLE user_; + ::int64_t invariable_; + ::int32_t slotid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<40> TusAddAndGetVariableRequest_class_data_; +// ------------------------------------------------------------------- + +class SignalingAddr final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SignalingAddr) */ { + public: + inline SignalingAddr() : SignalingAddr(nullptr) {} + ~SignalingAddr() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SignalingAddr* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SignalingAddr)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SignalingAddr(::google::protobuf::internal::ConstantInitialized); + + inline SignalingAddr(const SignalingAddr& from) : SignalingAddr(nullptr, from) {} + inline SignalingAddr(SignalingAddr&& from) noexcept + : SignalingAddr(nullptr, ::std::move(from)) {} + inline SignalingAddr& operator=(const SignalingAddr& from) { + CopyFrom(from); + return *this; + } + inline SignalingAddr& operator=(SignalingAddr&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SignalingAddr& default_instance() { + return *reinterpret_cast( + &_SignalingAddr_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(SignalingAddr& a, SignalingAddr& b) { a.Swap(&b); } + inline void Swap(SignalingAddr* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SignalingAddr* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SignalingAddr* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SignalingAddr& from); + void MergeFrom(const SignalingAddr& from) { SignalingAddr::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SignalingAddr* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SignalingAddr"; } + + explicit SignalingAddr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SignalingAddr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SignalingAddr& from); + SignalingAddr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SignalingAddr&& from) noexcept + : SignalingAddr(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIpFieldNumber = 1, + kPortFieldNumber = 2, + }; + // bytes ip = 1; + void clear_ip() ; + const ::std::string& ip() const; + template + void set_ip(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_ip(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_ip(); + void set_allocated_ip(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_ip() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_ip(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_ip(); + + public: + // .np2_structs.uint16 port = 2; + bool has_port() const; + void clear_port() ; + const ::np2_structs::uint16& port() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_port(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_port(); + void set_allocated_port(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_port(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_port(); + + private: + const ::np2_structs::uint16& _internal_port() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_port(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SignalingAddr) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SignalingAddr& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr ip_; + ::np2_structs::uint16* PROTOBUF_NULLABLE port_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<26> SignalingAddr_class_data_; +// ------------------------------------------------------------------- + +class SendRoomMessageRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SendRoomMessageRequest) */ { + public: + inline SendRoomMessageRequest() : SendRoomMessageRequest(nullptr) {} + ~SendRoomMessageRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SendRoomMessageRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SendRoomMessageRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SendRoomMessageRequest(::google::protobuf::internal::ConstantInitialized); + + inline SendRoomMessageRequest(const SendRoomMessageRequest& from) : SendRoomMessageRequest(nullptr, from) {} + inline SendRoomMessageRequest(SendRoomMessageRequest&& from) noexcept + : SendRoomMessageRequest(nullptr, ::std::move(from)) {} + inline SendRoomMessageRequest& operator=(const SendRoomMessageRequest& from) { + CopyFrom(from); + return *this; + } + inline SendRoomMessageRequest& operator=(SendRoomMessageRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SendRoomMessageRequest& default_instance() { + return *reinterpret_cast( + &_SendRoomMessageRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 41; + friend void swap(SendRoomMessageRequest& a, SendRoomMessageRequest& b) { a.Swap(&b); } + inline void Swap(SendRoomMessageRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendRoomMessageRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendRoomMessageRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SendRoomMessageRequest& from); + void MergeFrom(const SendRoomMessageRequest& from) { SendRoomMessageRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SendRoomMessageRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SendRoomMessageRequest"; } + + explicit SendRoomMessageRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SendRoomMessageRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SendRoomMessageRequest& from); + SendRoomMessageRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SendRoomMessageRequest&& from) noexcept + : SendRoomMessageRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDstFieldNumber = 3, + kMsgFieldNumber = 4, + kCastTypeFieldNumber = 2, + kOptionFieldNumber = 5, + kRoomIdFieldNumber = 1, + }; + // repeated .np2_structs.uint16 dst = 3; + int dst_size() const; + private: + int _internal_dst_size() const; + + public: + void clear_dst() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_dst(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_dst(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_dst() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_dst(); + public: + const ::np2_structs::uint16& dst(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_dst(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& dst() const; + // bytes msg = 4; + void clear_msg() ; + const ::std::string& msg() const; + template + void set_msg(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_msg(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_msg(); + void set_allocated_msg(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_msg() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_msg(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_msg(); + + public: + // .np2_structs.uint8 castType = 2; + bool has_casttype() const; + void clear_casttype() ; + const ::np2_structs::uint8& casttype() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_casttype(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_casttype(); + void set_allocated_casttype(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_casttype(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_casttype(); + + private: + const ::np2_structs::uint8& _internal_casttype() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_casttype(); + + public: + // .np2_structs.uint8 option = 5; + bool has_option() const; + void clear_option() ; + const ::np2_structs::uint8& option() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_option(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_option(); + void set_allocated_option(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_option(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_option(); + + private: + const ::np2_structs::uint8& _internal_option() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_option(); + + public: + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SendRoomMessageRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SendRoomMessageRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > dst_; + ::google::protobuf::internal::ArenaStringPtr msg_; + ::np2_structs::uint8* PROTOBUF_NULLABLE casttype_; + ::np2_structs::uint8* PROTOBUF_NULLABLE option_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<35> SendRoomMessageRequest_class_data_; +// ------------------------------------------------------------------- + +class SearchJoinRoomGUIRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SearchJoinRoomGUIRequest) */ { + public: + inline SearchJoinRoomGUIRequest() : SearchJoinRoomGUIRequest(nullptr) {} + ~SearchJoinRoomGUIRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SearchJoinRoomGUIRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SearchJoinRoomGUIRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SearchJoinRoomGUIRequest(::google::protobuf::internal::ConstantInitialized); + + inline SearchJoinRoomGUIRequest(const SearchJoinRoomGUIRequest& from) : SearchJoinRoomGUIRequest(nullptr, from) {} + inline SearchJoinRoomGUIRequest(SearchJoinRoomGUIRequest&& from) noexcept + : SearchJoinRoomGUIRequest(nullptr, ::std::move(from)) {} + inline SearchJoinRoomGUIRequest& operator=(const SearchJoinRoomGUIRequest& from) { + CopyFrom(from); + return *this; + } + inline SearchJoinRoomGUIRequest& operator=(SearchJoinRoomGUIRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SearchJoinRoomGUIRequest& default_instance() { + return *reinterpret_cast( + &_SearchJoinRoomGUIRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 87; + friend void swap(SearchJoinRoomGUIRequest& a, SearchJoinRoomGUIRequest& b) { a.Swap(&b); } + inline void Swap(SearchJoinRoomGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SearchJoinRoomGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SearchJoinRoomGUIRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SearchJoinRoomGUIRequest& from); + void MergeFrom(const SearchJoinRoomGUIRequest& from) { SearchJoinRoomGUIRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SearchJoinRoomGUIRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SearchJoinRoomGUIRequest"; } + + explicit SearchJoinRoomGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SearchJoinRoomGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SearchJoinRoomGUIRequest& from); + SearchJoinRoomGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SearchJoinRoomGUIRequest&& from) noexcept + : SearchJoinRoomGUIRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kCondsFieldNumber = 1, + kAttrsFieldNumber = 2, + }; + // repeated .np2_structs.MatchingSearchCondition conds = 1; + int conds_size() const; + private: + int _internal_conds_size() const; + + public: + void clear_conds() ; + ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL mutable_conds(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL mutable_conds(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& _internal_conds() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL _internal_mutable_conds(); + public: + const ::np2_structs::MatchingSearchCondition& conds(int index) const; + ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL add_conds(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& conds() const; + // repeated .np2_structs.MatchingAttr attrs = 2; + int attrs_size() const; + private: + int _internal_attrs_size() const; + + public: + void clear_attrs() ; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL mutable_attrs(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL mutable_attrs(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& _internal_attrs() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL _internal_mutable_attrs(); + public: + const ::np2_structs::MatchingAttr& attrs(int index) const; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL add_attrs(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& attrs() const; + // @@protoc_insertion_point(class_scope:np2_structs.SearchJoinRoomGUIRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SearchJoinRoomGUIRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingSearchCondition > conds_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingAttr > attrs_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<37> SearchJoinRoomGUIRequest_class_data_; +// ------------------------------------------------------------------- + +class RoomUpdateInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomUpdateInfo) */ { + public: + inline RoomUpdateInfo() : RoomUpdateInfo(nullptr) {} + ~RoomUpdateInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomUpdateInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomUpdateInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomUpdateInfo(::google::protobuf::internal::ConstantInitialized); + + inline RoomUpdateInfo(const RoomUpdateInfo& from) : RoomUpdateInfo(nullptr, from) {} + inline RoomUpdateInfo(RoomUpdateInfo&& from) noexcept + : RoomUpdateInfo(nullptr, ::std::move(from)) {} + inline RoomUpdateInfo& operator=(const RoomUpdateInfo& from) { + CopyFrom(from); + return *this; + } + inline RoomUpdateInfo& operator=(RoomUpdateInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomUpdateInfo& default_instance() { + return *reinterpret_cast( + &_RoomUpdateInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 37; + friend void swap(RoomUpdateInfo& a, RoomUpdateInfo& b) { a.Swap(&b); } + inline void Swap(RoomUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomUpdateInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomUpdateInfo& from); + void MergeFrom(const RoomUpdateInfo& from) { RoomUpdateInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomUpdateInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomUpdateInfo"; } + + explicit RoomUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomUpdateInfo& from); + RoomUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomUpdateInfo&& from) noexcept + : RoomUpdateInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kEventCauseFieldNumber = 1, + kOptDataFieldNumber = 3, + kErrorCodeFieldNumber = 2, + }; + // .np2_structs.uint8 eventCause = 1; + bool has_eventcause() const; + void clear_eventcause() ; + const ::np2_structs::uint8& eventcause() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_eventcause(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_eventcause(); + void set_allocated_eventcause(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_eventcause(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_eventcause(); + + private: + const ::np2_structs::uint8& _internal_eventcause() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_eventcause(); + + public: + // .np2_structs.PresenceOptionData optData = 3; + bool has_optdata() const; + void clear_optdata() ; + const ::np2_structs::PresenceOptionData& optdata() const; + [[nodiscard]] ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE release_optdata(); + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL mutable_optdata(); + void set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE unsafe_arena_release_optdata(); + + private: + const ::np2_structs::PresenceOptionData& _internal_optdata() const; + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL _internal_mutable_optdata(); + + public: + // int32 errorCode = 2; + void clear_errorcode() ; + ::int32_t errorcode() const; + void set_errorcode(::int32_t value); + + private: + ::int32_t _internal_errorcode() const; + void _internal_set_errorcode(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomUpdateInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomUpdateInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint8* PROTOBUF_NULLABLE eventcause_; + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE optdata_; + ::int32_t errorcode_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<27> RoomUpdateInfo_class_data_; +// ------------------------------------------------------------------- + +class RoomMessageInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomMessageInfo) */ { + public: + inline RoomMessageInfo() : RoomMessageInfo(nullptr) {} + ~RoomMessageInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomMessageInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomMessageInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomMessageInfo(::google::protobuf::internal::ConstantInitialized); + + inline RoomMessageInfo(const RoomMessageInfo& from) : RoomMessageInfo(nullptr, from) {} + inline RoomMessageInfo(RoomMessageInfo&& from) noexcept + : RoomMessageInfo(nullptr, ::std::move(from)) {} + inline RoomMessageInfo& operator=(const RoomMessageInfo& from) { + CopyFrom(from); + return *this; + } + inline RoomMessageInfo& operator=(RoomMessageInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomMessageInfo& default_instance() { + return *reinterpret_cast( + &_RoomMessageInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 42; + friend void swap(RoomMessageInfo& a, RoomMessageInfo& b) { a.Swap(&b); } + inline void Swap(RoomMessageInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomMessageInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomMessageInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomMessageInfo& from); + void MergeFrom(const RoomMessageInfo& from) { RoomMessageInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomMessageInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomMessageInfo"; } + + explicit RoomMessageInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomMessageInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomMessageInfo& from); + RoomMessageInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomMessageInfo&& from) noexcept + : RoomMessageInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDstFieldNumber = 3, + kMsgFieldNumber = 5, + kCastTypeFieldNumber = 2, + kSrcMemberFieldNumber = 4, + kFilteredFieldNumber = 1, + }; + // repeated .np2_structs.uint16 dst = 3; + int dst_size() const; + private: + int _internal_dst_size() const; + + public: + void clear_dst() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_dst(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_dst(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_dst() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_dst(); + public: + const ::np2_structs::uint16& dst(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_dst(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& dst() const; + // bytes msg = 5; + void clear_msg() ; + const ::std::string& msg() const; + template + void set_msg(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_msg(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_msg(); + void set_allocated_msg(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_msg() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_msg(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_msg(); + + public: + // .np2_structs.uint8 castType = 2; + bool has_casttype() const; + void clear_casttype() ; + const ::np2_structs::uint8& casttype() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_casttype(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_casttype(); + void set_allocated_casttype(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_casttype(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_casttype(); + + private: + const ::np2_structs::uint8& _internal_casttype() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_casttype(); + + public: + // .np2_structs.UserInfo srcMember = 4; + bool has_srcmember() const; + void clear_srcmember() ; + const ::np2_structs::UserInfo& srcmember() const; + [[nodiscard]] ::np2_structs::UserInfo* PROTOBUF_NULLABLE release_srcmember(); + ::np2_structs::UserInfo* PROTOBUF_NONNULL mutable_srcmember(); + void set_allocated_srcmember(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_srcmember(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + ::np2_structs::UserInfo* PROTOBUF_NULLABLE unsafe_arena_release_srcmember(); + + private: + const ::np2_structs::UserInfo& _internal_srcmember() const; + ::np2_structs::UserInfo* PROTOBUF_NONNULL _internal_mutable_srcmember(); + + public: + // bool filtered = 1; + void clear_filtered() ; + bool filtered() const; + void set_filtered(bool value); + + private: + bool _internal_filtered() const; + void _internal_set_filtered(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomMessageInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomMessageInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > dst_; + ::google::protobuf::internal::ArenaStringPtr msg_; + ::np2_structs::uint8* PROTOBUF_NULLABLE casttype_; + ::np2_structs::UserInfo* PROTOBUF_NULLABLE srcmember_; + bool filtered_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<28> RoomMessageInfo_class_data_; +// ------------------------------------------------------------------- + +class RoomMemberDataExternal final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomMemberDataExternal) */ { + public: + inline RoomMemberDataExternal() : RoomMemberDataExternal(nullptr) {} + ~RoomMemberDataExternal() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomMemberDataExternal* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomMemberDataExternal)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomMemberDataExternal(::google::protobuf::internal::ConstantInitialized); + + inline RoomMemberDataExternal(const RoomMemberDataExternal& from) : RoomMemberDataExternal(nullptr, from) {} + inline RoomMemberDataExternal(RoomMemberDataExternal&& from) noexcept + : RoomMemberDataExternal(nullptr, ::std::move(from)) {} + inline RoomMemberDataExternal& operator=(const RoomMemberDataExternal& from) { + CopyFrom(from); + return *this; + } + inline RoomMemberDataExternal& operator=(RoomMemberDataExternal&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomMemberDataExternal& default_instance() { + return *reinterpret_cast( + &_RoomMemberDataExternal_default_instance_); + } + static constexpr int kIndexInFileMessages = 89; + friend void swap(RoomMemberDataExternal& a, RoomMemberDataExternal& b) { a.Swap(&b); } + inline void Swap(RoomMemberDataExternal* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomMemberDataExternal* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomMemberDataExternal* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomMemberDataExternal& from); + void MergeFrom(const RoomMemberDataExternal& from) { RoomMemberDataExternal::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomMemberDataExternal* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomMemberDataExternal"; } + + explicit RoomMemberDataExternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomMemberDataExternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomMemberDataExternal& from); + RoomMemberDataExternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomMemberDataExternal&& from) noexcept + : RoomMemberDataExternal(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUserInfoFieldNumber = 1, + kRoleFieldNumber = 3, + kJoinDateFieldNumber = 2, + }; + // .np2_structs.UserInfo userInfo = 1; + bool has_userinfo() const; + void clear_userinfo() ; + const ::np2_structs::UserInfo& userinfo() const; + [[nodiscard]] ::np2_structs::UserInfo* PROTOBUF_NULLABLE release_userinfo(); + ::np2_structs::UserInfo* PROTOBUF_NONNULL mutable_userinfo(); + void set_allocated_userinfo(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_userinfo(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + ::np2_structs::UserInfo* PROTOBUF_NULLABLE unsafe_arena_release_userinfo(); + + private: + const ::np2_structs::UserInfo& _internal_userinfo() const; + ::np2_structs::UserInfo* PROTOBUF_NONNULL _internal_mutable_userinfo(); + + public: + // .np2_structs.uint8 role = 3; + bool has_role() const; + void clear_role() ; + const ::np2_structs::uint8& role() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_role(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_role(); + void set_allocated_role(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_role(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_role(); + + private: + const ::np2_structs::uint8& _internal_role() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_role(); + + public: + // uint64 joinDate = 2; + void clear_joindate() ; + ::uint64_t joindate() const; + void set_joindate(::uint64_t value); + + private: + ::uint64_t _internal_joindate() const; + void _internal_set_joindate(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomMemberDataExternal) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomMemberDataExternal& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::UserInfo* PROTOBUF_NULLABLE userinfo_; + ::np2_structs::uint8* PROTOBUF_NULLABLE role_; + ::uint64_t joindate_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<35> RoomMemberDataExternal_class_data_; +// ------------------------------------------------------------------- + +class RoomGroupPasswordConfig final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomGroupPasswordConfig) */ { + public: + inline RoomGroupPasswordConfig() : RoomGroupPasswordConfig(nullptr) {} + ~RoomGroupPasswordConfig() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomGroupPasswordConfig* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomGroupPasswordConfig)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomGroupPasswordConfig(::google::protobuf::internal::ConstantInitialized); + + inline RoomGroupPasswordConfig(const RoomGroupPasswordConfig& from) : RoomGroupPasswordConfig(nullptr, from) {} + inline RoomGroupPasswordConfig(RoomGroupPasswordConfig&& from) noexcept + : RoomGroupPasswordConfig(nullptr, ::std::move(from)) {} + inline RoomGroupPasswordConfig& operator=(const RoomGroupPasswordConfig& from) { + CopyFrom(from); + return *this; + } + inline RoomGroupPasswordConfig& operator=(RoomGroupPasswordConfig&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomGroupPasswordConfig& default_instance() { + return *reinterpret_cast( + &_RoomGroupPasswordConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = 19; + friend void swap(RoomGroupPasswordConfig& a, RoomGroupPasswordConfig& b) { a.Swap(&b); } + inline void Swap(RoomGroupPasswordConfig* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomGroupPasswordConfig* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomGroupPasswordConfig* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomGroupPasswordConfig& from); + void MergeFrom(const RoomGroupPasswordConfig& from) { RoomGroupPasswordConfig::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomGroupPasswordConfig* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomGroupPasswordConfig"; } + + explicit RoomGroupPasswordConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomGroupPasswordConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomGroupPasswordConfig& from); + RoomGroupPasswordConfig( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomGroupPasswordConfig&& from) noexcept + : RoomGroupPasswordConfig(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kGroupIdFieldNumber = 1, + kWithPasswordFieldNumber = 2, + }; + // .np2_structs.uint8 groupId = 1; + bool has_groupid() const; + void clear_groupid() ; + const ::np2_structs::uint8& groupid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_groupid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_groupid(); + void set_allocated_groupid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_groupid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_groupid(); + + private: + const ::np2_structs::uint8& _internal_groupid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_groupid(); + + public: + // bool withPassword = 2; + void clear_withpassword() ; + bool withpassword() const; + void set_withpassword(bool value); + + private: + bool _internal_withpassword() const; + void _internal_set_withpassword(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomGroupPasswordConfig) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomGroupPasswordConfig& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint8* PROTOBUF_NULLABLE groupid_; + bool withpassword_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<36> RoomGroupPasswordConfig_class_data_; +// ------------------------------------------------------------------- + +class RoomGroup final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomGroup) */ { + public: + inline RoomGroup() : RoomGroup(nullptr) {} + ~RoomGroup() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomGroup* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomGroup)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomGroup(::google::protobuf::internal::ConstantInitialized); + + inline RoomGroup(const RoomGroup& from) : RoomGroup(nullptr, from) {} + inline RoomGroup(RoomGroup&& from) noexcept + : RoomGroup(nullptr, ::std::move(from)) {} + inline RoomGroup& operator=(const RoomGroup& from) { + CopyFrom(from); + return *this; + } + inline RoomGroup& operator=(RoomGroup&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomGroup& default_instance() { + return *reinterpret_cast( + &_RoomGroup_default_instance_); + } + static constexpr int kIndexInFileMessages = 13; + friend void swap(RoomGroup& a, RoomGroup& b) { a.Swap(&b); } + inline void Swap(RoomGroup* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomGroup* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomGroup* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomGroup& from); + void MergeFrom(const RoomGroup& from) { RoomGroup::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomGroup* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomGroup"; } + + explicit RoomGroup(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomGroup(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomGroup& from); + RoomGroup( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomGroup&& from) noexcept + : RoomGroup(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kLabelFieldNumber = 3, + kGroupIdFieldNumber = 1, + kWithPasswordFieldNumber = 2, + kSlotNumFieldNumber = 4, + kCurGroupMemberNumFieldNumber = 5, + }; + // bytes label = 3; + void clear_label() ; + const ::std::string& label() const; + template + void set_label(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_label(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_label(); + void set_allocated_label(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_label() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_label(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_label(); + + public: + // .np2_structs.uint8 groupId = 1; + bool has_groupid() const; + void clear_groupid() ; + const ::np2_structs::uint8& groupid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_groupid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_groupid(); + void set_allocated_groupid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_groupid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_groupid(); + + private: + const ::np2_structs::uint8& _internal_groupid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_groupid(); + + public: + // bool withPassword = 2; + void clear_withpassword() ; + bool withpassword() const; + void set_withpassword(bool value); + + private: + bool _internal_withpassword() const; + void _internal_set_withpassword(bool value); + + public: + // uint32 slotNum = 4; + void clear_slotnum() ; + ::uint32_t slotnum() const; + void set_slotnum(::uint32_t value); + + private: + ::uint32_t _internal_slotnum() const; + void _internal_set_slotnum(::uint32_t value); + + public: + // uint32 curGroupMemberNum = 5; + void clear_curgroupmembernum() ; + ::uint32_t curgroupmembernum() const; + void set_curgroupmembernum(::uint32_t value); + + private: + ::uint32_t _internal_curgroupmembernum() const; + void _internal_set_curgroupmembernum(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomGroup) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomGroup& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr label_; + ::np2_structs::uint8* PROTOBUF_NULLABLE groupid_; + bool withpassword_; + ::uint32_t slotnum_; + ::uint32_t curgroupmembernum_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<22> RoomGroup_class_data_; +// ------------------------------------------------------------------- + +class QuickMatchGUIRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.QuickMatchGUIRequest) */ { + public: + inline QuickMatchGUIRequest() : QuickMatchGUIRequest(nullptr) {} + ~QuickMatchGUIRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(QuickMatchGUIRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(QuickMatchGUIRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR QuickMatchGUIRequest(::google::protobuf::internal::ConstantInitialized); + + inline QuickMatchGUIRequest(const QuickMatchGUIRequest& from) : QuickMatchGUIRequest(nullptr, from) {} + inline QuickMatchGUIRequest(QuickMatchGUIRequest&& from) noexcept + : QuickMatchGUIRequest(nullptr, ::std::move(from)) {} + inline QuickMatchGUIRequest& operator=(const QuickMatchGUIRequest& from) { + CopyFrom(from); + return *this; + } + inline QuickMatchGUIRequest& operator=(QuickMatchGUIRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const QuickMatchGUIRequest& default_instance() { + return *reinterpret_cast( + &_QuickMatchGUIRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 86; + friend void swap(QuickMatchGUIRequest& a, QuickMatchGUIRequest& b) { a.Swap(&b); } + inline void Swap(QuickMatchGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(QuickMatchGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + QuickMatchGUIRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const QuickMatchGUIRequest& from); + void MergeFrom(const QuickMatchGUIRequest& from) { QuickMatchGUIRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(QuickMatchGUIRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.QuickMatchGUIRequest"; } + + explicit QuickMatchGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + QuickMatchGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const QuickMatchGUIRequest& from); + QuickMatchGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, QuickMatchGUIRequest&& from) noexcept + : QuickMatchGUIRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kCondsFieldNumber = 1, + kAvailableNumFieldNumber = 2, + }; + // repeated .np2_structs.MatchingSearchCondition conds = 1; + int conds_size() const; + private: + int _internal_conds_size() const; + + public: + void clear_conds() ; + ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL mutable_conds(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL mutable_conds(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& _internal_conds() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL _internal_mutable_conds(); + public: + const ::np2_structs::MatchingSearchCondition& conds(int index) const; + ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL add_conds(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& conds() const; + // uint32 available_num = 2; + void clear_available_num() ; + ::uint32_t available_num() const; + void set_available_num(::uint32_t value); + + private: + ::uint32_t _internal_available_num() const; + void _internal_set_available_num(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.QuickMatchGUIRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const QuickMatchGUIRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingSearchCondition > conds_; + ::uint32_t available_num_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<33> QuickMatchGUIRequest_class_data_; +// ------------------------------------------------------------------- + +class OptParam final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.OptParam) */ { + public: + inline OptParam() : OptParam(nullptr) {} + ~OptParam() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(OptParam* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(OptParam)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR OptParam(::google::protobuf::internal::ConstantInitialized); + + inline OptParam(const OptParam& from) : OptParam(nullptr, from) {} + inline OptParam(OptParam&& from) noexcept + : OptParam(nullptr, ::std::move(from)) {} + inline OptParam& operator=(const OptParam& from) { + CopyFrom(from); + return *this; + } + inline OptParam& operator=(OptParam&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const OptParam& default_instance() { + return *reinterpret_cast( + &_OptParam_default_instance_); + } + static constexpr int kIndexInFileMessages = 9; + friend void swap(OptParam& a, OptParam& b) { a.Swap(&b); } + inline void Swap(OptParam* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OptParam* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OptParam* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const OptParam& from); + void MergeFrom(const OptParam& from) { OptParam::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(OptParam* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.OptParam"; } + + explicit OptParam(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + OptParam(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const OptParam& from); + OptParam( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, OptParam&& from) noexcept + : OptParam(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kTypeFieldNumber = 1, + kFlagFieldNumber = 2, + kHubMemberIdFieldNumber = 3, + }; + // .np2_structs.uint8 type = 1; + bool has_type() const; + void clear_type() ; + const ::np2_structs::uint8& type() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_type(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_type(); + void set_allocated_type(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_type(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_type(); + + private: + const ::np2_structs::uint8& _internal_type() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_type(); + + public: + // .np2_structs.uint8 flag = 2; + bool has_flag() const; + void clear_flag() ; + const ::np2_structs::uint8& flag() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_flag(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_flag(); + void set_allocated_flag(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_flag(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_flag(); + + private: + const ::np2_structs::uint8& _internal_flag() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_flag(); + + public: + // .np2_structs.uint16 hubMemberId = 3; + bool has_hubmemberid() const; + void clear_hubmemberid() ; + const ::np2_structs::uint16& hubmemberid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_hubmemberid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_hubmemberid(); + void set_allocated_hubmemberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_hubmemberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_hubmemberid(); + + private: + const ::np2_structs::uint16& _internal_hubmemberid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_hubmemberid(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.OptParam) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const OptParam& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint8* PROTOBUF_NULLABLE type_; + ::np2_structs::uint8* PROTOBUF_NULLABLE flag_; + ::np2_structs::uint16* PROTOBUF_NULLABLE hubmemberid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<21> OptParam_class_data_; +// ------------------------------------------------------------------- + +class MessageDetails final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MessageDetails) */ { + public: + inline MessageDetails() : MessageDetails(nullptr) {} + ~MessageDetails() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MessageDetails* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MessageDetails)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MessageDetails(::google::protobuf::internal::ConstantInitialized); + + inline MessageDetails(const MessageDetails& from) : MessageDetails(nullptr, from) {} + inline MessageDetails(MessageDetails&& from) noexcept + : MessageDetails(nullptr, ::std::move(from)) {} + inline MessageDetails& operator=(const MessageDetails& from) { + CopyFrom(from); + return *this; + } + inline MessageDetails& operator=(MessageDetails&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MessageDetails& default_instance() { + return *reinterpret_cast( + &_MessageDetails_default_instance_); + } + static constexpr int kIndexInFileMessages = 43; + friend void swap(MessageDetails& a, MessageDetails& b) { a.Swap(&b); } + inline void Swap(MessageDetails* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MessageDetails* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MessageDetails* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MessageDetails& from); + void MergeFrom(const MessageDetails& from) { MessageDetails::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MessageDetails* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MessageDetails"; } + + explicit MessageDetails(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MessageDetails(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MessageDetails& from); + MessageDetails( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MessageDetails&& from) noexcept + : MessageDetails(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kCommunicationIdFieldNumber = 1, + kSubjectFieldNumber = 6, + kBodyFieldNumber = 7, + kDataFieldNumber = 8, + kMainTypeFieldNumber = 3, + kSubTypeFieldNumber = 4, + kMsgIdFieldNumber = 2, + kMsgFeaturesFieldNumber = 5, + }; + // string communicationId = 1; + void clear_communicationid() ; + const ::std::string& communicationid() const; + template + void set_communicationid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_communicationid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_communicationid(); + void set_allocated_communicationid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_communicationid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_communicationid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_communicationid(); + + public: + // string subject = 6; + void clear_subject() ; + const ::std::string& subject() const; + template + void set_subject(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_subject(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_subject(); + void set_allocated_subject(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_subject() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_subject(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_subject(); + + public: + // string body = 7; + void clear_body() ; + const ::std::string& body() const; + template + void set_body(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_body(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_body(); + void set_allocated_body(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_body() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_body(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_body(); + + public: + // bytes data = 8; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // .np2_structs.uint16 mainType = 3; + bool has_maintype() const; + void clear_maintype() ; + const ::np2_structs::uint16& maintype() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_maintype(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_maintype(); + void set_allocated_maintype(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_maintype(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_maintype(); + + private: + const ::np2_structs::uint16& _internal_maintype() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_maintype(); + + public: + // .np2_structs.uint16 subType = 4; + bool has_subtype() const; + void clear_subtype() ; + const ::np2_structs::uint16& subtype() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_subtype(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_subtype(); + void set_allocated_subtype(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_subtype(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_subtype(); + + private: + const ::np2_structs::uint16& _internal_subtype() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_subtype(); + + public: + // uint64 msgId = 2; + void clear_msgid() ; + ::uint64_t msgid() const; + void set_msgid(::uint64_t value); + + private: + ::uint64_t _internal_msgid() const; + void _internal_set_msgid(::uint64_t value); + + public: + // uint32 msgFeatures = 5; + void clear_msgfeatures() ; + ::uint32_t msgfeatures() const; + void set_msgfeatures(::uint32_t value); + + private: + ::uint32_t _internal_msgfeatures() const; + void _internal_set_msgfeatures(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MessageDetails) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 8, + 2, 69, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MessageDetails& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr communicationid_; + ::google::protobuf::internal::ArenaStringPtr subject_; + ::google::protobuf::internal::ArenaStringPtr body_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::np2_structs::uint16* PROTOBUF_NULLABLE maintype_; + ::np2_structs::uint16* PROTOBUF_NULLABLE subtype_; + ::uint64_t msgid_; + ::uint32_t msgfeatures_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<27> MessageDetails_class_data_; +// ------------------------------------------------------------------- + +class MatchingRoom final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingRoom) */ { + public: + inline MatchingRoom() : MatchingRoom(nullptr) {} + ~MatchingRoom() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingRoom* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingRoom)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingRoom(::google::protobuf::internal::ConstantInitialized); + + inline MatchingRoom(const MatchingRoom& from) : MatchingRoom(nullptr, from) {} + inline MatchingRoom(MatchingRoom&& from) noexcept + : MatchingRoom(nullptr, ::std::move(from)) {} + inline MatchingRoom& operator=(const MatchingRoom& from) { + CopyFrom(from); + return *this; + } + inline MatchingRoom& operator=(MatchingRoom&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingRoom& default_instance() { + return *reinterpret_cast( + &_MatchingRoom_default_instance_); + } + static constexpr int kIndexInFileMessages = 82; + friend void swap(MatchingRoom& a, MatchingRoom& b) { a.Swap(&b); } + inline void Swap(MatchingRoom* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingRoom* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingRoom* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingRoom& from); + void MergeFrom(const MatchingRoom& from) { MatchingRoom::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingRoom* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingRoom"; } + + explicit MatchingRoom(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingRoom(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingRoom& from); + MatchingRoom( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingRoom&& from) noexcept + : MatchingRoom(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kAttrFieldNumber = 2, + kIdFieldNumber = 1, + }; + // repeated .np2_structs.MatchingAttr attr = 2; + int attr_size() const; + private: + int _internal_attr_size() const; + + public: + void clear_attr() ; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL mutable_attr(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL mutable_attr(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& _internal_attr() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL _internal_mutable_attr(); + public: + const ::np2_structs::MatchingAttr& attr(int index) const; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL add_attr(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& attr() const; + // bytes id = 1; + void clear_id() ; + const ::std::string& id() const; + template + void set_id(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_id(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_id(); + void set_allocated_id(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_id() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_id(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_id(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingRoom) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingRoom& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingAttr > attr_; + ::google::protobuf::internal::ArenaStringPtr id_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<25> MatchingRoom_class_data_; +// ------------------------------------------------------------------- + +class LeaveRoomRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.LeaveRoomRequest) */ { + public: + inline LeaveRoomRequest() : LeaveRoomRequest(nullptr) {} + ~LeaveRoomRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(LeaveRoomRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(LeaveRoomRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR LeaveRoomRequest(::google::protobuf::internal::ConstantInitialized); + + inline LeaveRoomRequest(const LeaveRoomRequest& from) : LeaveRoomRequest(nullptr, from) {} + inline LeaveRoomRequest(LeaveRoomRequest&& from) noexcept + : LeaveRoomRequest(nullptr, ::std::move(from)) {} + inline LeaveRoomRequest& operator=(const LeaveRoomRequest& from) { + CopyFrom(from); + return *this; + } + inline LeaveRoomRequest& operator=(LeaveRoomRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const LeaveRoomRequest& default_instance() { + return *reinterpret_cast( + &_LeaveRoomRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 26; + friend void swap(LeaveRoomRequest& a, LeaveRoomRequest& b) { a.Swap(&b); } + inline void Swap(LeaveRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LeaveRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LeaveRoomRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const LeaveRoomRequest& from); + void MergeFrom(const LeaveRoomRequest& from) { LeaveRoomRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(LeaveRoomRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.LeaveRoomRequest"; } + + explicit LeaveRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + LeaveRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const LeaveRoomRequest& from); + LeaveRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, LeaveRoomRequest&& from) noexcept + : LeaveRoomRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kOptDataFieldNumber = 2, + kRoomIdFieldNumber = 1, + }; + // .np2_structs.PresenceOptionData optData = 2; + bool has_optdata() const; + void clear_optdata() ; + const ::np2_structs::PresenceOptionData& optdata() const; + [[nodiscard]] ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE release_optdata(); + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL mutable_optdata(); + void set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE unsafe_arena_release_optdata(); + + private: + const ::np2_structs::PresenceOptionData& _internal_optdata() const; + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL _internal_mutable_optdata(); + + public: + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.LeaveRoomRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const LeaveRoomRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE optdata_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<29> LeaveRoomRequest_class_data_; +// ------------------------------------------------------------------- + +class IntAttr final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.IntAttr) */ { + public: + inline IntAttr() : IntAttr(nullptr) {} + ~IntAttr() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(IntAttr* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(IntAttr)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR IntAttr(::google::protobuf::internal::ConstantInitialized); + + inline IntAttr(const IntAttr& from) : IntAttr(nullptr, from) {} + inline IntAttr(IntAttr&& from) noexcept + : IntAttr(nullptr, ::std::move(from)) {} + inline IntAttr& operator=(const IntAttr& from) { + CopyFrom(from); + return *this; + } + inline IntAttr& operator=(IntAttr&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const IntAttr& default_instance() { + return *reinterpret_cast( + &_IntAttr_default_instance_); + } + static constexpr int kIndexInFileMessages = 6; + friend void swap(IntAttr& a, IntAttr& b) { a.Swap(&b); } + inline void Swap(IntAttr* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(IntAttr* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IntAttr* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const IntAttr& from); + void MergeFrom(const IntAttr& from) { IntAttr::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(IntAttr* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.IntAttr"; } + + explicit IntAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + IntAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const IntAttr& from); + IntAttr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, IntAttr&& from) noexcept + : IntAttr(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIdFieldNumber = 1, + kNumFieldNumber = 2, + }; + // .np2_structs.uint16 id = 1; + bool has_id() const; + void clear_id() ; + const ::np2_structs::uint16& id() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_id(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_id(); + void set_allocated_id(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_id(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_id(); + + private: + const ::np2_structs::uint16& _internal_id() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_id(); + + public: + // uint32 num = 2; + void clear_num() ; + ::uint32_t num() const; + void set_num(::uint32_t value); + + private: + ::uint32_t _internal_num() const; + void _internal_set_num(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.IntAttr) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const IntAttr& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint16* PROTOBUF_NULLABLE id_; + ::uint32_t num_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<20> IntAttr_class_data_; +// ------------------------------------------------------------------- + +class GetScoreResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetScoreResponse) */ { + public: + inline GetScoreResponse() : GetScoreResponse(nullptr) {} + ~GetScoreResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetScoreResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetScoreResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetScoreResponse(::google::protobuf::internal::ConstantInitialized); + + inline GetScoreResponse(const GetScoreResponse& from) : GetScoreResponse(nullptr, from) {} + inline GetScoreResponse(GetScoreResponse&& from) noexcept + : GetScoreResponse(nullptr, ::std::move(from)) {} + inline GetScoreResponse& operator=(const GetScoreResponse& from) { + CopyFrom(from); + return *this; + } + inline GetScoreResponse& operator=(GetScoreResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetScoreResponse& default_instance() { + return *reinterpret_cast( + &_GetScoreResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 53; + friend void swap(GetScoreResponse& a, GetScoreResponse& b) { a.Swap(&b); } + inline void Swap(GetScoreResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetScoreResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetScoreResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetScoreResponse& from); + void MergeFrom(const GetScoreResponse& from) { GetScoreResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetScoreResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetScoreResponse"; } + + explicit GetScoreResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetScoreResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreResponse& from); + GetScoreResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetScoreResponse&& from) noexcept + : GetScoreResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRankArrayFieldNumber = 1, + kCommentArrayFieldNumber = 2, + kInfoArrayFieldNumber = 3, + kLastSortDateFieldNumber = 4, + kTotalRecordFieldNumber = 5, + }; + // repeated .np2_structs.ScoreRankData rankArray = 1; + int rankarray_size() const; + private: + int _internal_rankarray_size() const; + + public: + void clear_rankarray() ; + ::np2_structs::ScoreRankData* PROTOBUF_NONNULL mutable_rankarray(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>* PROTOBUF_NONNULL mutable_rankarray(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>& _internal_rankarray() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>* PROTOBUF_NONNULL _internal_mutable_rankarray(); + public: + const ::np2_structs::ScoreRankData& rankarray(int index) const; + ::np2_structs::ScoreRankData* PROTOBUF_NONNULL add_rankarray(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>& rankarray() const; + // repeated string commentArray = 2; + int commentarray_size() const; + private: + int _internal_commentarray_size() const; + + public: + void clear_commentarray() ; + const ::std::string& commentarray(int index) const; + ::std::string* PROTOBUF_NONNULL mutable_commentarray(int index); + template + void set_commentarray(int index, Arg_&& value, Args_... args); + ::std::string* PROTOBUF_NONNULL add_commentarray(); + template + void add_commentarray(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField<::std::string>& commentarray() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL mutable_commentarray(); + + private: + const ::google::protobuf::RepeatedPtrField<::std::string>& _internal_commentarray() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL _internal_mutable_commentarray(); + + public: + // repeated .np2_structs.ScoreInfo infoArray = 3; + int infoarray_size() const; + private: + int _internal_infoarray_size() const; + + public: + void clear_infoarray() ; + ::np2_structs::ScoreInfo* PROTOBUF_NONNULL mutable_infoarray(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>* PROTOBUF_NONNULL mutable_infoarray(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>& _internal_infoarray() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>* PROTOBUF_NONNULL _internal_mutable_infoarray(); + public: + const ::np2_structs::ScoreInfo& infoarray(int index) const; + ::np2_structs::ScoreInfo* PROTOBUF_NONNULL add_infoarray(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>& infoarray() const; + // uint64 lastSortDate = 4; + void clear_lastsortdate() ; + ::uint64_t lastsortdate() const; + void set_lastsortdate(::uint64_t value); + + private: + ::uint64_t _internal_lastsortdate() const; + void _internal_set_lastsortdate(::uint64_t value); + + public: + // uint32 totalRecord = 5; + void clear_totalrecord() ; + ::uint32_t totalrecord() const; + void set_totalrecord(::uint32_t value); + + private: + ::uint32_t _internal_totalrecord() const; + void _internal_set_totalrecord(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetScoreResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 2, 49, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetScoreResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::ScoreRankData > rankarray_; + ::google::protobuf::RepeatedPtrField<::std::string> commentarray_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::ScoreInfo > infoarray_; + ::uint64_t lastsortdate_; + ::uint32_t totalrecord_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<29> GetScoreResponse_class_data_; +// ------------------------------------------------------------------- + +class GetScoreNpIdRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetScoreNpIdRequest) */ { + public: + inline GetScoreNpIdRequest() : GetScoreNpIdRequest(nullptr) {} + ~GetScoreNpIdRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetScoreNpIdRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetScoreNpIdRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetScoreNpIdRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetScoreNpIdRequest(const GetScoreNpIdRequest& from) : GetScoreNpIdRequest(nullptr, from) {} + inline GetScoreNpIdRequest(GetScoreNpIdRequest&& from) noexcept + : GetScoreNpIdRequest(nullptr, ::std::move(from)) {} + inline GetScoreNpIdRequest& operator=(const GetScoreNpIdRequest& from) { + CopyFrom(from); + return *this; + } + inline GetScoreNpIdRequest& operator=(GetScoreNpIdRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetScoreNpIdRequest& default_instance() { + return *reinterpret_cast( + &_GetScoreNpIdRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 49; + friend void swap(GetScoreNpIdRequest& a, GetScoreNpIdRequest& b) { a.Swap(&b); } + inline void Swap(GetScoreNpIdRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetScoreNpIdRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetScoreNpIdRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetScoreNpIdRequest& from); + void MergeFrom(const GetScoreNpIdRequest& from) { GetScoreNpIdRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetScoreNpIdRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetScoreNpIdRequest"; } + + explicit GetScoreNpIdRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetScoreNpIdRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetScoreNpIdRequest& from); + GetScoreNpIdRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetScoreNpIdRequest&& from) noexcept + : GetScoreNpIdRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpidsFieldNumber = 2, + kBoardIdFieldNumber = 1, + kWithCommentFieldNumber = 3, + kWithGameInfoFieldNumber = 4, + }; + // repeated .np2_structs.ScoreNpIdPcId npids = 2; + int npids_size() const; + private: + int _internal_npids_size() const; + + public: + void clear_npids() ; + ::np2_structs::ScoreNpIdPcId* PROTOBUF_NONNULL mutable_npids(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>* PROTOBUF_NONNULL mutable_npids(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>& _internal_npids() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>* PROTOBUF_NONNULL _internal_mutable_npids(); + public: + const ::np2_structs::ScoreNpIdPcId& npids(int index) const; + ::np2_structs::ScoreNpIdPcId* PROTOBUF_NONNULL add_npids(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>& npids() const; + // uint32 boardId = 1; + void clear_boardid() ; + ::uint32_t boardid() const; + void set_boardid(::uint32_t value); + + private: + ::uint32_t _internal_boardid() const; + void _internal_set_boardid(::uint32_t value); + + public: + // bool withComment = 3; + void clear_withcomment() ; + bool withcomment() const; + void set_withcomment(bool value); + + private: + bool _internal_withcomment() const; + void _internal_set_withcomment(bool value); + + public: + // bool withGameInfo = 4; + void clear_withgameinfo() ; + bool withgameinfo() const; + void set_withgameinfo(bool value); + + private: + bool _internal_withgameinfo() const; + void _internal_set_withgameinfo(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetScoreNpIdRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetScoreNpIdRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::ScoreNpIdPcId > npids_; + ::uint32_t boardid_; + bool withcomment_; + bool withgameinfo_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<32> GetScoreNpIdRequest_class_data_; +// ------------------------------------------------------------------- + +class GetRoomMemberDataInternalRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetRoomMemberDataInternalRequest) */ { + public: + inline GetRoomMemberDataInternalRequest() : GetRoomMemberDataInternalRequest(nullptr) {} + ~GetRoomMemberDataInternalRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetRoomMemberDataInternalRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetRoomMemberDataInternalRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetRoomMemberDataInternalRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetRoomMemberDataInternalRequest(const GetRoomMemberDataInternalRequest& from) : GetRoomMemberDataInternalRequest(nullptr, from) {} + inline GetRoomMemberDataInternalRequest(GetRoomMemberDataInternalRequest&& from) noexcept + : GetRoomMemberDataInternalRequest(nullptr, ::std::move(from)) {} + inline GetRoomMemberDataInternalRequest& operator=(const GetRoomMemberDataInternalRequest& from) { + CopyFrom(from); + return *this; + } + inline GetRoomMemberDataInternalRequest& operator=(GetRoomMemberDataInternalRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetRoomMemberDataInternalRequest& default_instance() { + return *reinterpret_cast( + &_GetRoomMemberDataInternalRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 31; + friend void swap(GetRoomMemberDataInternalRequest& a, GetRoomMemberDataInternalRequest& b) { a.Swap(&b); } + inline void Swap(GetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetRoomMemberDataInternalRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetRoomMemberDataInternalRequest& from); + void MergeFrom(const GetRoomMemberDataInternalRequest& from) { GetRoomMemberDataInternalRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetRoomMemberDataInternalRequest"; } + + explicit GetRoomMemberDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetRoomMemberDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetRoomMemberDataInternalRequest& from); + GetRoomMemberDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetRoomMemberDataInternalRequest&& from) noexcept + : GetRoomMemberDataInternalRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kAttrIdFieldNumber = 3, + kMemberIdFieldNumber = 2, + kRoomIdFieldNumber = 1, + }; + // repeated .np2_structs.uint16 attrId = 3; + int attrid_size() const; + private: + int _internal_attrid_size() const; + + public: + void clear_attrid() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_attrid(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_attrid(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_attrid() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_attrid(); + public: + const ::np2_structs::uint16& attrid(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_attrid(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& attrid() const; + // .np2_structs.uint16 memberId = 2; + bool has_memberid() const; + void clear_memberid() ; + const ::np2_structs::uint16& memberid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_memberid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_memberid(); + void set_allocated_memberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_memberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_memberid(); + + private: + const ::np2_structs::uint16& _internal_memberid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_memberid(); + + public: + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetRoomMemberDataInternalRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetRoomMemberDataInternalRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > attrid_; + ::np2_structs::uint16* PROTOBUF_NULLABLE memberid_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<45> GetRoomMemberDataInternalRequest_class_data_; +// ------------------------------------------------------------------- + +class GetRoomListGUIRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetRoomListGUIRequest) */ { + public: + inline GetRoomListGUIRequest() : GetRoomListGUIRequest(nullptr) {} + ~GetRoomListGUIRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetRoomListGUIRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetRoomListGUIRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetRoomListGUIRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetRoomListGUIRequest(const GetRoomListGUIRequest& from) : GetRoomListGUIRequest(nullptr, from) {} + inline GetRoomListGUIRequest(GetRoomListGUIRequest&& from) noexcept + : GetRoomListGUIRequest(nullptr, ::std::move(from)) {} + inline GetRoomListGUIRequest& operator=(const GetRoomListGUIRequest& from) { + CopyFrom(from); + return *this; + } + inline GetRoomListGUIRequest& operator=(GetRoomListGUIRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetRoomListGUIRequest& default_instance() { + return *reinterpret_cast( + &_GetRoomListGUIRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 81; + friend void swap(GetRoomListGUIRequest& a, GetRoomListGUIRequest& b) { a.Swap(&b); } + inline void Swap(GetRoomListGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetRoomListGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetRoomListGUIRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetRoomListGUIRequest& from); + void MergeFrom(const GetRoomListGUIRequest& from) { GetRoomListGUIRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetRoomListGUIRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetRoomListGUIRequest"; } + + explicit GetRoomListGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetRoomListGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetRoomListGUIRequest& from); + GetRoomListGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetRoomListGUIRequest&& from) noexcept + : GetRoomListGUIRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kCondsFieldNumber = 3, + kAttrsFieldNumber = 4, + kRangeStartFieldNumber = 1, + kRangeMaxFieldNumber = 2, + }; + // repeated .np2_structs.MatchingSearchCondition conds = 3; + int conds_size() const; + private: + int _internal_conds_size() const; + + public: + void clear_conds() ; + ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL mutable_conds(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL mutable_conds(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& _internal_conds() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL _internal_mutable_conds(); + public: + const ::np2_structs::MatchingSearchCondition& conds(int index) const; + ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL add_conds(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& conds() const; + // repeated .np2_structs.MatchingAttr attrs = 4; + int attrs_size() const; + private: + int _internal_attrs_size() const; + + public: + void clear_attrs() ; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL mutable_attrs(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL mutable_attrs(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& _internal_attrs() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL _internal_mutable_attrs(); + public: + const ::np2_structs::MatchingAttr& attrs(int index) const; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL add_attrs(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& attrs() const; + // uint32 range_start = 1; + void clear_range_start() ; + ::uint32_t range_start() const; + void set_range_start(::uint32_t value); + + private: + ::uint32_t _internal_range_start() const; + void _internal_set_range_start(::uint32_t value); + + public: + // uint32 range_max = 2; + void clear_range_max() ; + ::uint32_t range_max() const; + void set_range_max(::uint32_t value); + + private: + ::uint32_t _internal_range_max() const; + void _internal_set_range_max(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetRoomListGUIRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetRoomListGUIRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingSearchCondition > conds_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingAttr > attrs_; + ::uint32_t range_start_; + ::uint32_t range_max_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<34> GetRoomListGUIRequest_class_data_; +// ------------------------------------------------------------------- + +class GetRoomDataInternalRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetRoomDataInternalRequest) */ { + public: + inline GetRoomDataInternalRequest() : GetRoomDataInternalRequest(nullptr) {} + ~GetRoomDataInternalRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetRoomDataInternalRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetRoomDataInternalRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetRoomDataInternalRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetRoomDataInternalRequest(const GetRoomDataInternalRequest& from) : GetRoomDataInternalRequest(nullptr, from) {} + inline GetRoomDataInternalRequest(GetRoomDataInternalRequest&& from) noexcept + : GetRoomDataInternalRequest(nullptr, ::std::move(from)) {} + inline GetRoomDataInternalRequest& operator=(const GetRoomDataInternalRequest& from) { + CopyFrom(from); + return *this; + } + inline GetRoomDataInternalRequest& operator=(GetRoomDataInternalRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetRoomDataInternalRequest& default_instance() { + return *reinterpret_cast( + &_GetRoomDataInternalRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 34; + friend void swap(GetRoomDataInternalRequest& a, GetRoomDataInternalRequest& b) { a.Swap(&b); } + inline void Swap(GetRoomDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetRoomDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetRoomDataInternalRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetRoomDataInternalRequest& from); + void MergeFrom(const GetRoomDataInternalRequest& from) { GetRoomDataInternalRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetRoomDataInternalRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetRoomDataInternalRequest"; } + + explicit GetRoomDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetRoomDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetRoomDataInternalRequest& from); + GetRoomDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetRoomDataInternalRequest&& from) noexcept + : GetRoomDataInternalRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kAttrIdFieldNumber = 2, + kRoomIdFieldNumber = 1, + }; + // repeated .np2_structs.uint16 attrId = 2; + int attrid_size() const; + private: + int _internal_attrid_size() const; + + public: + void clear_attrid() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_attrid(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_attrid(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_attrid() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_attrid(); + public: + const ::np2_structs::uint16& attrid(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_attrid(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& attrid() const; + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetRoomDataInternalRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetRoomDataInternalRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > attrid_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> GetRoomDataInternalRequest_class_data_; +// ------------------------------------------------------------------- + +class GetRoomDataExternalListRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetRoomDataExternalListRequest) */ { + public: + inline GetRoomDataExternalListRequest() : GetRoomDataExternalListRequest(nullptr) {} + ~GetRoomDataExternalListRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetRoomDataExternalListRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetRoomDataExternalListRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetRoomDataExternalListRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetRoomDataExternalListRequest(const GetRoomDataExternalListRequest& from) : GetRoomDataExternalListRequest(nullptr, from) {} + inline GetRoomDataExternalListRequest(GetRoomDataExternalListRequest&& from) noexcept + : GetRoomDataExternalListRequest(nullptr, ::std::move(from)) {} + inline GetRoomDataExternalListRequest& operator=(const GetRoomDataExternalListRequest& from) { + CopyFrom(from); + return *this; + } + inline GetRoomDataExternalListRequest& operator=(GetRoomDataExternalListRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetRoomDataExternalListRequest& default_instance() { + return *reinterpret_cast( + &_GetRoomDataExternalListRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 27; + friend void swap(GetRoomDataExternalListRequest& a, GetRoomDataExternalListRequest& b) { a.Swap(&b); } + inline void Swap(GetRoomDataExternalListRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetRoomDataExternalListRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetRoomDataExternalListRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetRoomDataExternalListRequest& from); + void MergeFrom(const GetRoomDataExternalListRequest& from) { GetRoomDataExternalListRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetRoomDataExternalListRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetRoomDataExternalListRequest"; } + + explicit GetRoomDataExternalListRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetRoomDataExternalListRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetRoomDataExternalListRequest& from); + GetRoomDataExternalListRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetRoomDataExternalListRequest&& from) noexcept + : GetRoomDataExternalListRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomIdsFieldNumber = 1, + kAttrIdsFieldNumber = 2, + }; + // repeated uint64 roomIds = 1; + int roomids_size() const; + private: + int _internal_roomids_size() const; + + public: + void clear_roomids() ; + ::uint64_t roomids(int index) const; + void set_roomids(int index, ::uint64_t value); + void add_roomids(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& roomids() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL mutable_roomids(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_roomids() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL _internal_mutable_roomids(); + + public: + // repeated .np2_structs.uint16 attrIds = 2; + int attrids_size() const; + private: + int _internal_attrids_size() const; + + public: + void clear_attrids() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_attrids(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_attrids(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_attrids() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_attrids(); + public: + const ::np2_structs::uint16& attrids(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_attrids(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& attrids() const; + // @@protoc_insertion_point(class_scope:np2_structs.GetRoomDataExternalListRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetRoomDataExternalListRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> roomids_; + ::google::protobuf::internal::CachedSize _roomids_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > attrids_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<43> GetRoomDataExternalListRequest_class_data_; +// ------------------------------------------------------------------- + +class GetPingInfoResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetPingInfoResponse) */ { + public: + inline GetPingInfoResponse() : GetPingInfoResponse(nullptr) {} + ~GetPingInfoResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetPingInfoResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetPingInfoResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetPingInfoResponse(::google::protobuf::internal::ConstantInitialized); + + inline GetPingInfoResponse(const GetPingInfoResponse& from) : GetPingInfoResponse(nullptr, from) {} + inline GetPingInfoResponse(GetPingInfoResponse&& from) noexcept + : GetPingInfoResponse(nullptr, ::std::move(from)) {} + inline GetPingInfoResponse& operator=(const GetPingInfoResponse& from) { + CopyFrom(from); + return *this; + } + inline GetPingInfoResponse& operator=(GetPingInfoResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetPingInfoResponse& default_instance() { + return *reinterpret_cast( + &_GetPingInfoResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 40; + friend void swap(GetPingInfoResponse& a, GetPingInfoResponse& b) { a.Swap(&b); } + inline void Swap(GetPingInfoResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetPingInfoResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetPingInfoResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetPingInfoResponse& from); + void MergeFrom(const GetPingInfoResponse& from) { GetPingInfoResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetPingInfoResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetPingInfoResponse"; } + + explicit GetPingInfoResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetPingInfoResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetPingInfoResponse& from); + GetPingInfoResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetPingInfoResponse&& from) noexcept + : GetPingInfoResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kServerIdFieldNumber = 1, + kRoomIdFieldNumber = 3, + kWorldIdFieldNumber = 2, + kRttFieldNumber = 4, + }; + // .np2_structs.uint16 serverId = 1; + bool has_serverid() const; + void clear_serverid() ; + const ::np2_structs::uint16& serverid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_serverid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_serverid(); + void set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_serverid(); + + private: + const ::np2_structs::uint16& _internal_serverid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_serverid(); + + public: + // uint64 roomId = 3; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // uint32 worldId = 2; + void clear_worldid() ; + ::uint32_t worldid() const; + void set_worldid(::uint32_t value); + + private: + ::uint32_t _internal_worldid() const; + void _internal_set_worldid(::uint32_t value); + + public: + // uint32 rtt = 4; + void clear_rtt() ; + ::uint32_t rtt() const; + void set_rtt(::uint32_t value); + + private: + ::uint32_t _internal_rtt() const; + void _internal_set_rtt(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GetPingInfoResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetPingInfoResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint16* PROTOBUF_NULLABLE serverid_; + ::uint64_t roomid_; + ::uint32_t worldid_; + ::uint32_t rtt_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<32> GetPingInfoResponse_class_data_; +// ------------------------------------------------------------------- + +class GUIUserInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GUIUserInfo) */ { + public: + inline GUIUserInfo() : GUIUserInfo(nullptr) {} + ~GUIUserInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GUIUserInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GUIUserInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GUIUserInfo(::google::protobuf::internal::ConstantInitialized); + + inline GUIUserInfo(const GUIUserInfo& from) : GUIUserInfo(nullptr, from) {} + inline GUIUserInfo(GUIUserInfo&& from) noexcept + : GUIUserInfo(nullptr, ::std::move(from)) {} + inline GUIUserInfo& operator=(const GUIUserInfo& from) { + CopyFrom(from); + return *this; + } + inline GUIUserInfo& operator=(GUIUserInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GUIUserInfo& default_instance() { + return *reinterpret_cast( + &_GUIUserInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 79; + friend void swap(GUIUserInfo& a, GUIUserInfo& b) { a.Swap(&b); } + inline void Swap(GUIUserInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GUIUserInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GUIUserInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GUIUserInfo& from); + void MergeFrom(const GUIUserInfo& from) { GUIUserInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GUIUserInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GUIUserInfo"; } + + explicit GUIUserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GUIUserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GUIUserInfo& from); + GUIUserInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GUIUserInfo&& from) noexcept + : GUIUserInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kInfoFieldNumber = 1, + kOwnerFieldNumber = 2, + }; + // .np2_structs.UserInfo info = 1; + bool has_info() const; + void clear_info() ; + const ::np2_structs::UserInfo& info() const; + [[nodiscard]] ::np2_structs::UserInfo* PROTOBUF_NULLABLE release_info(); + ::np2_structs::UserInfo* PROTOBUF_NONNULL mutable_info(); + void set_allocated_info(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_info(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + ::np2_structs::UserInfo* PROTOBUF_NULLABLE unsafe_arena_release_info(); + + private: + const ::np2_structs::UserInfo& _internal_info() const; + ::np2_structs::UserInfo* PROTOBUF_NONNULL _internal_mutable_info(); + + public: + // bool owner = 2; + void clear_owner() ; + bool owner() const; + void set_owner(bool value); + + private: + bool _internal_owner() const; + void _internal_set_owner(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.GUIUserInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GUIUserInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::UserInfo* PROTOBUF_NULLABLE info_; + bool owner_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<24> GUIUserInfo_class_data_; +// ------------------------------------------------------------------- + +class CreateRoomGUIRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.CreateRoomGUIRequest) */ { + public: + inline CreateRoomGUIRequest() : CreateRoomGUIRequest(nullptr) {} + ~CreateRoomGUIRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(CreateRoomGUIRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(CreateRoomGUIRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR CreateRoomGUIRequest(::google::protobuf::internal::ConstantInitialized); + + inline CreateRoomGUIRequest(const CreateRoomGUIRequest& from) : CreateRoomGUIRequest(nullptr, from) {} + inline CreateRoomGUIRequest(CreateRoomGUIRequest&& from) noexcept + : CreateRoomGUIRequest(nullptr, ::std::move(from)) {} + inline CreateRoomGUIRequest& operator=(const CreateRoomGUIRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateRoomGUIRequest& operator=(CreateRoomGUIRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const CreateRoomGUIRequest& default_instance() { + return *reinterpret_cast( + &_CreateRoomGUIRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 78; + friend void swap(CreateRoomGUIRequest& a, CreateRoomGUIRequest& b) { a.Swap(&b); } + inline void Swap(CreateRoomGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateRoomGUIRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateRoomGUIRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const CreateRoomGUIRequest& from); + void MergeFrom(const CreateRoomGUIRequest& from) { CreateRoomGUIRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(CreateRoomGUIRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.CreateRoomGUIRequest"; } + + explicit CreateRoomGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + CreateRoomGUIRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const CreateRoomGUIRequest& from); + CreateRoomGUIRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, CreateRoomGUIRequest&& from) noexcept + : CreateRoomGUIRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kGameAttrsFieldNumber = 5, + kTotalSlotsFieldNumber = 1, + kPrivateSlotsFieldNumber = 2, + kPrivilegeGrantFieldNumber = 3, + kStealthFieldNumber = 4, + }; + // repeated .np2_structs.MatchingAttr game_attrs = 5; + int game_attrs_size() const; + private: + int _internal_game_attrs_size() const; + + public: + void clear_game_attrs() ; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL mutable_game_attrs(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL mutable_game_attrs(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& _internal_game_attrs() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL _internal_mutable_game_attrs(); + public: + const ::np2_structs::MatchingAttr& game_attrs(int index) const; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL add_game_attrs(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& game_attrs() const; + // uint32 total_slots = 1; + void clear_total_slots() ; + ::uint32_t total_slots() const; + void set_total_slots(::uint32_t value); + + private: + ::uint32_t _internal_total_slots() const; + void _internal_set_total_slots(::uint32_t value); + + public: + // uint32 private_slots = 2; + void clear_private_slots() ; + ::uint32_t private_slots() const; + void set_private_slots(::uint32_t value); + + private: + ::uint32_t _internal_private_slots() const; + void _internal_set_private_slots(::uint32_t value); + + public: + // bool privilege_grant = 3; + void clear_privilege_grant() ; + bool privilege_grant() const; + void set_privilege_grant(bool value); + + private: + bool _internal_privilege_grant() const; + void _internal_set_privilege_grant(bool value); + + public: + // bool stealth = 4; + void clear_stealth() ; + bool stealth() const; + void set_stealth(bool value); + + private: + bool _internal_stealth() const; + void _internal_set_stealth(bool value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.CreateRoomGUIRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const CreateRoomGUIRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingAttr > game_attrs_; + ::uint32_t total_slots_; + ::uint32_t private_slots_; + bool privilege_grant_; + bool stealth_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<33> CreateRoomGUIRequest_class_data_; +// ------------------------------------------------------------------- + +class BinAttr final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.BinAttr) */ { + public: + inline BinAttr() : BinAttr(nullptr) {} + ~BinAttr() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(BinAttr* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(BinAttr)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR BinAttr(::google::protobuf::internal::ConstantInitialized); + + inline BinAttr(const BinAttr& from) : BinAttr(nullptr, from) {} + inline BinAttr(BinAttr&& from) noexcept + : BinAttr(nullptr, ::std::move(from)) {} + inline BinAttr& operator=(const BinAttr& from) { + CopyFrom(from); + return *this; + } + inline BinAttr& operator=(BinAttr&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const BinAttr& default_instance() { + return *reinterpret_cast( + &_BinAttr_default_instance_); + } + static constexpr int kIndexInFileMessages = 5; + friend void swap(BinAttr& a, BinAttr& b) { a.Swap(&b); } + inline void Swap(BinAttr* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BinAttr* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BinAttr* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const BinAttr& from); + void MergeFrom(const BinAttr& from) { BinAttr::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(BinAttr* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.BinAttr"; } + + explicit BinAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + BinAttr(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BinAttr& from); + BinAttr( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, BinAttr&& from) noexcept + : BinAttr(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDataFieldNumber = 2, + kIdFieldNumber = 1, + }; + // bytes data = 2; + void clear_data() ; + const ::std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_data(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_data(); + void set_allocated_data(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_data() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_data(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // .np2_structs.uint16 id = 1; + bool has_id() const; + void clear_id() ; + const ::np2_structs::uint16& id() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_id(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_id(); + void set_allocated_id(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_id(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_id(); + + private: + const ::np2_structs::uint16& _internal_id() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_id(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.BinAttr) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const BinAttr& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr data_; + ::np2_structs::uint16* PROTOBUF_NULLABLE id_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<20> BinAttr_class_data_; +// ------------------------------------------------------------------- + +class SetUserInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SetUserInfo) */ { + public: + inline SetUserInfo() : SetUserInfo(nullptr) {} + ~SetUserInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SetUserInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SetUserInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SetUserInfo(::google::protobuf::internal::ConstantInitialized); + + inline SetUserInfo(const SetUserInfo& from) : SetUserInfo(nullptr, from) {} + inline SetUserInfo(SetUserInfo&& from) noexcept + : SetUserInfo(nullptr, ::std::move(from)) {} + inline SetUserInfo& operator=(const SetUserInfo& from) { + CopyFrom(from); + return *this; + } + inline SetUserInfo& operator=(SetUserInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SetUserInfo& default_instance() { + return *reinterpret_cast( + &_SetUserInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 33; + friend void swap(SetUserInfo& a, SetUserInfo& b) { a.Swap(&b); } + inline void Swap(SetUserInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SetUserInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SetUserInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SetUserInfo& from); + void MergeFrom(const SetUserInfo& from) { SetUserInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SetUserInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SetUserInfo"; } + + explicit SetUserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SetUserInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SetUserInfo& from); + SetUserInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SetUserInfo&& from) noexcept + : SetUserInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUserBinAttrFieldNumber = 2, + kServerIdFieldNumber = 1, + }; + // repeated .np2_structs.BinAttr userBinAttr = 2; + int userbinattr_size() const; + private: + int _internal_userbinattr_size() const; + + public: + void clear_userbinattr() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_userbinattr(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_userbinattr(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_userbinattr() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_userbinattr(); + public: + const ::np2_structs::BinAttr& userbinattr(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_userbinattr(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& userbinattr() const; + // .np2_structs.uint16 serverId = 1; + bool has_serverid() const; + void clear_serverid() ; + const ::np2_structs::uint16& serverid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_serverid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_serverid(); + void set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_serverid(); + + private: + const ::np2_structs::uint16& _internal_serverid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_serverid(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SetUserInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SetUserInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > userbinattr_; + ::np2_structs::uint16* PROTOBUF_NULLABLE serverid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<24> SetUserInfo_class_data_; +// ------------------------------------------------------------------- + +class SetRoomMemberDataInternalRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SetRoomMemberDataInternalRequest) */ { + public: + inline SetRoomMemberDataInternalRequest() : SetRoomMemberDataInternalRequest(nullptr) {} + ~SetRoomMemberDataInternalRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SetRoomMemberDataInternalRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SetRoomMemberDataInternalRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SetRoomMemberDataInternalRequest(::google::protobuf::internal::ConstantInitialized); + + inline SetRoomMemberDataInternalRequest(const SetRoomMemberDataInternalRequest& from) : SetRoomMemberDataInternalRequest(nullptr, from) {} + inline SetRoomMemberDataInternalRequest(SetRoomMemberDataInternalRequest&& from) noexcept + : SetRoomMemberDataInternalRequest(nullptr, ::std::move(from)) {} + inline SetRoomMemberDataInternalRequest& operator=(const SetRoomMemberDataInternalRequest& from) { + CopyFrom(from); + return *this; + } + inline SetRoomMemberDataInternalRequest& operator=(SetRoomMemberDataInternalRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SetRoomMemberDataInternalRequest& default_instance() { + return *reinterpret_cast( + &_SetRoomMemberDataInternalRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 32; + friend void swap(SetRoomMemberDataInternalRequest& a, SetRoomMemberDataInternalRequest& b) { a.Swap(&b); } + inline void Swap(SetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SetRoomMemberDataInternalRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SetRoomMemberDataInternalRequest& from); + void MergeFrom(const SetRoomMemberDataInternalRequest& from) { SetRoomMemberDataInternalRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SetRoomMemberDataInternalRequest"; } + + explicit SetRoomMemberDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SetRoomMemberDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SetRoomMemberDataInternalRequest& from); + SetRoomMemberDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SetRoomMemberDataInternalRequest&& from) noexcept + : SetRoomMemberDataInternalRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomMemberBinAttrInternalFieldNumber = 4, + kMemberIdFieldNumber = 2, + kTeamIdFieldNumber = 3, + kRoomIdFieldNumber = 1, + }; + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + int roommemberbinattrinternal_size() const; + private: + int _internal_roommemberbinattrinternal_size() const; + + public: + void clear_roommemberbinattrinternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roommemberbinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roommemberbinattrinternal(); + public: + const ::np2_structs::BinAttr& roommemberbinattrinternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roommemberbinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roommemberbinattrinternal() const; + // .np2_structs.uint16 memberId = 2; + bool has_memberid() const; + void clear_memberid() ; + const ::np2_structs::uint16& memberid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_memberid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_memberid(); + void set_allocated_memberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_memberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_memberid(); + + private: + const ::np2_structs::uint16& _internal_memberid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_memberid(); + + public: + // .np2_structs.uint8 teamId = 3; + bool has_teamid() const; + void clear_teamid() ; + const ::np2_structs::uint8& teamid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_teamid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_teamid(); + void set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_teamid(); + + private: + const ::np2_structs::uint8& _internal_teamid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_teamid(); + + public: + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SetRoomMemberDataInternalRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SetRoomMemberDataInternalRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roommemberbinattrinternal_; + ::np2_structs::uint16* PROTOBUF_NULLABLE memberid_; + ::np2_structs::uint8* PROTOBUF_NULLABLE teamid_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<45> SetRoomMemberDataInternalRequest_class_data_; +// ------------------------------------------------------------------- + +class SetRoomDataInternalRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SetRoomDataInternalRequest) */ { + public: + inline SetRoomDataInternalRequest() : SetRoomDataInternalRequest(nullptr) {} + ~SetRoomDataInternalRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SetRoomDataInternalRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SetRoomDataInternalRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SetRoomDataInternalRequest(::google::protobuf::internal::ConstantInitialized); + + inline SetRoomDataInternalRequest(const SetRoomDataInternalRequest& from) : SetRoomDataInternalRequest(nullptr, from) {} + inline SetRoomDataInternalRequest(SetRoomDataInternalRequest&& from) noexcept + : SetRoomDataInternalRequest(nullptr, ::std::move(from)) {} + inline SetRoomDataInternalRequest& operator=(const SetRoomDataInternalRequest& from) { + CopyFrom(from); + return *this; + } + inline SetRoomDataInternalRequest& operator=(SetRoomDataInternalRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SetRoomDataInternalRequest& default_instance() { + return *reinterpret_cast( + &_SetRoomDataInternalRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 30; + friend void swap(SetRoomDataInternalRequest& a, SetRoomDataInternalRequest& b) { a.Swap(&b); } + inline void Swap(SetRoomDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SetRoomDataInternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SetRoomDataInternalRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SetRoomDataInternalRequest& from); + void MergeFrom(const SetRoomDataInternalRequest& from) { SetRoomDataInternalRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SetRoomDataInternalRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SetRoomDataInternalRequest"; } + + explicit SetRoomDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SetRoomDataInternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SetRoomDataInternalRequest& from); + SetRoomDataInternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SetRoomDataInternalRequest&& from) noexcept + : SetRoomDataInternalRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomBinAttrInternalFieldNumber = 4, + kPasswordConfigFieldNumber = 5, + kPasswordSlotMaskFieldNumber = 6, + kOwnerPrivilegeRankFieldNumber = 7, + kRoomIdFieldNumber = 1, + kFlagFilterFieldNumber = 2, + kFlagAttrFieldNumber = 3, + }; + // repeated .np2_structs.BinAttr roomBinAttrInternal = 4; + int roombinattrinternal_size() const; + private: + int _internal_roombinattrinternal_size() const; + + public: + void clear_roombinattrinternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roombinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roombinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roombinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roombinattrinternal(); + public: + const ::np2_structs::BinAttr& roombinattrinternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roombinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roombinattrinternal() const; + // repeated .np2_structs.RoomGroupPasswordConfig passwordConfig = 5; + int passwordconfig_size() const; + private: + int _internal_passwordconfig_size() const; + + public: + void clear_passwordconfig() ; + ::np2_structs::RoomGroupPasswordConfig* PROTOBUF_NONNULL mutable_passwordconfig(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>* PROTOBUF_NONNULL mutable_passwordconfig(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>& _internal_passwordconfig() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>* PROTOBUF_NONNULL _internal_mutable_passwordconfig(); + public: + const ::np2_structs::RoomGroupPasswordConfig& passwordconfig(int index) const; + ::np2_structs::RoomGroupPasswordConfig* PROTOBUF_NONNULL add_passwordconfig(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>& passwordconfig() const; + // repeated uint64 passwordSlotMask = 6; + int passwordslotmask_size() const; + private: + int _internal_passwordslotmask_size() const; + + public: + void clear_passwordslotmask() ; + ::uint64_t passwordslotmask(int index) const; + void set_passwordslotmask(int index, ::uint64_t value); + void add_passwordslotmask(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& passwordslotmask() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL mutable_passwordslotmask(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_passwordslotmask() const; + ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL _internal_mutable_passwordslotmask(); + + public: + // repeated .np2_structs.uint16 ownerPrivilegeRank = 7; + int ownerprivilegerank_size() const; + private: + int _internal_ownerprivilegerank_size() const; + + public: + void clear_ownerprivilegerank() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_ownerprivilegerank(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_ownerprivilegerank(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_ownerprivilegerank() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_ownerprivilegerank(); + public: + const ::np2_structs::uint16& ownerprivilegerank(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_ownerprivilegerank(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& ownerprivilegerank() const; + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // uint32 flagFilter = 2; + void clear_flagfilter() ; + ::uint32_t flagfilter() const; + void set_flagfilter(::uint32_t value); + + private: + ::uint32_t _internal_flagfilter() const; + void _internal_set_flagfilter(::uint32_t value); + + public: + // uint32 flagAttr = 3; + void clear_flagattr() ; + ::uint32_t flagattr() const; + void set_flagattr(::uint32_t value); + + private: + ::uint32_t _internal_flagattr() const; + void _internal_set_flagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SetRoomDataInternalRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 7, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SetRoomDataInternalRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roombinattrinternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomGroupPasswordConfig > passwordconfig_; + ::google::protobuf::RepeatedField<::uint64_t> passwordslotmask_; + ::google::protobuf::internal::CachedSize _passwordslotmask_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > ownerprivilegerank_; + ::uint64_t roomid_; + ::uint32_t flagfilter_; + ::uint32_t flagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> SetRoomDataInternalRequest_class_data_; +// ------------------------------------------------------------------- + +class SetRoomDataExternalRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SetRoomDataExternalRequest) */ { + public: + inline SetRoomDataExternalRequest() : SetRoomDataExternalRequest(nullptr) {} + ~SetRoomDataExternalRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SetRoomDataExternalRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SetRoomDataExternalRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SetRoomDataExternalRequest(::google::protobuf::internal::ConstantInitialized); + + inline SetRoomDataExternalRequest(const SetRoomDataExternalRequest& from) : SetRoomDataExternalRequest(nullptr, from) {} + inline SetRoomDataExternalRequest(SetRoomDataExternalRequest&& from) noexcept + : SetRoomDataExternalRequest(nullptr, ::std::move(from)) {} + inline SetRoomDataExternalRequest& operator=(const SetRoomDataExternalRequest& from) { + CopyFrom(from); + return *this; + } + inline SetRoomDataExternalRequest& operator=(SetRoomDataExternalRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SetRoomDataExternalRequest& default_instance() { + return *reinterpret_cast( + &_SetRoomDataExternalRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 29; + friend void swap(SetRoomDataExternalRequest& a, SetRoomDataExternalRequest& b) { a.Swap(&b); } + inline void Swap(SetRoomDataExternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SetRoomDataExternalRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SetRoomDataExternalRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SetRoomDataExternalRequest& from); + void MergeFrom(const SetRoomDataExternalRequest& from) { SetRoomDataExternalRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SetRoomDataExternalRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SetRoomDataExternalRequest"; } + + explicit SetRoomDataExternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SetRoomDataExternalRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SetRoomDataExternalRequest& from); + SetRoomDataExternalRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SetRoomDataExternalRequest&& from) noexcept + : SetRoomDataExternalRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomSearchableIntAttrExternalFieldNumber = 2, + kRoomSearchableBinAttrExternalFieldNumber = 3, + kRoomBinAttrExternalFieldNumber = 4, + kRoomIdFieldNumber = 1, + }; + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 2; + int roomsearchableintattrexternal_size() const; + private: + int _internal_roomsearchableintattrexternal_size() const; + + public: + void clear_roomsearchableintattrexternal() ; + ::np2_structs::IntAttr* PROTOBUF_NONNULL mutable_roomsearchableintattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL mutable_roomsearchableintattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& _internal_roomsearchableintattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL _internal_mutable_roomsearchableintattrexternal(); + public: + const ::np2_structs::IntAttr& roomsearchableintattrexternal(int index) const; + ::np2_structs::IntAttr* PROTOBUF_NONNULL add_roomsearchableintattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& roomsearchableintattrexternal() const; + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 3; + int roomsearchablebinattrexternal_size() const; + private: + int _internal_roomsearchablebinattrexternal_size() const; + + public: + void clear_roomsearchablebinattrexternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roomsearchablebinattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roomsearchablebinattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roomsearchablebinattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roomsearchablebinattrexternal(); + public: + const ::np2_structs::BinAttr& roomsearchablebinattrexternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roomsearchablebinattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roomsearchablebinattrexternal() const; + // repeated .np2_structs.BinAttr roomBinAttrExternal = 4; + int roombinattrexternal_size() const; + private: + int _internal_roombinattrexternal_size() const; + + public: + void clear_roombinattrexternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roombinattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roombinattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roombinattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roombinattrexternal(); + public: + const ::np2_structs::BinAttr& roombinattrexternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roombinattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roombinattrexternal() const; + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SetRoomDataExternalRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SetRoomDataExternalRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::IntAttr > roomsearchableintattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roomsearchablebinattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roombinattrexternal_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> SetRoomDataExternalRequest_class_data_; +// ------------------------------------------------------------------- + +class RoomMemberBinAttrInternal final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomMemberBinAttrInternal) */ { + public: + inline RoomMemberBinAttrInternal() : RoomMemberBinAttrInternal(nullptr) {} + ~RoomMemberBinAttrInternal() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomMemberBinAttrInternal* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomMemberBinAttrInternal)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomMemberBinAttrInternal(::google::protobuf::internal::ConstantInitialized); + + inline RoomMemberBinAttrInternal(const RoomMemberBinAttrInternal& from) : RoomMemberBinAttrInternal(nullptr, from) {} + inline RoomMemberBinAttrInternal(RoomMemberBinAttrInternal&& from) noexcept + : RoomMemberBinAttrInternal(nullptr, ::std::move(from)) {} + inline RoomMemberBinAttrInternal& operator=(const RoomMemberBinAttrInternal& from) { + CopyFrom(from); + return *this; + } + inline RoomMemberBinAttrInternal& operator=(RoomMemberBinAttrInternal&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomMemberBinAttrInternal& default_instance() { + return *reinterpret_cast( + &_RoomMemberBinAttrInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = 7; + friend void swap(RoomMemberBinAttrInternal& a, RoomMemberBinAttrInternal& b) { a.Swap(&b); } + inline void Swap(RoomMemberBinAttrInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomMemberBinAttrInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomMemberBinAttrInternal* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomMemberBinAttrInternal& from); + void MergeFrom(const RoomMemberBinAttrInternal& from) { RoomMemberBinAttrInternal::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomMemberBinAttrInternal* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomMemberBinAttrInternal"; } + + explicit RoomMemberBinAttrInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomMemberBinAttrInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomMemberBinAttrInternal& from); + RoomMemberBinAttrInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomMemberBinAttrInternal&& from) noexcept + : RoomMemberBinAttrInternal(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDataFieldNumber = 2, + kUpdateDateFieldNumber = 1, + }; + // .np2_structs.BinAttr data = 2; + bool has_data() const; + void clear_data() ; + const ::np2_structs::BinAttr& data() const; + [[nodiscard]] ::np2_structs::BinAttr* PROTOBUF_NULLABLE release_data(); + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_data(); + void set_allocated_data(::np2_structs::BinAttr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_data(::np2_structs::BinAttr* PROTOBUF_NULLABLE value); + ::np2_structs::BinAttr* PROTOBUF_NULLABLE unsafe_arena_release_data(); + + private: + const ::np2_structs::BinAttr& _internal_data() const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // uint64 updateDate = 1; + void clear_updatedate() ; + ::uint64_t updatedate() const; + void set_updatedate(::uint64_t value); + + private: + ::uint64_t _internal_updatedate() const; + void _internal_set_updatedate(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomMemberBinAttrInternal) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomMemberBinAttrInternal& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::BinAttr* PROTOBUF_NULLABLE data_; + ::uint64_t updatedate_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<38> RoomMemberBinAttrInternal_class_data_; +// ------------------------------------------------------------------- + +class RoomDataExternal final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomDataExternal) */ { + public: + inline RoomDataExternal() : RoomDataExternal(nullptr) {} + ~RoomDataExternal() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomDataExternal* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomDataExternal)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomDataExternal(::google::protobuf::internal::ConstantInitialized); + + inline RoomDataExternal(const RoomDataExternal& from) : RoomDataExternal(nullptr, from) {} + inline RoomDataExternal(RoomDataExternal&& from) noexcept + : RoomDataExternal(nullptr, ::std::move(from)) {} + inline RoomDataExternal& operator=(const RoomDataExternal& from) { + CopyFrom(from); + return *this; + } + inline RoomDataExternal& operator=(RoomDataExternal&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomDataExternal& default_instance() { + return *reinterpret_cast( + &_RoomDataExternal_default_instance_); + } + static constexpr int kIndexInFileMessages = 15; + friend void swap(RoomDataExternal& a, RoomDataExternal& b) { a.Swap(&b); } + inline void Swap(RoomDataExternal* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomDataExternal* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomDataExternal* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomDataExternal& from); + void MergeFrom(const RoomDataExternal& from) { RoomDataExternal::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomDataExternal* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomDataExternal"; } + + explicit RoomDataExternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomDataExternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomDataExternal& from); + RoomDataExternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomDataExternal&& from) noexcept + : RoomDataExternal(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomGroupFieldNumber = 13, + kRoomSearchableIntAttrExternalFieldNumber = 15, + kRoomSearchableBinAttrExternalFieldNumber = 16, + kRoomBinAttrExternalFieldNumber = 17, + kServerIdFieldNumber = 1, + kPublicSlotNumFieldNumber = 3, + kPrivateSlotNumFieldNumber = 4, + kOpenPublicSlotNumFieldNumber = 7, + kMaxSlotFieldNumber = 8, + kOpenPrivateSlotNumFieldNumber = 9, + kCurMemberNumFieldNumber = 10, + kOwnerFieldNumber = 12, + kLobbyIdFieldNumber = 5, + kRoomIdFieldNumber = 6, + kWorldIdFieldNumber = 2, + kFlagAttrFieldNumber = 14, + kPasswordSlotMaskFieldNumber = 11, + }; + // repeated .np2_structs.RoomGroup roomGroup = 13; + int roomgroup_size() const; + private: + int _internal_roomgroup_size() const; + + public: + void clear_roomgroup() ; + ::np2_structs::RoomGroup* PROTOBUF_NONNULL mutable_roomgroup(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL mutable_roomgroup(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& _internal_roomgroup() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL _internal_mutable_roomgroup(); + public: + const ::np2_structs::RoomGroup& roomgroup(int index) const; + ::np2_structs::RoomGroup* PROTOBUF_NONNULL add_roomgroup(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& roomgroup() const; + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 15; + int roomsearchableintattrexternal_size() const; + private: + int _internal_roomsearchableintattrexternal_size() const; + + public: + void clear_roomsearchableintattrexternal() ; + ::np2_structs::IntAttr* PROTOBUF_NONNULL mutable_roomsearchableintattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL mutable_roomsearchableintattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& _internal_roomsearchableintattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL _internal_mutable_roomsearchableintattrexternal(); + public: + const ::np2_structs::IntAttr& roomsearchableintattrexternal(int index) const; + ::np2_structs::IntAttr* PROTOBUF_NONNULL add_roomsearchableintattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& roomsearchableintattrexternal() const; + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 16; + int roomsearchablebinattrexternal_size() const; + private: + int _internal_roomsearchablebinattrexternal_size() const; + + public: + void clear_roomsearchablebinattrexternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roomsearchablebinattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roomsearchablebinattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roomsearchablebinattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roomsearchablebinattrexternal(); + public: + const ::np2_structs::BinAttr& roomsearchablebinattrexternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roomsearchablebinattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roomsearchablebinattrexternal() const; + // repeated .np2_structs.BinAttr roomBinAttrExternal = 17; + int roombinattrexternal_size() const; + private: + int _internal_roombinattrexternal_size() const; + + public: + void clear_roombinattrexternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roombinattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roombinattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roombinattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roombinattrexternal(); + public: + const ::np2_structs::BinAttr& roombinattrexternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roombinattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roombinattrexternal() const; + // .np2_structs.uint16 serverId = 1; + bool has_serverid() const; + void clear_serverid() ; + const ::np2_structs::uint16& serverid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_serverid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_serverid(); + void set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_serverid(); + + private: + const ::np2_structs::uint16& _internal_serverid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_serverid(); + + public: + // .np2_structs.uint16 publicSlotNum = 3; + bool has_publicslotnum() const; + void clear_publicslotnum() ; + const ::np2_structs::uint16& publicslotnum() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_publicslotnum(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_publicslotnum(); + void set_allocated_publicslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_publicslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_publicslotnum(); + + private: + const ::np2_structs::uint16& _internal_publicslotnum() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_publicslotnum(); + + public: + // .np2_structs.uint16 privateSlotNum = 4; + bool has_privateslotnum() const; + void clear_privateslotnum() ; + const ::np2_structs::uint16& privateslotnum() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_privateslotnum(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_privateslotnum(); + void set_allocated_privateslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_privateslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_privateslotnum(); + + private: + const ::np2_structs::uint16& _internal_privateslotnum() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_privateslotnum(); + + public: + // .np2_structs.uint16 openPublicSlotNum = 7; + bool has_openpublicslotnum() const; + void clear_openpublicslotnum() ; + const ::np2_structs::uint16& openpublicslotnum() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_openpublicslotnum(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_openpublicslotnum(); + void set_allocated_openpublicslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_openpublicslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_openpublicslotnum(); + + private: + const ::np2_structs::uint16& _internal_openpublicslotnum() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_openpublicslotnum(); + + public: + // .np2_structs.uint16 maxSlot = 8; + bool has_maxslot() const; + void clear_maxslot() ; + const ::np2_structs::uint16& maxslot() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_maxslot(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_maxslot(); + void set_allocated_maxslot(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_maxslot(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_maxslot(); + + private: + const ::np2_structs::uint16& _internal_maxslot() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_maxslot(); + + public: + // .np2_structs.uint16 openPrivateSlotNum = 9; + bool has_openprivateslotnum() const; + void clear_openprivateslotnum() ; + const ::np2_structs::uint16& openprivateslotnum() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_openprivateslotnum(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_openprivateslotnum(); + void set_allocated_openprivateslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_openprivateslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_openprivateslotnum(); + + private: + const ::np2_structs::uint16& _internal_openprivateslotnum() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_openprivateslotnum(); + + public: + // .np2_structs.uint16 curMemberNum = 10; + bool has_curmembernum() const; + void clear_curmembernum() ; + const ::np2_structs::uint16& curmembernum() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_curmembernum(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_curmembernum(); + void set_allocated_curmembernum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_curmembernum(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_curmembernum(); + + private: + const ::np2_structs::uint16& _internal_curmembernum() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_curmembernum(); + + public: + // .np2_structs.UserInfo owner = 12; + bool has_owner() const; + void clear_owner() ; + const ::np2_structs::UserInfo& owner() const; + [[nodiscard]] ::np2_structs::UserInfo* PROTOBUF_NULLABLE release_owner(); + ::np2_structs::UserInfo* PROTOBUF_NONNULL mutable_owner(); + void set_allocated_owner(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_owner(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + ::np2_structs::UserInfo* PROTOBUF_NULLABLE unsafe_arena_release_owner(); + + private: + const ::np2_structs::UserInfo& _internal_owner() const; + ::np2_structs::UserInfo* PROTOBUF_NONNULL _internal_mutable_owner(); + + public: + // uint64 lobbyId = 5; + void clear_lobbyid() ; + ::uint64_t lobbyid() const; + void set_lobbyid(::uint64_t value); + + private: + ::uint64_t _internal_lobbyid() const; + void _internal_set_lobbyid(::uint64_t value); + + public: + // uint64 roomId = 6; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // uint32 worldId = 2; + void clear_worldid() ; + ::uint32_t worldid() const; + void set_worldid(::uint32_t value); + + private: + ::uint32_t _internal_worldid() const; + void _internal_set_worldid(::uint32_t value); + + public: + // uint32 flagAttr = 14; + void clear_flagattr() ; + ::uint32_t flagattr() const; + void set_flagattr(::uint32_t value); + + private: + ::uint32_t _internal_flagattr() const; + void _internal_set_flagattr(::uint32_t value); + + public: + // uint64 passwordSlotMask = 11; + void clear_passwordslotmask() ; + ::uint64_t passwordslotmask() const; + void set_passwordslotmask(::uint64_t value); + + private: + ::uint64_t _internal_passwordslotmask() const; + void _internal_set_passwordslotmask(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomDataExternal) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<5, 17, + 12, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomDataExternal& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomGroup > roomgroup_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::IntAttr > roomsearchableintattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roomsearchablebinattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roombinattrexternal_; + ::np2_structs::uint16* PROTOBUF_NULLABLE serverid_; + ::np2_structs::uint16* PROTOBUF_NULLABLE publicslotnum_; + ::np2_structs::uint16* PROTOBUF_NULLABLE privateslotnum_; + ::np2_structs::uint16* PROTOBUF_NULLABLE openpublicslotnum_; + ::np2_structs::uint16* PROTOBUF_NULLABLE maxslot_; + ::np2_structs::uint16* PROTOBUF_NULLABLE openprivateslotnum_; + ::np2_structs::uint16* PROTOBUF_NULLABLE curmembernum_; + ::np2_structs::UserInfo* PROTOBUF_NULLABLE owner_; + ::uint64_t lobbyid_; + ::uint64_t roomid_; + ::uint32_t worldid_; + ::uint32_t flagattr_; + ::uint64_t passwordslotmask_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<29> RoomDataExternal_class_data_; +// ------------------------------------------------------------------- + +class MatchingSignalingInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingSignalingInfo) */ { + public: + inline MatchingSignalingInfo() : MatchingSignalingInfo(nullptr) {} + ~MatchingSignalingInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingSignalingInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingSignalingInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingSignalingInfo(::google::protobuf::internal::ConstantInitialized); + + inline MatchingSignalingInfo(const MatchingSignalingInfo& from) : MatchingSignalingInfo(nullptr, from) {} + inline MatchingSignalingInfo(MatchingSignalingInfo&& from) noexcept + : MatchingSignalingInfo(nullptr, ::std::move(from)) {} + inline MatchingSignalingInfo& operator=(const MatchingSignalingInfo& from) { + CopyFrom(from); + return *this; + } + inline MatchingSignalingInfo& operator=(MatchingSignalingInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingSignalingInfo& default_instance() { + return *reinterpret_cast( + &_MatchingSignalingInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 3; + friend void swap(MatchingSignalingInfo& a, MatchingSignalingInfo& b) { a.Swap(&b); } + inline void Swap(MatchingSignalingInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingSignalingInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingSignalingInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingSignalingInfo& from); + void MergeFrom(const MatchingSignalingInfo& from) { MatchingSignalingInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingSignalingInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingSignalingInfo"; } + + explicit MatchingSignalingInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingSignalingInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingSignalingInfo& from); + MatchingSignalingInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingSignalingInfo&& from) noexcept + : MatchingSignalingInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNpidFieldNumber = 1, + kAddrFieldNumber = 2, + }; + // string npid = 1; + void clear_npid() ; + const ::std::string& npid() const; + template + void set_npid(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_npid(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_npid(); + void set_allocated_npid(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_npid() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_npid(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_npid(); + + public: + // .np2_structs.SignalingAddr addr = 2; + bool has_addr() const; + void clear_addr() ; + const ::np2_structs::SignalingAddr& addr() const; + [[nodiscard]] ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE release_addr(); + ::np2_structs::SignalingAddr* PROTOBUF_NONNULL mutable_addr(); + void set_allocated_addr(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_addr(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value); + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE unsafe_arena_release_addr(); + + private: + const ::np2_structs::SignalingAddr& _internal_addr() const; + ::np2_structs::SignalingAddr* PROTOBUF_NONNULL _internal_mutable_addr(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingSignalingInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 1, 46, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingSignalingInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr npid_; + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE addr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<34> MatchingSignalingInfo_class_data_; +// ------------------------------------------------------------------- + +class MatchingRoomStatus final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingRoomStatus) */ { + public: + inline MatchingRoomStatus() : MatchingRoomStatus(nullptr) {} + ~MatchingRoomStatus() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingRoomStatus* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingRoomStatus)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingRoomStatus(::google::protobuf::internal::ConstantInitialized); + + inline MatchingRoomStatus(const MatchingRoomStatus& from) : MatchingRoomStatus(nullptr, from) {} + inline MatchingRoomStatus(MatchingRoomStatus&& from) noexcept + : MatchingRoomStatus(nullptr, ::std::move(from)) {} + inline MatchingRoomStatus& operator=(const MatchingRoomStatus& from) { + CopyFrom(from); + return *this; + } + inline MatchingRoomStatus& operator=(MatchingRoomStatus&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingRoomStatus& default_instance() { + return *reinterpret_cast( + &_MatchingRoomStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = 80; + friend void swap(MatchingRoomStatus& a, MatchingRoomStatus& b) { a.Swap(&b); } + inline void Swap(MatchingRoomStatus* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingRoomStatus* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingRoomStatus* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingRoomStatus& from); + void MergeFrom(const MatchingRoomStatus& from) { MatchingRoomStatus::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingRoomStatus* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingRoomStatus"; } + + explicit MatchingRoomStatus(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingRoomStatus(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingRoomStatus& from); + MatchingRoomStatus( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingRoomStatus&& from) noexcept + : MatchingRoomStatus(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMembersFieldNumber = 2, + kIdFieldNumber = 1, + kKickActorFieldNumber = 3, + kOptFieldNumber = 4, + }; + // repeated .np2_structs.GUIUserInfo members = 2; + int members_size() const; + private: + int _internal_members_size() const; + + public: + void clear_members() ; + ::np2_structs::GUIUserInfo* PROTOBUF_NONNULL mutable_members(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>* PROTOBUF_NONNULL mutable_members(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>& _internal_members() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>* PROTOBUF_NONNULL _internal_mutable_members(); + public: + const ::np2_structs::GUIUserInfo& members(int index) const; + ::np2_structs::GUIUserInfo* PROTOBUF_NONNULL add_members(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>& members() const; + // bytes id = 1; + void clear_id() ; + const ::std::string& id() const; + template + void set_id(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_id(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_id(); + void set_allocated_id(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_id() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_id(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_id(); + + public: + // string kick_actor = 3; + void clear_kick_actor() ; + const ::std::string& kick_actor() const; + template + void set_kick_actor(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_kick_actor(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_kick_actor(); + void set_allocated_kick_actor(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_kick_actor() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_kick_actor(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_kick_actor(); + + public: + // bytes opt = 4; + void clear_opt() ; + const ::std::string& opt() const; + template + void set_opt(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_opt(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_opt(); + void set_allocated_opt(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_opt() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_opt(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_opt(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingRoomStatus) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 1, 49, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingRoomStatus& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::GUIUserInfo > members_; + ::google::protobuf::internal::ArenaStringPtr id_; + ::google::protobuf::internal::ArenaStringPtr kick_actor_; + ::google::protobuf::internal::ArenaStringPtr opt_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> MatchingRoomStatus_class_data_; +// ------------------------------------------------------------------- + +class MatchingRoomList final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingRoomList) */ { + public: + inline MatchingRoomList() : MatchingRoomList(nullptr) {} + ~MatchingRoomList() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingRoomList* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingRoomList)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingRoomList(::google::protobuf::internal::ConstantInitialized); + + inline MatchingRoomList(const MatchingRoomList& from) : MatchingRoomList(nullptr, from) {} + inline MatchingRoomList(MatchingRoomList&& from) noexcept + : MatchingRoomList(nullptr, ::std::move(from)) {} + inline MatchingRoomList& operator=(const MatchingRoomList& from) { + CopyFrom(from); + return *this; + } + inline MatchingRoomList& operator=(MatchingRoomList&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingRoomList& default_instance() { + return *reinterpret_cast( + &_MatchingRoomList_default_instance_); + } + static constexpr int kIndexInFileMessages = 83; + friend void swap(MatchingRoomList& a, MatchingRoomList& b) { a.Swap(&b); } + inline void Swap(MatchingRoomList* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingRoomList* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingRoomList* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingRoomList& from); + void MergeFrom(const MatchingRoomList& from) { MatchingRoomList::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingRoomList* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingRoomList"; } + + explicit MatchingRoomList(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingRoomList(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingRoomList& from); + MatchingRoomList( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingRoomList&& from) noexcept + : MatchingRoomList(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomsFieldNumber = 3, + kStartFieldNumber = 1, + kTotalFieldNumber = 2, + }; + // repeated .np2_structs.MatchingRoom rooms = 3; + int rooms_size() const; + private: + int _internal_rooms_size() const; + + public: + void clear_rooms() ; + ::np2_structs::MatchingRoom* PROTOBUF_NONNULL mutable_rooms(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>* PROTOBUF_NONNULL mutable_rooms(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>& _internal_rooms() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>* PROTOBUF_NONNULL _internal_mutable_rooms(); + public: + const ::np2_structs::MatchingRoom& rooms(int index) const; + ::np2_structs::MatchingRoom* PROTOBUF_NONNULL add_rooms(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>& rooms() const; + // uint32 start = 1; + void clear_start() ; + ::uint32_t start() const; + void set_start(::uint32_t value); + + private: + ::uint32_t _internal_start() const; + void _internal_set_start(::uint32_t value); + + public: + // uint32 total = 2; + void clear_total() ; + ::uint32_t total() const; + void set_total(::uint32_t value); + + private: + ::uint32_t _internal_total() const; + void _internal_set_total(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingRoomList) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingRoomList& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingRoom > rooms_; + ::uint32_t start_; + ::uint32_t total_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<29> MatchingRoomList_class_data_; +// ------------------------------------------------------------------- + +class Matching2SignalingInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.Matching2SignalingInfo) */ { + public: + inline Matching2SignalingInfo() : Matching2SignalingInfo(nullptr) {} + ~Matching2SignalingInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Matching2SignalingInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Matching2SignalingInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR Matching2SignalingInfo(::google::protobuf::internal::ConstantInitialized); + + inline Matching2SignalingInfo(const Matching2SignalingInfo& from) : Matching2SignalingInfo(nullptr, from) {} + inline Matching2SignalingInfo(Matching2SignalingInfo&& from) noexcept + : Matching2SignalingInfo(nullptr, ::std::move(from)) {} + inline Matching2SignalingInfo& operator=(const Matching2SignalingInfo& from) { + CopyFrom(from); + return *this; + } + inline Matching2SignalingInfo& operator=(Matching2SignalingInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const Matching2SignalingInfo& default_instance() { + return *reinterpret_cast( + &_Matching2SignalingInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 4; + friend void swap(Matching2SignalingInfo& a, Matching2SignalingInfo& b) { a.Swap(&b); } + inline void Swap(Matching2SignalingInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Matching2SignalingInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Matching2SignalingInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const Matching2SignalingInfo& from); + void MergeFrom(const Matching2SignalingInfo& from) { Matching2SignalingInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(Matching2SignalingInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.Matching2SignalingInfo"; } + + explicit Matching2SignalingInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + Matching2SignalingInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Matching2SignalingInfo& from); + Matching2SignalingInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Matching2SignalingInfo&& from) noexcept + : Matching2SignalingInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMemberIdFieldNumber = 1, + kAddrFieldNumber = 2, + }; + // .np2_structs.uint16 member_id = 1; + bool has_member_id() const; + void clear_member_id() ; + const ::np2_structs::uint16& member_id() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_member_id(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_member_id(); + void set_allocated_member_id(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_member_id(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_member_id(); + + private: + const ::np2_structs::uint16& _internal_member_id() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_member_id(); + + public: + // .np2_structs.SignalingAddr addr = 2; + bool has_addr() const; + void clear_addr() ; + const ::np2_structs::SignalingAddr& addr() const; + [[nodiscard]] ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE release_addr(); + ::np2_structs::SignalingAddr* PROTOBUF_NONNULL mutable_addr(); + void set_allocated_addr(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_addr(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value); + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE unsafe_arena_release_addr(); + + private: + const ::np2_structs::SignalingAddr& _internal_addr() const; + ::np2_structs::SignalingAddr* PROTOBUF_NONNULL _internal_mutable_addr(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.Matching2SignalingInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const Matching2SignalingInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint16* PROTOBUF_NULLABLE member_id_; + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE addr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<35> Matching2SignalingInfo_class_data_; +// ------------------------------------------------------------------- + +class JoinRoomRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.JoinRoomRequest) */ { + public: + inline JoinRoomRequest() : JoinRoomRequest(nullptr) {} + ~JoinRoomRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(JoinRoomRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(JoinRoomRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR JoinRoomRequest(::google::protobuf::internal::ConstantInitialized); + + inline JoinRoomRequest(const JoinRoomRequest& from) : JoinRoomRequest(nullptr, from) {} + inline JoinRoomRequest(JoinRoomRequest&& from) noexcept + : JoinRoomRequest(nullptr, ::std::move(from)) {} + inline JoinRoomRequest& operator=(const JoinRoomRequest& from) { + CopyFrom(from); + return *this; + } + inline JoinRoomRequest& operator=(JoinRoomRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const JoinRoomRequest& default_instance() { + return *reinterpret_cast( + &_JoinRoomRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 24; + friend void swap(JoinRoomRequest& a, JoinRoomRequest& b) { a.Swap(&b); } + inline void Swap(JoinRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JoinRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JoinRoomRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const JoinRoomRequest& from); + void MergeFrom(const JoinRoomRequest& from) { JoinRoomRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(JoinRoomRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.JoinRoomRequest"; } + + explicit JoinRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + JoinRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const JoinRoomRequest& from); + JoinRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, JoinRoomRequest&& from) noexcept + : JoinRoomRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomMemberBinAttrInternalFieldNumber = 4, + kRoomPasswordFieldNumber = 2, + kJoinRoomGroupLabelFieldNumber = 3, + kOptDataFieldNumber = 5, + kTeamIdFieldNumber = 6, + kRoomIdFieldNumber = 1, + }; + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; + int roommemberbinattrinternal_size() const; + private: + int _internal_roommemberbinattrinternal_size() const; + + public: + void clear_roommemberbinattrinternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roommemberbinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roommemberbinattrinternal(); + public: + const ::np2_structs::BinAttr& roommemberbinattrinternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roommemberbinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roommemberbinattrinternal() const; + // bytes roomPassword = 2; + void clear_roompassword() ; + const ::std::string& roompassword() const; + template + void set_roompassword(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_roompassword(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_roompassword(); + void set_allocated_roompassword(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_roompassword() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_roompassword(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_roompassword(); + + public: + // bytes joinRoomGroupLabel = 3; + void clear_joinroomgrouplabel() ; + const ::std::string& joinroomgrouplabel() const; + template + void set_joinroomgrouplabel(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_joinroomgrouplabel(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_joinroomgrouplabel(); + void set_allocated_joinroomgrouplabel(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_joinroomgrouplabel() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_joinroomgrouplabel(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_joinroomgrouplabel(); + + public: + // .np2_structs.PresenceOptionData optData = 5; + bool has_optdata() const; + void clear_optdata() ; + const ::np2_structs::PresenceOptionData& optdata() const; + [[nodiscard]] ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE release_optdata(); + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL mutable_optdata(); + void set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE unsafe_arena_release_optdata(); + + private: + const ::np2_structs::PresenceOptionData& _internal_optdata() const; + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL _internal_mutable_optdata(); + + public: + // .np2_structs.uint8 teamId = 6; + bool has_teamid() const; + void clear_teamid() ; + const ::np2_structs::uint8& teamid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_teamid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_teamid(); + void set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_teamid(); + + private: + const ::np2_structs::uint8& _internal_teamid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_teamid(); + + public: + // uint64 roomId = 1; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.JoinRoomRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 6, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const JoinRoomRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roommemberbinattrinternal_; + ::google::protobuf::internal::ArenaStringPtr roompassword_; + ::google::protobuf::internal::ArenaStringPtr joinroomgrouplabel_; + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE optdata_; + ::np2_structs::uint8* PROTOBUF_NULLABLE teamid_; + ::uint64_t roomid_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<28> JoinRoomRequest_class_data_; +// ------------------------------------------------------------------- + +class IntSearchFilter final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.IntSearchFilter) */ { + public: + inline IntSearchFilter() : IntSearchFilter(nullptr) {} + ~IntSearchFilter() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(IntSearchFilter* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(IntSearchFilter)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR IntSearchFilter(::google::protobuf::internal::ConstantInitialized); + + inline IntSearchFilter(const IntSearchFilter& from) : IntSearchFilter(nullptr, from) {} + inline IntSearchFilter(IntSearchFilter&& from) noexcept + : IntSearchFilter(nullptr, ::std::move(from)) {} + inline IntSearchFilter& operator=(const IntSearchFilter& from) { + CopyFrom(from); + return *this; + } + inline IntSearchFilter& operator=(IntSearchFilter&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const IntSearchFilter& default_instance() { + return *reinterpret_cast( + &_IntSearchFilter_default_instance_); + } + static constexpr int kIndexInFileMessages = 16; + friend void swap(IntSearchFilter& a, IntSearchFilter& b) { a.Swap(&b); } + inline void Swap(IntSearchFilter* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(IntSearchFilter* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IntSearchFilter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const IntSearchFilter& from); + void MergeFrom(const IntSearchFilter& from) { IntSearchFilter::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(IntSearchFilter* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.IntSearchFilter"; } + + explicit IntSearchFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + IntSearchFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const IntSearchFilter& from); + IntSearchFilter( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, IntSearchFilter&& from) noexcept + : IntSearchFilter(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSearchOperatorFieldNumber = 1, + kAttrFieldNumber = 2, + }; + // .np2_structs.uint8 searchOperator = 1; + bool has_searchoperator() const; + void clear_searchoperator() ; + const ::np2_structs::uint8& searchoperator() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_searchoperator(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_searchoperator(); + void set_allocated_searchoperator(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_searchoperator(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_searchoperator(); + + private: + const ::np2_structs::uint8& _internal_searchoperator() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_searchoperator(); + + public: + // .np2_structs.IntAttr attr = 2; + bool has_attr() const; + void clear_attr() ; + const ::np2_structs::IntAttr& attr() const; + [[nodiscard]] ::np2_structs::IntAttr* PROTOBUF_NULLABLE release_attr(); + ::np2_structs::IntAttr* PROTOBUF_NONNULL mutable_attr(); + void set_allocated_attr(::np2_structs::IntAttr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_attr(::np2_structs::IntAttr* PROTOBUF_NULLABLE value); + ::np2_structs::IntAttr* PROTOBUF_NULLABLE unsafe_arena_release_attr(); + + private: + const ::np2_structs::IntAttr& _internal_attr() const; + ::np2_structs::IntAttr* PROTOBUF_NONNULL _internal_mutable_attr(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.IntSearchFilter) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const IntSearchFilter& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint8* PROTOBUF_NULLABLE searchoperator_; + ::np2_structs::IntAttr* PROTOBUF_NULLABLE attr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<28> IntSearchFilter_class_data_; +// ------------------------------------------------------------------- + +class GetRoomMemberDataExternalListResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetRoomMemberDataExternalListResponse) */ { + public: + inline GetRoomMemberDataExternalListResponse() : GetRoomMemberDataExternalListResponse(nullptr) {} + ~GetRoomMemberDataExternalListResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetRoomMemberDataExternalListResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetRoomMemberDataExternalListResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetRoomMemberDataExternalListResponse(::google::protobuf::internal::ConstantInitialized); + + inline GetRoomMemberDataExternalListResponse(const GetRoomMemberDataExternalListResponse& from) : GetRoomMemberDataExternalListResponse(nullptr, from) {} + inline GetRoomMemberDataExternalListResponse(GetRoomMemberDataExternalListResponse&& from) noexcept + : GetRoomMemberDataExternalListResponse(nullptr, ::std::move(from)) {} + inline GetRoomMemberDataExternalListResponse& operator=(const GetRoomMemberDataExternalListResponse& from) { + CopyFrom(from); + return *this; + } + inline GetRoomMemberDataExternalListResponse& operator=(GetRoomMemberDataExternalListResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetRoomMemberDataExternalListResponse& default_instance() { + return *reinterpret_cast( + &_GetRoomMemberDataExternalListResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 90; + friend void swap(GetRoomMemberDataExternalListResponse& a, GetRoomMemberDataExternalListResponse& b) { a.Swap(&b); } + inline void Swap(GetRoomMemberDataExternalListResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetRoomMemberDataExternalListResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetRoomMemberDataExternalListResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetRoomMemberDataExternalListResponse& from); + void MergeFrom(const GetRoomMemberDataExternalListResponse& from) { GetRoomMemberDataExternalListResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetRoomMemberDataExternalListResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetRoomMemberDataExternalListResponse"; } + + explicit GetRoomMemberDataExternalListResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetRoomMemberDataExternalListResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetRoomMemberDataExternalListResponse& from); + GetRoomMemberDataExternalListResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetRoomMemberDataExternalListResponse&& from) noexcept + : GetRoomMemberDataExternalListResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMembersFieldNumber = 1, + }; + // repeated .np2_structs.RoomMemberDataExternal members = 1; + int members_size() const; + private: + int _internal_members_size() const; + + public: + void clear_members() ; + ::np2_structs::RoomMemberDataExternal* PROTOBUF_NONNULL mutable_members(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>* PROTOBUF_NONNULL mutable_members(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>& _internal_members() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>* PROTOBUF_NONNULL _internal_mutable_members(); + public: + const ::np2_structs::RoomMemberDataExternal& members(int index) const; + ::np2_structs::RoomMemberDataExternal* PROTOBUF_NONNULL add_members(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>& members() const; + // @@protoc_insertion_point(class_scope:np2_structs.GetRoomMemberDataExternalListResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetRoomMemberDataExternalListResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomMemberDataExternal > members_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<50> GetRoomMemberDataExternalListResponse_class_data_; +// ------------------------------------------------------------------- + +class CreateJoinRoomRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.CreateJoinRoomRequest) */ { + public: + inline CreateJoinRoomRequest() : CreateJoinRoomRequest(nullptr) {} + ~CreateJoinRoomRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(CreateJoinRoomRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(CreateJoinRoomRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR CreateJoinRoomRequest(::google::protobuf::internal::ConstantInitialized); + + inline CreateJoinRoomRequest(const CreateJoinRoomRequest& from) : CreateJoinRoomRequest(nullptr, from) {} + inline CreateJoinRoomRequest(CreateJoinRoomRequest&& from) noexcept + : CreateJoinRoomRequest(nullptr, ::std::move(from)) {} + inline CreateJoinRoomRequest& operator=(const CreateJoinRoomRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateJoinRoomRequest& operator=(CreateJoinRoomRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const CreateJoinRoomRequest& default_instance() { + return *reinterpret_cast( + &_CreateJoinRoomRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 22; + friend void swap(CreateJoinRoomRequest& a, CreateJoinRoomRequest& b) { a.Swap(&b); } + inline void Swap(CreateJoinRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateJoinRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateJoinRoomRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const CreateJoinRoomRequest& from); + void MergeFrom(const CreateJoinRoomRequest& from) { CreateJoinRoomRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(CreateJoinRoomRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.CreateJoinRoomRequest"; } + + explicit CreateJoinRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + CreateJoinRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const CreateJoinRoomRequest& from); + CreateJoinRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, CreateJoinRoomRequest&& from) noexcept + : CreateJoinRoomRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomBinAttrInternalFieldNumber = 5, + kRoomSearchableIntAttrExternalFieldNumber = 6, + kRoomSearchableBinAttrExternalFieldNumber = 7, + kRoomBinAttrExternalFieldNumber = 8, + kGroupConfigFieldNumber = 10, + kAllowedUserFieldNumber = 12, + kBlockedUserFieldNumber = 13, + kRoomMemberBinAttrInternalFieldNumber = 15, + kRoomPasswordFieldNumber = 9, + kJoinRoomGroupLabelFieldNumber = 14, + kTeamIdFieldNumber = 16, + kSigOptParamFieldNumber = 17, + kLobbyIdFieldNumber = 2, + kWorldIdFieldNumber = 1, + kMaxSlotFieldNumber = 3, + kPasswordSlotMaskFieldNumber = 11, + kFlagAttrFieldNumber = 4, + }; + // repeated .np2_structs.BinAttr roomBinAttrInternal = 5; + int roombinattrinternal_size() const; + private: + int _internal_roombinattrinternal_size() const; + + public: + void clear_roombinattrinternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roombinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roombinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roombinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roombinattrinternal(); + public: + const ::np2_structs::BinAttr& roombinattrinternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roombinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roombinattrinternal() const; + // repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 6; + int roomsearchableintattrexternal_size() const; + private: + int _internal_roomsearchableintattrexternal_size() const; + + public: + void clear_roomsearchableintattrexternal() ; + ::np2_structs::IntAttr* PROTOBUF_NONNULL mutable_roomsearchableintattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL mutable_roomsearchableintattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& _internal_roomsearchableintattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL _internal_mutable_roomsearchableintattrexternal(); + public: + const ::np2_structs::IntAttr& roomsearchableintattrexternal(int index) const; + ::np2_structs::IntAttr* PROTOBUF_NONNULL add_roomsearchableintattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& roomsearchableintattrexternal() const; + // repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 7; + int roomsearchablebinattrexternal_size() const; + private: + int _internal_roomsearchablebinattrexternal_size() const; + + public: + void clear_roomsearchablebinattrexternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roomsearchablebinattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roomsearchablebinattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roomsearchablebinattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roomsearchablebinattrexternal(); + public: + const ::np2_structs::BinAttr& roomsearchablebinattrexternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roomsearchablebinattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roomsearchablebinattrexternal() const; + // repeated .np2_structs.BinAttr roomBinAttrExternal = 8; + int roombinattrexternal_size() const; + private: + int _internal_roombinattrexternal_size() const; + + public: + void clear_roombinattrexternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roombinattrexternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roombinattrexternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roombinattrexternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roombinattrexternal(); + public: + const ::np2_structs::BinAttr& roombinattrexternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roombinattrexternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roombinattrexternal() const; + // repeated .np2_structs.GroupConfig groupConfig = 10; + int groupconfig_size() const; + private: + int _internal_groupconfig_size() const; + + public: + void clear_groupconfig() ; + ::np2_structs::GroupConfig* PROTOBUF_NONNULL mutable_groupconfig(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>* PROTOBUF_NONNULL mutable_groupconfig(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>& _internal_groupconfig() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>* PROTOBUF_NONNULL _internal_mutable_groupconfig(); + public: + const ::np2_structs::GroupConfig& groupconfig(int index) const; + ::np2_structs::GroupConfig* PROTOBUF_NONNULL add_groupconfig(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>& groupconfig() const; + // repeated string allowedUser = 12; + int alloweduser_size() const; + private: + int _internal_alloweduser_size() const; + + public: + void clear_alloweduser() ; + const ::std::string& alloweduser(int index) const; + ::std::string* PROTOBUF_NONNULL mutable_alloweduser(int index); + template + void set_alloweduser(int index, Arg_&& value, Args_... args); + ::std::string* PROTOBUF_NONNULL add_alloweduser(); + template + void add_alloweduser(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField<::std::string>& alloweduser() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL mutable_alloweduser(); + + private: + const ::google::protobuf::RepeatedPtrField<::std::string>& _internal_alloweduser() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL _internal_mutable_alloweduser(); + + public: + // repeated string blockedUser = 13; + int blockeduser_size() const; + private: + int _internal_blockeduser_size() const; + + public: + void clear_blockeduser() ; + const ::std::string& blockeduser(int index) const; + ::std::string* PROTOBUF_NONNULL mutable_blockeduser(int index); + template + void set_blockeduser(int index, Arg_&& value, Args_... args); + ::std::string* PROTOBUF_NONNULL add_blockeduser(); + template + void add_blockeduser(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField<::std::string>& blockeduser() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL mutable_blockeduser(); + + private: + const ::google::protobuf::RepeatedPtrField<::std::string>& _internal_blockeduser() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL _internal_mutable_blockeduser(); + + public: + // repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 15; + int roommemberbinattrinternal_size() const; + private: + int _internal_roommemberbinattrinternal_size() const; + + public: + void clear_roommemberbinattrinternal() ; + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& _internal_roommemberbinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL _internal_mutable_roommemberbinattrinternal(); + public: + const ::np2_structs::BinAttr& roommemberbinattrinternal(int index) const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL add_roommemberbinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& roommemberbinattrinternal() const; + // bytes roomPassword = 9; + void clear_roompassword() ; + const ::std::string& roompassword() const; + template + void set_roompassword(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_roompassword(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_roompassword(); + void set_allocated_roompassword(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_roompassword() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_roompassword(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_roompassword(); + + public: + // bytes joinRoomGroupLabel = 14; + void clear_joinroomgrouplabel() ; + const ::std::string& joinroomgrouplabel() const; + template + void set_joinroomgrouplabel(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_joinroomgrouplabel(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_joinroomgrouplabel(); + void set_allocated_joinroomgrouplabel(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_joinroomgrouplabel() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_joinroomgrouplabel(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_joinroomgrouplabel(); + + public: + // .np2_structs.uint8 teamId = 16; + bool has_teamid() const; + void clear_teamid() ; + const ::np2_structs::uint8& teamid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_teamid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_teamid(); + void set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_teamid(); + + private: + const ::np2_structs::uint8& _internal_teamid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_teamid(); + + public: + // .np2_structs.OptParam sigOptParam = 17; + bool has_sigoptparam() const; + void clear_sigoptparam() ; + const ::np2_structs::OptParam& sigoptparam() const; + [[nodiscard]] ::np2_structs::OptParam* PROTOBUF_NULLABLE release_sigoptparam(); + ::np2_structs::OptParam* PROTOBUF_NONNULL mutable_sigoptparam(); + void set_allocated_sigoptparam(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_sigoptparam(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + ::np2_structs::OptParam* PROTOBUF_NULLABLE unsafe_arena_release_sigoptparam(); + + private: + const ::np2_structs::OptParam& _internal_sigoptparam() const; + ::np2_structs::OptParam* PROTOBUF_NONNULL _internal_mutable_sigoptparam(); + + public: + // uint64 lobbyId = 2; + void clear_lobbyid() ; + ::uint64_t lobbyid() const; + void set_lobbyid(::uint64_t value); + + private: + ::uint64_t _internal_lobbyid() const; + void _internal_set_lobbyid(::uint64_t value); + + public: + // uint32 worldId = 1; + void clear_worldid() ; + ::uint32_t worldid() const; + void set_worldid(::uint32_t value); + + private: + ::uint32_t _internal_worldid() const; + void _internal_set_worldid(::uint32_t value); + + public: + // uint32 maxSlot = 3; + void clear_maxslot() ; + ::uint32_t maxslot() const; + void set_maxslot(::uint32_t value); + + private: + ::uint32_t _internal_maxslot() const; + void _internal_set_maxslot(::uint32_t value); + + public: + // uint64 passwordSlotMask = 11; + void clear_passwordslotmask() ; + ::uint64_t passwordslotmask() const; + void set_passwordslotmask(::uint64_t value); + + private: + ::uint64_t _internal_passwordslotmask() const; + void _internal_set_passwordslotmask(::uint64_t value); + + public: + // uint32 flagAttr = 4; + void clear_flagattr() ; + ::uint32_t flagattr() const; + void set_flagattr(::uint32_t value); + + private: + ::uint32_t _internal_flagattr() const; + void _internal_set_flagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.CreateJoinRoomRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<5, 17, + 8, 80, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const CreateJoinRoomRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roombinattrinternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::IntAttr > roomsearchableintattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roomsearchablebinattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roombinattrexternal_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::GroupConfig > groupconfig_; + ::google::protobuf::RepeatedPtrField<::std::string> alloweduser_; + ::google::protobuf::RepeatedPtrField<::std::string> blockeduser_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttr > roommemberbinattrinternal_; + ::google::protobuf::internal::ArenaStringPtr roompassword_; + ::google::protobuf::internal::ArenaStringPtr joinroomgrouplabel_; + ::np2_structs::uint8* PROTOBUF_NULLABLE teamid_; + ::np2_structs::OptParam* PROTOBUF_NULLABLE sigoptparam_; + ::uint64_t lobbyid_; + ::uint32_t worldid_; + ::uint32_t maxslot_; + ::uint64_t passwordslotmask_; + ::uint32_t flagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<34> CreateJoinRoomRequest_class_data_; +// ------------------------------------------------------------------- + +class BinSearchFilter final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.BinSearchFilter) */ { + public: + inline BinSearchFilter() : BinSearchFilter(nullptr) {} + ~BinSearchFilter() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(BinSearchFilter* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(BinSearchFilter)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR BinSearchFilter(::google::protobuf::internal::ConstantInitialized); + + inline BinSearchFilter(const BinSearchFilter& from) : BinSearchFilter(nullptr, from) {} + inline BinSearchFilter(BinSearchFilter&& from) noexcept + : BinSearchFilter(nullptr, ::std::move(from)) {} + inline BinSearchFilter& operator=(const BinSearchFilter& from) { + CopyFrom(from); + return *this; + } + inline BinSearchFilter& operator=(BinSearchFilter&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const BinSearchFilter& default_instance() { + return *reinterpret_cast( + &_BinSearchFilter_default_instance_); + } + static constexpr int kIndexInFileMessages = 17; + friend void swap(BinSearchFilter& a, BinSearchFilter& b) { a.Swap(&b); } + inline void Swap(BinSearchFilter* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BinSearchFilter* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BinSearchFilter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const BinSearchFilter& from); + void MergeFrom(const BinSearchFilter& from) { BinSearchFilter::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(BinSearchFilter* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.BinSearchFilter"; } + + explicit BinSearchFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + BinSearchFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BinSearchFilter& from); + BinSearchFilter( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, BinSearchFilter&& from) noexcept + : BinSearchFilter(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSearchOperatorFieldNumber = 1, + kAttrFieldNumber = 2, + }; + // .np2_structs.uint8 searchOperator = 1; + bool has_searchoperator() const; + void clear_searchoperator() ; + const ::np2_structs::uint8& searchoperator() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_searchoperator(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_searchoperator(); + void set_allocated_searchoperator(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_searchoperator(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_searchoperator(); + + private: + const ::np2_structs::uint8& _internal_searchoperator() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_searchoperator(); + + public: + // .np2_structs.BinAttr attr = 2; + bool has_attr() const; + void clear_attr() ; + const ::np2_structs::BinAttr& attr() const; + [[nodiscard]] ::np2_structs::BinAttr* PROTOBUF_NULLABLE release_attr(); + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_attr(); + void set_allocated_attr(::np2_structs::BinAttr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_attr(::np2_structs::BinAttr* PROTOBUF_NULLABLE value); + ::np2_structs::BinAttr* PROTOBUF_NULLABLE unsafe_arena_release_attr(); + + private: + const ::np2_structs::BinAttr& _internal_attr() const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL _internal_mutable_attr(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.BinSearchFilter) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const BinSearchFilter& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint8* PROTOBUF_NULLABLE searchoperator_; + ::np2_structs::BinAttr* PROTOBUF_NULLABLE attr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<28> BinSearchFilter_class_data_; +// ------------------------------------------------------------------- + +class BinAttrInternal final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.BinAttrInternal) */ { + public: + inline BinAttrInternal() : BinAttrInternal(nullptr) {} + ~BinAttrInternal() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(BinAttrInternal* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(BinAttrInternal)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR BinAttrInternal(::google::protobuf::internal::ConstantInitialized); + + inline BinAttrInternal(const BinAttrInternal& from) : BinAttrInternal(nullptr, from) {} + inline BinAttrInternal(BinAttrInternal&& from) noexcept + : BinAttrInternal(nullptr, ::std::move(from)) {} + inline BinAttrInternal& operator=(const BinAttrInternal& from) { + CopyFrom(from); + return *this; + } + inline BinAttrInternal& operator=(BinAttrInternal&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const BinAttrInternal& default_instance() { + return *reinterpret_cast( + &_BinAttrInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = 8; + friend void swap(BinAttrInternal& a, BinAttrInternal& b) { a.Swap(&b); } + inline void Swap(BinAttrInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BinAttrInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BinAttrInternal* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const BinAttrInternal& from); + void MergeFrom(const BinAttrInternal& from) { BinAttrInternal::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(BinAttrInternal* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.BinAttrInternal"; } + + explicit BinAttrInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + BinAttrInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BinAttrInternal& from); + BinAttrInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, BinAttrInternal&& from) noexcept + : BinAttrInternal(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUpdateMemberIdFieldNumber = 2, + kDataFieldNumber = 3, + kUpdateDateFieldNumber = 1, + }; + // .np2_structs.uint16 updateMemberId = 2; + bool has_updatememberid() const; + void clear_updatememberid() ; + const ::np2_structs::uint16& updatememberid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_updatememberid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_updatememberid(); + void set_allocated_updatememberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_updatememberid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_updatememberid(); + + private: + const ::np2_structs::uint16& _internal_updatememberid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_updatememberid(); + + public: + // .np2_structs.BinAttr data = 3; + bool has_data() const; + void clear_data() ; + const ::np2_structs::BinAttr& data() const; + [[nodiscard]] ::np2_structs::BinAttr* PROTOBUF_NULLABLE release_data(); + ::np2_structs::BinAttr* PROTOBUF_NONNULL mutable_data(); + void set_allocated_data(::np2_structs::BinAttr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_data(::np2_structs::BinAttr* PROTOBUF_NULLABLE value); + ::np2_structs::BinAttr* PROTOBUF_NULLABLE unsafe_arena_release_data(); + + private: + const ::np2_structs::BinAttr& _internal_data() const; + ::np2_structs::BinAttr* PROTOBUF_NONNULL _internal_mutable_data(); + + public: + // uint64 updateDate = 1; + void clear_updatedate() ; + ::uint64_t updatedate() const; + void set_updatedate(::uint64_t value); + + private: + ::uint64_t _internal_updatedate() const; + void _internal_set_updatedate(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.BinAttrInternal) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const BinAttrInternal& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::uint16* PROTOBUF_NULLABLE updatememberid_; + ::np2_structs::BinAttr* PROTOBUF_NULLABLE data_; + ::uint64_t updatedate_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<28> BinAttrInternal_class_data_; +// ------------------------------------------------------------------- + +class SearchRoomResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SearchRoomResponse) */ { + public: + inline SearchRoomResponse() : SearchRoomResponse(nullptr) {} + ~SearchRoomResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SearchRoomResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SearchRoomResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SearchRoomResponse(::google::protobuf::internal::ConstantInitialized); + + inline SearchRoomResponse(const SearchRoomResponse& from) : SearchRoomResponse(nullptr, from) {} + inline SearchRoomResponse(SearchRoomResponse&& from) noexcept + : SearchRoomResponse(nullptr, ::std::move(from)) {} + inline SearchRoomResponse& operator=(const SearchRoomResponse& from) { + CopyFrom(from); + return *this; + } + inline SearchRoomResponse& operator=(SearchRoomResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SearchRoomResponse& default_instance() { + return *reinterpret_cast( + &_SearchRoomResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 21; + friend void swap(SearchRoomResponse& a, SearchRoomResponse& b) { a.Swap(&b); } + inline void Swap(SearchRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SearchRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SearchRoomResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SearchRoomResponse& from); + void MergeFrom(const SearchRoomResponse& from) { SearchRoomResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SearchRoomResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SearchRoomResponse"; } + + explicit SearchRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SearchRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SearchRoomResponse& from); + SearchRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SearchRoomResponse&& from) noexcept + : SearchRoomResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomsFieldNumber = 3, + kStartIndexFieldNumber = 1, + kTotalFieldNumber = 2, + }; + // repeated .np2_structs.RoomDataExternal rooms = 3; + int rooms_size() const; + private: + int _internal_rooms_size() const; + + public: + void clear_rooms() ; + ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL mutable_rooms(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL mutable_rooms(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& _internal_rooms() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL _internal_mutable_rooms(); + public: + const ::np2_structs::RoomDataExternal& rooms(int index) const; + ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL add_rooms(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& rooms() const; + // uint32 startIndex = 1; + void clear_startindex() ; + ::uint32_t startindex() const; + void set_startindex(::uint32_t value); + + private: + ::uint32_t _internal_startindex() const; + void _internal_set_startindex(::uint32_t value); + + public: + // uint32 total = 2; + void clear_total() ; + ::uint32_t total() const; + void set_total(::uint32_t value); + + private: + ::uint32_t _internal_total() const; + void _internal_set_total(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SearchRoomResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SearchRoomResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomDataExternal > rooms_; + ::uint32_t startindex_; + ::uint32_t total_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> SearchRoomResponse_class_data_; +// ------------------------------------------------------------------- + +class SearchRoomRequest final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.SearchRoomRequest) */ { + public: + inline SearchRoomRequest() : SearchRoomRequest(nullptr) {} + ~SearchRoomRequest() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SearchRoomRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SearchRoomRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SearchRoomRequest(::google::protobuf::internal::ConstantInitialized); + + inline SearchRoomRequest(const SearchRoomRequest& from) : SearchRoomRequest(nullptr, from) {} + inline SearchRoomRequest(SearchRoomRequest&& from) noexcept + : SearchRoomRequest(nullptr, ::std::move(from)) {} + inline SearchRoomRequest& operator=(const SearchRoomRequest& from) { + CopyFrom(from); + return *this; + } + inline SearchRoomRequest& operator=(SearchRoomRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const SearchRoomRequest& default_instance() { + return *reinterpret_cast( + &_SearchRoomRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 20; + friend void swap(SearchRoomRequest& a, SearchRoomRequest& b) { a.Swap(&b); } + inline void Swap(SearchRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SearchRoomRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SearchRoomRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SearchRoomRequest& from); + void MergeFrom(const SearchRoomRequest& from) { SearchRoomRequest::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SearchRoomRequest* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.SearchRoomRequest"; } + + explicit SearchRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + SearchRoomRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SearchRoomRequest& from); + SearchRoomRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SearchRoomRequest&& from) noexcept + : SearchRoomRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIntFilterFieldNumber = 8, + kBinFilterFieldNumber = 9, + kAttrIdFieldNumber = 10, + kOptionFieldNumber = 1, + kWorldIdFieldNumber = 2, + kLobbyIdFieldNumber = 3, + kRangeFilterStartIndexFieldNumber = 4, + kRangeFilterMaxFieldNumber = 5, + kFlagFilterFieldNumber = 6, + kFlagAttrFieldNumber = 7, + }; + // repeated .np2_structs.IntSearchFilter intFilter = 8; + int intfilter_size() const; + private: + int _internal_intfilter_size() const; + + public: + void clear_intfilter() ; + ::np2_structs::IntSearchFilter* PROTOBUF_NONNULL mutable_intfilter(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>* PROTOBUF_NONNULL mutable_intfilter(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>& _internal_intfilter() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>* PROTOBUF_NONNULL _internal_mutable_intfilter(); + public: + const ::np2_structs::IntSearchFilter& intfilter(int index) const; + ::np2_structs::IntSearchFilter* PROTOBUF_NONNULL add_intfilter(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>& intfilter() const; + // repeated .np2_structs.BinSearchFilter binFilter = 9; + int binfilter_size() const; + private: + int _internal_binfilter_size() const; + + public: + void clear_binfilter() ; + ::np2_structs::BinSearchFilter* PROTOBUF_NONNULL mutable_binfilter(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>* PROTOBUF_NONNULL mutable_binfilter(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>& _internal_binfilter() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>* PROTOBUF_NONNULL _internal_mutable_binfilter(); + public: + const ::np2_structs::BinSearchFilter& binfilter(int index) const; + ::np2_structs::BinSearchFilter* PROTOBUF_NONNULL add_binfilter(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>& binfilter() const; + // repeated .np2_structs.uint16 attrId = 10; + int attrid_size() const; + private: + int _internal_attrid_size() const; + + public: + void clear_attrid() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_attrid(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_attrid(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_attrid() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_attrid(); + public: + const ::np2_structs::uint16& attrid(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_attrid(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& attrid() const; + // int32 option = 1; + void clear_option() ; + ::int32_t option() const; + void set_option(::int32_t value); + + private: + ::int32_t _internal_option() const; + void _internal_set_option(::int32_t value); + + public: + // uint32 worldId = 2; + void clear_worldid() ; + ::uint32_t worldid() const; + void set_worldid(::uint32_t value); + + private: + ::uint32_t _internal_worldid() const; + void _internal_set_worldid(::uint32_t value); + + public: + // uint64 lobbyId = 3; + void clear_lobbyid() ; + ::uint64_t lobbyid() const; + void set_lobbyid(::uint64_t value); + + private: + ::uint64_t _internal_lobbyid() const; + void _internal_set_lobbyid(::uint64_t value); + + public: + // uint32 rangeFilter_startIndex = 4; + void clear_rangefilter_startindex() ; + ::uint32_t rangefilter_startindex() const; + void set_rangefilter_startindex(::uint32_t value); + + private: + ::uint32_t _internal_rangefilter_startindex() const; + void _internal_set_rangefilter_startindex(::uint32_t value); + + public: + // uint32 rangeFilter_max = 5; + void clear_rangefilter_max() ; + ::uint32_t rangefilter_max() const; + void set_rangefilter_max(::uint32_t value); + + private: + ::uint32_t _internal_rangefilter_max() const; + void _internal_set_rangefilter_max(::uint32_t value); + + public: + // uint32 flagFilter = 6; + void clear_flagfilter() ; + ::uint32_t flagfilter() const; + void set_flagfilter(::uint32_t value); + + private: + ::uint32_t _internal_flagfilter() const; + void _internal_set_flagfilter(::uint32_t value); + + public: + // uint32 flagAttr = 7; + void clear_flagattr() ; + ::uint32_t flagattr() const; + void set_flagattr(::uint32_t value); + + private: + ::uint32_t _internal_flagattr() const; + void _internal_set_flagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.SearchRoomRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<4, 10, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const SearchRoomRequest& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::IntSearchFilter > intfilter_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinSearchFilter > binfilter_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > attrid_; + ::int32_t option_; + ::uint32_t worldid_; + ::uint64_t lobbyid_; + ::uint32_t rangefilter_startindex_; + ::uint32_t rangefilter_max_; + ::uint32_t flagfilter_; + ::uint32_t flagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<30> SearchRoomRequest_class_data_; +// ------------------------------------------------------------------- + +class RoomMemberDataInternal final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomMemberDataInternal) */ { + public: + inline RoomMemberDataInternal() : RoomMemberDataInternal(nullptr) {} + ~RoomMemberDataInternal() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomMemberDataInternal* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomMemberDataInternal)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomMemberDataInternal(::google::protobuf::internal::ConstantInitialized); + + inline RoomMemberDataInternal(const RoomMemberDataInternal& from) : RoomMemberDataInternal(nullptr, from) {} + inline RoomMemberDataInternal(RoomMemberDataInternal&& from) noexcept + : RoomMemberDataInternal(nullptr, ::std::move(from)) {} + inline RoomMemberDataInternal& operator=(const RoomMemberDataInternal& from) { + CopyFrom(from); + return *this; + } + inline RoomMemberDataInternal& operator=(RoomMemberDataInternal&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomMemberDataInternal& default_instance() { + return *reinterpret_cast( + &_RoomMemberDataInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = 12; + friend void swap(RoomMemberDataInternal& a, RoomMemberDataInternal& b) { a.Swap(&b); } + inline void Swap(RoomMemberDataInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomMemberDataInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomMemberDataInternal* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomMemberDataInternal& from); + void MergeFrom(const RoomMemberDataInternal& from) { RoomMemberDataInternal::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomMemberDataInternal* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomMemberDataInternal"; } + + explicit RoomMemberDataInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomMemberDataInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomMemberDataInternal& from); + RoomMemberDataInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomMemberDataInternal&& from) noexcept + : RoomMemberDataInternal(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomMemberBinAttrInternalFieldNumber = 8, + kUserInfoFieldNumber = 1, + kTeamIdFieldNumber = 4, + kRoomGroupFieldNumber = 5, + kNatTypeFieldNumber = 6, + kJoinDateFieldNumber = 2, + kMemberIdFieldNumber = 3, + kFlagAttrFieldNumber = 7, + }; + // repeated .np2_structs.RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; + int roommemberbinattrinternal_size() const; + private: + int _internal_roommemberbinattrinternal_size() const; + + public: + void clear_roommemberbinattrinternal() ; + ::np2_structs::RoomMemberBinAttrInternal* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>* PROTOBUF_NONNULL mutable_roommemberbinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>& _internal_roommemberbinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>* PROTOBUF_NONNULL _internal_mutable_roommemberbinattrinternal(); + public: + const ::np2_structs::RoomMemberBinAttrInternal& roommemberbinattrinternal(int index) const; + ::np2_structs::RoomMemberBinAttrInternal* PROTOBUF_NONNULL add_roommemberbinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>& roommemberbinattrinternal() const; + // .np2_structs.UserInfo userInfo = 1; + bool has_userinfo() const; + void clear_userinfo() ; + const ::np2_structs::UserInfo& userinfo() const; + [[nodiscard]] ::np2_structs::UserInfo* PROTOBUF_NULLABLE release_userinfo(); + ::np2_structs::UserInfo* PROTOBUF_NONNULL mutable_userinfo(); + void set_allocated_userinfo(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_userinfo(::np2_structs::UserInfo* PROTOBUF_NULLABLE value); + ::np2_structs::UserInfo* PROTOBUF_NULLABLE unsafe_arena_release_userinfo(); + + private: + const ::np2_structs::UserInfo& _internal_userinfo() const; + ::np2_structs::UserInfo* PROTOBUF_NONNULL _internal_mutable_userinfo(); + + public: + // .np2_structs.uint8 teamId = 4; + bool has_teamid() const; + void clear_teamid() ; + const ::np2_structs::uint8& teamid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_teamid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_teamid(); + void set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_teamid(); + + private: + const ::np2_structs::uint8& _internal_teamid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_teamid(); + + public: + // .np2_structs.RoomGroup roomGroup = 5; + bool has_roomgroup() const; + void clear_roomgroup() ; + const ::np2_structs::RoomGroup& roomgroup() const; + [[nodiscard]] ::np2_structs::RoomGroup* PROTOBUF_NULLABLE release_roomgroup(); + ::np2_structs::RoomGroup* PROTOBUF_NONNULL mutable_roomgroup(); + void set_allocated_roomgroup(::np2_structs::RoomGroup* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_roomgroup(::np2_structs::RoomGroup* PROTOBUF_NULLABLE value); + ::np2_structs::RoomGroup* PROTOBUF_NULLABLE unsafe_arena_release_roomgroup(); + + private: + const ::np2_structs::RoomGroup& _internal_roomgroup() const; + ::np2_structs::RoomGroup* PROTOBUF_NONNULL _internal_mutable_roomgroup(); + + public: + // .np2_structs.uint8 natType = 6; + bool has_nattype() const; + void clear_nattype() ; + const ::np2_structs::uint8& nattype() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_nattype(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_nattype(); + void set_allocated_nattype(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_nattype(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_nattype(); + + private: + const ::np2_structs::uint8& _internal_nattype() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_nattype(); + + public: + // uint64 joinDate = 2; + void clear_joindate() ; + ::uint64_t joindate() const; + void set_joindate(::uint64_t value); + + private: + ::uint64_t _internal_joindate() const; + void _internal_set_joindate(::uint64_t value); + + public: + // uint32 memberId = 3; + void clear_memberid() ; + ::uint32_t memberid() const; + void set_memberid(::uint32_t value); + + private: + ::uint32_t _internal_memberid() const; + void _internal_set_memberid(::uint32_t value); + + public: + // uint32 flagAttr = 7; + void clear_flagattr() ; + ::uint32_t flagattr() const; + void set_flagattr(::uint32_t value); + + private: + ::uint32_t _internal_flagattr() const; + void _internal_set_flagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomMemberDataInternal) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 8, + 5, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomMemberDataInternal& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomMemberBinAttrInternal > roommemberbinattrinternal_; + ::np2_structs::UserInfo* PROTOBUF_NULLABLE userinfo_; + ::np2_structs::uint8* PROTOBUF_NULLABLE teamid_; + ::np2_structs::RoomGroup* PROTOBUF_NULLABLE roomgroup_; + ::np2_structs::uint8* PROTOBUF_NULLABLE nattype_; + ::uint64_t joindate_; + ::uint32_t memberid_; + ::uint32_t flagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<35> RoomMemberDataInternal_class_data_; +// ------------------------------------------------------------------- + +class MatchingSearchJoinRoomInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.MatchingSearchJoinRoomInfo) */ { + public: + inline MatchingSearchJoinRoomInfo() : MatchingSearchJoinRoomInfo(nullptr) {} + ~MatchingSearchJoinRoomInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(MatchingSearchJoinRoomInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(MatchingSearchJoinRoomInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR MatchingSearchJoinRoomInfo(::google::protobuf::internal::ConstantInitialized); + + inline MatchingSearchJoinRoomInfo(const MatchingSearchJoinRoomInfo& from) : MatchingSearchJoinRoomInfo(nullptr, from) {} + inline MatchingSearchJoinRoomInfo(MatchingSearchJoinRoomInfo&& from) noexcept + : MatchingSearchJoinRoomInfo(nullptr, ::std::move(from)) {} + inline MatchingSearchJoinRoomInfo& operator=(const MatchingSearchJoinRoomInfo& from) { + CopyFrom(from); + return *this; + } + inline MatchingSearchJoinRoomInfo& operator=(MatchingSearchJoinRoomInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const MatchingSearchJoinRoomInfo& default_instance() { + return *reinterpret_cast( + &_MatchingSearchJoinRoomInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 88; + friend void swap(MatchingSearchJoinRoomInfo& a, MatchingSearchJoinRoomInfo& b) { a.Swap(&b); } + inline void Swap(MatchingSearchJoinRoomInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatchingSearchJoinRoomInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatchingSearchJoinRoomInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const MatchingSearchJoinRoomInfo& from); + void MergeFrom(const MatchingSearchJoinRoomInfo& from) { MatchingSearchJoinRoomInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(MatchingSearchJoinRoomInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.MatchingSearchJoinRoomInfo"; } + + explicit MatchingSearchJoinRoomInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + MatchingSearchJoinRoomInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MatchingSearchJoinRoomInfo& from); + MatchingSearchJoinRoomInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MatchingSearchJoinRoomInfo&& from) noexcept + : MatchingSearchJoinRoomInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kAttrFieldNumber = 2, + kRoomFieldNumber = 1, + }; + // repeated .np2_structs.MatchingAttr attr = 2; + int attr_size() const; + private: + int _internal_attr_size() const; + + public: + void clear_attr() ; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL mutable_attr(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL mutable_attr(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& _internal_attr() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL _internal_mutable_attr(); + public: + const ::np2_structs::MatchingAttr& attr(int index) const; + ::np2_structs::MatchingAttr* PROTOBUF_NONNULL add_attr(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& attr() const; + // .np2_structs.MatchingRoomStatus room = 1; + bool has_room() const; + void clear_room() ; + const ::np2_structs::MatchingRoomStatus& room() const; + [[nodiscard]] ::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE release_room(); + ::np2_structs::MatchingRoomStatus* PROTOBUF_NONNULL mutable_room(); + void set_allocated_room(::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_room(::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE value); + ::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE unsafe_arena_release_room(); + + private: + const ::np2_structs::MatchingRoomStatus& _internal_room() const; + ::np2_structs::MatchingRoomStatus* PROTOBUF_NONNULL _internal_mutable_room(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.MatchingSearchJoinRoomInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const MatchingSearchJoinRoomInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::MatchingAttr > attr_; + ::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE room_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> MatchingSearchJoinRoomInfo_class_data_; +// ------------------------------------------------------------------- + +class GetRoomDataExternalListResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.GetRoomDataExternalListResponse) */ { + public: + inline GetRoomDataExternalListResponse() : GetRoomDataExternalListResponse(nullptr) {} + ~GetRoomDataExternalListResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GetRoomDataExternalListResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GetRoomDataExternalListResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GetRoomDataExternalListResponse(::google::protobuf::internal::ConstantInitialized); + + inline GetRoomDataExternalListResponse(const GetRoomDataExternalListResponse& from) : GetRoomDataExternalListResponse(nullptr, from) {} + inline GetRoomDataExternalListResponse(GetRoomDataExternalListResponse&& from) noexcept + : GetRoomDataExternalListResponse(nullptr, ::std::move(from)) {} + inline GetRoomDataExternalListResponse& operator=(const GetRoomDataExternalListResponse& from) { + CopyFrom(from); + return *this; + } + inline GetRoomDataExternalListResponse& operator=(GetRoomDataExternalListResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const GetRoomDataExternalListResponse& default_instance() { + return *reinterpret_cast( + &_GetRoomDataExternalListResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 28; + friend void swap(GetRoomDataExternalListResponse& a, GetRoomDataExternalListResponse& b) { a.Swap(&b); } + inline void Swap(GetRoomDataExternalListResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetRoomDataExternalListResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetRoomDataExternalListResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GetRoomDataExternalListResponse& from); + void MergeFrom(const GetRoomDataExternalListResponse& from) { GetRoomDataExternalListResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GetRoomDataExternalListResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.GetRoomDataExternalListResponse"; } + + explicit GetRoomDataExternalListResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + GetRoomDataExternalListResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const GetRoomDataExternalListResponse& from); + GetRoomDataExternalListResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, GetRoomDataExternalListResponse&& from) noexcept + : GetRoomDataExternalListResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomsFieldNumber = 1, + }; + // repeated .np2_structs.RoomDataExternal rooms = 1; + int rooms_size() const; + private: + int _internal_rooms_size() const; + + public: + void clear_rooms() ; + ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL mutable_rooms(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL mutable_rooms(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& _internal_rooms() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL _internal_mutable_rooms(); + public: + const ::np2_structs::RoomDataExternal& rooms(int index) const; + ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL add_rooms(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& rooms() const; + // @@protoc_insertion_point(class_scope:np2_structs.GetRoomDataExternalListResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 1, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const GetRoomDataExternalListResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomDataExternal > rooms_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<44> GetRoomDataExternalListResponse_class_data_; +// ------------------------------------------------------------------- + +class RoomMemberUpdateInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomMemberUpdateInfo) */ { + public: + inline RoomMemberUpdateInfo() : RoomMemberUpdateInfo(nullptr) {} + ~RoomMemberUpdateInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomMemberUpdateInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomMemberUpdateInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomMemberUpdateInfo(::google::protobuf::internal::ConstantInitialized); + + inline RoomMemberUpdateInfo(const RoomMemberUpdateInfo& from) : RoomMemberUpdateInfo(nullptr, from) {} + inline RoomMemberUpdateInfo(RoomMemberUpdateInfo&& from) noexcept + : RoomMemberUpdateInfo(nullptr, ::std::move(from)) {} + inline RoomMemberUpdateInfo& operator=(const RoomMemberUpdateInfo& from) { + CopyFrom(from); + return *this; + } + inline RoomMemberUpdateInfo& operator=(RoomMemberUpdateInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomMemberUpdateInfo& default_instance() { + return *reinterpret_cast( + &_RoomMemberUpdateInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 35; + friend void swap(RoomMemberUpdateInfo& a, RoomMemberUpdateInfo& b) { a.Swap(&b); } + inline void Swap(RoomMemberUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomMemberUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomMemberUpdateInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomMemberUpdateInfo& from); + void MergeFrom(const RoomMemberUpdateInfo& from) { RoomMemberUpdateInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomMemberUpdateInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomMemberUpdateInfo"; } + + explicit RoomMemberUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomMemberUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomMemberUpdateInfo& from); + RoomMemberUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomMemberUpdateInfo&& from) noexcept + : RoomMemberUpdateInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRoomMemberDataInternalFieldNumber = 1, + kEventCauseFieldNumber = 2, + kOptDataFieldNumber = 3, + }; + // .np2_structs.RoomMemberDataInternal roomMemberDataInternal = 1; + bool has_roommemberdatainternal() const; + void clear_roommemberdatainternal() ; + const ::np2_structs::RoomMemberDataInternal& roommemberdatainternal() const; + [[nodiscard]] ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE release_roommemberdatainternal(); + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL mutable_roommemberdatainternal(); + void set_allocated_roommemberdatainternal(::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_roommemberdatainternal(::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value); + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE unsafe_arena_release_roommemberdatainternal(); + + private: + const ::np2_structs::RoomMemberDataInternal& _internal_roommemberdatainternal() const; + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL _internal_mutable_roommemberdatainternal(); + + public: + // .np2_structs.uint8 eventCause = 2; + bool has_eventcause() const; + void clear_eventcause() ; + const ::np2_structs::uint8& eventcause() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_eventcause(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_eventcause(); + void set_allocated_eventcause(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_eventcause(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_eventcause(); + + private: + const ::np2_structs::uint8& _internal_eventcause() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_eventcause(); + + public: + // .np2_structs.PresenceOptionData optData = 3; + bool has_optdata() const; + void clear_optdata() ; + const ::np2_structs::PresenceOptionData& optdata() const; + [[nodiscard]] ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE release_optdata(); + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL mutable_optdata(); + void set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value); + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE unsafe_arena_release_optdata(); + + private: + const ::np2_structs::PresenceOptionData& _internal_optdata() const; + ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL _internal_mutable_optdata(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomMemberUpdateInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomMemberUpdateInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE roommemberdatainternal_; + ::np2_structs::uint8* PROTOBUF_NULLABLE eventcause_; + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE optdata_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<33> RoomMemberUpdateInfo_class_data_; +// ------------------------------------------------------------------- + +class RoomMemberDataInternalUpdateInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomMemberDataInternalUpdateInfo) */ { + public: + inline RoomMemberDataInternalUpdateInfo() : RoomMemberDataInternalUpdateInfo(nullptr) {} + ~RoomMemberDataInternalUpdateInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomMemberDataInternalUpdateInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomMemberDataInternalUpdateInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomMemberDataInternalUpdateInfo(::google::protobuf::internal::ConstantInitialized); + + inline RoomMemberDataInternalUpdateInfo(const RoomMemberDataInternalUpdateInfo& from) : RoomMemberDataInternalUpdateInfo(nullptr, from) {} + inline RoomMemberDataInternalUpdateInfo(RoomMemberDataInternalUpdateInfo&& from) noexcept + : RoomMemberDataInternalUpdateInfo(nullptr, ::std::move(from)) {} + inline RoomMemberDataInternalUpdateInfo& operator=(const RoomMemberDataInternalUpdateInfo& from) { + CopyFrom(from); + return *this; + } + inline RoomMemberDataInternalUpdateInfo& operator=(RoomMemberDataInternalUpdateInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomMemberDataInternalUpdateInfo& default_instance() { + return *reinterpret_cast( + &_RoomMemberDataInternalUpdateInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 39; + friend void swap(RoomMemberDataInternalUpdateInfo& a, RoomMemberDataInternalUpdateInfo& b) { a.Swap(&b); } + inline void Swap(RoomMemberDataInternalUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomMemberDataInternalUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomMemberDataInternalUpdateInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomMemberDataInternalUpdateInfo& from); + void MergeFrom(const RoomMemberDataInternalUpdateInfo& from) { RoomMemberDataInternalUpdateInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomMemberDataInternalUpdateInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomMemberDataInternalUpdateInfo"; } + + explicit RoomMemberDataInternalUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomMemberDataInternalUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomMemberDataInternalUpdateInfo& from); + RoomMemberDataInternalUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomMemberDataInternalUpdateInfo&& from) noexcept + : RoomMemberDataInternalUpdateInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNewRoomMemberBinAttrInternalFieldNumber = 4, + kNewRoomMemberDataInternalFieldNumber = 1, + kPrevTeamIdFieldNumber = 3, + kPrevFlagAttrFieldNumber = 2, + }; + // repeated .np2_structs.uint16 newRoomMemberBinAttrInternal = 4; + int newroommemberbinattrinternal_size() const; + private: + int _internal_newroommemberbinattrinternal_size() const; + + public: + void clear_newroommemberbinattrinternal() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_newroommemberbinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_newroommemberbinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_newroommemberbinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_newroommemberbinattrinternal(); + public: + const ::np2_structs::uint16& newroommemberbinattrinternal(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_newroommemberbinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& newroommemberbinattrinternal() const; + // .np2_structs.RoomMemberDataInternal newRoomMemberDataInternal = 1; + bool has_newroommemberdatainternal() const; + void clear_newroommemberdatainternal() ; + const ::np2_structs::RoomMemberDataInternal& newroommemberdatainternal() const; + [[nodiscard]] ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE release_newroommemberdatainternal(); + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL mutable_newroommemberdatainternal(); + void set_allocated_newroommemberdatainternal(::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_newroommemberdatainternal(::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value); + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE unsafe_arena_release_newroommemberdatainternal(); + + private: + const ::np2_structs::RoomMemberDataInternal& _internal_newroommemberdatainternal() const; + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL _internal_mutable_newroommemberdatainternal(); + + public: + // .np2_structs.uint8 prevTeamId = 3; + bool has_prevteamid() const; + void clear_prevteamid() ; + const ::np2_structs::uint8& prevteamid() const; + [[nodiscard]] ::np2_structs::uint8* PROTOBUF_NULLABLE release_prevteamid(); + ::np2_structs::uint8* PROTOBUF_NONNULL mutable_prevteamid(); + void set_allocated_prevteamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_prevteamid(::np2_structs::uint8* PROTOBUF_NULLABLE value); + ::np2_structs::uint8* PROTOBUF_NULLABLE unsafe_arena_release_prevteamid(); + + private: + const ::np2_structs::uint8& _internal_prevteamid() const; + ::np2_structs::uint8* PROTOBUF_NONNULL _internal_mutable_prevteamid(); + + public: + // uint32 prevFlagAttr = 2; + void clear_prevflagattr() ; + ::uint32_t prevflagattr() const; + void set_prevflagattr(::uint32_t value); + + private: + ::uint32_t _internal_prevflagattr() const; + void _internal_set_prevflagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomMemberDataInternalUpdateInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 4, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomMemberDataInternalUpdateInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > newroommemberbinattrinternal_; + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE newroommemberdatainternal_; + ::np2_structs::uint8* PROTOBUF_NULLABLE prevteamid_; + ::uint32_t prevflagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<45> RoomMemberDataInternalUpdateInfo_class_data_; +// ------------------------------------------------------------------- + +class RoomDataInternal final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomDataInternal) */ { + public: + inline RoomDataInternal() : RoomDataInternal(nullptr) {} + ~RoomDataInternal() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomDataInternal* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomDataInternal)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomDataInternal(::google::protobuf::internal::ConstantInitialized); + + inline RoomDataInternal(const RoomDataInternal& from) : RoomDataInternal(nullptr, from) {} + inline RoomDataInternal(RoomDataInternal&& from) noexcept + : RoomDataInternal(nullptr, ::std::move(from)) {} + inline RoomDataInternal& operator=(const RoomDataInternal& from) { + CopyFrom(from); + return *this; + } + inline RoomDataInternal& operator=(RoomDataInternal&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomDataInternal& default_instance() { + return *reinterpret_cast( + &_RoomDataInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = 14; + friend void swap(RoomDataInternal& a, RoomDataInternal& b) { a.Swap(&b); } + inline void Swap(RoomDataInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomDataInternal* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomDataInternal* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomDataInternal& from); + void MergeFrom(const RoomDataInternal& from) { RoomDataInternal::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomDataInternal* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomDataInternal"; } + + explicit RoomDataInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomDataInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomDataInternal& from); + RoomDataInternal( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomDataInternal&& from) noexcept + : RoomDataInternal(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMemberListFieldNumber = 7, + kRoomGroupFieldNumber = 9, + kRoomBinAttrInternalFieldNumber = 11, + kServerIdFieldNumber = 1, + kOwnerIdFieldNumber = 8, + kLobbyIdFieldNumber = 3, + kRoomIdFieldNumber = 4, + kWorldIdFieldNumber = 2, + kMaxSlotFieldNumber = 6, + kPasswordSlotMaskFieldNumber = 5, + kFlagAttrFieldNumber = 10, + }; + // repeated .np2_structs.RoomMemberDataInternal memberList = 7; + int memberlist_size() const; + private: + int _internal_memberlist_size() const; + + public: + void clear_memberlist() ; + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL mutable_memberlist(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>* PROTOBUF_NONNULL mutable_memberlist(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>& _internal_memberlist() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>* PROTOBUF_NONNULL _internal_mutable_memberlist(); + public: + const ::np2_structs::RoomMemberDataInternal& memberlist(int index) const; + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL add_memberlist(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>& memberlist() const; + // repeated .np2_structs.RoomGroup roomGroup = 9; + int roomgroup_size() const; + private: + int _internal_roomgroup_size() const; + + public: + void clear_roomgroup() ; + ::np2_structs::RoomGroup* PROTOBUF_NONNULL mutable_roomgroup(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL mutable_roomgroup(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& _internal_roomgroup() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL _internal_mutable_roomgroup(); + public: + const ::np2_structs::RoomGroup& roomgroup(int index) const; + ::np2_structs::RoomGroup* PROTOBUF_NONNULL add_roomgroup(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& roomgroup() const; + // repeated .np2_structs.BinAttrInternal roomBinAttrInternal = 11; + int roombinattrinternal_size() const; + private: + int _internal_roombinattrinternal_size() const; + + public: + void clear_roombinattrinternal() ; + ::np2_structs::BinAttrInternal* PROTOBUF_NONNULL mutable_roombinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>* PROTOBUF_NONNULL mutable_roombinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>& _internal_roombinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>* PROTOBUF_NONNULL _internal_mutable_roombinattrinternal(); + public: + const ::np2_structs::BinAttrInternal& roombinattrinternal(int index) const; + ::np2_structs::BinAttrInternal* PROTOBUF_NONNULL add_roombinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>& roombinattrinternal() const; + // .np2_structs.uint16 serverId = 1; + bool has_serverid() const; + void clear_serverid() ; + const ::np2_structs::uint16& serverid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_serverid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_serverid(); + void set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_serverid(); + + private: + const ::np2_structs::uint16& _internal_serverid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_serverid(); + + public: + // .np2_structs.uint16 ownerId = 8; + bool has_ownerid() const; + void clear_ownerid() ; + const ::np2_structs::uint16& ownerid() const; + [[nodiscard]] ::np2_structs::uint16* PROTOBUF_NULLABLE release_ownerid(); + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_ownerid(); + void set_allocated_ownerid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_ownerid(::np2_structs::uint16* PROTOBUF_NULLABLE value); + ::np2_structs::uint16* PROTOBUF_NULLABLE unsafe_arena_release_ownerid(); + + private: + const ::np2_structs::uint16& _internal_ownerid() const; + ::np2_structs::uint16* PROTOBUF_NONNULL _internal_mutable_ownerid(); + + public: + // uint64 lobbyId = 3; + void clear_lobbyid() ; + ::uint64_t lobbyid() const; + void set_lobbyid(::uint64_t value); + + private: + ::uint64_t _internal_lobbyid() const; + void _internal_set_lobbyid(::uint64_t value); + + public: + // uint64 roomId = 4; + void clear_roomid() ; + ::uint64_t roomid() const; + void set_roomid(::uint64_t value); + + private: + ::uint64_t _internal_roomid() const; + void _internal_set_roomid(::uint64_t value); + + public: + // uint32 worldId = 2; + void clear_worldid() ; + ::uint32_t worldid() const; + void set_worldid(::uint32_t value); + + private: + ::uint32_t _internal_worldid() const; + void _internal_set_worldid(::uint32_t value); + + public: + // uint32 maxSlot = 6; + void clear_maxslot() ; + ::uint32_t maxslot() const; + void set_maxslot(::uint32_t value); + + private: + ::uint32_t _internal_maxslot() const; + void _internal_set_maxslot(::uint32_t value); + + public: + // uint64 passwordSlotMask = 5; + void clear_passwordslotmask() ; + ::uint64_t passwordslotmask() const; + void set_passwordslotmask(::uint64_t value); + + private: + ::uint64_t _internal_passwordslotmask() const; + void _internal_set_passwordslotmask(::uint64_t value); + + public: + // uint32 flagAttr = 10; + void clear_flagattr() ; + ::uint32_t flagattr() const; + void set_flagattr(::uint32_t value); + + private: + ::uint32_t _internal_flagattr() const; + void _internal_set_flagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomDataInternal) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<4, 11, + 5, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomDataInternal& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomMemberDataInternal > memberlist_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::RoomGroup > roomgroup_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::BinAttrInternal > roombinattrinternal_; + ::np2_structs::uint16* PROTOBUF_NULLABLE serverid_; + ::np2_structs::uint16* PROTOBUF_NULLABLE ownerid_; + ::uint64_t lobbyid_; + ::uint64_t roomid_; + ::uint32_t worldid_; + ::uint32_t maxslot_; + ::uint64_t passwordslotmask_; + ::uint32_t flagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<29> RoomDataInternal_class_data_; +// ------------------------------------------------------------------- + +class RoomDataInternalUpdateInfo final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.RoomDataInternalUpdateInfo) */ { + public: + inline RoomDataInternalUpdateInfo() : RoomDataInternalUpdateInfo(nullptr) {} + ~RoomDataInternalUpdateInfo() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(RoomDataInternalUpdateInfo* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(RoomDataInternalUpdateInfo)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR RoomDataInternalUpdateInfo(::google::protobuf::internal::ConstantInitialized); + + inline RoomDataInternalUpdateInfo(const RoomDataInternalUpdateInfo& from) : RoomDataInternalUpdateInfo(nullptr, from) {} + inline RoomDataInternalUpdateInfo(RoomDataInternalUpdateInfo&& from) noexcept + : RoomDataInternalUpdateInfo(nullptr, ::std::move(from)) {} + inline RoomDataInternalUpdateInfo& operator=(const RoomDataInternalUpdateInfo& from) { + CopyFrom(from); + return *this; + } + inline RoomDataInternalUpdateInfo& operator=(RoomDataInternalUpdateInfo&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const RoomDataInternalUpdateInfo& default_instance() { + return *reinterpret_cast( + &_RoomDataInternalUpdateInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = 38; + friend void swap(RoomDataInternalUpdateInfo& a, RoomDataInternalUpdateInfo& b) { a.Swap(&b); } + inline void Swap(RoomDataInternalUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RoomDataInternalUpdateInfo* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RoomDataInternalUpdateInfo* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const RoomDataInternalUpdateInfo& from); + void MergeFrom(const RoomDataInternalUpdateInfo& from) { RoomDataInternalUpdateInfo::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(RoomDataInternalUpdateInfo* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.RoomDataInternalUpdateInfo"; } + + explicit RoomDataInternalUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + RoomDataInternalUpdateInfo(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const RoomDataInternalUpdateInfo& from); + RoomDataInternalUpdateInfo( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, RoomDataInternalUpdateInfo&& from) noexcept + : RoomDataInternalUpdateInfo(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNewRoomBinAttrInternalFieldNumber = 5, + kNewRoomGroupFieldNumber = 4, + kNewRoomDataInternalFieldNumber = 1, + kPrevRoomPasswordSlotMaskFieldNumber = 3, + kPrevFlagAttrFieldNumber = 2, + }; + // repeated .np2_structs.uint16 newRoomBinAttrInternal = 5; + int newroombinattrinternal_size() const; + private: + int _internal_newroombinattrinternal_size() const; + + public: + void clear_newroombinattrinternal() ; + ::np2_structs::uint16* PROTOBUF_NONNULL mutable_newroombinattrinternal(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL mutable_newroombinattrinternal(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& _internal_newroombinattrinternal() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL _internal_mutable_newroombinattrinternal(); + public: + const ::np2_structs::uint16& newroombinattrinternal(int index) const; + ::np2_structs::uint16* PROTOBUF_NONNULL add_newroombinattrinternal(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& newroombinattrinternal() const; + // bytes newRoomGroup = 4; + void clear_newroomgroup() ; + const ::std::string& newroomgroup() const; + template + void set_newroomgroup(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_newroomgroup(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_newroomgroup(); + void set_allocated_newroomgroup(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_newroomgroup() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_newroomgroup(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_newroomgroup(); + + public: + // .np2_structs.RoomDataInternal newRoomDataInternal = 1; + bool has_newroomdatainternal() const; + void clear_newroomdatainternal() ; + const ::np2_structs::RoomDataInternal& newroomdatainternal() const; + [[nodiscard]] ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE release_newroomdatainternal(); + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL mutable_newroomdatainternal(); + void set_allocated_newroomdatainternal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_newroomdatainternal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE unsafe_arena_release_newroomdatainternal(); + + private: + const ::np2_structs::RoomDataInternal& _internal_newroomdatainternal() const; + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL _internal_mutable_newroomdatainternal(); + + public: + // uint64 prevRoomPasswordSlotMask = 3; + void clear_prevroompasswordslotmask() ; + ::uint64_t prevroompasswordslotmask() const; + void set_prevroompasswordslotmask(::uint64_t value); + + private: + ::uint64_t _internal_prevroompasswordslotmask() const; + void _internal_set_prevroompasswordslotmask(::uint64_t value); + + public: + // uint32 prevFlagAttr = 2; + void clear_prevflagattr() ; + ::uint32_t prevflagattr() const; + void set_prevflagattr(::uint32_t value); + + private: + ::uint32_t _internal_prevflagattr() const; + void _internal_set_prevflagattr(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.RoomDataInternalUpdateInfo) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const RoomDataInternalUpdateInfo& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::uint16 > newroombinattrinternal_; + ::google::protobuf::internal::ArenaStringPtr newroomgroup_; + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE newroomdatainternal_; + ::uint64_t prevroompasswordslotmask_; + ::uint32_t prevflagattr_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> RoomDataInternalUpdateInfo_class_data_; +// ------------------------------------------------------------------- + +class NotificationUserJoinedRoom final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.NotificationUserJoinedRoom) */ { + public: + inline NotificationUserJoinedRoom() : NotificationUserJoinedRoom(nullptr) {} + ~NotificationUserJoinedRoom() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(NotificationUserJoinedRoom* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(NotificationUserJoinedRoom)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR NotificationUserJoinedRoom(::google::protobuf::internal::ConstantInitialized); + + inline NotificationUserJoinedRoom(const NotificationUserJoinedRoom& from) : NotificationUserJoinedRoom(nullptr, from) {} + inline NotificationUserJoinedRoom(NotificationUserJoinedRoom&& from) noexcept + : NotificationUserJoinedRoom(nullptr, ::std::move(from)) {} + inline NotificationUserJoinedRoom& operator=(const NotificationUserJoinedRoom& from) { + CopyFrom(from); + return *this; + } + inline NotificationUserJoinedRoom& operator=(NotificationUserJoinedRoom&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const NotificationUserJoinedRoom& default_instance() { + return *reinterpret_cast( + &_NotificationUserJoinedRoom_default_instance_); + } + static constexpr int kIndexInFileMessages = 36; + friend void swap(NotificationUserJoinedRoom& a, NotificationUserJoinedRoom& b) { a.Swap(&b); } + inline void Swap(NotificationUserJoinedRoom* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NotificationUserJoinedRoom* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NotificationUserJoinedRoom* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const NotificationUserJoinedRoom& from); + void MergeFrom(const NotificationUserJoinedRoom& from) { NotificationUserJoinedRoom::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(NotificationUserJoinedRoom* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.NotificationUserJoinedRoom"; } + + explicit NotificationUserJoinedRoom(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + NotificationUserJoinedRoom(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const NotificationUserJoinedRoom& from); + NotificationUserJoinedRoom( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, NotificationUserJoinedRoom&& from) noexcept + : NotificationUserJoinedRoom(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUpdateInfoFieldNumber = 2, + kSignalingFieldNumber = 3, + kRoomIdFieldNumber = 1, + }; + // .np2_structs.RoomMemberUpdateInfo update_info = 2; + bool has_update_info() const; + void clear_update_info() ; + const ::np2_structs::RoomMemberUpdateInfo& update_info() const; + [[nodiscard]] ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE release_update_info(); + ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NONNULL mutable_update_info(); + void set_allocated_update_info(::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_update_info(::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE value); + ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE unsafe_arena_release_update_info(); + + private: + const ::np2_structs::RoomMemberUpdateInfo& _internal_update_info() const; + ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NONNULL _internal_mutable_update_info(); + + public: + // .np2_structs.SignalingAddr signaling = 3; + bool has_signaling() const; + void clear_signaling() ; + const ::np2_structs::SignalingAddr& signaling() const; + [[nodiscard]] ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE release_signaling(); + ::np2_structs::SignalingAddr* PROTOBUF_NONNULL mutable_signaling(); + void set_allocated_signaling(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_signaling(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value); + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE unsafe_arena_release_signaling(); + + private: + const ::np2_structs::SignalingAddr& _internal_signaling() const; + ::np2_structs::SignalingAddr* PROTOBUF_NONNULL _internal_mutable_signaling(); + + public: + // uint64 room_id = 1; + void clear_room_id() ; + ::uint64_t room_id() const; + void set_room_id(::uint64_t value); + + private: + ::uint64_t _internal_room_id() const; + void _internal_set_room_id(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.NotificationUserJoinedRoom) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const NotificationUserJoinedRoom& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE update_info_; + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE signaling_; + ::uint64_t room_id_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<39> NotificationUserJoinedRoom_class_data_; +// ------------------------------------------------------------------- + +class JoinRoomResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.JoinRoomResponse) */ { + public: + inline JoinRoomResponse() : JoinRoomResponse(nullptr) {} + ~JoinRoomResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(JoinRoomResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(JoinRoomResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR JoinRoomResponse(::google::protobuf::internal::ConstantInitialized); + + inline JoinRoomResponse(const JoinRoomResponse& from) : JoinRoomResponse(nullptr, from) {} + inline JoinRoomResponse(JoinRoomResponse&& from) noexcept + : JoinRoomResponse(nullptr, ::std::move(from)) {} + inline JoinRoomResponse& operator=(const JoinRoomResponse& from) { + CopyFrom(from); + return *this; + } + inline JoinRoomResponse& operator=(JoinRoomResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const JoinRoomResponse& default_instance() { + return *reinterpret_cast( + &_JoinRoomResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 25; + friend void swap(JoinRoomResponse& a, JoinRoomResponse& b) { a.Swap(&b); } + inline void Swap(JoinRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JoinRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JoinRoomResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const JoinRoomResponse& from); + void MergeFrom(const JoinRoomResponse& from) { JoinRoomResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(JoinRoomResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.JoinRoomResponse"; } + + explicit JoinRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + JoinRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const JoinRoomResponse& from); + JoinRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, JoinRoomResponse&& from) noexcept + : JoinRoomResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kSignalingDataFieldNumber = 2, + kRoomDataFieldNumber = 1, + kOptParamFieldNumber = 3, + }; + // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; + int signaling_data_size() const; + private: + int _internal_signaling_data_size() const; + + public: + void clear_signaling_data() ; + ::np2_structs::Matching2SignalingInfo* PROTOBUF_NONNULL mutable_signaling_data(int index); + ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>* PROTOBUF_NONNULL mutable_signaling_data(); + + private: + const ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>& _internal_signaling_data() const; + ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>* PROTOBUF_NONNULL _internal_mutable_signaling_data(); + public: + const ::np2_structs::Matching2SignalingInfo& signaling_data(int index) const; + ::np2_structs::Matching2SignalingInfo* PROTOBUF_NONNULL add_signaling_data(); + const ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>& signaling_data() const; + // .np2_structs.RoomDataInternal room_data = 1; + bool has_room_data() const; + void clear_room_data() ; + const ::np2_structs::RoomDataInternal& room_data() const; + [[nodiscard]] ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE release_room_data(); + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL mutable_room_data(); + void set_allocated_room_data(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_room_data(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE unsafe_arena_release_room_data(); + + private: + const ::np2_structs::RoomDataInternal& _internal_room_data() const; + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL _internal_mutable_room_data(); + + public: + // .np2_structs.OptParam opt_param = 3; + bool has_opt_param() const; + void clear_opt_param() ; + const ::np2_structs::OptParam& opt_param() const; + [[nodiscard]] ::np2_structs::OptParam* PROTOBUF_NULLABLE release_opt_param(); + ::np2_structs::OptParam* PROTOBUF_NONNULL mutable_opt_param(); + void set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + ::np2_structs::OptParam* PROTOBUF_NULLABLE unsafe_arena_release_opt_param(); + + private: + const ::np2_structs::OptParam& _internal_opt_param() const; + ::np2_structs::OptParam* PROTOBUF_NONNULL _internal_mutable_opt_param(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.JoinRoomResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, + 3, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const JoinRoomResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::np2_structs::Matching2SignalingInfo > signaling_data_; + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE room_data_; + ::np2_structs::OptParam* PROTOBUF_NULLABLE opt_param_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<29> JoinRoomResponse_class_data_; +// ------------------------------------------------------------------- + +class CreateRoomResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.CreateRoomResponse) */ { + public: + inline CreateRoomResponse() : CreateRoomResponse(nullptr) {} + ~CreateRoomResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(CreateRoomResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(CreateRoomResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR CreateRoomResponse(::google::protobuf::internal::ConstantInitialized); + + inline CreateRoomResponse(const CreateRoomResponse& from) : CreateRoomResponse(nullptr, from) {} + inline CreateRoomResponse(CreateRoomResponse&& from) noexcept + : CreateRoomResponse(nullptr, ::std::move(from)) {} + inline CreateRoomResponse& operator=(const CreateRoomResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateRoomResponse& operator=(CreateRoomResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const CreateRoomResponse& default_instance() { + return *reinterpret_cast( + &_CreateRoomResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 23; + friend void swap(CreateRoomResponse& a, CreateRoomResponse& b) { a.Swap(&b); } + inline void Swap(CreateRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateRoomResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const CreateRoomResponse& from); + void MergeFrom(const CreateRoomResponse& from) { CreateRoomResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(CreateRoomResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.CreateRoomResponse"; } + + explicit CreateRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + CreateRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const CreateRoomResponse& from); + CreateRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, CreateRoomResponse&& from) noexcept + : CreateRoomResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kInternalFieldNumber = 1, + kOptParamFieldNumber = 2, + }; + // .np2_structs.RoomDataInternal internal = 1; + bool has_internal() const; + void clear_internal() ; + const ::np2_structs::RoomDataInternal& internal() const; + [[nodiscard]] ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE release_internal(); + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL mutable_internal(); + void set_allocated_internal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_internal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE unsafe_arena_release_internal(); + + private: + const ::np2_structs::RoomDataInternal& _internal_internal() const; + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL _internal_mutable_internal(); + + public: + // .np2_structs.OptParam opt_param = 2; + bool has_opt_param() const; + void clear_opt_param() ; + const ::np2_structs::OptParam& opt_param() const; + [[nodiscard]] ::np2_structs::OptParam* PROTOBUF_NULLABLE release_opt_param(); + ::np2_structs::OptParam* PROTOBUF_NONNULL mutable_opt_param(); + void set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + ::np2_structs::OptParam* PROTOBUF_NULLABLE unsafe_arena_release_opt_param(); + + private: + const ::np2_structs::OptParam& _internal_opt_param() const; + ::np2_structs::OptParam* PROTOBUF_NONNULL _internal_mutable_opt_param(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.CreateRoomResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const CreateRoomResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE internal_; + ::np2_structs::OptParam* PROTOBUF_NULLABLE opt_param_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> CreateRoomResponse_class_data_; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// uint8 + +// uint32 value = 1; +inline void uint8::clear_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t uint8::value() const { + // @@protoc_insertion_point(field_get:np2_structs.uint8.value) + return _internal_value(); +} +inline void uint8::set_value(::uint32_t value) { + _internal_set_value(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.uint8.value) +} +inline ::uint32_t uint8::_internal_value() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.value_; +} +inline void uint8::_internal_set_value(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_ = value; +} + +// ------------------------------------------------------------------- + +// uint16 + +// uint32 value = 1; +inline void uint16::clear_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t uint16::value() const { + // @@protoc_insertion_point(field_get:np2_structs.uint16.value) + return _internal_value(); +} +inline void uint16::set_value(::uint32_t value) { + _internal_set_value(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.uint16.value) +} +inline ::uint32_t uint16::_internal_value() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.value_; +} +inline void uint16::_internal_set_value(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_ = value; +} + +// ------------------------------------------------------------------- + +// SignalingAddr + +// bytes ip = 1; +inline void SignalingAddr::clear_ip() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ip_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& SignalingAddr::ip() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SignalingAddr.ip) + return _internal_ip(); +} +template +PROTOBUF_ALWAYS_INLINE void SignalingAddr::set_ip(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.ip_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SignalingAddr.ip) +} +inline ::std::string* PROTOBUF_NONNULL SignalingAddr::mutable_ip() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_ip(); + // @@protoc_insertion_point(field_mutable:np2_structs.SignalingAddr.ip) + return _s; +} +inline const ::std::string& SignalingAddr::_internal_ip() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ip_.Get(); +} +inline void SignalingAddr::_internal_set_ip(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ip_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SignalingAddr::_internal_mutable_ip() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.ip_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SignalingAddr::release_ip() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SignalingAddr.ip) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.ip_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.ip_.Set("", GetArena()); + } + return released; +} +inline void SignalingAddr::set_allocated_ip(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.ip_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.ip_.IsDefault()) { + _impl_.ip_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SignalingAddr.ip) +} + +// .np2_structs.uint16 port = 2; +inline bool SignalingAddr::has_port() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.port_ != nullptr); + return value; +} +inline void SignalingAddr::clear_port() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.port_ != nullptr) _impl_.port_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint16& SignalingAddr::_internal_port() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.port_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& SignalingAddr::port() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SignalingAddr.port) + return _internal_port(); +} +inline void SignalingAddr::unsafe_arena_set_allocated_port( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.port_); + } + _impl_.port_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.SignalingAddr.port) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE SignalingAddr::release_port() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* released = _impl_.port_; + _impl_.port_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE SignalingAddr::unsafe_arena_release_port() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SignalingAddr.port) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* temp = _impl_.port_; + _impl_.port_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SignalingAddr::_internal_mutable_port() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.port_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.port_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.port_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SignalingAddr::mutable_port() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* _msg = _internal_mutable_port(); + // @@protoc_insertion_point(field_mutable:np2_structs.SignalingAddr.port) + return _msg; +} +inline void SignalingAddr::set_allocated_port(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.port_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.port_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.SignalingAddr.port) +} + +// ------------------------------------------------------------------- + +// MatchingSignalingInfo + +// string npid = 1; +inline void MatchingSignalingInfo::clear_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& MatchingSignalingInfo::npid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSignalingInfo.npid) + return _internal_npid(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingSignalingInfo::set_npid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.npid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingSignalingInfo.npid) +} +inline ::std::string* PROTOBUF_NONNULL MatchingSignalingInfo::mutable_npid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_npid(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingSignalingInfo.npid) + return _s; +} +inline const ::std::string& MatchingSignalingInfo::_internal_npid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npid_.Get(); +} +inline void MatchingSignalingInfo::_internal_set_npid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingSignalingInfo::_internal_mutable_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.npid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingSignalingInfo::release_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingSignalingInfo.npid) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.npid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.npid_.Set("", GetArena()); + } + return released; +} +inline void MatchingSignalingInfo::set_allocated_npid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.npid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.npid_.IsDefault()) { + _impl_.npid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingSignalingInfo.npid) +} + +// .np2_structs.SignalingAddr addr = 2; +inline bool MatchingSignalingInfo::has_addr() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.addr_ != nullptr); + return value; +} +inline void MatchingSignalingInfo::clear_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.addr_ != nullptr) _impl_.addr_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::SignalingAddr& MatchingSignalingInfo::_internal_addr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::SignalingAddr* p = _impl_.addr_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_SignalingAddr_default_instance_); +} +inline const ::np2_structs::SignalingAddr& MatchingSignalingInfo::addr() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSignalingInfo.addr) + return _internal_addr(); +} +inline void MatchingSignalingInfo::unsafe_arena_set_allocated_addr( + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.addr_); + } + _impl_.addr_ = reinterpret_cast<::np2_structs::SignalingAddr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.MatchingSignalingInfo.addr) +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE MatchingSignalingInfo::release_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* released = _impl_.addr_; + _impl_.addr_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE MatchingSignalingInfo::unsafe_arena_release_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingSignalingInfo.addr) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* temp = _impl_.addr_; + _impl_.addr_ = nullptr; + return temp; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NONNULL MatchingSignalingInfo::_internal_mutable_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.addr_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::SignalingAddr>(GetArena()); + _impl_.addr_ = reinterpret_cast<::np2_structs::SignalingAddr*>(p); + } + return _impl_.addr_; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NONNULL MatchingSignalingInfo::mutable_addr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* _msg = _internal_mutable_addr(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingSignalingInfo.addr) + return _msg; +} +inline void MatchingSignalingInfo::set_allocated_addr(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.addr_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.addr_ = reinterpret_cast<::np2_structs::SignalingAddr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingSignalingInfo.addr) +} + +// ------------------------------------------------------------------- + +// Matching2SignalingInfo + +// .np2_structs.uint16 member_id = 1; +inline bool Matching2SignalingInfo::has_member_id() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.member_id_ != nullptr); + return value; +} +inline void Matching2SignalingInfo::clear_member_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.member_id_ != nullptr) _impl_.member_id_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint16& Matching2SignalingInfo::_internal_member_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.member_id_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& Matching2SignalingInfo::member_id() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.Matching2SignalingInfo.member_id) + return _internal_member_id(); +} +inline void Matching2SignalingInfo::unsafe_arena_set_allocated_member_id( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.member_id_); + } + _impl_.member_id_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.Matching2SignalingInfo.member_id) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE Matching2SignalingInfo::release_member_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* released = _impl_.member_id_; + _impl_.member_id_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE Matching2SignalingInfo::unsafe_arena_release_member_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.Matching2SignalingInfo.member_id) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* temp = _impl_.member_id_; + _impl_.member_id_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL Matching2SignalingInfo::_internal_mutable_member_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.member_id_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.member_id_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.member_id_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL Matching2SignalingInfo::mutable_member_id() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* _msg = _internal_mutable_member_id(); + // @@protoc_insertion_point(field_mutable:np2_structs.Matching2SignalingInfo.member_id) + return _msg; +} +inline void Matching2SignalingInfo::set_allocated_member_id(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.member_id_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.member_id_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.Matching2SignalingInfo.member_id) +} + +// .np2_structs.SignalingAddr addr = 2; +inline bool Matching2SignalingInfo::has_addr() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.addr_ != nullptr); + return value; +} +inline void Matching2SignalingInfo::clear_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.addr_ != nullptr) _impl_.addr_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::SignalingAddr& Matching2SignalingInfo::_internal_addr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::SignalingAddr* p = _impl_.addr_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_SignalingAddr_default_instance_); +} +inline const ::np2_structs::SignalingAddr& Matching2SignalingInfo::addr() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.Matching2SignalingInfo.addr) + return _internal_addr(); +} +inline void Matching2SignalingInfo::unsafe_arena_set_allocated_addr( + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.addr_); + } + _impl_.addr_ = reinterpret_cast<::np2_structs::SignalingAddr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.Matching2SignalingInfo.addr) +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE Matching2SignalingInfo::release_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* released = _impl_.addr_; + _impl_.addr_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE Matching2SignalingInfo::unsafe_arena_release_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.Matching2SignalingInfo.addr) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* temp = _impl_.addr_; + _impl_.addr_ = nullptr; + return temp; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NONNULL Matching2SignalingInfo::_internal_mutable_addr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.addr_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::SignalingAddr>(GetArena()); + _impl_.addr_ = reinterpret_cast<::np2_structs::SignalingAddr*>(p); + } + return _impl_.addr_; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NONNULL Matching2SignalingInfo::mutable_addr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* _msg = _internal_mutable_addr(); + // @@protoc_insertion_point(field_mutable:np2_structs.Matching2SignalingInfo.addr) + return _msg; +} +inline void Matching2SignalingInfo::set_allocated_addr(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.addr_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.addr_ = reinterpret_cast<::np2_structs::SignalingAddr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.Matching2SignalingInfo.addr) +} + +// ------------------------------------------------------------------- + +// BinAttr + +// .np2_structs.uint16 id = 1; +inline bool BinAttr::has_id() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.id_ != nullptr); + return value; +} +inline void BinAttr::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.id_ != nullptr) _impl_.id_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint16& BinAttr::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.id_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& BinAttr::id() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.BinAttr.id) + return _internal_id(); +} +inline void BinAttr::unsafe_arena_set_allocated_id( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.id_); + } + _impl_.id_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.BinAttr.id) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE BinAttr::release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* released = _impl_.id_; + _impl_.id_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE BinAttr::unsafe_arena_release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.BinAttr.id) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* temp = _impl_.id_; + _impl_.id_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL BinAttr::_internal_mutable_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.id_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.id_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.id_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL BinAttr::mutable_id() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* _msg = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:np2_structs.BinAttr.id) + return _msg; +} +inline void BinAttr::set_allocated_id(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.id_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.id_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.BinAttr.id) +} + +// bytes data = 2; +inline void BinAttr::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& BinAttr::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.BinAttr.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void BinAttr::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.BinAttr.data) +} +inline ::std::string* PROTOBUF_NONNULL BinAttr::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.BinAttr.data) + return _s; +} +inline const ::std::string& BinAttr::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void BinAttr::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL BinAttr::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE BinAttr::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.BinAttr.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void BinAttr::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.BinAttr.data) +} + +// ------------------------------------------------------------------- + +// IntAttr + +// .np2_structs.uint16 id = 1; +inline bool IntAttr::has_id() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.id_ != nullptr); + return value; +} +inline void IntAttr::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.id_ != nullptr) _impl_.id_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint16& IntAttr::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.id_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& IntAttr::id() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.IntAttr.id) + return _internal_id(); +} +inline void IntAttr::unsafe_arena_set_allocated_id( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.id_); + } + _impl_.id_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.IntAttr.id) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE IntAttr::release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* released = _impl_.id_; + _impl_.id_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE IntAttr::unsafe_arena_release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.IntAttr.id) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* temp = _impl_.id_; + _impl_.id_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL IntAttr::_internal_mutable_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.id_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.id_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.id_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL IntAttr::mutable_id() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* _msg = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:np2_structs.IntAttr.id) + return _msg; +} +inline void IntAttr::set_allocated_id(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.id_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.id_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.IntAttr.id) +} + +// uint32 num = 2; +inline void IntAttr::clear_num() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.num_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t IntAttr::num() const { + // @@protoc_insertion_point(field_get:np2_structs.IntAttr.num) + return _internal_num(); +} +inline void IntAttr::set_num(::uint32_t value) { + _internal_set_num(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.IntAttr.num) +} +inline ::uint32_t IntAttr::_internal_num() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.num_; +} +inline void IntAttr::_internal_set_num(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.num_ = value; +} + +// ------------------------------------------------------------------- + +// RoomMemberBinAttrInternal + +// uint64 updateDate = 1; +inline void RoomMemberBinAttrInternal::clear_updatedate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatedate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint64_t RoomMemberBinAttrInternal::updatedate() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberBinAttrInternal.updateDate) + return _internal_updatedate(); +} +inline void RoomMemberBinAttrInternal::set_updatedate(::uint64_t value) { + _internal_set_updatedate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMemberBinAttrInternal.updateDate) +} +inline ::uint64_t RoomMemberBinAttrInternal::_internal_updatedate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.updatedate_; +} +inline void RoomMemberBinAttrInternal::_internal_set_updatedate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatedate_ = value; +} + +// .np2_structs.BinAttr data = 2; +inline bool RoomMemberBinAttrInternal::has_data() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.data_ != nullptr); + return value; +} +inline void RoomMemberBinAttrInternal::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.data_ != nullptr) _impl_.data_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::BinAttr& RoomMemberBinAttrInternal::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::BinAttr* p = _impl_.data_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_BinAttr_default_instance_); +} +inline const ::np2_structs::BinAttr& RoomMemberBinAttrInternal::data() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberBinAttrInternal.data) + return _internal_data(); +} +inline void RoomMemberBinAttrInternal::unsafe_arena_set_allocated_data( + ::np2_structs::BinAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.data_); + } + _impl_.data_ = reinterpret_cast<::np2_structs::BinAttr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberBinAttrInternal.data) +} +inline ::np2_structs::BinAttr* PROTOBUF_NULLABLE RoomMemberBinAttrInternal::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::BinAttr* released = _impl_.data_; + _impl_.data_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::BinAttr* PROTOBUF_NULLABLE RoomMemberBinAttrInternal::unsafe_arena_release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberBinAttrInternal.data) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::BinAttr* temp = _impl_.data_; + _impl_.data_ = nullptr; + return temp; +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL RoomMemberBinAttrInternal::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.data_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::BinAttr>(GetArena()); + _impl_.data_ = reinterpret_cast<::np2_structs::BinAttr*>(p); + } + return _impl_.data_; +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL RoomMemberBinAttrInternal::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::BinAttr* _msg = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberBinAttrInternal.data) + return _msg; +} +inline void RoomMemberBinAttrInternal::set_allocated_data(::np2_structs::BinAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.data_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.data_ = reinterpret_cast<::np2_structs::BinAttr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberBinAttrInternal.data) +} + +// ------------------------------------------------------------------- + +// BinAttrInternal + +// uint64 updateDate = 1; +inline void BinAttrInternal::clear_updatedate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatedate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t BinAttrInternal::updatedate() const { + // @@protoc_insertion_point(field_get:np2_structs.BinAttrInternal.updateDate) + return _internal_updatedate(); +} +inline void BinAttrInternal::set_updatedate(::uint64_t value) { + _internal_set_updatedate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.BinAttrInternal.updateDate) +} +inline ::uint64_t BinAttrInternal::_internal_updatedate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.updatedate_; +} +inline void BinAttrInternal::_internal_set_updatedate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatedate_ = value; +} + +// .np2_structs.uint16 updateMemberId = 2; +inline bool BinAttrInternal::has_updatememberid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.updatememberid_ != nullptr); + return value; +} +inline void BinAttrInternal::clear_updatememberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.updatememberid_ != nullptr) _impl_.updatememberid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint16& BinAttrInternal::_internal_updatememberid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.updatememberid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& BinAttrInternal::updatememberid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.BinAttrInternal.updateMemberId) + return _internal_updatememberid(); +} +inline void BinAttrInternal::unsafe_arena_set_allocated_updatememberid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.updatememberid_); + } + _impl_.updatememberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.BinAttrInternal.updateMemberId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE BinAttrInternal::release_updatememberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* released = _impl_.updatememberid_; + _impl_.updatememberid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE BinAttrInternal::unsafe_arena_release_updatememberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.BinAttrInternal.updateMemberId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* temp = _impl_.updatememberid_; + _impl_.updatememberid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL BinAttrInternal::_internal_mutable_updatememberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.updatememberid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.updatememberid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.updatememberid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL BinAttrInternal::mutable_updatememberid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* _msg = _internal_mutable_updatememberid(); + // @@protoc_insertion_point(field_mutable:np2_structs.BinAttrInternal.updateMemberId) + return _msg; +} +inline void BinAttrInternal::set_allocated_updatememberid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.updatememberid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.updatememberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.BinAttrInternal.updateMemberId) +} + +// .np2_structs.BinAttr data = 3; +inline bool BinAttrInternal::has_data() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.data_ != nullptr); + return value; +} +inline void BinAttrInternal::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.data_ != nullptr) _impl_.data_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::BinAttr& BinAttrInternal::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::BinAttr* p = _impl_.data_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_BinAttr_default_instance_); +} +inline const ::np2_structs::BinAttr& BinAttrInternal::data() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.BinAttrInternal.data) + return _internal_data(); +} +inline void BinAttrInternal::unsafe_arena_set_allocated_data( + ::np2_structs::BinAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.data_); + } + _impl_.data_ = reinterpret_cast<::np2_structs::BinAttr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.BinAttrInternal.data) +} +inline ::np2_structs::BinAttr* PROTOBUF_NULLABLE BinAttrInternal::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::BinAttr* released = _impl_.data_; + _impl_.data_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::BinAttr* PROTOBUF_NULLABLE BinAttrInternal::unsafe_arena_release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.BinAttrInternal.data) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::BinAttr* temp = _impl_.data_; + _impl_.data_ = nullptr; + return temp; +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL BinAttrInternal::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.data_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::BinAttr>(GetArena()); + _impl_.data_ = reinterpret_cast<::np2_structs::BinAttr*>(p); + } + return _impl_.data_; +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL BinAttrInternal::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::BinAttr* _msg = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.BinAttrInternal.data) + return _msg; +} +inline void BinAttrInternal::set_allocated_data(::np2_structs::BinAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.data_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.data_ = reinterpret_cast<::np2_structs::BinAttr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.BinAttrInternal.data) +} + +// ------------------------------------------------------------------- + +// OptParam + +// .np2_structs.uint8 type = 1; +inline bool OptParam::has_type() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.type_ != nullptr); + return value; +} +inline void OptParam::clear_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.type_ != nullptr) _impl_.type_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint8& OptParam::_internal_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.type_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& OptParam::type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.OptParam.type) + return _internal_type(); +} +inline void OptParam::unsafe_arena_set_allocated_type( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.type_); + } + _impl_.type_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.OptParam.type) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE OptParam::release_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* released = _impl_.type_; + _impl_.type_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE OptParam::unsafe_arena_release_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.OptParam.type) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* temp = _impl_.type_; + _impl_.type_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL OptParam::_internal_mutable_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.type_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.type_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.type_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL OptParam::mutable_type() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* _msg = _internal_mutable_type(); + // @@protoc_insertion_point(field_mutable:np2_structs.OptParam.type) + return _msg; +} +inline void OptParam::set_allocated_type(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.type_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.type_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.OptParam.type) +} + +// .np2_structs.uint8 flag = 2; +inline bool OptParam::has_flag() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.flag_ != nullptr); + return value; +} +inline void OptParam::clear_flag() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.flag_ != nullptr) _impl_.flag_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint8& OptParam::_internal_flag() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.flag_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& OptParam::flag() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.OptParam.flag) + return _internal_flag(); +} +inline void OptParam::unsafe_arena_set_allocated_flag( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.flag_); + } + _impl_.flag_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.OptParam.flag) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE OptParam::release_flag() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* released = _impl_.flag_; + _impl_.flag_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE OptParam::unsafe_arena_release_flag() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.OptParam.flag) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* temp = _impl_.flag_; + _impl_.flag_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL OptParam::_internal_mutable_flag() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.flag_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.flag_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.flag_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL OptParam::mutable_flag() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* _msg = _internal_mutable_flag(); + // @@protoc_insertion_point(field_mutable:np2_structs.OptParam.flag) + return _msg; +} +inline void OptParam::set_allocated_flag(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.flag_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.flag_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.OptParam.flag) +} + +// .np2_structs.uint16 hubMemberId = 3; +inline bool OptParam::has_hubmemberid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.hubmemberid_ != nullptr); + return value; +} +inline void OptParam::clear_hubmemberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.hubmemberid_ != nullptr) _impl_.hubmemberid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::uint16& OptParam::_internal_hubmemberid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.hubmemberid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& OptParam::hubmemberid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.OptParam.hubMemberId) + return _internal_hubmemberid(); +} +inline void OptParam::unsafe_arena_set_allocated_hubmemberid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hubmemberid_); + } + _impl_.hubmemberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.OptParam.hubMemberId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE OptParam::release_hubmemberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint16* released = _impl_.hubmemberid_; + _impl_.hubmemberid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE OptParam::unsafe_arena_release_hubmemberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.OptParam.hubMemberId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint16* temp = _impl_.hubmemberid_; + _impl_.hubmemberid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL OptParam::_internal_mutable_hubmemberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.hubmemberid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.hubmemberid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.hubmemberid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL OptParam::mutable_hubmemberid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint16* _msg = _internal_mutable_hubmemberid(); + // @@protoc_insertion_point(field_mutable:np2_structs.OptParam.hubMemberId) + return _msg; +} +inline void OptParam::set_allocated_hubmemberid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hubmemberid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.hubmemberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.OptParam.hubMemberId) +} + +// ------------------------------------------------------------------- + +// GroupConfig + +// uint32 slotNum = 1; +inline void GroupConfig::clear_slotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotnum_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t GroupConfig::slotnum() const { + // @@protoc_insertion_point(field_get:np2_structs.GroupConfig.slotNum) + return _internal_slotnum(); +} +inline void GroupConfig::set_slotnum(::uint32_t value) { + _internal_set_slotnum(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GroupConfig.slotNum) +} +inline ::uint32_t GroupConfig::_internal_slotnum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotnum_; +} +inline void GroupConfig::_internal_set_slotnum(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotnum_ = value; +} + +// bytes label = 2; +inline void GroupConfig::clear_label() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.label_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& GroupConfig::label() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GroupConfig.label) + return _internal_label(); +} +template +PROTOBUF_ALWAYS_INLINE void GroupConfig::set_label(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.label_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.GroupConfig.label) +} +inline ::std::string* PROTOBUF_NONNULL GroupConfig::mutable_label() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_label(); + // @@protoc_insertion_point(field_mutable:np2_structs.GroupConfig.label) + return _s; +} +inline const ::std::string& GroupConfig::_internal_label() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.label_.Get(); +} +inline void GroupConfig::_internal_set_label(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.label_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL GroupConfig::_internal_mutable_label() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.label_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE GroupConfig::release_label() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.GroupConfig.label) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.label_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.label_.Set("", GetArena()); + } + return released; +} +inline void GroupConfig::set_allocated_label(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.label_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.label_.IsDefault()) { + _impl_.label_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.GroupConfig.label) +} + +// bool withPassword = 3; +inline void GroupConfig::clear_withpassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withpassword_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline bool GroupConfig::withpassword() const { + // @@protoc_insertion_point(field_get:np2_structs.GroupConfig.withPassword) + return _internal_withpassword(); +} +inline void GroupConfig::set_withpassword(bool value) { + _internal_set_withpassword(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GroupConfig.withPassword) +} +inline bool GroupConfig::_internal_withpassword() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withpassword_; +} +inline void GroupConfig::_internal_set_withpassword(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withpassword_ = value; +} + +// ------------------------------------------------------------------- + +// UserInfo + +// string npId = 1; +inline void UserInfo::clear_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& UserInfo::npid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.UserInfo.npId) + return _internal_npid(); +} +template +PROTOBUF_ALWAYS_INLINE void UserInfo::set_npid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.npid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.UserInfo.npId) +} +inline ::std::string* PROTOBUF_NONNULL UserInfo::mutable_npid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_npid(); + // @@protoc_insertion_point(field_mutable:np2_structs.UserInfo.npId) + return _s; +} +inline const ::std::string& UserInfo::_internal_npid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npid_.Get(); +} +inline void UserInfo::_internal_set_npid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL UserInfo::_internal_mutable_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.npid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE UserInfo::release_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.UserInfo.npId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.npid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.npid_.Set("", GetArena()); + } + return released; +} +inline void UserInfo::set_allocated_npid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.npid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.npid_.IsDefault()) { + _impl_.npid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.UserInfo.npId) +} + +// string onlineName = 2; +inline void UserInfo::clear_onlinename() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.onlinename_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& UserInfo::onlinename() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.UserInfo.onlineName) + return _internal_onlinename(); +} +template +PROTOBUF_ALWAYS_INLINE void UserInfo::set_onlinename(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.onlinename_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.UserInfo.onlineName) +} +inline ::std::string* PROTOBUF_NONNULL UserInfo::mutable_onlinename() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_onlinename(); + // @@protoc_insertion_point(field_mutable:np2_structs.UserInfo.onlineName) + return _s; +} +inline const ::std::string& UserInfo::_internal_onlinename() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.onlinename_.Get(); +} +inline void UserInfo::_internal_set_onlinename(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.onlinename_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL UserInfo::_internal_mutable_onlinename() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.onlinename_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE UserInfo::release_onlinename() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.UserInfo.onlineName) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.onlinename_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.onlinename_.Set("", GetArena()); + } + return released; +} +inline void UserInfo::set_allocated_onlinename(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.onlinename_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.onlinename_.IsDefault()) { + _impl_.onlinename_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.UserInfo.onlineName) +} + +// string avatarUrl = 3; +inline void UserInfo::clear_avatarurl() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.avatarurl_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& UserInfo::avatarurl() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.UserInfo.avatarUrl) + return _internal_avatarurl(); +} +template +PROTOBUF_ALWAYS_INLINE void UserInfo::set_avatarurl(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.avatarurl_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.UserInfo.avatarUrl) +} +inline ::std::string* PROTOBUF_NONNULL UserInfo::mutable_avatarurl() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_avatarurl(); + // @@protoc_insertion_point(field_mutable:np2_structs.UserInfo.avatarUrl) + return _s; +} +inline const ::std::string& UserInfo::_internal_avatarurl() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.avatarurl_.Get(); +} +inline void UserInfo::_internal_set_avatarurl(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.avatarurl_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL UserInfo::_internal_mutable_avatarurl() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.avatarurl_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE UserInfo::release_avatarurl() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.UserInfo.avatarUrl) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.avatarurl_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.avatarurl_.Set("", GetArena()); + } + return released; +} +inline void UserInfo::set_allocated_avatarurl(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.avatarurl_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.avatarurl_.IsDefault()) { + _impl_.avatarurl_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.UserInfo.avatarUrl) +} + +// ------------------------------------------------------------------- + +// RoomMemberDataInternal + +// .np2_structs.UserInfo userInfo = 1; +inline bool RoomMemberDataInternal::has_userinfo() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.userinfo_ != nullptr); + return value; +} +inline void RoomMemberDataInternal::clear_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.userinfo_ != nullptr) _impl_.userinfo_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::UserInfo& RoomMemberDataInternal::_internal_userinfo() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::UserInfo* p = _impl_.userinfo_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_UserInfo_default_instance_); +} +inline const ::np2_structs::UserInfo& RoomMemberDataInternal::userinfo() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.userInfo) + return _internal_userinfo(); +} +inline void RoomMemberDataInternal::unsafe_arena_set_allocated_userinfo( + ::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.userinfo_); + } + _impl_.userinfo_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataInternal.userInfo) +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomMemberDataInternal::release_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::UserInfo* released = _impl_.userinfo_; + _impl_.userinfo_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomMemberDataInternal::unsafe_arena_release_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataInternal.userInfo) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::UserInfo* temp = _impl_.userinfo_; + _impl_.userinfo_ = nullptr; + return temp; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomMemberDataInternal::_internal_mutable_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.userinfo_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::UserInfo>(GetArena()); + _impl_.userinfo_ = reinterpret_cast<::np2_structs::UserInfo*>(p); + } + return _impl_.userinfo_; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomMemberDataInternal::mutable_userinfo() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::UserInfo* _msg = _internal_mutable_userinfo(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternal.userInfo) + return _msg; +} +inline void RoomMemberDataInternal::set_allocated_userinfo(::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.userinfo_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.userinfo_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataInternal.userInfo) +} + +// uint64 joinDate = 2; +inline void RoomMemberDataInternal::clear_joindate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joindate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::uint64_t RoomMemberDataInternal::joindate() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.joinDate) + return _internal_joindate(); +} +inline void RoomMemberDataInternal::set_joindate(::uint64_t value) { + _internal_set_joindate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMemberDataInternal.joinDate) +} +inline ::uint64_t RoomMemberDataInternal::_internal_joindate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.joindate_; +} +inline void RoomMemberDataInternal::_internal_set_joindate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joindate_ = value; +} + +// uint32 memberId = 3; +inline void RoomMemberDataInternal::clear_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.memberid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::uint32_t RoomMemberDataInternal::memberid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.memberId) + return _internal_memberid(); +} +inline void RoomMemberDataInternal::set_memberid(::uint32_t value) { + _internal_set_memberid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMemberDataInternal.memberId) +} +inline ::uint32_t RoomMemberDataInternal::_internal_memberid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.memberid_; +} +inline void RoomMemberDataInternal::_internal_set_memberid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.memberid_ = value; +} + +// .np2_structs.uint8 teamId = 4; +inline bool RoomMemberDataInternal::has_teamid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.teamid_ != nullptr); + return value; +} +inline void RoomMemberDataInternal::clear_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ != nullptr) _impl_.teamid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::uint8& RoomMemberDataInternal::_internal_teamid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.teamid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomMemberDataInternal::teamid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.teamId) + return _internal_teamid(); +} +inline void RoomMemberDataInternal::unsafe_arena_set_allocated_teamid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataInternal.teamId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataInternal::release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* released = _impl_.teamid_; + _impl_.teamid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataInternal::unsafe_arena_release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataInternal.teamId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* temp = _impl_.teamid_; + _impl_.teamid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataInternal::_internal_mutable_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.teamid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataInternal::mutable_teamid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* _msg = _internal_mutable_teamid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternal.teamId) + return _msg; +} +inline void RoomMemberDataInternal::set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataInternal.teamId) +} + +// .np2_structs.RoomGroup roomGroup = 5; +inline bool RoomMemberDataInternal::has_roomgroup() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); + PROTOBUF_ASSUME(!value || _impl_.roomgroup_ != nullptr); + return value; +} +inline void RoomMemberDataInternal::clear_roomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.roomgroup_ != nullptr) _impl_.roomgroup_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::np2_structs::RoomGroup& RoomMemberDataInternal::_internal_roomgroup() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomGroup* p = _impl_.roomgroup_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomGroup_default_instance_); +} +inline const ::np2_structs::RoomGroup& RoomMemberDataInternal::roomgroup() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.roomGroup) + return _internal_roomgroup(); +} +inline void RoomMemberDataInternal::unsafe_arena_set_allocated_roomgroup( + ::np2_structs::RoomGroup* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.roomgroup_); + } + _impl_.roomgroup_ = reinterpret_cast<::np2_structs::RoomGroup*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataInternal.roomGroup) +} +inline ::np2_structs::RoomGroup* PROTOBUF_NULLABLE RoomMemberDataInternal::release_roomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::RoomGroup* released = _impl_.roomgroup_; + _impl_.roomgroup_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomGroup* PROTOBUF_NULLABLE RoomMemberDataInternal::unsafe_arena_release_roomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataInternal.roomGroup) + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::RoomGroup* temp = _impl_.roomgroup_; + _impl_.roomgroup_ = nullptr; + return temp; +} +inline ::np2_structs::RoomGroup* PROTOBUF_NONNULL RoomMemberDataInternal::_internal_mutable_roomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.roomgroup_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomGroup>(GetArena()); + _impl_.roomgroup_ = reinterpret_cast<::np2_structs::RoomGroup*>(p); + } + return _impl_.roomgroup_; +} +inline ::np2_structs::RoomGroup* PROTOBUF_NONNULL RoomMemberDataInternal::mutable_roomgroup() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::RoomGroup* _msg = _internal_mutable_roomgroup(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternal.roomGroup) + return _msg; +} +inline void RoomMemberDataInternal::set_allocated_roomgroup(::np2_structs::RoomGroup* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.roomgroup_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + + _impl_.roomgroup_ = reinterpret_cast<::np2_structs::RoomGroup*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataInternal.roomGroup) +} + +// .np2_structs.uint8 natType = 6; +inline bool RoomMemberDataInternal::has_nattype() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + PROTOBUF_ASSUME(!value || _impl_.nattype_ != nullptr); + return value; +} +inline void RoomMemberDataInternal::clear_nattype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.nattype_ != nullptr) _impl_.nattype_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::np2_structs::uint8& RoomMemberDataInternal::_internal_nattype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.nattype_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomMemberDataInternal::nattype() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.natType) + return _internal_nattype(); +} +inline void RoomMemberDataInternal::unsafe_arena_set_allocated_nattype( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.nattype_); + } + _impl_.nattype_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataInternal.natType) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataInternal::release_nattype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint8* released = _impl_.nattype_; + _impl_.nattype_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataInternal::unsafe_arena_release_nattype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataInternal.natType) + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint8* temp = _impl_.nattype_; + _impl_.nattype_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataInternal::_internal_mutable_nattype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.nattype_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.nattype_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.nattype_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataInternal::mutable_nattype() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint8* _msg = _internal_mutable_nattype(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternal.natType) + return _msg; +} +inline void RoomMemberDataInternal::set_allocated_nattype(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.nattype_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + + _impl_.nattype_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataInternal.natType) +} + +// uint32 flagAttr = 7; +inline void RoomMemberDataInternal::clear_flagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000080U); +} +inline ::uint32_t RoomMemberDataInternal::flagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.flagAttr) + return _internal_flagattr(); +} +inline void RoomMemberDataInternal::set_flagattr(::uint32_t value) { + _internal_set_flagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMemberDataInternal.flagAttr) +} +inline ::uint32_t RoomMemberDataInternal::_internal_flagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagattr_; +} +inline void RoomMemberDataInternal::_internal_set_flagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = value; +} + +// repeated .np2_structs.RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; +inline int RoomMemberDataInternal::_internal_roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal().size(); +} +inline int RoomMemberDataInternal::roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal_size(); +} +inline void RoomMemberDataInternal::clear_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roommemberbinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::RoomMemberBinAttrInternal* PROTOBUF_NONNULL RoomMemberDataInternal::mutable_roommemberbinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternal.roomMemberBinAttrInternal) + return _internal_mutable_roommemberbinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>* PROTOBUF_NONNULL RoomMemberDataInternal::mutable_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomMemberDataInternal.roomMemberBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roommemberbinattrinternal(); +} +inline const ::np2_structs::RoomMemberBinAttrInternal& RoomMemberDataInternal::roommemberbinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternal.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal().Get(index); +} +inline ::np2_structs::RoomMemberBinAttrInternal* PROTOBUF_NONNULL RoomMemberDataInternal::add_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomMemberBinAttrInternal* _add = + _internal_mutable_roommemberbinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.RoomMemberDataInternal.roomMemberBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>& RoomMemberDataInternal::roommemberbinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomMemberDataInternal.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>& +RoomMemberDataInternal::_internal_roommemberbinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roommemberbinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberBinAttrInternal>* PROTOBUF_NONNULL +RoomMemberDataInternal::_internal_mutable_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roommemberbinattrinternal_; +} + +// ------------------------------------------------------------------- + +// RoomGroup + +// .np2_structs.uint8 groupId = 1; +inline bool RoomGroup::has_groupid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.groupid_ != nullptr); + return value; +} +inline void RoomGroup::clear_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.groupid_ != nullptr) _impl_.groupid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint8& RoomGroup::_internal_groupid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.groupid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomGroup::groupid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroup.groupId) + return _internal_groupid(); +} +inline void RoomGroup::unsafe_arena_set_allocated_groupid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.groupid_); + } + _impl_.groupid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomGroup.groupId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomGroup::release_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* released = _impl_.groupid_; + _impl_.groupid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomGroup::unsafe_arena_release_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomGroup.groupId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* temp = _impl_.groupid_; + _impl_.groupid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomGroup::_internal_mutable_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.groupid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.groupid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.groupid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomGroup::mutable_groupid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* _msg = _internal_mutable_groupid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomGroup.groupId) + return _msg; +} +inline void RoomGroup::set_allocated_groupid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.groupid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.groupid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomGroup.groupId) +} + +// bool withPassword = 2; +inline void RoomGroup::clear_withpassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withpassword_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline bool RoomGroup::withpassword() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroup.withPassword) + return _internal_withpassword(); +} +inline void RoomGroup::set_withpassword(bool value) { + _internal_set_withpassword(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.RoomGroup.withPassword) +} +inline bool RoomGroup::_internal_withpassword() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withpassword_; +} +inline void RoomGroup::_internal_set_withpassword(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withpassword_ = value; +} + +// bytes label = 3; +inline void RoomGroup::clear_label() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.label_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& RoomGroup::label() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroup.label) + return _internal_label(); +} +template +PROTOBUF_ALWAYS_INLINE void RoomGroup::set_label(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.label_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.RoomGroup.label) +} +inline ::std::string* PROTOBUF_NONNULL RoomGroup::mutable_label() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_label(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomGroup.label) + return _s; +} +inline const ::std::string& RoomGroup::_internal_label() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.label_.Get(); +} +inline void RoomGroup::_internal_set_label(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.label_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL RoomGroup::_internal_mutable_label() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.label_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE RoomGroup::release_label() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomGroup.label) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.label_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.label_.Set("", GetArena()); + } + return released; +} +inline void RoomGroup::set_allocated_label(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.label_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.label_.IsDefault()) { + _impl_.label_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomGroup.label) +} + +// uint32 slotNum = 4; +inline void RoomGroup::clear_slotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotnum_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t RoomGroup::slotnum() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroup.slotNum) + return _internal_slotnum(); +} +inline void RoomGroup::set_slotnum(::uint32_t value) { + _internal_set_slotnum(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.RoomGroup.slotNum) +} +inline ::uint32_t RoomGroup::_internal_slotnum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotnum_; +} +inline void RoomGroup::_internal_set_slotnum(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotnum_ = value; +} + +// uint32 curGroupMemberNum = 5; +inline void RoomGroup::clear_curgroupmembernum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.curgroupmembernum_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint32_t RoomGroup::curgroupmembernum() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroup.curGroupMemberNum) + return _internal_curgroupmembernum(); +} +inline void RoomGroup::set_curgroupmembernum(::uint32_t value) { + _internal_set_curgroupmembernum(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.RoomGroup.curGroupMemberNum) +} +inline ::uint32_t RoomGroup::_internal_curgroupmembernum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.curgroupmembernum_; +} +inline void RoomGroup::_internal_set_curgroupmembernum(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.curgroupmembernum_ = value; +} + +// ------------------------------------------------------------------- + +// RoomDataInternal + +// .np2_structs.uint16 serverId = 1; +inline bool RoomDataInternal::has_serverid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); + PROTOBUF_ASSUME(!value || _impl_.serverid_ != nullptr); + return value; +} +inline void RoomDataInternal::clear_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ != nullptr) _impl_.serverid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::np2_structs::uint16& RoomDataInternal::_internal_serverid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.serverid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataInternal::serverid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.serverId) + return _internal_serverid(); +} +inline void RoomDataInternal::unsafe_arena_set_allocated_serverid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataInternal.serverId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataInternal::release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::uint16* released = _impl_.serverid_; + _impl_.serverid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataInternal::unsafe_arena_release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataInternal.serverId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::uint16* temp = _impl_.serverid_; + _impl_.serverid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataInternal::_internal_mutable_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.serverid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataInternal::mutable_serverid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::uint16* _msg = _internal_mutable_serverid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternal.serverId) + return _msg; +} +inline void RoomDataInternal::set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataInternal.serverId) +} + +// uint32 worldId = 2; +inline void RoomDataInternal::clear_worldid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000080U); +} +inline ::uint32_t RoomDataInternal::worldid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.worldId) + return _internal_worldid(); +} +inline void RoomDataInternal::set_worldid(::uint32_t value) { + _internal_set_worldid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternal.worldId) +} +inline ::uint32_t RoomDataInternal::_internal_worldid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.worldid_; +} +inline void RoomDataInternal::_internal_set_worldid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = value; +} + +// uint64 lobbyId = 3; +inline void RoomDataInternal::clear_lobbyid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::uint64_t RoomDataInternal::lobbyid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.lobbyId) + return _internal_lobbyid(); +} +inline void RoomDataInternal::set_lobbyid(::uint64_t value) { + _internal_set_lobbyid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternal.lobbyId) +} +inline ::uint64_t RoomDataInternal::_internal_lobbyid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lobbyid_; +} +inline void RoomDataInternal::_internal_set_lobbyid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = value; +} + +// uint64 roomId = 4; +inline void RoomDataInternal::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::uint64_t RoomDataInternal::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.roomId) + return _internal_roomid(); +} +inline void RoomDataInternal::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternal.roomId) +} +inline ::uint64_t RoomDataInternal::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void RoomDataInternal::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// uint64 passwordSlotMask = 5; +inline void RoomDataInternal::clear_passwordslotmask() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000200U); +} +inline ::uint64_t RoomDataInternal::passwordslotmask() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.passwordSlotMask) + return _internal_passwordslotmask(); +} +inline void RoomDataInternal::set_passwordslotmask(::uint64_t value) { + _internal_set_passwordslotmask(value); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternal.passwordSlotMask) +} +inline ::uint64_t RoomDataInternal::_internal_passwordslotmask() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.passwordslotmask_; +} +inline void RoomDataInternal::_internal_set_passwordslotmask(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_ = value; +} + +// uint32 maxSlot = 6; +inline void RoomDataInternal::clear_maxslot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.maxslot_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000100U); +} +inline ::uint32_t RoomDataInternal::maxslot() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.maxSlot) + return _internal_maxslot(); +} +inline void RoomDataInternal::set_maxslot(::uint32_t value) { + _internal_set_maxslot(value); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternal.maxSlot) +} +inline ::uint32_t RoomDataInternal::_internal_maxslot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.maxslot_; +} +inline void RoomDataInternal::_internal_set_maxslot(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.maxslot_ = value; +} + +// repeated .np2_structs.RoomMemberDataInternal memberList = 7; +inline int RoomDataInternal::_internal_memberlist_size() const { + return _internal_memberlist().size(); +} +inline int RoomDataInternal::memberlist_size() const { + return _internal_memberlist_size(); +} +inline void RoomDataInternal::clear_memberlist() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.memberlist_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL RoomDataInternal::mutable_memberlist(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternal.memberList) + return _internal_mutable_memberlist()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>* PROTOBUF_NONNULL RoomDataInternal::mutable_memberlist() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataInternal.memberList) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_memberlist(); +} +inline const ::np2_structs::RoomMemberDataInternal& RoomDataInternal::memberlist(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.memberList) + return _internal_memberlist().Get(index); +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL RoomDataInternal::add_memberlist() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomMemberDataInternal* _add = + _internal_mutable_memberlist()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataInternal.memberList) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>& RoomDataInternal::memberlist() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataInternal.memberList) + return _internal_memberlist(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>& +RoomDataInternal::_internal_memberlist() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.memberlist_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataInternal>* PROTOBUF_NONNULL +RoomDataInternal::_internal_mutable_memberlist() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.memberlist_; +} + +// .np2_structs.uint16 ownerId = 8; +inline bool RoomDataInternal::has_ownerid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + PROTOBUF_ASSUME(!value || _impl_.ownerid_ != nullptr); + return value; +} +inline void RoomDataInternal::clear_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.ownerid_ != nullptr) _impl_.ownerid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::np2_structs::uint16& RoomDataInternal::_internal_ownerid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.ownerid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataInternal::ownerid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.ownerId) + return _internal_ownerid(); +} +inline void RoomDataInternal::unsafe_arena_set_allocated_ownerid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.ownerid_); + } + _impl_.ownerid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataInternal.ownerId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataInternal::release_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* released = _impl_.ownerid_; + _impl_.ownerid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataInternal::unsafe_arena_release_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataInternal.ownerId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* temp = _impl_.ownerid_; + _impl_.ownerid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataInternal::_internal_mutable_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.ownerid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.ownerid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.ownerid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataInternal::mutable_ownerid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* _msg = _internal_mutable_ownerid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternal.ownerId) + return _msg; +} +inline void RoomDataInternal::set_allocated_ownerid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.ownerid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + + _impl_.ownerid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataInternal.ownerId) +} + +// repeated .np2_structs.RoomGroup roomGroup = 9; +inline int RoomDataInternal::_internal_roomgroup_size() const { + return _internal_roomgroup().size(); +} +inline int RoomDataInternal::roomgroup_size() const { + return _internal_roomgroup_size(); +} +inline void RoomDataInternal::clear_roomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomgroup_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::RoomGroup* PROTOBUF_NONNULL RoomDataInternal::mutable_roomgroup(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternal.roomGroup) + return _internal_mutable_roomgroup()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL RoomDataInternal::mutable_roomgroup() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataInternal.roomGroup) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomgroup(); +} +inline const ::np2_structs::RoomGroup& RoomDataInternal::roomgroup(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.roomGroup) + return _internal_roomgroup().Get(index); +} +inline ::np2_structs::RoomGroup* PROTOBUF_NONNULL RoomDataInternal::add_roomgroup() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomGroup* _add = + _internal_mutable_roomgroup()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataInternal.roomGroup) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& RoomDataInternal::roomgroup() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataInternal.roomGroup) + return _internal_roomgroup(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& +RoomDataInternal::_internal_roomgroup() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomgroup_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL +RoomDataInternal::_internal_mutable_roomgroup() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomgroup_; +} + +// uint32 flagAttr = 10; +inline void RoomDataInternal::clear_flagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000400U); +} +inline ::uint32_t RoomDataInternal::flagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.flagAttr) + return _internal_flagattr(); +} +inline void RoomDataInternal::set_flagattr(::uint32_t value) { + _internal_set_flagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternal.flagAttr) +} +inline ::uint32_t RoomDataInternal::_internal_flagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagattr_; +} +inline void RoomDataInternal::_internal_set_flagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = value; +} + +// repeated .np2_structs.BinAttrInternal roomBinAttrInternal = 11; +inline int RoomDataInternal::_internal_roombinattrinternal_size() const { + return _internal_roombinattrinternal().size(); +} +inline int RoomDataInternal::roombinattrinternal_size() const { + return _internal_roombinattrinternal_size(); +} +inline void RoomDataInternal::clear_roombinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roombinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::np2_structs::BinAttrInternal* PROTOBUF_NONNULL RoomDataInternal::mutable_roombinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternal.roomBinAttrInternal) + return _internal_mutable_roombinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>* PROTOBUF_NONNULL RoomDataInternal::mutable_roombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataInternal.roomBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roombinattrinternal(); +} +inline const ::np2_structs::BinAttrInternal& RoomDataInternal::roombinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternal.roomBinAttrInternal) + return _internal_roombinattrinternal().Get(index); +} +inline ::np2_structs::BinAttrInternal* PROTOBUF_NONNULL RoomDataInternal::add_roombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttrInternal* _add = + _internal_mutable_roombinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataInternal.roomBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>& RoomDataInternal::roombinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataInternal.roomBinAttrInternal) + return _internal_roombinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>& +RoomDataInternal::_internal_roombinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roombinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttrInternal>* PROTOBUF_NONNULL +RoomDataInternal::_internal_mutable_roombinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roombinattrinternal_; +} + +// ------------------------------------------------------------------- + +// RoomDataExternal + +// .np2_structs.uint16 serverId = 1; +inline bool RoomDataExternal::has_serverid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + PROTOBUF_ASSUME(!value || _impl_.serverid_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ != nullptr) _impl_.serverid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_serverid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.serverid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::serverid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.serverId) + return _internal_serverid(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_serverid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.serverId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* released = _impl_.serverid_; + _impl_.serverid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.serverId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* temp = _impl_.serverid_; + _impl_.serverid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.serverid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_serverid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* _msg = _internal_mutable_serverid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.serverId) + return _msg; +} +inline void RoomDataExternal::set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.serverId) +} + +// uint32 worldId = 2; +inline void RoomDataExternal::clear_worldid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00004000U); +} +inline ::uint32_t RoomDataExternal::worldid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.worldId) + return _internal_worldid(); +} +inline void RoomDataExternal::set_worldid(::uint32_t value) { + _internal_set_worldid(value); + SetHasBit(_impl_._has_bits_[0], 0x00004000U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataExternal.worldId) +} +inline ::uint32_t RoomDataExternal::_internal_worldid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.worldid_; +} +inline void RoomDataExternal::_internal_set_worldid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = value; +} + +// .np2_structs.uint16 publicSlotNum = 3; +inline bool RoomDataExternal::has_publicslotnum() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000020U); + PROTOBUF_ASSUME(!value || _impl_.publicslotnum_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_publicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.publicslotnum_ != nullptr) _impl_.publicslotnum_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_publicslotnum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.publicslotnum_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::publicslotnum() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.publicSlotNum) + return _internal_publicslotnum(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_publicslotnum( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.publicslotnum_); + } + _impl_.publicslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.publicSlotNum) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_publicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ::np2_structs::uint16* released = _impl_.publicslotnum_; + _impl_.publicslotnum_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_publicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.publicSlotNum) + + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ::np2_structs::uint16* temp = _impl_.publicslotnum_; + _impl_.publicslotnum_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_publicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.publicslotnum_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.publicslotnum_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.publicslotnum_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_publicslotnum() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + ::np2_structs::uint16* _msg = _internal_mutable_publicslotnum(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.publicSlotNum) + return _msg; +} +inline void RoomDataExternal::set_allocated_publicslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.publicslotnum_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + } + + _impl_.publicslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.publicSlotNum) +} + +// .np2_structs.uint16 privateSlotNum = 4; +inline bool RoomDataExternal::has_privateslotnum() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000040U); + PROTOBUF_ASSUME(!value || _impl_.privateslotnum_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_privateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.privateslotnum_ != nullptr) _impl_.privateslotnum_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_privateslotnum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.privateslotnum_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::privateslotnum() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.privateSlotNum) + return _internal_privateslotnum(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_privateslotnum( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.privateslotnum_); + } + _impl_.privateslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.privateSlotNum) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_privateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ::np2_structs::uint16* released = _impl_.privateslotnum_; + _impl_.privateslotnum_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_privateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.privateSlotNum) + + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ::np2_structs::uint16* temp = _impl_.privateslotnum_; + _impl_.privateslotnum_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_privateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.privateslotnum_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.privateslotnum_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.privateslotnum_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_privateslotnum() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + ::np2_structs::uint16* _msg = _internal_mutable_privateslotnum(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.privateSlotNum) + return _msg; +} +inline void RoomDataExternal::set_allocated_privateslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.privateslotnum_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + } + + _impl_.privateslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.privateSlotNum) +} + +// uint64 lobbyId = 5; +inline void RoomDataExternal::clear_lobbyid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00001000U); +} +inline ::uint64_t RoomDataExternal::lobbyid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.lobbyId) + return _internal_lobbyid(); +} +inline void RoomDataExternal::set_lobbyid(::uint64_t value) { + _internal_set_lobbyid(value); + SetHasBit(_impl_._has_bits_[0], 0x00001000U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataExternal.lobbyId) +} +inline ::uint64_t RoomDataExternal::_internal_lobbyid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lobbyid_; +} +inline void RoomDataExternal::_internal_set_lobbyid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = value; +} + +// uint64 roomId = 6; +inline void RoomDataExternal::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00002000U); +} +inline ::uint64_t RoomDataExternal::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.roomId) + return _internal_roomid(); +} +inline void RoomDataExternal::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00002000U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataExternal.roomId) +} +inline ::uint64_t RoomDataExternal::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void RoomDataExternal::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// .np2_structs.uint16 openPublicSlotNum = 7; +inline bool RoomDataExternal::has_openpublicslotnum() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000080U); + PROTOBUF_ASSUME(!value || _impl_.openpublicslotnum_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_openpublicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.openpublicslotnum_ != nullptr) _impl_.openpublicslotnum_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000080U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_openpublicslotnum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.openpublicslotnum_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::openpublicslotnum() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.openPublicSlotNum) + return _internal_openpublicslotnum(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_openpublicslotnum( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.openpublicslotnum_); + } + _impl_.openpublicslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.openPublicSlotNum) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_openpublicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + ::np2_structs::uint16* released = _impl_.openpublicslotnum_; + _impl_.openpublicslotnum_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_openpublicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.openPublicSlotNum) + + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + ::np2_structs::uint16* temp = _impl_.openpublicslotnum_; + _impl_.openpublicslotnum_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_openpublicslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.openpublicslotnum_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.openpublicslotnum_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.openpublicslotnum_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_openpublicslotnum() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + ::np2_structs::uint16* _msg = _internal_mutable_openpublicslotnum(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.openPublicSlotNum) + return _msg; +} +inline void RoomDataExternal::set_allocated_openpublicslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.openpublicslotnum_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + } + + _impl_.openpublicslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.openPublicSlotNum) +} + +// .np2_structs.uint16 maxSlot = 8; +inline bool RoomDataExternal::has_maxslot() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000100U); + PROTOBUF_ASSUME(!value || _impl_.maxslot_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_maxslot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.maxslot_ != nullptr) _impl_.maxslot_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000100U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_maxslot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.maxslot_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::maxslot() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.maxSlot) + return _internal_maxslot(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_maxslot( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.maxslot_); + } + _impl_.maxslot_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.maxSlot) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_maxslot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + ::np2_structs::uint16* released = _impl_.maxslot_; + _impl_.maxslot_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_maxslot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.maxSlot) + + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + ::np2_structs::uint16* temp = _impl_.maxslot_; + _impl_.maxslot_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_maxslot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.maxslot_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.maxslot_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.maxslot_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_maxslot() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + ::np2_structs::uint16* _msg = _internal_mutable_maxslot(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.maxSlot) + return _msg; +} +inline void RoomDataExternal::set_allocated_maxslot(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.maxslot_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + } + + _impl_.maxslot_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.maxSlot) +} + +// .np2_structs.uint16 openPrivateSlotNum = 9; +inline bool RoomDataExternal::has_openprivateslotnum() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000200U); + PROTOBUF_ASSUME(!value || _impl_.openprivateslotnum_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_openprivateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.openprivateslotnum_ != nullptr) _impl_.openprivateslotnum_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000200U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_openprivateslotnum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.openprivateslotnum_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::openprivateslotnum() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.openPrivateSlotNum) + return _internal_openprivateslotnum(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_openprivateslotnum( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.openprivateslotnum_); + } + _impl_.openprivateslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.openPrivateSlotNum) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_openprivateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + ::np2_structs::uint16* released = _impl_.openprivateslotnum_; + _impl_.openprivateslotnum_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_openprivateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.openPrivateSlotNum) + + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + ::np2_structs::uint16* temp = _impl_.openprivateslotnum_; + _impl_.openprivateslotnum_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_openprivateslotnum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.openprivateslotnum_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.openprivateslotnum_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.openprivateslotnum_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_openprivateslotnum() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + ::np2_structs::uint16* _msg = _internal_mutable_openprivateslotnum(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.openPrivateSlotNum) + return _msg; +} +inline void RoomDataExternal::set_allocated_openprivateslotnum(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.openprivateslotnum_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + } + + _impl_.openprivateslotnum_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.openPrivateSlotNum) +} + +// .np2_structs.uint16 curMemberNum = 10; +inline bool RoomDataExternal::has_curmembernum() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000400U); + PROTOBUF_ASSUME(!value || _impl_.curmembernum_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_curmembernum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.curmembernum_ != nullptr) _impl_.curmembernum_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000400U); +} +inline const ::np2_structs::uint16& RoomDataExternal::_internal_curmembernum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.curmembernum_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& RoomDataExternal::curmembernum() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.curMemberNum) + return _internal_curmembernum(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_curmembernum( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.curmembernum_); + } + _impl_.curmembernum_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.curMemberNum) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::release_curmembernum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ::np2_structs::uint16* released = _impl_.curmembernum_; + _impl_.curmembernum_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_curmembernum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.curMemberNum) + + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ::np2_structs::uint16* temp = _impl_.curmembernum_; + _impl_.curmembernum_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_curmembernum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.curmembernum_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.curmembernum_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.curmembernum_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataExternal::mutable_curmembernum() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + ::np2_structs::uint16* _msg = _internal_mutable_curmembernum(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.curMemberNum) + return _msg; +} +inline void RoomDataExternal::set_allocated_curmembernum(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.curmembernum_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + } + + _impl_.curmembernum_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.curMemberNum) +} + +// uint64 passwordSlotMask = 11; +inline void RoomDataExternal::clear_passwordslotmask() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00010000U); +} +inline ::uint64_t RoomDataExternal::passwordslotmask() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.passwordSlotMask) + return _internal_passwordslotmask(); +} +inline void RoomDataExternal::set_passwordslotmask(::uint64_t value) { + _internal_set_passwordslotmask(value); + SetHasBit(_impl_._has_bits_[0], 0x00010000U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataExternal.passwordSlotMask) +} +inline ::uint64_t RoomDataExternal::_internal_passwordslotmask() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.passwordslotmask_; +} +inline void RoomDataExternal::_internal_set_passwordslotmask(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_ = value; +} + +// .np2_structs.UserInfo owner = 12; +inline bool RoomDataExternal::has_owner() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000800U); + PROTOBUF_ASSUME(!value || _impl_.owner_ != nullptr); + return value; +} +inline void RoomDataExternal::clear_owner() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.owner_ != nullptr) _impl_.owner_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000800U); +} +inline const ::np2_structs::UserInfo& RoomDataExternal::_internal_owner() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::UserInfo* p = _impl_.owner_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_UserInfo_default_instance_); +} +inline const ::np2_structs::UserInfo& RoomDataExternal::owner() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.owner) + return _internal_owner(); +} +inline void RoomDataExternal::unsafe_arena_set_allocated_owner( + ::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.owner_); + } + _impl_.owner_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000800U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataExternal.owner) +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomDataExternal::release_owner() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + ::np2_structs::UserInfo* released = _impl_.owner_; + _impl_.owner_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomDataExternal::unsafe_arena_release_owner() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataExternal.owner) + + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + ::np2_structs::UserInfo* temp = _impl_.owner_; + _impl_.owner_ = nullptr; + return temp; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomDataExternal::_internal_mutable_owner() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.owner_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::UserInfo>(GetArena()); + _impl_.owner_ = reinterpret_cast<::np2_structs::UserInfo*>(p); + } + return _impl_.owner_; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomDataExternal::mutable_owner() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000800U); + ::np2_structs::UserInfo* _msg = _internal_mutable_owner(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.owner) + return _msg; +} +inline void RoomDataExternal::set_allocated_owner(::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.owner_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000800U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + } + + _impl_.owner_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataExternal.owner) +} + +// repeated .np2_structs.RoomGroup roomGroup = 13; +inline int RoomDataExternal::_internal_roomgroup_size() const { + return _internal_roomgroup().size(); +} +inline int RoomDataExternal::roomgroup_size() const { + return _internal_roomgroup_size(); +} +inline void RoomDataExternal::clear_roomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomgroup_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::RoomGroup* PROTOBUF_NONNULL RoomDataExternal::mutable_roomgroup(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.roomGroup) + return _internal_mutable_roomgroup()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL RoomDataExternal::mutable_roomgroup() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataExternal.roomGroup) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomgroup(); +} +inline const ::np2_structs::RoomGroup& RoomDataExternal::roomgroup(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.roomGroup) + return _internal_roomgroup().Get(index); +} +inline ::np2_structs::RoomGroup* PROTOBUF_NONNULL RoomDataExternal::add_roomgroup() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomGroup* _add = + _internal_mutable_roomgroup()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataExternal.roomGroup) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& RoomDataExternal::roomgroup() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataExternal.roomGroup) + return _internal_roomgroup(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>& +RoomDataExternal::_internal_roomgroup() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomgroup_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroup>* PROTOBUF_NONNULL +RoomDataExternal::_internal_mutable_roomgroup() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomgroup_; +} + +// uint32 flagAttr = 14; +inline void RoomDataExternal::clear_flagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00008000U); +} +inline ::uint32_t RoomDataExternal::flagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.flagAttr) + return _internal_flagattr(); +} +inline void RoomDataExternal::set_flagattr(::uint32_t value) { + _internal_set_flagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00008000U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataExternal.flagAttr) +} +inline ::uint32_t RoomDataExternal::_internal_flagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagattr_; +} +inline void RoomDataExternal::_internal_set_flagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = value; +} + +// repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 15; +inline int RoomDataExternal::_internal_roomsearchableintattrexternal_size() const { + return _internal_roomsearchableintattrexternal().size(); +} +inline int RoomDataExternal::roomsearchableintattrexternal_size() const { + return _internal_roomsearchableintattrexternal_size(); +} +inline void RoomDataExternal::clear_roomsearchableintattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomsearchableintattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL RoomDataExternal::mutable_roomsearchableintattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.roomSearchableIntAttrExternal) + return _internal_mutable_roomsearchableintattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL RoomDataExternal::mutable_roomsearchableintattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataExternal.roomSearchableIntAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomsearchableintattrexternal(); +} +inline const ::np2_structs::IntAttr& RoomDataExternal::roomsearchableintattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.roomSearchableIntAttrExternal) + return _internal_roomsearchableintattrexternal().Get(index); +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL RoomDataExternal::add_roomsearchableintattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::IntAttr* _add = + _internal_mutable_roomsearchableintattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataExternal.roomSearchableIntAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& RoomDataExternal::roomsearchableintattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataExternal.roomSearchableIntAttrExternal) + return _internal_roomsearchableintattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& +RoomDataExternal::_internal_roomsearchableintattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomsearchableintattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL +RoomDataExternal::_internal_mutable_roomsearchableintattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomsearchableintattrexternal_; +} + +// repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 16; +inline int RoomDataExternal::_internal_roomsearchablebinattrexternal_size() const { + return _internal_roomsearchablebinattrexternal().size(); +} +inline int RoomDataExternal::roomsearchablebinattrexternal_size() const { + return _internal_roomsearchablebinattrexternal_size(); +} +inline void RoomDataExternal::clear_roomsearchablebinattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomsearchablebinattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL RoomDataExternal::mutable_roomsearchablebinattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.roomSearchableBinAttrExternal) + return _internal_mutable_roomsearchablebinattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL RoomDataExternal::mutable_roomsearchablebinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataExternal.roomSearchableBinAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomsearchablebinattrexternal(); +} +inline const ::np2_structs::BinAttr& RoomDataExternal::roomsearchablebinattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.roomSearchableBinAttrExternal) + return _internal_roomsearchablebinattrexternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL RoomDataExternal::add_roomsearchablebinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roomsearchablebinattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataExternal.roomSearchableBinAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& RoomDataExternal::roomsearchablebinattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataExternal.roomSearchableBinAttrExternal) + return _internal_roomsearchablebinattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +RoomDataExternal::_internal_roomsearchablebinattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomsearchablebinattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +RoomDataExternal::_internal_mutable_roomsearchablebinattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomsearchablebinattrexternal_; +} + +// repeated .np2_structs.BinAttr roomBinAttrExternal = 17; +inline int RoomDataExternal::_internal_roombinattrexternal_size() const { + return _internal_roombinattrexternal().size(); +} +inline int RoomDataExternal::roombinattrexternal_size() const { + return _internal_roombinattrexternal_size(); +} +inline void RoomDataExternal::clear_roombinattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roombinattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL RoomDataExternal::mutable_roombinattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataExternal.roomBinAttrExternal) + return _internal_mutable_roombinattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL RoomDataExternal::mutable_roombinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataExternal.roomBinAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roombinattrexternal(); +} +inline const ::np2_structs::BinAttr& RoomDataExternal::roombinattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataExternal.roomBinAttrExternal) + return _internal_roombinattrexternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL RoomDataExternal::add_roombinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roombinattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataExternal.roomBinAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& RoomDataExternal::roombinattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataExternal.roomBinAttrExternal) + return _internal_roombinattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +RoomDataExternal::_internal_roombinattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roombinattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +RoomDataExternal::_internal_mutable_roombinattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roombinattrexternal_; +} + +// ------------------------------------------------------------------- + +// IntSearchFilter + +// .np2_structs.uint8 searchOperator = 1; +inline bool IntSearchFilter::has_searchoperator() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.searchoperator_ != nullptr); + return value; +} +inline void IntSearchFilter::clear_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.searchoperator_ != nullptr) _impl_.searchoperator_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint8& IntSearchFilter::_internal_searchoperator() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.searchoperator_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& IntSearchFilter::searchoperator() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.IntSearchFilter.searchOperator) + return _internal_searchoperator(); +} +inline void IntSearchFilter::unsafe_arena_set_allocated_searchoperator( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.searchoperator_); + } + _impl_.searchoperator_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.IntSearchFilter.searchOperator) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE IntSearchFilter::release_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* released = _impl_.searchoperator_; + _impl_.searchoperator_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE IntSearchFilter::unsafe_arena_release_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.IntSearchFilter.searchOperator) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* temp = _impl_.searchoperator_; + _impl_.searchoperator_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL IntSearchFilter::_internal_mutable_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.searchoperator_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.searchoperator_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.searchoperator_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL IntSearchFilter::mutable_searchoperator() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* _msg = _internal_mutable_searchoperator(); + // @@protoc_insertion_point(field_mutable:np2_structs.IntSearchFilter.searchOperator) + return _msg; +} +inline void IntSearchFilter::set_allocated_searchoperator(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.searchoperator_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.searchoperator_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.IntSearchFilter.searchOperator) +} + +// .np2_structs.IntAttr attr = 2; +inline bool IntSearchFilter::has_attr() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.attr_ != nullptr); + return value; +} +inline void IntSearchFilter::clear_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.attr_ != nullptr) _impl_.attr_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::IntAttr& IntSearchFilter::_internal_attr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::IntAttr* p = _impl_.attr_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_IntAttr_default_instance_); +} +inline const ::np2_structs::IntAttr& IntSearchFilter::attr() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.IntSearchFilter.attr) + return _internal_attr(); +} +inline void IntSearchFilter::unsafe_arena_set_allocated_attr( + ::np2_structs::IntAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attr_); + } + _impl_.attr_ = reinterpret_cast<::np2_structs::IntAttr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.IntSearchFilter.attr) +} +inline ::np2_structs::IntAttr* PROTOBUF_NULLABLE IntSearchFilter::release_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::IntAttr* released = _impl_.attr_; + _impl_.attr_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::IntAttr* PROTOBUF_NULLABLE IntSearchFilter::unsafe_arena_release_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.IntSearchFilter.attr) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::IntAttr* temp = _impl_.attr_; + _impl_.attr_ = nullptr; + return temp; +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL IntSearchFilter::_internal_mutable_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.attr_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::IntAttr>(GetArena()); + _impl_.attr_ = reinterpret_cast<::np2_structs::IntAttr*>(p); + } + return _impl_.attr_; +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL IntSearchFilter::mutable_attr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::IntAttr* _msg = _internal_mutable_attr(); + // @@protoc_insertion_point(field_mutable:np2_structs.IntSearchFilter.attr) + return _msg; +} +inline void IntSearchFilter::set_allocated_attr(::np2_structs::IntAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attr_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.attr_ = reinterpret_cast<::np2_structs::IntAttr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.IntSearchFilter.attr) +} + +// ------------------------------------------------------------------- + +// BinSearchFilter + +// .np2_structs.uint8 searchOperator = 1; +inline bool BinSearchFilter::has_searchoperator() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.searchoperator_ != nullptr); + return value; +} +inline void BinSearchFilter::clear_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.searchoperator_ != nullptr) _impl_.searchoperator_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint8& BinSearchFilter::_internal_searchoperator() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.searchoperator_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& BinSearchFilter::searchoperator() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.BinSearchFilter.searchOperator) + return _internal_searchoperator(); +} +inline void BinSearchFilter::unsafe_arena_set_allocated_searchoperator( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.searchoperator_); + } + _impl_.searchoperator_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.BinSearchFilter.searchOperator) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE BinSearchFilter::release_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* released = _impl_.searchoperator_; + _impl_.searchoperator_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE BinSearchFilter::unsafe_arena_release_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.BinSearchFilter.searchOperator) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* temp = _impl_.searchoperator_; + _impl_.searchoperator_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL BinSearchFilter::_internal_mutable_searchoperator() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.searchoperator_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.searchoperator_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.searchoperator_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL BinSearchFilter::mutable_searchoperator() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* _msg = _internal_mutable_searchoperator(); + // @@protoc_insertion_point(field_mutable:np2_structs.BinSearchFilter.searchOperator) + return _msg; +} +inline void BinSearchFilter::set_allocated_searchoperator(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.searchoperator_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.searchoperator_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.BinSearchFilter.searchOperator) +} + +// .np2_structs.BinAttr attr = 2; +inline bool BinSearchFilter::has_attr() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.attr_ != nullptr); + return value; +} +inline void BinSearchFilter::clear_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.attr_ != nullptr) _impl_.attr_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::BinAttr& BinSearchFilter::_internal_attr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::BinAttr* p = _impl_.attr_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_BinAttr_default_instance_); +} +inline const ::np2_structs::BinAttr& BinSearchFilter::attr() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.BinSearchFilter.attr) + return _internal_attr(); +} +inline void BinSearchFilter::unsafe_arena_set_allocated_attr( + ::np2_structs::BinAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attr_); + } + _impl_.attr_ = reinterpret_cast<::np2_structs::BinAttr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.BinSearchFilter.attr) +} +inline ::np2_structs::BinAttr* PROTOBUF_NULLABLE BinSearchFilter::release_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::BinAttr* released = _impl_.attr_; + _impl_.attr_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::BinAttr* PROTOBUF_NULLABLE BinSearchFilter::unsafe_arena_release_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.BinSearchFilter.attr) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::BinAttr* temp = _impl_.attr_; + _impl_.attr_ = nullptr; + return temp; +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL BinSearchFilter::_internal_mutable_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.attr_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::BinAttr>(GetArena()); + _impl_.attr_ = reinterpret_cast<::np2_structs::BinAttr*>(p); + } + return _impl_.attr_; +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL BinSearchFilter::mutable_attr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::BinAttr* _msg = _internal_mutable_attr(); + // @@protoc_insertion_point(field_mutable:np2_structs.BinSearchFilter.attr) + return _msg; +} +inline void BinSearchFilter::set_allocated_attr(::np2_structs::BinAttr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attr_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.attr_ = reinterpret_cast<::np2_structs::BinAttr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.BinSearchFilter.attr) +} + +// ------------------------------------------------------------------- + +// PresenceOptionData + +// bytes data = 1; +inline void PresenceOptionData::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& PresenceOptionData::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.PresenceOptionData.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void PresenceOptionData::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.PresenceOptionData.data) +} +inline ::std::string* PROTOBUF_NONNULL PresenceOptionData::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.PresenceOptionData.data) + return _s; +} +inline const ::std::string& PresenceOptionData::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void PresenceOptionData::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL PresenceOptionData::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE PresenceOptionData::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.PresenceOptionData.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void PresenceOptionData::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.PresenceOptionData.data) +} + +// uint32 len = 2; +inline void PresenceOptionData::clear_len() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.len_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t PresenceOptionData::len() const { + // @@protoc_insertion_point(field_get:np2_structs.PresenceOptionData.len) + return _internal_len(); +} +inline void PresenceOptionData::set_len(::uint32_t value) { + _internal_set_len(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.PresenceOptionData.len) +} +inline ::uint32_t PresenceOptionData::_internal_len() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.len_; +} +inline void PresenceOptionData::_internal_set_len(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.len_ = value; +} + +// ------------------------------------------------------------------- + +// RoomGroupPasswordConfig + +// .np2_structs.uint8 groupId = 1; +inline bool RoomGroupPasswordConfig::has_groupid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.groupid_ != nullptr); + return value; +} +inline void RoomGroupPasswordConfig::clear_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.groupid_ != nullptr) _impl_.groupid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint8& RoomGroupPasswordConfig::_internal_groupid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.groupid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomGroupPasswordConfig::groupid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroupPasswordConfig.groupId) + return _internal_groupid(); +} +inline void RoomGroupPasswordConfig::unsafe_arena_set_allocated_groupid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.groupid_); + } + _impl_.groupid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomGroupPasswordConfig.groupId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomGroupPasswordConfig::release_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* released = _impl_.groupid_; + _impl_.groupid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomGroupPasswordConfig::unsafe_arena_release_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomGroupPasswordConfig.groupId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* temp = _impl_.groupid_; + _impl_.groupid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomGroupPasswordConfig::_internal_mutable_groupid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.groupid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.groupid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.groupid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomGroupPasswordConfig::mutable_groupid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* _msg = _internal_mutable_groupid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomGroupPasswordConfig.groupId) + return _msg; +} +inline void RoomGroupPasswordConfig::set_allocated_groupid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.groupid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.groupid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomGroupPasswordConfig.groupId) +} + +// bool withPassword = 2; +inline void RoomGroupPasswordConfig::clear_withpassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withpassword_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool RoomGroupPasswordConfig::withpassword() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomGroupPasswordConfig.withPassword) + return _internal_withpassword(); +} +inline void RoomGroupPasswordConfig::set_withpassword(bool value) { + _internal_set_withpassword(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.RoomGroupPasswordConfig.withPassword) +} +inline bool RoomGroupPasswordConfig::_internal_withpassword() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withpassword_; +} +inline void RoomGroupPasswordConfig::_internal_set_withpassword(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withpassword_ = value; +} + +// ------------------------------------------------------------------- + +// SearchRoomRequest + +// int32 option = 1; +inline void SearchRoomRequest::clear_option() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.option_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::int32_t SearchRoomRequest::option() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.option) + return _internal_option(); +} +inline void SearchRoomRequest::set_option(::int32_t value) { + _internal_set_option(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.option) +} +inline ::int32_t SearchRoomRequest::_internal_option() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.option_; +} +inline void SearchRoomRequest::_internal_set_option(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.option_ = value; +} + +// uint32 worldId = 2; +inline void SearchRoomRequest::clear_worldid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint32_t SearchRoomRequest::worldid() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.worldId) + return _internal_worldid(); +} +inline void SearchRoomRequest::set_worldid(::uint32_t value) { + _internal_set_worldid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.worldId) +} +inline ::uint32_t SearchRoomRequest::_internal_worldid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.worldid_; +} +inline void SearchRoomRequest::_internal_set_worldid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = value; +} + +// uint64 lobbyId = 3; +inline void SearchRoomRequest::clear_lobbyid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::uint64_t SearchRoomRequest::lobbyid() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.lobbyId) + return _internal_lobbyid(); +} +inline void SearchRoomRequest::set_lobbyid(::uint64_t value) { + _internal_set_lobbyid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.lobbyId) +} +inline ::uint64_t SearchRoomRequest::_internal_lobbyid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lobbyid_; +} +inline void SearchRoomRequest::_internal_set_lobbyid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = value; +} + +// uint32 rangeFilter_startIndex = 4; +inline void SearchRoomRequest::clear_rangefilter_startindex() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rangefilter_startindex_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::uint32_t SearchRoomRequest::rangefilter_startindex() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.rangeFilter_startIndex) + return _internal_rangefilter_startindex(); +} +inline void SearchRoomRequest::set_rangefilter_startindex(::uint32_t value) { + _internal_set_rangefilter_startindex(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.rangeFilter_startIndex) +} +inline ::uint32_t SearchRoomRequest::_internal_rangefilter_startindex() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rangefilter_startindex_; +} +inline void SearchRoomRequest::_internal_set_rangefilter_startindex(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rangefilter_startindex_ = value; +} + +// uint32 rangeFilter_max = 5; +inline void SearchRoomRequest::clear_rangefilter_max() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rangefilter_max_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000080U); +} +inline ::uint32_t SearchRoomRequest::rangefilter_max() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.rangeFilter_max) + return _internal_rangefilter_max(); +} +inline void SearchRoomRequest::set_rangefilter_max(::uint32_t value) { + _internal_set_rangefilter_max(value); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.rangeFilter_max) +} +inline ::uint32_t SearchRoomRequest::_internal_rangefilter_max() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rangefilter_max_; +} +inline void SearchRoomRequest::_internal_set_rangefilter_max(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rangefilter_max_ = value; +} + +// uint32 flagFilter = 6; +inline void SearchRoomRequest::clear_flagfilter() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagfilter_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000100U); +} +inline ::uint32_t SearchRoomRequest::flagfilter() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.flagFilter) + return _internal_flagfilter(); +} +inline void SearchRoomRequest::set_flagfilter(::uint32_t value) { + _internal_set_flagfilter(value); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.flagFilter) +} +inline ::uint32_t SearchRoomRequest::_internal_flagfilter() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagfilter_; +} +inline void SearchRoomRequest::_internal_set_flagfilter(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagfilter_ = value; +} + +// uint32 flagAttr = 7; +inline void SearchRoomRequest::clear_flagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000200U); +} +inline ::uint32_t SearchRoomRequest::flagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.flagAttr) + return _internal_flagattr(); +} +inline void SearchRoomRequest::set_flagattr(::uint32_t value) { + _internal_set_flagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomRequest.flagAttr) +} +inline ::uint32_t SearchRoomRequest::_internal_flagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagattr_; +} +inline void SearchRoomRequest::_internal_set_flagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = value; +} + +// repeated .np2_structs.IntSearchFilter intFilter = 8; +inline int SearchRoomRequest::_internal_intfilter_size() const { + return _internal_intfilter().size(); +} +inline int SearchRoomRequest::intfilter_size() const { + return _internal_intfilter_size(); +} +inline void SearchRoomRequest::clear_intfilter() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.intfilter_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::IntSearchFilter* PROTOBUF_NONNULL SearchRoomRequest::mutable_intfilter(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SearchRoomRequest.intFilter) + return _internal_mutable_intfilter()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>* PROTOBUF_NONNULL SearchRoomRequest::mutable_intfilter() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SearchRoomRequest.intFilter) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_intfilter(); +} +inline const ::np2_structs::IntSearchFilter& SearchRoomRequest::intfilter(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.intFilter) + return _internal_intfilter().Get(index); +} +inline ::np2_structs::IntSearchFilter* PROTOBUF_NONNULL SearchRoomRequest::add_intfilter() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::IntSearchFilter* _add = + _internal_mutable_intfilter()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SearchRoomRequest.intFilter) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>& SearchRoomRequest::intfilter() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SearchRoomRequest.intFilter) + return _internal_intfilter(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>& +SearchRoomRequest::_internal_intfilter() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.intfilter_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntSearchFilter>* PROTOBUF_NONNULL +SearchRoomRequest::_internal_mutable_intfilter() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.intfilter_; +} + +// repeated .np2_structs.BinSearchFilter binFilter = 9; +inline int SearchRoomRequest::_internal_binfilter_size() const { + return _internal_binfilter().size(); +} +inline int SearchRoomRequest::binfilter_size() const { + return _internal_binfilter_size(); +} +inline void SearchRoomRequest::clear_binfilter() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.binfilter_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::BinSearchFilter* PROTOBUF_NONNULL SearchRoomRequest::mutable_binfilter(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SearchRoomRequest.binFilter) + return _internal_mutable_binfilter()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>* PROTOBUF_NONNULL SearchRoomRequest::mutable_binfilter() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SearchRoomRequest.binFilter) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_binfilter(); +} +inline const ::np2_structs::BinSearchFilter& SearchRoomRequest::binfilter(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.binFilter) + return _internal_binfilter().Get(index); +} +inline ::np2_structs::BinSearchFilter* PROTOBUF_NONNULL SearchRoomRequest::add_binfilter() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinSearchFilter* _add = + _internal_mutable_binfilter()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.SearchRoomRequest.binFilter) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>& SearchRoomRequest::binfilter() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SearchRoomRequest.binFilter) + return _internal_binfilter(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>& +SearchRoomRequest::_internal_binfilter() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.binfilter_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinSearchFilter>* PROTOBUF_NONNULL +SearchRoomRequest::_internal_mutable_binfilter() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.binfilter_; +} + +// repeated .np2_structs.uint16 attrId = 10; +inline int SearchRoomRequest::_internal_attrid_size() const { + return _internal_attrid().size(); +} +inline int SearchRoomRequest::attrid_size() const { + return _internal_attrid_size(); +} +inline void SearchRoomRequest::clear_attrid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attrid_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SearchRoomRequest::mutable_attrid(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SearchRoomRequest.attrId) + return _internal_mutable_attrid()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL SearchRoomRequest::mutable_attrid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SearchRoomRequest.attrId) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attrid(); +} +inline const ::np2_structs::uint16& SearchRoomRequest::attrid(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomRequest.attrId) + return _internal_attrid().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SearchRoomRequest::add_attrid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_attrid()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.SearchRoomRequest.attrId) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& SearchRoomRequest::attrid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SearchRoomRequest.attrId) + return _internal_attrid(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +SearchRoomRequest::_internal_attrid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attrid_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +SearchRoomRequest::_internal_mutable_attrid() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attrid_; +} + +// ------------------------------------------------------------------- + +// SearchRoomResponse + +// uint32 startIndex = 1; +inline void SearchRoomResponse::clear_startindex() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.startindex_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t SearchRoomResponse::startindex() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomResponse.startIndex) + return _internal_startindex(); +} +inline void SearchRoomResponse::set_startindex(::uint32_t value) { + _internal_set_startindex(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomResponse.startIndex) +} +inline ::uint32_t SearchRoomResponse::_internal_startindex() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.startindex_; +} +inline void SearchRoomResponse::_internal_set_startindex(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.startindex_ = value; +} + +// uint32 total = 2; +inline void SearchRoomResponse::clear_total() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.total_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t SearchRoomResponse::total() const { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomResponse.total) + return _internal_total(); +} +inline void SearchRoomResponse::set_total(::uint32_t value) { + _internal_set_total(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.SearchRoomResponse.total) +} +inline ::uint32_t SearchRoomResponse::_internal_total() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.total_; +} +inline void SearchRoomResponse::_internal_set_total(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.total_ = value; +} + +// repeated .np2_structs.RoomDataExternal rooms = 3; +inline int SearchRoomResponse::_internal_rooms_size() const { + return _internal_rooms().size(); +} +inline int SearchRoomResponse::rooms_size() const { + return _internal_rooms_size(); +} +inline void SearchRoomResponse::clear_rooms() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rooms_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL SearchRoomResponse::mutable_rooms(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SearchRoomResponse.rooms) + return _internal_mutable_rooms()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL SearchRoomResponse::mutable_rooms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SearchRoomResponse.rooms) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_rooms(); +} +inline const ::np2_structs::RoomDataExternal& SearchRoomResponse::rooms(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SearchRoomResponse.rooms) + return _internal_rooms().Get(index); +} +inline ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL SearchRoomResponse::add_rooms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomDataExternal* _add = + _internal_mutable_rooms()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SearchRoomResponse.rooms) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& SearchRoomResponse::rooms() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SearchRoomResponse.rooms) + return _internal_rooms(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& +SearchRoomResponse::_internal_rooms() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rooms_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL +SearchRoomResponse::_internal_mutable_rooms() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.rooms_; +} + +// ------------------------------------------------------------------- + +// CreateJoinRoomRequest + +// uint32 worldId = 1; +inline void CreateJoinRoomRequest::clear_worldid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00002000U); +} +inline ::uint32_t CreateJoinRoomRequest::worldid() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.worldId) + return _internal_worldid(); +} +inline void CreateJoinRoomRequest::set_worldid(::uint32_t value) { + _internal_set_worldid(value); + SetHasBit(_impl_._has_bits_[0], 0x00002000U); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.worldId) +} +inline ::uint32_t CreateJoinRoomRequest::_internal_worldid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.worldid_; +} +inline void CreateJoinRoomRequest::_internal_set_worldid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = value; +} + +// uint64 lobbyId = 2; +inline void CreateJoinRoomRequest::clear_lobbyid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00001000U); +} +inline ::uint64_t CreateJoinRoomRequest::lobbyid() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.lobbyId) + return _internal_lobbyid(); +} +inline void CreateJoinRoomRequest::set_lobbyid(::uint64_t value) { + _internal_set_lobbyid(value); + SetHasBit(_impl_._has_bits_[0], 0x00001000U); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.lobbyId) +} +inline ::uint64_t CreateJoinRoomRequest::_internal_lobbyid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lobbyid_; +} +inline void CreateJoinRoomRequest::_internal_set_lobbyid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lobbyid_ = value; +} + +// uint32 maxSlot = 3; +inline void CreateJoinRoomRequest::clear_maxslot() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.maxslot_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00004000U); +} +inline ::uint32_t CreateJoinRoomRequest::maxslot() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.maxSlot) + return _internal_maxslot(); +} +inline void CreateJoinRoomRequest::set_maxslot(::uint32_t value) { + _internal_set_maxslot(value); + SetHasBit(_impl_._has_bits_[0], 0x00004000U); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.maxSlot) +} +inline ::uint32_t CreateJoinRoomRequest::_internal_maxslot() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.maxslot_; +} +inline void CreateJoinRoomRequest::_internal_set_maxslot(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.maxslot_ = value; +} + +// uint32 flagAttr = 4; +inline void CreateJoinRoomRequest::clear_flagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00010000U); +} +inline ::uint32_t CreateJoinRoomRequest::flagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.flagAttr) + return _internal_flagattr(); +} +inline void CreateJoinRoomRequest::set_flagattr(::uint32_t value) { + _internal_set_flagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00010000U); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.flagAttr) +} +inline ::uint32_t CreateJoinRoomRequest::_internal_flagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagattr_; +} +inline void CreateJoinRoomRequest::_internal_set_flagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = value; +} + +// repeated .np2_structs.BinAttr roomBinAttrInternal = 5; +inline int CreateJoinRoomRequest::_internal_roombinattrinternal_size() const { + return _internal_roombinattrinternal().size(); +} +inline int CreateJoinRoomRequest::roombinattrinternal_size() const { + return _internal_roombinattrinternal_size(); +} +inline void CreateJoinRoomRequest::clear_roombinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roombinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roombinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.roomBinAttrInternal) + return _internal_mutable_roombinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.roomBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roombinattrinternal(); +} +inline const ::np2_structs::BinAttr& CreateJoinRoomRequest::roombinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.roomBinAttrInternal) + return _internal_roombinattrinternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::add_roombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roombinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.roomBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& CreateJoinRoomRequest::roombinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.roomBinAttrInternal) + return _internal_roombinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +CreateJoinRoomRequest::_internal_roombinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roombinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_roombinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roombinattrinternal_; +} + +// repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 6; +inline int CreateJoinRoomRequest::_internal_roomsearchableintattrexternal_size() const { + return _internal_roomsearchableintattrexternal().size(); +} +inline int CreateJoinRoomRequest::roomsearchableintattrexternal_size() const { + return _internal_roomsearchableintattrexternal_size(); +} +inline void CreateJoinRoomRequest::clear_roomsearchableintattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomsearchableintattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roomsearchableintattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.roomSearchableIntAttrExternal) + return _internal_mutable_roomsearchableintattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roomsearchableintattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.roomSearchableIntAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomsearchableintattrexternal(); +} +inline const ::np2_structs::IntAttr& CreateJoinRoomRequest::roomsearchableintattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.roomSearchableIntAttrExternal) + return _internal_roomsearchableintattrexternal().Get(index); +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::add_roomsearchableintattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::IntAttr* _add = + _internal_mutable_roomsearchableintattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.roomSearchableIntAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& CreateJoinRoomRequest::roomsearchableintattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.roomSearchableIntAttrExternal) + return _internal_roomsearchableintattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& +CreateJoinRoomRequest::_internal_roomsearchableintattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomsearchableintattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_roomsearchableintattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomsearchableintattrexternal_; +} + +// repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 7; +inline int CreateJoinRoomRequest::_internal_roomsearchablebinattrexternal_size() const { + return _internal_roomsearchablebinattrexternal().size(); +} +inline int CreateJoinRoomRequest::roomsearchablebinattrexternal_size() const { + return _internal_roomsearchablebinattrexternal_size(); +} +inline void CreateJoinRoomRequest::clear_roomsearchablebinattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomsearchablebinattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roomsearchablebinattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.roomSearchableBinAttrExternal) + return _internal_mutable_roomsearchablebinattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roomsearchablebinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.roomSearchableBinAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomsearchablebinattrexternal(); +} +inline const ::np2_structs::BinAttr& CreateJoinRoomRequest::roomsearchablebinattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.roomSearchableBinAttrExternal) + return _internal_roomsearchablebinattrexternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::add_roomsearchablebinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roomsearchablebinattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.roomSearchableBinAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& CreateJoinRoomRequest::roomsearchablebinattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.roomSearchableBinAttrExternal) + return _internal_roomsearchablebinattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +CreateJoinRoomRequest::_internal_roomsearchablebinattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomsearchablebinattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_roomsearchablebinattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomsearchablebinattrexternal_; +} + +// repeated .np2_structs.BinAttr roomBinAttrExternal = 8; +inline int CreateJoinRoomRequest::_internal_roombinattrexternal_size() const { + return _internal_roombinattrexternal().size(); +} +inline int CreateJoinRoomRequest::roombinattrexternal_size() const { + return _internal_roombinattrexternal_size(); +} +inline void CreateJoinRoomRequest::clear_roombinattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roombinattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roombinattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.roomBinAttrExternal) + return _internal_mutable_roombinattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roombinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.roomBinAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roombinattrexternal(); +} +inline const ::np2_structs::BinAttr& CreateJoinRoomRequest::roombinattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.roomBinAttrExternal) + return _internal_roombinattrexternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::add_roombinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roombinattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.roomBinAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& CreateJoinRoomRequest::roombinattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.roomBinAttrExternal) + return _internal_roombinattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +CreateJoinRoomRequest::_internal_roombinattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roombinattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_roombinattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roombinattrexternal_; +} + +// bytes roomPassword = 9; +inline void CreateJoinRoomRequest::clear_roompassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roompassword_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000100U); +} +inline const ::std::string& CreateJoinRoomRequest::roompassword() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.roomPassword) + return _internal_roompassword(); +} +template +PROTOBUF_ALWAYS_INLINE void CreateJoinRoomRequest::set_roompassword(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + _impl_.roompassword_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.roomPassword) +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roompassword() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + ::std::string* _s = _internal_mutable_roompassword(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.roomPassword) + return _s; +} +inline const ::std::string& CreateJoinRoomRequest::_internal_roompassword() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roompassword_.Get(); +} +inline void CreateJoinRoomRequest::_internal_set_roompassword(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roompassword_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::_internal_mutable_roompassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.roompassword_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE CreateJoinRoomRequest::release_roompassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateJoinRoomRequest.roomPassword) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000100U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + auto* released = _impl_.roompassword_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.roompassword_.Set("", GetArena()); + } + return released; +} +inline void CreateJoinRoomRequest::set_allocated_roompassword(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000100U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + } + _impl_.roompassword_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.roompassword_.IsDefault()) { + _impl_.roompassword_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateJoinRoomRequest.roomPassword) +} + +// repeated .np2_structs.GroupConfig groupConfig = 10; +inline int CreateJoinRoomRequest::_internal_groupconfig_size() const { + return _internal_groupconfig().size(); +} +inline int CreateJoinRoomRequest::groupconfig_size() const { + return _internal_groupconfig_size(); +} +inline void CreateJoinRoomRequest::clear_groupconfig() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.groupconfig_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::np2_structs::GroupConfig* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_groupconfig(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.groupConfig) + return _internal_mutable_groupconfig()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_groupconfig() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.groupConfig) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_groupconfig(); +} +inline const ::np2_structs::GroupConfig& CreateJoinRoomRequest::groupconfig(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.groupConfig) + return _internal_groupconfig().Get(index); +} +inline ::np2_structs::GroupConfig* PROTOBUF_NONNULL CreateJoinRoomRequest::add_groupconfig() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::GroupConfig* _add = + _internal_mutable_groupconfig()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.groupConfig) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>& CreateJoinRoomRequest::groupconfig() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.groupConfig) + return _internal_groupconfig(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>& +CreateJoinRoomRequest::_internal_groupconfig() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.groupconfig_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::GroupConfig>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_groupconfig() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.groupconfig_; +} + +// uint64 passwordSlotMask = 11; +inline void CreateJoinRoomRequest::clear_passwordslotmask() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00008000U); +} +inline ::uint64_t CreateJoinRoomRequest::passwordslotmask() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.passwordSlotMask) + return _internal_passwordslotmask(); +} +inline void CreateJoinRoomRequest::set_passwordslotmask(::uint64_t value) { + _internal_set_passwordslotmask(value); + SetHasBit(_impl_._has_bits_[0], 0x00008000U); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.passwordSlotMask) +} +inline ::uint64_t CreateJoinRoomRequest::_internal_passwordslotmask() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.passwordslotmask_; +} +inline void CreateJoinRoomRequest::_internal_set_passwordslotmask(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_ = value; +} + +// repeated string allowedUser = 12; +inline int CreateJoinRoomRequest::_internal_alloweduser_size() const { + return _internal_alloweduser().size(); +} +inline int CreateJoinRoomRequest::alloweduser_size() const { + return _internal_alloweduser_size(); +} +inline void CreateJoinRoomRequest::clear_alloweduser() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.alloweduser_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::add_alloweduser() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::std::string* _s = + _internal_mutable_alloweduser()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_add_mutable:np2_structs.CreateJoinRoomRequest.allowedUser) + return _s; +} +inline const ::std::string& CreateJoinRoomRequest::alloweduser(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.allowedUser) + return _internal_alloweduser().Get(index); +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_alloweduser(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.allowedUser) + return _internal_mutable_alloweduser()->Mutable(index); +} +template +inline void CreateJoinRoomRequest::set_alloweduser(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString(*_internal_mutable_alloweduser()->Mutable(index), ::std::forward(value), + args... ); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.allowedUser) +} +template +inline void CreateJoinRoomRequest::add_alloweduser(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField( + ::google::protobuf::MessageLite::internal_visibility(), GetArena(), + *_internal_mutable_alloweduser(), ::std::forward(value), + args... ); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.allowedUser) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& CreateJoinRoomRequest::alloweduser() + const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.allowedUser) + return _internal_alloweduser(); +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +CreateJoinRoomRequest::mutable_alloweduser() ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.allowedUser) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_alloweduser(); +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +CreateJoinRoomRequest::_internal_alloweduser() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.alloweduser_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_alloweduser() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.alloweduser_; +} + +// repeated string blockedUser = 13; +inline int CreateJoinRoomRequest::_internal_blockeduser_size() const { + return _internal_blockeduser().size(); +} +inline int CreateJoinRoomRequest::blockeduser_size() const { + return _internal_blockeduser_size(); +} +inline void CreateJoinRoomRequest::clear_blockeduser() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.blockeduser_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::add_blockeduser() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::std::string* _s = + _internal_mutable_blockeduser()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_add_mutable:np2_structs.CreateJoinRoomRequest.blockedUser) + return _s; +} +inline const ::std::string& CreateJoinRoomRequest::blockeduser(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.blockedUser) + return _internal_blockeduser().Get(index); +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_blockeduser(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.blockedUser) + return _internal_mutable_blockeduser()->Mutable(index); +} +template +inline void CreateJoinRoomRequest::set_blockeduser(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString(*_internal_mutable_blockeduser()->Mutable(index), ::std::forward(value), + args... ); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.blockedUser) +} +template +inline void CreateJoinRoomRequest::add_blockeduser(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField( + ::google::protobuf::MessageLite::internal_visibility(), GetArena(), + *_internal_mutable_blockeduser(), ::std::forward(value), + args... ); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.blockedUser) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& CreateJoinRoomRequest::blockeduser() + const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.blockedUser) + return _internal_blockeduser(); +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +CreateJoinRoomRequest::mutable_blockeduser() ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.blockedUser) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_blockeduser(); +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +CreateJoinRoomRequest::_internal_blockeduser() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.blockeduser_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_blockeduser() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.blockeduser_; +} + +// bytes joinRoomGroupLabel = 14; +inline void CreateJoinRoomRequest::clear_joinroomgrouplabel() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joinroomgrouplabel_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000200U); +} +inline const ::std::string& CreateJoinRoomRequest::joinroomgrouplabel() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.joinRoomGroupLabel) + return _internal_joinroomgrouplabel(); +} +template +PROTOBUF_ALWAYS_INLINE void CreateJoinRoomRequest::set_joinroomgrouplabel(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + _impl_.joinroomgrouplabel_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.CreateJoinRoomRequest.joinRoomGroupLabel) +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_joinroomgrouplabel() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + ::std::string* _s = _internal_mutable_joinroomgrouplabel(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.joinRoomGroupLabel) + return _s; +} +inline const ::std::string& CreateJoinRoomRequest::_internal_joinroomgrouplabel() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.joinroomgrouplabel_.Get(); +} +inline void CreateJoinRoomRequest::_internal_set_joinroomgrouplabel(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joinroomgrouplabel_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL CreateJoinRoomRequest::_internal_mutable_joinroomgrouplabel() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.joinroomgrouplabel_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE CreateJoinRoomRequest::release_joinroomgrouplabel() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateJoinRoomRequest.joinRoomGroupLabel) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000200U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + auto* released = _impl_.joinroomgrouplabel_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.joinroomgrouplabel_.Set("", GetArena()); + } + return released; +} +inline void CreateJoinRoomRequest::set_allocated_joinroomgrouplabel(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000200U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + } + _impl_.joinroomgrouplabel_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.joinroomgrouplabel_.IsDefault()) { + _impl_.joinroomgrouplabel_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateJoinRoomRequest.joinRoomGroupLabel) +} + +// repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 15; +inline int CreateJoinRoomRequest::_internal_roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal().size(); +} +inline int CreateJoinRoomRequest::roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal_size(); +} +inline void CreateJoinRoomRequest::clear_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roommemberbinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000080U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roommemberbinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.roomMemberBinAttrInternal) + return _internal_mutable_roommemberbinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000080U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateJoinRoomRequest.roomMemberBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roommemberbinattrinternal(); +} +inline const ::np2_structs::BinAttr& CreateJoinRoomRequest::roommemberbinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL CreateJoinRoomRequest::add_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roommemberbinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000080U); + // @@protoc_insertion_point(field_add:np2_structs.CreateJoinRoomRequest.roomMemberBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& CreateJoinRoomRequest::roommemberbinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateJoinRoomRequest.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +CreateJoinRoomRequest::_internal_roommemberbinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roommemberbinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +CreateJoinRoomRequest::_internal_mutable_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roommemberbinattrinternal_; +} + +// .np2_structs.uint8 teamId = 16; +inline bool CreateJoinRoomRequest::has_teamid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000400U); + PROTOBUF_ASSUME(!value || _impl_.teamid_ != nullptr); + return value; +} +inline void CreateJoinRoomRequest::clear_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ != nullptr) _impl_.teamid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000400U); +} +inline const ::np2_structs::uint8& CreateJoinRoomRequest::_internal_teamid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.teamid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& CreateJoinRoomRequest::teamid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.teamId) + return _internal_teamid(); +} +inline void CreateJoinRoomRequest::unsafe_arena_set_allocated_teamid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.CreateJoinRoomRequest.teamId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE CreateJoinRoomRequest::release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ::np2_structs::uint8* released = _impl_.teamid_; + _impl_.teamid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE CreateJoinRoomRequest::unsafe_arena_release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateJoinRoomRequest.teamId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ::np2_structs::uint8* temp = _impl_.teamid_; + _impl_.teamid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL CreateJoinRoomRequest::_internal_mutable_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.teamid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_teamid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + ::np2_structs::uint8* _msg = _internal_mutable_teamid(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.teamId) + return _msg; +} +inline void CreateJoinRoomRequest::set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000400U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + } + + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateJoinRoomRequest.teamId) +} + +// .np2_structs.OptParam sigOptParam = 17; +inline bool CreateJoinRoomRequest::has_sigoptparam() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000800U); + PROTOBUF_ASSUME(!value || _impl_.sigoptparam_ != nullptr); + return value; +} +inline void CreateJoinRoomRequest::clear_sigoptparam() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.sigoptparam_ != nullptr) _impl_.sigoptparam_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000800U); +} +inline const ::np2_structs::OptParam& CreateJoinRoomRequest::_internal_sigoptparam() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::OptParam* p = _impl_.sigoptparam_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_OptParam_default_instance_); +} +inline const ::np2_structs::OptParam& CreateJoinRoomRequest::sigoptparam() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateJoinRoomRequest.sigOptParam) + return _internal_sigoptparam(); +} +inline void CreateJoinRoomRequest::unsafe_arena_set_allocated_sigoptparam( + ::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.sigoptparam_); + } + _impl_.sigoptparam_ = reinterpret_cast<::np2_structs::OptParam*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000800U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.CreateJoinRoomRequest.sigOptParam) +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE CreateJoinRoomRequest::release_sigoptparam() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + ::np2_structs::OptParam* released = _impl_.sigoptparam_; + _impl_.sigoptparam_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE CreateJoinRoomRequest::unsafe_arena_release_sigoptparam() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateJoinRoomRequest.sigOptParam) + + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + ::np2_structs::OptParam* temp = _impl_.sigoptparam_; + _impl_.sigoptparam_ = nullptr; + return temp; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL CreateJoinRoomRequest::_internal_mutable_sigoptparam() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.sigoptparam_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::OptParam>(GetArena()); + _impl_.sigoptparam_ = reinterpret_cast<::np2_structs::OptParam*>(p); + } + return _impl_.sigoptparam_; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL CreateJoinRoomRequest::mutable_sigoptparam() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000800U); + ::np2_structs::OptParam* _msg = _internal_mutable_sigoptparam(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateJoinRoomRequest.sigOptParam) + return _msg; +} +inline void CreateJoinRoomRequest::set_allocated_sigoptparam(::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.sigoptparam_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000800U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + } + + _impl_.sigoptparam_ = reinterpret_cast<::np2_structs::OptParam*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateJoinRoomRequest.sigOptParam) +} + +// ------------------------------------------------------------------- + +// CreateRoomResponse + +// .np2_structs.RoomDataInternal internal = 1; +inline bool CreateRoomResponse::has_internal() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.internal_ != nullptr); + return value; +} +inline void CreateRoomResponse::clear_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.internal_ != nullptr) _impl_.internal_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::RoomDataInternal& CreateRoomResponse::_internal_internal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomDataInternal* p = _impl_.internal_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomDataInternal_default_instance_); +} +inline const ::np2_structs::RoomDataInternal& CreateRoomResponse::internal() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomResponse.internal) + return _internal_internal(); +} +inline void CreateRoomResponse::unsafe_arena_set_allocated_internal( + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.internal_); + } + _impl_.internal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.CreateRoomResponse.internal) +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE CreateRoomResponse::release_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomDataInternal* released = _impl_.internal_; + _impl_.internal_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE CreateRoomResponse::unsafe_arena_release_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateRoomResponse.internal) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomDataInternal* temp = _impl_.internal_; + _impl_.internal_ = nullptr; + return temp; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL CreateRoomResponse::_internal_mutable_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.internal_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomDataInternal>(GetArena()); + _impl_.internal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(p); + } + return _impl_.internal_; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL CreateRoomResponse::mutable_internal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomDataInternal* _msg = _internal_mutable_internal(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateRoomResponse.internal) + return _msg; +} +inline void CreateRoomResponse::set_allocated_internal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.internal_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.internal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateRoomResponse.internal) +} + +// .np2_structs.OptParam opt_param = 2; +inline bool CreateRoomResponse::has_opt_param() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.opt_param_ != nullptr); + return value; +} +inline void CreateRoomResponse::clear_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ != nullptr) _impl_.opt_param_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::OptParam& CreateRoomResponse::_internal_opt_param() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::OptParam* p = _impl_.opt_param_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_OptParam_default_instance_); +} +inline const ::np2_structs::OptParam& CreateRoomResponse::opt_param() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomResponse.opt_param) + return _internal_opt_param(); +} +inline void CreateRoomResponse::unsafe_arena_set_allocated_opt_param( + ::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.CreateRoomResponse.opt_param) +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE CreateRoomResponse::release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::OptParam* released = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE CreateRoomResponse::unsafe_arena_release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateRoomResponse.opt_param) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::OptParam* temp = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + return temp; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL CreateRoomResponse::_internal_mutable_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::OptParam>(GetArena()); + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(p); + } + return _impl_.opt_param_; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL CreateRoomResponse::mutable_opt_param() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::OptParam* _msg = _internal_mutable_opt_param(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateRoomResponse.opt_param) + return _msg; +} +inline void CreateRoomResponse::set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateRoomResponse.opt_param) +} + +// ------------------------------------------------------------------- + +// JoinRoomRequest + +// uint64 roomId = 1; +inline void JoinRoomRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::uint64_t JoinRoomRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomRequest.roomId) + return _internal_roomid(); +} +inline void JoinRoomRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.JoinRoomRequest.roomId) +} +inline ::uint64_t JoinRoomRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void JoinRoomRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// bytes roomPassword = 2; +inline void JoinRoomRequest::clear_roompassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roompassword_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& JoinRoomRequest::roompassword() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomRequest.roomPassword) + return _internal_roompassword(); +} +template +PROTOBUF_ALWAYS_INLINE void JoinRoomRequest::set_roompassword(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.roompassword_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.JoinRoomRequest.roomPassword) +} +inline ::std::string* PROTOBUF_NONNULL JoinRoomRequest::mutable_roompassword() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_roompassword(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomRequest.roomPassword) + return _s; +} +inline const ::std::string& JoinRoomRequest::_internal_roompassword() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roompassword_.Get(); +} +inline void JoinRoomRequest::_internal_set_roompassword(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roompassword_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL JoinRoomRequest::_internal_mutable_roompassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.roompassword_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE JoinRoomRequest::release_roompassword() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomRequest.roomPassword) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.roompassword_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.roompassword_.Set("", GetArena()); + } + return released; +} +inline void JoinRoomRequest::set_allocated_roompassword(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.roompassword_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.roompassword_.IsDefault()) { + _impl_.roompassword_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomRequest.roomPassword) +} + +// bytes joinRoomGroupLabel = 3; +inline void JoinRoomRequest::clear_joinroomgrouplabel() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joinroomgrouplabel_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& JoinRoomRequest::joinroomgrouplabel() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomRequest.joinRoomGroupLabel) + return _internal_joinroomgrouplabel(); +} +template +PROTOBUF_ALWAYS_INLINE void JoinRoomRequest::set_joinroomgrouplabel(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.joinroomgrouplabel_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.JoinRoomRequest.joinRoomGroupLabel) +} +inline ::std::string* PROTOBUF_NONNULL JoinRoomRequest::mutable_joinroomgrouplabel() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_joinroomgrouplabel(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomRequest.joinRoomGroupLabel) + return _s; +} +inline const ::std::string& JoinRoomRequest::_internal_joinroomgrouplabel() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.joinroomgrouplabel_.Get(); +} +inline void JoinRoomRequest::_internal_set_joinroomgrouplabel(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joinroomgrouplabel_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL JoinRoomRequest::_internal_mutable_joinroomgrouplabel() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.joinroomgrouplabel_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE JoinRoomRequest::release_joinroomgrouplabel() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomRequest.joinRoomGroupLabel) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.joinroomgrouplabel_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.joinroomgrouplabel_.Set("", GetArena()); + } + return released; +} +inline void JoinRoomRequest::set_allocated_joinroomgrouplabel(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.joinroomgrouplabel_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.joinroomgrouplabel_.IsDefault()) { + _impl_.joinroomgrouplabel_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomRequest.joinRoomGroupLabel) +} + +// repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; +inline int JoinRoomRequest::_internal_roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal().size(); +} +inline int JoinRoomRequest::roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal_size(); +} +inline void JoinRoomRequest::clear_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roommemberbinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL JoinRoomRequest::mutable_roommemberbinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomRequest.roomMemberBinAttrInternal) + return _internal_mutable_roommemberbinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL JoinRoomRequest::mutable_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.JoinRoomRequest.roomMemberBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roommemberbinattrinternal(); +} +inline const ::np2_structs::BinAttr& JoinRoomRequest::roommemberbinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomRequest.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL JoinRoomRequest::add_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roommemberbinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.JoinRoomRequest.roomMemberBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& JoinRoomRequest::roommemberbinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.JoinRoomRequest.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +JoinRoomRequest::_internal_roommemberbinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roommemberbinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +JoinRoomRequest::_internal_mutable_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roommemberbinattrinternal_; +} + +// .np2_structs.PresenceOptionData optData = 5; +inline bool JoinRoomRequest::has_optdata() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); + PROTOBUF_ASSUME(!value || _impl_.optdata_ != nullptr); + return value; +} +inline void JoinRoomRequest::clear_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ != nullptr) _impl_.optdata_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::np2_structs::PresenceOptionData& JoinRoomRequest::_internal_optdata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::PresenceOptionData* p = _impl_.optdata_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_PresenceOptionData_default_instance_); +} +inline const ::np2_structs::PresenceOptionData& JoinRoomRequest::optdata() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomRequest.optData) + return _internal_optdata(); +} +inline void JoinRoomRequest::unsafe_arena_set_allocated_optdata( + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.JoinRoomRequest.optData) +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE JoinRoomRequest::release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::PresenceOptionData* released = _impl_.optdata_; + _impl_.optdata_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE JoinRoomRequest::unsafe_arena_release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomRequest.optData) + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::PresenceOptionData* temp = _impl_.optdata_; + _impl_.optdata_ = nullptr; + return temp; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL JoinRoomRequest::_internal_mutable_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::PresenceOptionData>(GetArena()); + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(p); + } + return _impl_.optdata_; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL JoinRoomRequest::mutable_optdata() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::PresenceOptionData* _msg = _internal_mutable_optdata(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomRequest.optData) + return _msg; +} +inline void JoinRoomRequest::set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomRequest.optData) +} + +// .np2_structs.uint8 teamId = 6; +inline bool JoinRoomRequest::has_teamid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + PROTOBUF_ASSUME(!value || _impl_.teamid_ != nullptr); + return value; +} +inline void JoinRoomRequest::clear_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ != nullptr) _impl_.teamid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::np2_structs::uint8& JoinRoomRequest::_internal_teamid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.teamid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& JoinRoomRequest::teamid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomRequest.teamId) + return _internal_teamid(); +} +inline void JoinRoomRequest::unsafe_arena_set_allocated_teamid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.JoinRoomRequest.teamId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE JoinRoomRequest::release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint8* released = _impl_.teamid_; + _impl_.teamid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE JoinRoomRequest::unsafe_arena_release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomRequest.teamId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint8* temp = _impl_.teamid_; + _impl_.teamid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL JoinRoomRequest::_internal_mutable_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.teamid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL JoinRoomRequest::mutable_teamid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint8* _msg = _internal_mutable_teamid(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomRequest.teamId) + return _msg; +} +inline void JoinRoomRequest::set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomRequest.teamId) +} + +// ------------------------------------------------------------------- + +// JoinRoomResponse + +// .np2_structs.RoomDataInternal room_data = 1; +inline bool JoinRoomResponse::has_room_data() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.room_data_ != nullptr); + return value; +} +inline void JoinRoomResponse::clear_room_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.room_data_ != nullptr) _impl_.room_data_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::RoomDataInternal& JoinRoomResponse::_internal_room_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomDataInternal* p = _impl_.room_data_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomDataInternal_default_instance_); +} +inline const ::np2_structs::RoomDataInternal& JoinRoomResponse::room_data() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomResponse.room_data) + return _internal_room_data(); +} +inline void JoinRoomResponse::unsafe_arena_set_allocated_room_data( + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.room_data_); + } + _impl_.room_data_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.JoinRoomResponse.room_data) +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE JoinRoomResponse::release_room_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::RoomDataInternal* released = _impl_.room_data_; + _impl_.room_data_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE JoinRoomResponse::unsafe_arena_release_room_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomResponse.room_data) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::RoomDataInternal* temp = _impl_.room_data_; + _impl_.room_data_ = nullptr; + return temp; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL JoinRoomResponse::_internal_mutable_room_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.room_data_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomDataInternal>(GetArena()); + _impl_.room_data_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(p); + } + return _impl_.room_data_; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL JoinRoomResponse::mutable_room_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::RoomDataInternal* _msg = _internal_mutable_room_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomResponse.room_data) + return _msg; +} +inline void JoinRoomResponse::set_allocated_room_data(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.room_data_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.room_data_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomResponse.room_data) +} + +// repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; +inline int JoinRoomResponse::_internal_signaling_data_size() const { + return _internal_signaling_data().size(); +} +inline int JoinRoomResponse::signaling_data_size() const { + return _internal_signaling_data_size(); +} +inline void JoinRoomResponse::clear_signaling_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.signaling_data_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::Matching2SignalingInfo* PROTOBUF_NONNULL JoinRoomResponse::mutable_signaling_data(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomResponse.signaling_data) + return _internal_mutable_signaling_data()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>* PROTOBUF_NONNULL JoinRoomResponse::mutable_signaling_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.JoinRoomResponse.signaling_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_signaling_data(); +} +inline const ::np2_structs::Matching2SignalingInfo& JoinRoomResponse::signaling_data(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomResponse.signaling_data) + return _internal_signaling_data().Get(index); +} +inline ::np2_structs::Matching2SignalingInfo* PROTOBUF_NONNULL JoinRoomResponse::add_signaling_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::Matching2SignalingInfo* _add = + _internal_mutable_signaling_data()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.JoinRoomResponse.signaling_data) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>& JoinRoomResponse::signaling_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.JoinRoomResponse.signaling_data) + return _internal_signaling_data(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>& +JoinRoomResponse::_internal_signaling_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.signaling_data_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::Matching2SignalingInfo>* PROTOBUF_NONNULL +JoinRoomResponse::_internal_mutable_signaling_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.signaling_data_; +} + +// .np2_structs.OptParam opt_param = 3; +inline bool JoinRoomResponse::has_opt_param() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.opt_param_ != nullptr); + return value; +} +inline void JoinRoomResponse::clear_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ != nullptr) _impl_.opt_param_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::OptParam& JoinRoomResponse::_internal_opt_param() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::OptParam* p = _impl_.opt_param_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_OptParam_default_instance_); +} +inline const ::np2_structs::OptParam& JoinRoomResponse::opt_param() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomResponse.opt_param) + return _internal_opt_param(); +} +inline void JoinRoomResponse::unsafe_arena_set_allocated_opt_param( + ::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.JoinRoomResponse.opt_param) +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE JoinRoomResponse::release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::OptParam* released = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE JoinRoomResponse::unsafe_arena_release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomResponse.opt_param) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::OptParam* temp = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + return temp; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL JoinRoomResponse::_internal_mutable_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::OptParam>(GetArena()); + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(p); + } + return _impl_.opt_param_; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL JoinRoomResponse::mutable_opt_param() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::OptParam* _msg = _internal_mutable_opt_param(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomResponse.opt_param) + return _msg; +} +inline void JoinRoomResponse::set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomResponse.opt_param) +} + +// ------------------------------------------------------------------- + +// LeaveRoomRequest + +// uint64 roomId = 1; +inline void LeaveRoomRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint64_t LeaveRoomRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.LeaveRoomRequest.roomId) + return _internal_roomid(); +} +inline void LeaveRoomRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.LeaveRoomRequest.roomId) +} +inline ::uint64_t LeaveRoomRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void LeaveRoomRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// .np2_structs.PresenceOptionData optData = 2; +inline bool LeaveRoomRequest::has_optdata() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.optdata_ != nullptr); + return value; +} +inline void LeaveRoomRequest::clear_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ != nullptr) _impl_.optdata_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::PresenceOptionData& LeaveRoomRequest::_internal_optdata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::PresenceOptionData* p = _impl_.optdata_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_PresenceOptionData_default_instance_); +} +inline const ::np2_structs::PresenceOptionData& LeaveRoomRequest::optdata() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.LeaveRoomRequest.optData) + return _internal_optdata(); +} +inline void LeaveRoomRequest::unsafe_arena_set_allocated_optdata( + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.LeaveRoomRequest.optData) +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE LeaveRoomRequest::release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::PresenceOptionData* released = _impl_.optdata_; + _impl_.optdata_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE LeaveRoomRequest::unsafe_arena_release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.LeaveRoomRequest.optData) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::PresenceOptionData* temp = _impl_.optdata_; + _impl_.optdata_ = nullptr; + return temp; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL LeaveRoomRequest::_internal_mutable_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::PresenceOptionData>(GetArena()); + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(p); + } + return _impl_.optdata_; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL LeaveRoomRequest::mutable_optdata() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::PresenceOptionData* _msg = _internal_mutable_optdata(); + // @@protoc_insertion_point(field_mutable:np2_structs.LeaveRoomRequest.optData) + return _msg; +} +inline void LeaveRoomRequest::set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.LeaveRoomRequest.optData) +} + +// ------------------------------------------------------------------- + +// GetRoomDataExternalListRequest + +// repeated uint64 roomIds = 1; +inline int GetRoomDataExternalListRequest::_internal_roomids_size() const { + return _internal_roomids().size(); +} +inline int GetRoomDataExternalListRequest::roomids_size() const { + return _internal_roomids_size(); +} +inline void GetRoomDataExternalListRequest::clear_roomids() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomids_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint64_t GetRoomDataExternalListRequest::roomids(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomDataExternalListRequest.roomIds) + return _internal_roomids().Get(index); +} +inline void GetRoomDataExternalListRequest::set_roomids(int index, ::uint64_t value) { + _internal_mutable_roomids()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.GetRoomDataExternalListRequest.roomIds) +} +inline void GetRoomDataExternalListRequest::add_roomids(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_roomids()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomDataExternalListRequest.roomIds) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& GetRoomDataExternalListRequest::roomids() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomDataExternalListRequest.roomIds) + return _internal_roomids(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL GetRoomDataExternalListRequest::mutable_roomids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomDataExternalListRequest.roomIds) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomids(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +GetRoomDataExternalListRequest::_internal_roomids() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomids_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL +GetRoomDataExternalListRequest::_internal_mutable_roomids() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomids_; +} + +// repeated .np2_structs.uint16 attrIds = 2; +inline int GetRoomDataExternalListRequest::_internal_attrids_size() const { + return _internal_attrids().size(); +} +inline int GetRoomDataExternalListRequest::attrids_size() const { + return _internal_attrids_size(); +} +inline void GetRoomDataExternalListRequest::clear_attrids() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attrids_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomDataExternalListRequest::mutable_attrids(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomDataExternalListRequest.attrIds) + return _internal_mutable_attrids()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL GetRoomDataExternalListRequest::mutable_attrids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomDataExternalListRequest.attrIds) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attrids(); +} +inline const ::np2_structs::uint16& GetRoomDataExternalListRequest::attrids(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomDataExternalListRequest.attrIds) + return _internal_attrids().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomDataExternalListRequest::add_attrids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_attrids()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomDataExternalListRequest.attrIds) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& GetRoomDataExternalListRequest::attrids() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomDataExternalListRequest.attrIds) + return _internal_attrids(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +GetRoomDataExternalListRequest::_internal_attrids() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attrids_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +GetRoomDataExternalListRequest::_internal_mutable_attrids() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attrids_; +} + +// ------------------------------------------------------------------- + +// GetRoomDataExternalListResponse + +// repeated .np2_structs.RoomDataExternal rooms = 1; +inline int GetRoomDataExternalListResponse::_internal_rooms_size() const { + return _internal_rooms().size(); +} +inline int GetRoomDataExternalListResponse::rooms_size() const { + return _internal_rooms_size(); +} +inline void GetRoomDataExternalListResponse::clear_rooms() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rooms_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL GetRoomDataExternalListResponse::mutable_rooms(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomDataExternalListResponse.rooms) + return _internal_mutable_rooms()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL GetRoomDataExternalListResponse::mutable_rooms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomDataExternalListResponse.rooms) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_rooms(); +} +inline const ::np2_structs::RoomDataExternal& GetRoomDataExternalListResponse::rooms(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomDataExternalListResponse.rooms) + return _internal_rooms().Get(index); +} +inline ::np2_structs::RoomDataExternal* PROTOBUF_NONNULL GetRoomDataExternalListResponse::add_rooms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomDataExternal* _add = + _internal_mutable_rooms()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomDataExternalListResponse.rooms) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& GetRoomDataExternalListResponse::rooms() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomDataExternalListResponse.rooms) + return _internal_rooms(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>& +GetRoomDataExternalListResponse::_internal_rooms() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rooms_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomDataExternal>* PROTOBUF_NONNULL +GetRoomDataExternalListResponse::_internal_mutable_rooms() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.rooms_; +} + +// ------------------------------------------------------------------- + +// SetRoomDataExternalRequest + +// uint64 roomId = 1; +inline void SetRoomDataExternalRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint64_t SetRoomDataExternalRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataExternalRequest.roomId) + return _internal_roomid(); +} +inline void SetRoomDataExternalRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomDataExternalRequest.roomId) +} +inline ::uint64_t SetRoomDataExternalRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void SetRoomDataExternalRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// repeated .np2_structs.IntAttr roomSearchableIntAttrExternal = 2; +inline int SetRoomDataExternalRequest::_internal_roomsearchableintattrexternal_size() const { + return _internal_roomsearchableintattrexternal().size(); +} +inline int SetRoomDataExternalRequest::roomsearchableintattrexternal_size() const { + return _internal_roomsearchableintattrexternal_size(); +} +inline void SetRoomDataExternalRequest::clear_roomsearchableintattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomsearchableintattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL SetRoomDataExternalRequest::mutable_roomsearchableintattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomDataExternalRequest.roomSearchableIntAttrExternal) + return _internal_mutable_roomsearchableintattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL SetRoomDataExternalRequest::mutable_roomsearchableintattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataExternalRequest.roomSearchableIntAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomsearchableintattrexternal(); +} +inline const ::np2_structs::IntAttr& SetRoomDataExternalRequest::roomsearchableintattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataExternalRequest.roomSearchableIntAttrExternal) + return _internal_roomsearchableintattrexternal().Get(index); +} +inline ::np2_structs::IntAttr* PROTOBUF_NONNULL SetRoomDataExternalRequest::add_roomsearchableintattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::IntAttr* _add = + _internal_mutable_roomsearchableintattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataExternalRequest.roomSearchableIntAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& SetRoomDataExternalRequest::roomsearchableintattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataExternalRequest.roomSearchableIntAttrExternal) + return _internal_roomsearchableintattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>& +SetRoomDataExternalRequest::_internal_roomsearchableintattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomsearchableintattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::IntAttr>* PROTOBUF_NONNULL +SetRoomDataExternalRequest::_internal_mutable_roomsearchableintattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomsearchableintattrexternal_; +} + +// repeated .np2_structs.BinAttr roomSearchableBinAttrExternal = 3; +inline int SetRoomDataExternalRequest::_internal_roomsearchablebinattrexternal_size() const { + return _internal_roomsearchablebinattrexternal().size(); +} +inline int SetRoomDataExternalRequest::roomsearchablebinattrexternal_size() const { + return _internal_roomsearchablebinattrexternal_size(); +} +inline void SetRoomDataExternalRequest::clear_roomsearchablebinattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomsearchablebinattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomDataExternalRequest::mutable_roomsearchablebinattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomDataExternalRequest.roomSearchableBinAttrExternal) + return _internal_mutable_roomsearchablebinattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL SetRoomDataExternalRequest::mutable_roomsearchablebinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataExternalRequest.roomSearchableBinAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roomsearchablebinattrexternal(); +} +inline const ::np2_structs::BinAttr& SetRoomDataExternalRequest::roomsearchablebinattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataExternalRequest.roomSearchableBinAttrExternal) + return _internal_roomsearchablebinattrexternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomDataExternalRequest::add_roomsearchablebinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roomsearchablebinattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataExternalRequest.roomSearchableBinAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& SetRoomDataExternalRequest::roomsearchablebinattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataExternalRequest.roomSearchableBinAttrExternal) + return _internal_roomsearchablebinattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +SetRoomDataExternalRequest::_internal_roomsearchablebinattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomsearchablebinattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +SetRoomDataExternalRequest::_internal_mutable_roomsearchablebinattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roomsearchablebinattrexternal_; +} + +// repeated .np2_structs.BinAttr roomBinAttrExternal = 4; +inline int SetRoomDataExternalRequest::_internal_roombinattrexternal_size() const { + return _internal_roombinattrexternal().size(); +} +inline int SetRoomDataExternalRequest::roombinattrexternal_size() const { + return _internal_roombinattrexternal_size(); +} +inline void SetRoomDataExternalRequest::clear_roombinattrexternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roombinattrexternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomDataExternalRequest::mutable_roombinattrexternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomDataExternalRequest.roomBinAttrExternal) + return _internal_mutable_roombinattrexternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL SetRoomDataExternalRequest::mutable_roombinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataExternalRequest.roomBinAttrExternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roombinattrexternal(); +} +inline const ::np2_structs::BinAttr& SetRoomDataExternalRequest::roombinattrexternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataExternalRequest.roomBinAttrExternal) + return _internal_roombinattrexternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomDataExternalRequest::add_roombinattrexternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roombinattrexternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataExternalRequest.roomBinAttrExternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& SetRoomDataExternalRequest::roombinattrexternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataExternalRequest.roomBinAttrExternal) + return _internal_roombinattrexternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +SetRoomDataExternalRequest::_internal_roombinattrexternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roombinattrexternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +SetRoomDataExternalRequest::_internal_mutable_roombinattrexternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roombinattrexternal_; +} + +// ------------------------------------------------------------------- + +// SetRoomDataInternalRequest + +// uint64 roomId = 1; +inline void SetRoomDataInternalRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint64_t SetRoomDataInternalRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.roomId) + return _internal_roomid(); +} +inline void SetRoomDataInternalRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomDataInternalRequest.roomId) +} +inline ::uint64_t SetRoomDataInternalRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void SetRoomDataInternalRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// uint32 flagFilter = 2; +inline void SetRoomDataInternalRequest::clear_flagfilter() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagfilter_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::uint32_t SetRoomDataInternalRequest::flagfilter() const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.flagFilter) + return _internal_flagfilter(); +} +inline void SetRoomDataInternalRequest::set_flagfilter(::uint32_t value) { + _internal_set_flagfilter(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomDataInternalRequest.flagFilter) +} +inline ::uint32_t SetRoomDataInternalRequest::_internal_flagfilter() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagfilter_; +} +inline void SetRoomDataInternalRequest::_internal_set_flagfilter(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagfilter_ = value; +} + +// uint32 flagAttr = 3; +inline void SetRoomDataInternalRequest::clear_flagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::uint32_t SetRoomDataInternalRequest::flagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.flagAttr) + return _internal_flagattr(); +} +inline void SetRoomDataInternalRequest::set_flagattr(::uint32_t value) { + _internal_set_flagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomDataInternalRequest.flagAttr) +} +inline ::uint32_t SetRoomDataInternalRequest::_internal_flagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.flagattr_; +} +inline void SetRoomDataInternalRequest::_internal_set_flagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.flagattr_ = value; +} + +// repeated .np2_structs.BinAttr roomBinAttrInternal = 4; +inline int SetRoomDataInternalRequest::_internal_roombinattrinternal_size() const { + return _internal_roombinattrinternal().size(); +} +inline int SetRoomDataInternalRequest::roombinattrinternal_size() const { + return _internal_roombinattrinternal_size(); +} +inline void SetRoomDataInternalRequest::clear_roombinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roombinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_roombinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomDataInternalRequest.roomBinAttrInternal) + return _internal_mutable_roombinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_roombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataInternalRequest.roomBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roombinattrinternal(); +} +inline const ::np2_structs::BinAttr& SetRoomDataInternalRequest::roombinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.roomBinAttrInternal) + return _internal_roombinattrinternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomDataInternalRequest::add_roombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roombinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataInternalRequest.roomBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& SetRoomDataInternalRequest::roombinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataInternalRequest.roomBinAttrInternal) + return _internal_roombinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +SetRoomDataInternalRequest::_internal_roombinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roombinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +SetRoomDataInternalRequest::_internal_mutable_roombinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roombinattrinternal_; +} + +// repeated .np2_structs.RoomGroupPasswordConfig passwordConfig = 5; +inline int SetRoomDataInternalRequest::_internal_passwordconfig_size() const { + return _internal_passwordconfig().size(); +} +inline int SetRoomDataInternalRequest::passwordconfig_size() const { + return _internal_passwordconfig_size(); +} +inline void SetRoomDataInternalRequest::clear_passwordconfig() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordconfig_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::RoomGroupPasswordConfig* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_passwordconfig(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomDataInternalRequest.passwordConfig) + return _internal_mutable_passwordconfig()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_passwordconfig() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataInternalRequest.passwordConfig) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_passwordconfig(); +} +inline const ::np2_structs::RoomGroupPasswordConfig& SetRoomDataInternalRequest::passwordconfig(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.passwordConfig) + return _internal_passwordconfig().Get(index); +} +inline ::np2_structs::RoomGroupPasswordConfig* PROTOBUF_NONNULL SetRoomDataInternalRequest::add_passwordconfig() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomGroupPasswordConfig* _add = + _internal_mutable_passwordconfig()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataInternalRequest.passwordConfig) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>& SetRoomDataInternalRequest::passwordconfig() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataInternalRequest.passwordConfig) + return _internal_passwordconfig(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>& +SetRoomDataInternalRequest::_internal_passwordconfig() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.passwordconfig_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomGroupPasswordConfig>* PROTOBUF_NONNULL +SetRoomDataInternalRequest::_internal_mutable_passwordconfig() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.passwordconfig_; +} + +// repeated uint64 passwordSlotMask = 6; +inline int SetRoomDataInternalRequest::_internal_passwordslotmask_size() const { + return _internal_passwordslotmask().size(); +} +inline int SetRoomDataInternalRequest::passwordslotmask_size() const { + return _internal_passwordslotmask_size(); +} +inline void SetRoomDataInternalRequest::clear_passwordslotmask() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.passwordslotmask_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t SetRoomDataInternalRequest::passwordslotmask(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.passwordSlotMask) + return _internal_passwordslotmask().Get(index); +} +inline void SetRoomDataInternalRequest::set_passwordslotmask(int index, ::uint64_t value) { + _internal_mutable_passwordslotmask()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomDataInternalRequest.passwordSlotMask) +} +inline void SetRoomDataInternalRequest::add_passwordslotmask(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_passwordslotmask()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataInternalRequest.passwordSlotMask) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& SetRoomDataInternalRequest::passwordslotmask() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataInternalRequest.passwordSlotMask) + return _internal_passwordslotmask(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_passwordslotmask() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataInternalRequest.passwordSlotMask) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_passwordslotmask(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +SetRoomDataInternalRequest::_internal_passwordslotmask() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.passwordslotmask_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL +SetRoomDataInternalRequest::_internal_mutable_passwordslotmask() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.passwordslotmask_; +} + +// repeated .np2_structs.uint16 ownerPrivilegeRank = 7; +inline int SetRoomDataInternalRequest::_internal_ownerprivilegerank_size() const { + return _internal_ownerprivilegerank().size(); +} +inline int SetRoomDataInternalRequest::ownerprivilegerank_size() const { + return _internal_ownerprivilegerank_size(); +} +inline void SetRoomDataInternalRequest::clear_ownerprivilegerank() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ownerprivilegerank_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_ownerprivilegerank(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomDataInternalRequest.ownerPrivilegeRank) + return _internal_mutable_ownerprivilegerank()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL SetRoomDataInternalRequest::mutable_ownerprivilegerank() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomDataInternalRequest.ownerPrivilegeRank) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_ownerprivilegerank(); +} +inline const ::np2_structs::uint16& SetRoomDataInternalRequest::ownerprivilegerank(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomDataInternalRequest.ownerPrivilegeRank) + return _internal_ownerprivilegerank().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SetRoomDataInternalRequest::add_ownerprivilegerank() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_ownerprivilegerank()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomDataInternalRequest.ownerPrivilegeRank) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& SetRoomDataInternalRequest::ownerprivilegerank() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomDataInternalRequest.ownerPrivilegeRank) + return _internal_ownerprivilegerank(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +SetRoomDataInternalRequest::_internal_ownerprivilegerank() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ownerprivilegerank_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +SetRoomDataInternalRequest::_internal_mutable_ownerprivilegerank() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.ownerprivilegerank_; +} + +// ------------------------------------------------------------------- + +// GetRoomMemberDataInternalRequest + +// uint64 roomId = 1; +inline void GetRoomMemberDataInternalRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t GetRoomMemberDataInternalRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomMemberDataInternalRequest.roomId) + return _internal_roomid(); +} +inline void GetRoomMemberDataInternalRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetRoomMemberDataInternalRequest.roomId) +} +inline ::uint64_t GetRoomMemberDataInternalRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void GetRoomMemberDataInternalRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// .np2_structs.uint16 memberId = 2; +inline bool GetRoomMemberDataInternalRequest::has_memberid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.memberid_ != nullptr); + return value; +} +inline void GetRoomMemberDataInternalRequest::clear_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.memberid_ != nullptr) _impl_.memberid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint16& GetRoomMemberDataInternalRequest::_internal_memberid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.memberid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& GetRoomMemberDataInternalRequest::memberid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomMemberDataInternalRequest.memberId) + return _internal_memberid(); +} +inline void GetRoomMemberDataInternalRequest::unsafe_arena_set_allocated_memberid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.memberid_); + } + _impl_.memberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.GetRoomMemberDataInternalRequest.memberId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE GetRoomMemberDataInternalRequest::release_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* released = _impl_.memberid_; + _impl_.memberid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE GetRoomMemberDataInternalRequest::unsafe_arena_release_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.GetRoomMemberDataInternalRequest.memberId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* temp = _impl_.memberid_; + _impl_.memberid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::_internal_mutable_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.memberid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.memberid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.memberid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::mutable_memberid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* _msg = _internal_mutable_memberid(); + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomMemberDataInternalRequest.memberId) + return _msg; +} +inline void GetRoomMemberDataInternalRequest::set_allocated_memberid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.memberid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.memberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.GetRoomMemberDataInternalRequest.memberId) +} + +// repeated .np2_structs.uint16 attrId = 3; +inline int GetRoomMemberDataInternalRequest::_internal_attrid_size() const { + return _internal_attrid().size(); +} +inline int GetRoomMemberDataInternalRequest::attrid_size() const { + return _internal_attrid_size(); +} +inline void GetRoomMemberDataInternalRequest::clear_attrid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attrid_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::mutable_attrid(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomMemberDataInternalRequest.attrId) + return _internal_mutable_attrid()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::mutable_attrid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomMemberDataInternalRequest.attrId) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attrid(); +} +inline const ::np2_structs::uint16& GetRoomMemberDataInternalRequest::attrid(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomMemberDataInternalRequest.attrId) + return _internal_attrid().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomMemberDataInternalRequest::add_attrid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_attrid()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomMemberDataInternalRequest.attrId) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& GetRoomMemberDataInternalRequest::attrid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomMemberDataInternalRequest.attrId) + return _internal_attrid(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +GetRoomMemberDataInternalRequest::_internal_attrid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attrid_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +GetRoomMemberDataInternalRequest::_internal_mutable_attrid() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attrid_; +} + +// ------------------------------------------------------------------- + +// SetRoomMemberDataInternalRequest + +// uint64 roomId = 1; +inline void SetRoomMemberDataInternalRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint64_t SetRoomMemberDataInternalRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomMemberDataInternalRequest.roomId) + return _internal_roomid(); +} +inline void SetRoomMemberDataInternalRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomMemberDataInternalRequest.roomId) +} +inline ::uint64_t SetRoomMemberDataInternalRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void SetRoomMemberDataInternalRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// .np2_structs.uint16 memberId = 2; +inline bool SetRoomMemberDataInternalRequest::has_memberid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.memberid_ != nullptr); + return value; +} +inline void SetRoomMemberDataInternalRequest::clear_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.memberid_ != nullptr) _impl_.memberid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint16& SetRoomMemberDataInternalRequest::_internal_memberid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.memberid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& SetRoomMemberDataInternalRequest::memberid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomMemberDataInternalRequest.memberId) + return _internal_memberid(); +} +inline void SetRoomMemberDataInternalRequest::unsafe_arena_set_allocated_memberid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.memberid_); + } + _impl_.memberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.SetRoomMemberDataInternalRequest.memberId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE SetRoomMemberDataInternalRequest::release_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* released = _impl_.memberid_; + _impl_.memberid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE SetRoomMemberDataInternalRequest::unsafe_arena_release_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetRoomMemberDataInternalRequest.memberId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* temp = _impl_.memberid_; + _impl_.memberid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::_internal_mutable_memberid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.memberid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.memberid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.memberid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::mutable_memberid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* _msg = _internal_mutable_memberid(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomMemberDataInternalRequest.memberId) + return _msg; +} +inline void SetRoomMemberDataInternalRequest::set_allocated_memberid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.memberid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.memberid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetRoomMemberDataInternalRequest.memberId) +} + +// .np2_structs.uint8 teamId = 3; +inline bool SetRoomMemberDataInternalRequest::has_teamid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.teamid_ != nullptr); + return value; +} +inline void SetRoomMemberDataInternalRequest::clear_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ != nullptr) _impl_.teamid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::uint8& SetRoomMemberDataInternalRequest::_internal_teamid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.teamid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& SetRoomMemberDataInternalRequest::teamid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomMemberDataInternalRequest.teamId) + return _internal_teamid(); +} +inline void SetRoomMemberDataInternalRequest::unsafe_arena_set_allocated_teamid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.SetRoomMemberDataInternalRequest.teamId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE SetRoomMemberDataInternalRequest::release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* released = _impl_.teamid_; + _impl_.teamid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE SetRoomMemberDataInternalRequest::unsafe_arena_release_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetRoomMemberDataInternalRequest.teamId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* temp = _impl_.teamid_; + _impl_.teamid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::_internal_mutable_teamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.teamid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.teamid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::mutable_teamid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* _msg = _internal_mutable_teamid(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomMemberDataInternalRequest.teamId) + return _msg; +} +inline void SetRoomMemberDataInternalRequest::set_allocated_teamid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.teamid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.teamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetRoomMemberDataInternalRequest.teamId) +} + +// repeated .np2_structs.BinAttr roomMemberBinAttrInternal = 4; +inline int SetRoomMemberDataInternalRequest::_internal_roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal().size(); +} +inline int SetRoomMemberDataInternalRequest::roommemberbinattrinternal_size() const { + return _internal_roommemberbinattrinternal_size(); +} +inline void SetRoomMemberDataInternalRequest::clear_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roommemberbinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::mutable_roommemberbinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomMemberDataInternalRequest.roomMemberBinAttrInternal) + return _internal_mutable_roommemberbinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::mutable_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetRoomMemberDataInternalRequest.roomMemberBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_roommemberbinattrinternal(); +} +inline const ::np2_structs::BinAttr& SetRoomMemberDataInternalRequest::roommemberbinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomMemberDataInternalRequest.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetRoomMemberDataInternalRequest::add_roommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_roommemberbinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SetRoomMemberDataInternalRequest.roomMemberBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& SetRoomMemberDataInternalRequest::roommemberbinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetRoomMemberDataInternalRequest.roomMemberBinAttrInternal) + return _internal_roommemberbinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +SetRoomMemberDataInternalRequest::_internal_roommemberbinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roommemberbinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +SetRoomMemberDataInternalRequest::_internal_mutable_roommemberbinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.roommemberbinattrinternal_; +} + +// ------------------------------------------------------------------- + +// SetUserInfo + +// .np2_structs.uint16 serverId = 1; +inline bool SetUserInfo::has_serverid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.serverid_ != nullptr); + return value; +} +inline void SetUserInfo::clear_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ != nullptr) _impl_.serverid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint16& SetUserInfo::_internal_serverid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.serverid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& SetUserInfo::serverid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetUserInfo.serverId) + return _internal_serverid(); +} +inline void SetUserInfo::unsafe_arena_set_allocated_serverid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.SetUserInfo.serverId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE SetUserInfo::release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* released = _impl_.serverid_; + _impl_.serverid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE SetUserInfo::unsafe_arena_release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetUserInfo.serverId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* temp = _impl_.serverid_; + _impl_.serverid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SetUserInfo::_internal_mutable_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.serverid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SetUserInfo::mutable_serverid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint16* _msg = _internal_mutable_serverid(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetUserInfo.serverId) + return _msg; +} +inline void SetUserInfo::set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetUserInfo.serverId) +} + +// repeated .np2_structs.BinAttr userBinAttr = 2; +inline int SetUserInfo::_internal_userbinattr_size() const { + return _internal_userbinattr().size(); +} +inline int SetUserInfo::userbinattr_size() const { + return _internal_userbinattr_size(); +} +inline void SetUserInfo::clear_userbinattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.userbinattr_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetUserInfo::mutable_userbinattr(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SetUserInfo.userBinAttr) + return _internal_mutable_userbinattr()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL SetUserInfo::mutable_userbinattr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SetUserInfo.userBinAttr) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_userbinattr(); +} +inline const ::np2_structs::BinAttr& SetUserInfo::userbinattr(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetUserInfo.userBinAttr) + return _internal_userbinattr().Get(index); +} +inline ::np2_structs::BinAttr* PROTOBUF_NONNULL SetUserInfo::add_userbinattr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::BinAttr* _add = + _internal_mutable_userbinattr()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SetUserInfo.userBinAttr) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& SetUserInfo::userbinattr() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SetUserInfo.userBinAttr) + return _internal_userbinattr(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>& +SetUserInfo::_internal_userbinattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.userbinattr_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::BinAttr>* PROTOBUF_NONNULL +SetUserInfo::_internal_mutable_userbinattr() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.userbinattr_; +} + +// ------------------------------------------------------------------- + +// GetRoomDataInternalRequest + +// uint64 roomId = 1; +inline void GetRoomDataInternalRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint64_t GetRoomDataInternalRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomDataInternalRequest.roomId) + return _internal_roomid(); +} +inline void GetRoomDataInternalRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GetRoomDataInternalRequest.roomId) +} +inline ::uint64_t GetRoomDataInternalRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void GetRoomDataInternalRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// repeated .np2_structs.uint16 attrId = 2; +inline int GetRoomDataInternalRequest::_internal_attrid_size() const { + return _internal_attrid().size(); +} +inline int GetRoomDataInternalRequest::attrid_size() const { + return _internal_attrid_size(); +} +inline void GetRoomDataInternalRequest::clear_attrid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attrid_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomDataInternalRequest::mutable_attrid(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomDataInternalRequest.attrId) + return _internal_mutable_attrid()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL GetRoomDataInternalRequest::mutable_attrid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomDataInternalRequest.attrId) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attrid(); +} +inline const ::np2_structs::uint16& GetRoomDataInternalRequest::attrid(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomDataInternalRequest.attrId) + return _internal_attrid().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetRoomDataInternalRequest::add_attrid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_attrid()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomDataInternalRequest.attrId) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& GetRoomDataInternalRequest::attrid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomDataInternalRequest.attrId) + return _internal_attrid(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +GetRoomDataInternalRequest::_internal_attrid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attrid_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +GetRoomDataInternalRequest::_internal_mutable_attrid() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attrid_; +} + +// ------------------------------------------------------------------- + +// RoomMemberUpdateInfo + +// .np2_structs.RoomMemberDataInternal roomMemberDataInternal = 1; +inline bool RoomMemberUpdateInfo::has_roommemberdatainternal() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.roommemberdatainternal_ != nullptr); + return value; +} +inline void RoomMemberUpdateInfo::clear_roommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.roommemberdatainternal_ != nullptr) _impl_.roommemberdatainternal_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::RoomMemberDataInternal& RoomMemberUpdateInfo::_internal_roommemberdatainternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomMemberDataInternal* p = _impl_.roommemberdatainternal_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomMemberDataInternal_default_instance_); +} +inline const ::np2_structs::RoomMemberDataInternal& RoomMemberUpdateInfo::roommemberdatainternal() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberUpdateInfo.roomMemberDataInternal) + return _internal_roommemberdatainternal(); +} +inline void RoomMemberUpdateInfo::unsafe_arena_set_allocated_roommemberdatainternal( + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.roommemberdatainternal_); + } + _impl_.roommemberdatainternal_ = reinterpret_cast<::np2_structs::RoomMemberDataInternal*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberUpdateInfo.roomMemberDataInternal) +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE RoomMemberUpdateInfo::release_roommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomMemberDataInternal* released = _impl_.roommemberdatainternal_; + _impl_.roommemberdatainternal_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE RoomMemberUpdateInfo::unsafe_arena_release_roommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberUpdateInfo.roomMemberDataInternal) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomMemberDataInternal* temp = _impl_.roommemberdatainternal_; + _impl_.roommemberdatainternal_ = nullptr; + return temp; +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL RoomMemberUpdateInfo::_internal_mutable_roommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.roommemberdatainternal_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomMemberDataInternal>(GetArena()); + _impl_.roommemberdatainternal_ = reinterpret_cast<::np2_structs::RoomMemberDataInternal*>(p); + } + return _impl_.roommemberdatainternal_; +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL RoomMemberUpdateInfo::mutable_roommemberdatainternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomMemberDataInternal* _msg = _internal_mutable_roommemberdatainternal(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberUpdateInfo.roomMemberDataInternal) + return _msg; +} +inline void RoomMemberUpdateInfo::set_allocated_roommemberdatainternal(::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.roommemberdatainternal_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.roommemberdatainternal_ = reinterpret_cast<::np2_structs::RoomMemberDataInternal*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberUpdateInfo.roomMemberDataInternal) +} + +// .np2_structs.uint8 eventCause = 2; +inline bool RoomMemberUpdateInfo::has_eventcause() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.eventcause_ != nullptr); + return value; +} +inline void RoomMemberUpdateInfo::clear_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.eventcause_ != nullptr) _impl_.eventcause_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint8& RoomMemberUpdateInfo::_internal_eventcause() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.eventcause_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomMemberUpdateInfo::eventcause() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberUpdateInfo.eventCause) + return _internal_eventcause(); +} +inline void RoomMemberUpdateInfo::unsafe_arena_set_allocated_eventcause( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.eventcause_); + } + _impl_.eventcause_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberUpdateInfo.eventCause) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberUpdateInfo::release_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* released = _impl_.eventcause_; + _impl_.eventcause_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberUpdateInfo::unsafe_arena_release_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberUpdateInfo.eventCause) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* temp = _impl_.eventcause_; + _impl_.eventcause_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberUpdateInfo::_internal_mutable_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.eventcause_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.eventcause_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.eventcause_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberUpdateInfo::mutable_eventcause() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* _msg = _internal_mutable_eventcause(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberUpdateInfo.eventCause) + return _msg; +} +inline void RoomMemberUpdateInfo::set_allocated_eventcause(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.eventcause_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.eventcause_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberUpdateInfo.eventCause) +} + +// .np2_structs.PresenceOptionData optData = 3; +inline bool RoomMemberUpdateInfo::has_optdata() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.optdata_ != nullptr); + return value; +} +inline void RoomMemberUpdateInfo::clear_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ != nullptr) _impl_.optdata_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::PresenceOptionData& RoomMemberUpdateInfo::_internal_optdata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::PresenceOptionData* p = _impl_.optdata_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_PresenceOptionData_default_instance_); +} +inline const ::np2_structs::PresenceOptionData& RoomMemberUpdateInfo::optdata() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberUpdateInfo.optData) + return _internal_optdata(); +} +inline void RoomMemberUpdateInfo::unsafe_arena_set_allocated_optdata( + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberUpdateInfo.optData) +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE RoomMemberUpdateInfo::release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::PresenceOptionData* released = _impl_.optdata_; + _impl_.optdata_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE RoomMemberUpdateInfo::unsafe_arena_release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberUpdateInfo.optData) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::PresenceOptionData* temp = _impl_.optdata_; + _impl_.optdata_ = nullptr; + return temp; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL RoomMemberUpdateInfo::_internal_mutable_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::PresenceOptionData>(GetArena()); + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(p); + } + return _impl_.optdata_; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL RoomMemberUpdateInfo::mutable_optdata() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::PresenceOptionData* _msg = _internal_mutable_optdata(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberUpdateInfo.optData) + return _msg; +} +inline void RoomMemberUpdateInfo::set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberUpdateInfo.optData) +} + +// ------------------------------------------------------------------- + +// NotificationUserJoinedRoom + +// uint64 room_id = 1; +inline void NotificationUserJoinedRoom::clear_room_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.room_id_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t NotificationUserJoinedRoom::room_id() const { + // @@protoc_insertion_point(field_get:np2_structs.NotificationUserJoinedRoom.room_id) + return _internal_room_id(); +} +inline void NotificationUserJoinedRoom::set_room_id(::uint64_t value) { + _internal_set_room_id(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.NotificationUserJoinedRoom.room_id) +} +inline ::uint64_t NotificationUserJoinedRoom::_internal_room_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.room_id_; +} +inline void NotificationUserJoinedRoom::_internal_set_room_id(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.room_id_ = value; +} + +// .np2_structs.RoomMemberUpdateInfo update_info = 2; +inline bool NotificationUserJoinedRoom::has_update_info() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.update_info_ != nullptr); + return value; +} +inline void NotificationUserJoinedRoom::clear_update_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.update_info_ != nullptr) _impl_.update_info_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::RoomMemberUpdateInfo& NotificationUserJoinedRoom::_internal_update_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomMemberUpdateInfo* p = _impl_.update_info_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomMemberUpdateInfo_default_instance_); +} +inline const ::np2_structs::RoomMemberUpdateInfo& NotificationUserJoinedRoom::update_info() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.NotificationUserJoinedRoom.update_info) + return _internal_update_info(); +} +inline void NotificationUserJoinedRoom::unsafe_arena_set_allocated_update_info( + ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.update_info_); + } + _impl_.update_info_ = reinterpret_cast<::np2_structs::RoomMemberUpdateInfo*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.NotificationUserJoinedRoom.update_info) +} +inline ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE NotificationUserJoinedRoom::release_update_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomMemberUpdateInfo* released = _impl_.update_info_; + _impl_.update_info_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE NotificationUserJoinedRoom::unsafe_arena_release_update_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.NotificationUserJoinedRoom.update_info) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomMemberUpdateInfo* temp = _impl_.update_info_; + _impl_.update_info_ = nullptr; + return temp; +} +inline ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NONNULL NotificationUserJoinedRoom::_internal_mutable_update_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.update_info_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomMemberUpdateInfo>(GetArena()); + _impl_.update_info_ = reinterpret_cast<::np2_structs::RoomMemberUpdateInfo*>(p); + } + return _impl_.update_info_; +} +inline ::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NONNULL NotificationUserJoinedRoom::mutable_update_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomMemberUpdateInfo* _msg = _internal_mutable_update_info(); + // @@protoc_insertion_point(field_mutable:np2_structs.NotificationUserJoinedRoom.update_info) + return _msg; +} +inline void NotificationUserJoinedRoom::set_allocated_update_info(::np2_structs::RoomMemberUpdateInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.update_info_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.update_info_ = reinterpret_cast<::np2_structs::RoomMemberUpdateInfo*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.NotificationUserJoinedRoom.update_info) +} + +// .np2_structs.SignalingAddr signaling = 3; +inline bool NotificationUserJoinedRoom::has_signaling() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.signaling_ != nullptr); + return value; +} +inline void NotificationUserJoinedRoom::clear_signaling() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.signaling_ != nullptr) _impl_.signaling_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::SignalingAddr& NotificationUserJoinedRoom::_internal_signaling() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::SignalingAddr* p = _impl_.signaling_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_SignalingAddr_default_instance_); +} +inline const ::np2_structs::SignalingAddr& NotificationUserJoinedRoom::signaling() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.NotificationUserJoinedRoom.signaling) + return _internal_signaling(); +} +inline void NotificationUserJoinedRoom::unsafe_arena_set_allocated_signaling( + ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.signaling_); + } + _impl_.signaling_ = reinterpret_cast<::np2_structs::SignalingAddr*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.NotificationUserJoinedRoom.signaling) +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE NotificationUserJoinedRoom::release_signaling() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* released = _impl_.signaling_; + _impl_.signaling_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NULLABLE NotificationUserJoinedRoom::unsafe_arena_release_signaling() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.NotificationUserJoinedRoom.signaling) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* temp = _impl_.signaling_; + _impl_.signaling_ = nullptr; + return temp; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NONNULL NotificationUserJoinedRoom::_internal_mutable_signaling() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.signaling_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::SignalingAddr>(GetArena()); + _impl_.signaling_ = reinterpret_cast<::np2_structs::SignalingAddr*>(p); + } + return _impl_.signaling_; +} +inline ::np2_structs::SignalingAddr* PROTOBUF_NONNULL NotificationUserJoinedRoom::mutable_signaling() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::SignalingAddr* _msg = _internal_mutable_signaling(); + // @@protoc_insertion_point(field_mutable:np2_structs.NotificationUserJoinedRoom.signaling) + return _msg; +} +inline void NotificationUserJoinedRoom::set_allocated_signaling(::np2_structs::SignalingAddr* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.signaling_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.signaling_ = reinterpret_cast<::np2_structs::SignalingAddr*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.NotificationUserJoinedRoom.signaling) +} + +// ------------------------------------------------------------------- + +// RoomUpdateInfo + +// .np2_structs.uint8 eventCause = 1; +inline bool RoomUpdateInfo::has_eventcause() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.eventcause_ != nullptr); + return value; +} +inline void RoomUpdateInfo::clear_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.eventcause_ != nullptr) _impl_.eventcause_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint8& RoomUpdateInfo::_internal_eventcause() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.eventcause_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomUpdateInfo::eventcause() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomUpdateInfo.eventCause) + return _internal_eventcause(); +} +inline void RoomUpdateInfo::unsafe_arena_set_allocated_eventcause( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.eventcause_); + } + _impl_.eventcause_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomUpdateInfo.eventCause) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomUpdateInfo::release_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* released = _impl_.eventcause_; + _impl_.eventcause_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomUpdateInfo::unsafe_arena_release_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomUpdateInfo.eventCause) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* temp = _impl_.eventcause_; + _impl_.eventcause_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomUpdateInfo::_internal_mutable_eventcause() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.eventcause_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.eventcause_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.eventcause_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomUpdateInfo::mutable_eventcause() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint8* _msg = _internal_mutable_eventcause(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomUpdateInfo.eventCause) + return _msg; +} +inline void RoomUpdateInfo::set_allocated_eventcause(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.eventcause_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.eventcause_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomUpdateInfo.eventCause) +} + +// int32 errorCode = 2; +inline void RoomUpdateInfo::clear_errorcode() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.errorcode_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t RoomUpdateInfo::errorcode() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomUpdateInfo.errorCode) + return _internal_errorcode(); +} +inline void RoomUpdateInfo::set_errorcode(::int32_t value) { + _internal_set_errorcode(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.RoomUpdateInfo.errorCode) +} +inline ::int32_t RoomUpdateInfo::_internal_errorcode() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.errorcode_; +} +inline void RoomUpdateInfo::_internal_set_errorcode(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.errorcode_ = value; +} + +// .np2_structs.PresenceOptionData optData = 3; +inline bool RoomUpdateInfo::has_optdata() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.optdata_ != nullptr); + return value; +} +inline void RoomUpdateInfo::clear_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ != nullptr) _impl_.optdata_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::PresenceOptionData& RoomUpdateInfo::_internal_optdata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::PresenceOptionData* p = _impl_.optdata_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_PresenceOptionData_default_instance_); +} +inline const ::np2_structs::PresenceOptionData& RoomUpdateInfo::optdata() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomUpdateInfo.optData) + return _internal_optdata(); +} +inline void RoomUpdateInfo::unsafe_arena_set_allocated_optdata( + ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomUpdateInfo.optData) +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE RoomUpdateInfo::release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::PresenceOptionData* released = _impl_.optdata_; + _impl_.optdata_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE RoomUpdateInfo::unsafe_arena_release_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomUpdateInfo.optData) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::PresenceOptionData* temp = _impl_.optdata_; + _impl_.optdata_ = nullptr; + return temp; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL RoomUpdateInfo::_internal_mutable_optdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.optdata_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::PresenceOptionData>(GetArena()); + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(p); + } + return _impl_.optdata_; +} +inline ::np2_structs::PresenceOptionData* PROTOBUF_NONNULL RoomUpdateInfo::mutable_optdata() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::PresenceOptionData* _msg = _internal_mutable_optdata(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomUpdateInfo.optData) + return _msg; +} +inline void RoomUpdateInfo::set_allocated_optdata(::np2_structs::PresenceOptionData* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.optdata_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.optdata_ = reinterpret_cast<::np2_structs::PresenceOptionData*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomUpdateInfo.optData) +} + +// ------------------------------------------------------------------- + +// RoomDataInternalUpdateInfo + +// .np2_structs.RoomDataInternal newRoomDataInternal = 1; +inline bool RoomDataInternalUpdateInfo::has_newroomdatainternal() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.newroomdatainternal_ != nullptr); + return value; +} +inline void RoomDataInternalUpdateInfo::clear_newroomdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.newroomdatainternal_ != nullptr) _impl_.newroomdatainternal_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::RoomDataInternal& RoomDataInternalUpdateInfo::_internal_newroomdatainternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomDataInternal* p = _impl_.newroomdatainternal_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomDataInternal_default_instance_); +} +inline const ::np2_structs::RoomDataInternal& RoomDataInternalUpdateInfo::newroomdatainternal() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternalUpdateInfo.newRoomDataInternal) + return _internal_newroomdatainternal(); +} +inline void RoomDataInternalUpdateInfo::unsafe_arena_set_allocated_newroomdatainternal( + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.newroomdatainternal_); + } + _impl_.newroomdatainternal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomDataInternalUpdateInfo.newRoomDataInternal) +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE RoomDataInternalUpdateInfo::release_newroomdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::RoomDataInternal* released = _impl_.newroomdatainternal_; + _impl_.newroomdatainternal_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE RoomDataInternalUpdateInfo::unsafe_arena_release_newroomdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataInternalUpdateInfo.newRoomDataInternal) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::RoomDataInternal* temp = _impl_.newroomdatainternal_; + _impl_.newroomdatainternal_ = nullptr; + return temp; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::_internal_mutable_newroomdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.newroomdatainternal_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomDataInternal>(GetArena()); + _impl_.newroomdatainternal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(p); + } + return _impl_.newroomdatainternal_; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::mutable_newroomdatainternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::RoomDataInternal* _msg = _internal_mutable_newroomdatainternal(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternalUpdateInfo.newRoomDataInternal) + return _msg; +} +inline void RoomDataInternalUpdateInfo::set_allocated_newroomdatainternal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.newroomdatainternal_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.newroomdatainternal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataInternalUpdateInfo.newRoomDataInternal) +} + +// uint32 prevFlagAttr = 2; +inline void RoomDataInternalUpdateInfo::clear_prevflagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.prevflagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint32_t RoomDataInternalUpdateInfo::prevflagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternalUpdateInfo.prevFlagAttr) + return _internal_prevflagattr(); +} +inline void RoomDataInternalUpdateInfo::set_prevflagattr(::uint32_t value) { + _internal_set_prevflagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternalUpdateInfo.prevFlagAttr) +} +inline ::uint32_t RoomDataInternalUpdateInfo::_internal_prevflagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.prevflagattr_; +} +inline void RoomDataInternalUpdateInfo::_internal_set_prevflagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.prevflagattr_ = value; +} + +// uint64 prevRoomPasswordSlotMask = 3; +inline void RoomDataInternalUpdateInfo::clear_prevroompasswordslotmask() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.prevroompasswordslotmask_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint64_t RoomDataInternalUpdateInfo::prevroompasswordslotmask() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternalUpdateInfo.prevRoomPasswordSlotMask) + return _internal_prevroompasswordslotmask(); +} +inline void RoomDataInternalUpdateInfo::set_prevroompasswordslotmask(::uint64_t value) { + _internal_set_prevroompasswordslotmask(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternalUpdateInfo.prevRoomPasswordSlotMask) +} +inline ::uint64_t RoomDataInternalUpdateInfo::_internal_prevroompasswordslotmask() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.prevroompasswordslotmask_; +} +inline void RoomDataInternalUpdateInfo::_internal_set_prevroompasswordslotmask(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.prevroompasswordslotmask_ = value; +} + +// bytes newRoomGroup = 4; +inline void RoomDataInternalUpdateInfo::clear_newroomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.newroomgroup_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& RoomDataInternalUpdateInfo::newroomgroup() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternalUpdateInfo.newRoomGroup) + return _internal_newroomgroup(); +} +template +PROTOBUF_ALWAYS_INLINE void RoomDataInternalUpdateInfo::set_newroomgroup(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.newroomgroup_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.RoomDataInternalUpdateInfo.newRoomGroup) +} +inline ::std::string* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::mutable_newroomgroup() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_newroomgroup(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternalUpdateInfo.newRoomGroup) + return _s; +} +inline const ::std::string& RoomDataInternalUpdateInfo::_internal_newroomgroup() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.newroomgroup_.Get(); +} +inline void RoomDataInternalUpdateInfo::_internal_set_newroomgroup(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.newroomgroup_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::_internal_mutable_newroomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.newroomgroup_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE RoomDataInternalUpdateInfo::release_newroomgroup() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomDataInternalUpdateInfo.newRoomGroup) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.newroomgroup_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.newroomgroup_.Set("", GetArena()); + } + return released; +} +inline void RoomDataInternalUpdateInfo::set_allocated_newroomgroup(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.newroomgroup_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.newroomgroup_.IsDefault()) { + _impl_.newroomgroup_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomDataInternalUpdateInfo.newRoomGroup) +} + +// repeated .np2_structs.uint16 newRoomBinAttrInternal = 5; +inline int RoomDataInternalUpdateInfo::_internal_newroombinattrinternal_size() const { + return _internal_newroombinattrinternal().size(); +} +inline int RoomDataInternalUpdateInfo::newroombinattrinternal_size() const { + return _internal_newroombinattrinternal_size(); +} +inline void RoomDataInternalUpdateInfo::clear_newroombinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.newroombinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::mutable_newroombinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomDataInternalUpdateInfo.newRoomBinAttrInternal) + return _internal_mutable_newroombinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::mutable_newroombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomDataInternalUpdateInfo.newRoomBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_newroombinattrinternal(); +} +inline const ::np2_structs::uint16& RoomDataInternalUpdateInfo::newroombinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomDataInternalUpdateInfo.newRoomBinAttrInternal) + return _internal_newroombinattrinternal().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomDataInternalUpdateInfo::add_newroombinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_newroombinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.RoomDataInternalUpdateInfo.newRoomBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& RoomDataInternalUpdateInfo::newroombinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomDataInternalUpdateInfo.newRoomBinAttrInternal) + return _internal_newroombinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +RoomDataInternalUpdateInfo::_internal_newroombinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.newroombinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +RoomDataInternalUpdateInfo::_internal_mutable_newroombinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.newroombinattrinternal_; +} + +// ------------------------------------------------------------------- + +// RoomMemberDataInternalUpdateInfo + +// .np2_structs.RoomMemberDataInternal newRoomMemberDataInternal = 1; +inline bool RoomMemberDataInternalUpdateInfo::has_newroommemberdatainternal() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.newroommemberdatainternal_ != nullptr); + return value; +} +inline void RoomMemberDataInternalUpdateInfo::clear_newroommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.newroommemberdatainternal_ != nullptr) _impl_.newroommemberdatainternal_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::RoomMemberDataInternal& RoomMemberDataInternalUpdateInfo::_internal_newroommemberdatainternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomMemberDataInternal* p = _impl_.newroommemberdatainternal_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomMemberDataInternal_default_instance_); +} +inline const ::np2_structs::RoomMemberDataInternal& RoomMemberDataInternalUpdateInfo::newroommemberdatainternal() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberDataInternal) + return _internal_newroommemberdatainternal(); +} +inline void RoomMemberDataInternalUpdateInfo::unsafe_arena_set_allocated_newroommemberdatainternal( + ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.newroommemberdatainternal_); + } + _impl_.newroommemberdatainternal_ = reinterpret_cast<::np2_structs::RoomMemberDataInternal*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberDataInternal) +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE RoomMemberDataInternalUpdateInfo::release_newroommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::RoomMemberDataInternal* released = _impl_.newroommemberdatainternal_; + _impl_.newroommemberdatainternal_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE RoomMemberDataInternalUpdateInfo::unsafe_arena_release_newroommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberDataInternal) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::RoomMemberDataInternal* temp = _impl_.newroommemberdatainternal_; + _impl_.newroommemberdatainternal_ = nullptr; + return temp; +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::_internal_mutable_newroommemberdatainternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.newroommemberdatainternal_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomMemberDataInternal>(GetArena()); + _impl_.newroommemberdatainternal_ = reinterpret_cast<::np2_structs::RoomMemberDataInternal*>(p); + } + return _impl_.newroommemberdatainternal_; +} +inline ::np2_structs::RoomMemberDataInternal* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::mutable_newroommemberdatainternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::RoomMemberDataInternal* _msg = _internal_mutable_newroommemberdatainternal(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberDataInternal) + return _msg; +} +inline void RoomMemberDataInternalUpdateInfo::set_allocated_newroommemberdatainternal(::np2_structs::RoomMemberDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.newroommemberdatainternal_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.newroommemberdatainternal_ = reinterpret_cast<::np2_structs::RoomMemberDataInternal*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberDataInternal) +} + +// uint32 prevFlagAttr = 2; +inline void RoomMemberDataInternalUpdateInfo::clear_prevflagattr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.prevflagattr_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t RoomMemberDataInternalUpdateInfo::prevflagattr() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternalUpdateInfo.prevFlagAttr) + return _internal_prevflagattr(); +} +inline void RoomMemberDataInternalUpdateInfo::set_prevflagattr(::uint32_t value) { + _internal_set_prevflagattr(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMemberDataInternalUpdateInfo.prevFlagAttr) +} +inline ::uint32_t RoomMemberDataInternalUpdateInfo::_internal_prevflagattr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.prevflagattr_; +} +inline void RoomMemberDataInternalUpdateInfo::_internal_set_prevflagattr(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.prevflagattr_ = value; +} + +// .np2_structs.uint8 prevTeamId = 3; +inline bool RoomMemberDataInternalUpdateInfo::has_prevteamid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.prevteamid_ != nullptr); + return value; +} +inline void RoomMemberDataInternalUpdateInfo::clear_prevteamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.prevteamid_ != nullptr) _impl_.prevteamid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::uint8& RoomMemberDataInternalUpdateInfo::_internal_prevteamid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.prevteamid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomMemberDataInternalUpdateInfo::prevteamid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternalUpdateInfo.prevTeamId) + return _internal_prevteamid(); +} +inline void RoomMemberDataInternalUpdateInfo::unsafe_arena_set_allocated_prevteamid( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.prevteamid_); + } + _impl_.prevteamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataInternalUpdateInfo.prevTeamId) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataInternalUpdateInfo::release_prevteamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* released = _impl_.prevteamid_; + _impl_.prevteamid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataInternalUpdateInfo::unsafe_arena_release_prevteamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataInternalUpdateInfo.prevTeamId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* temp = _impl_.prevteamid_; + _impl_.prevteamid_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::_internal_mutable_prevteamid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.prevteamid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.prevteamid_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.prevteamid_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::mutable_prevteamid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* _msg = _internal_mutable_prevteamid(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternalUpdateInfo.prevTeamId) + return _msg; +} +inline void RoomMemberDataInternalUpdateInfo::set_allocated_prevteamid(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.prevteamid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.prevteamid_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataInternalUpdateInfo.prevTeamId) +} + +// repeated .np2_structs.uint16 newRoomMemberBinAttrInternal = 4; +inline int RoomMemberDataInternalUpdateInfo::_internal_newroommemberbinattrinternal_size() const { + return _internal_newroommemberbinattrinternal().size(); +} +inline int RoomMemberDataInternalUpdateInfo::newroommemberbinattrinternal_size() const { + return _internal_newroommemberbinattrinternal_size(); +} +inline void RoomMemberDataInternalUpdateInfo::clear_newroommemberbinattrinternal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.newroommemberbinattrinternal_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::mutable_newroommemberbinattrinternal(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberBinAttrInternal) + return _internal_mutable_newroommemberbinattrinternal()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::mutable_newroommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberBinAttrInternal) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_newroommemberbinattrinternal(); +} +inline const ::np2_structs::uint16& RoomMemberDataInternalUpdateInfo::newroommemberbinattrinternal(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberBinAttrInternal) + return _internal_newroommemberbinattrinternal().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomMemberDataInternalUpdateInfo::add_newroommemberbinattrinternal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_newroommemberbinattrinternal()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberBinAttrInternal) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& RoomMemberDataInternalUpdateInfo::newroommemberbinattrinternal() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomMemberDataInternalUpdateInfo.newRoomMemberBinAttrInternal) + return _internal_newroommemberbinattrinternal(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +RoomMemberDataInternalUpdateInfo::_internal_newroommemberbinattrinternal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.newroommemberbinattrinternal_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +RoomMemberDataInternalUpdateInfo::_internal_mutable_newroommemberbinattrinternal() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.newroommemberbinattrinternal_; +} + +// ------------------------------------------------------------------- + +// GetPingInfoResponse + +// .np2_structs.uint16 serverId = 1; +inline bool GetPingInfoResponse::has_serverid() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.serverid_ != nullptr); + return value; +} +inline void GetPingInfoResponse::clear_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ != nullptr) _impl_.serverid_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::uint16& GetPingInfoResponse::_internal_serverid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.serverid_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& GetPingInfoResponse::serverid() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetPingInfoResponse.serverId) + return _internal_serverid(); +} +inline void GetPingInfoResponse::unsafe_arena_set_allocated_serverid( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.GetPingInfoResponse.serverId) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE GetPingInfoResponse::release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* released = _impl_.serverid_; + _impl_.serverid_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE GetPingInfoResponse::unsafe_arena_release_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.GetPingInfoResponse.serverId) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* temp = _impl_.serverid_; + _impl_.serverid_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetPingInfoResponse::_internal_mutable_serverid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.serverid_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.serverid_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL GetPingInfoResponse::mutable_serverid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::uint16* _msg = _internal_mutable_serverid(); + // @@protoc_insertion_point(field_mutable:np2_structs.GetPingInfoResponse.serverId) + return _msg; +} +inline void GetPingInfoResponse::set_allocated_serverid(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.serverid_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.serverid_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.GetPingInfoResponse.serverId) +} + +// uint32 worldId = 2; +inline void GetPingInfoResponse::clear_worldid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t GetPingInfoResponse::worldid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetPingInfoResponse.worldId) + return _internal_worldid(); +} +inline void GetPingInfoResponse::set_worldid(::uint32_t value) { + _internal_set_worldid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetPingInfoResponse.worldId) +} +inline ::uint32_t GetPingInfoResponse::_internal_worldid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.worldid_; +} +inline void GetPingInfoResponse::_internal_set_worldid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.worldid_ = value; +} + +// uint64 roomId = 3; +inline void GetPingInfoResponse::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint64_t GetPingInfoResponse::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetPingInfoResponse.roomId) + return _internal_roomid(); +} +inline void GetPingInfoResponse::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GetPingInfoResponse.roomId) +} +inline ::uint64_t GetPingInfoResponse::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void GetPingInfoResponse::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// uint32 rtt = 4; +inline void GetPingInfoResponse::clear_rtt() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rtt_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t GetPingInfoResponse::rtt() const { + // @@protoc_insertion_point(field_get:np2_structs.GetPingInfoResponse.rtt) + return _internal_rtt(); +} +inline void GetPingInfoResponse::set_rtt(::uint32_t value) { + _internal_set_rtt(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.GetPingInfoResponse.rtt) +} +inline ::uint32_t GetPingInfoResponse::_internal_rtt() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rtt_; +} +inline void GetPingInfoResponse::_internal_set_rtt(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rtt_ = value; +} + +// ------------------------------------------------------------------- + +// SendRoomMessageRequest + +// uint64 roomId = 1; +inline void SendRoomMessageRequest::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint64_t SendRoomMessageRequest::roomid() const { + // @@protoc_insertion_point(field_get:np2_structs.SendRoomMessageRequest.roomId) + return _internal_roomid(); +} +inline void SendRoomMessageRequest::set_roomid(::uint64_t value) { + _internal_set_roomid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.SendRoomMessageRequest.roomId) +} +inline ::uint64_t SendRoomMessageRequest::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_; +} +inline void SendRoomMessageRequest::_internal_set_roomid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_ = value; +} + +// .np2_structs.uint8 castType = 2; +inline bool SendRoomMessageRequest::has_casttype() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.casttype_ != nullptr); + return value; +} +inline void SendRoomMessageRequest::clear_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.casttype_ != nullptr) _impl_.casttype_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::uint8& SendRoomMessageRequest::_internal_casttype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.casttype_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& SendRoomMessageRequest::casttype() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SendRoomMessageRequest.castType) + return _internal_casttype(); +} +inline void SendRoomMessageRequest::unsafe_arena_set_allocated_casttype( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.casttype_); + } + _impl_.casttype_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.SendRoomMessageRequest.castType) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE SendRoomMessageRequest::release_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* released = _impl_.casttype_; + _impl_.casttype_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE SendRoomMessageRequest::unsafe_arena_release_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SendRoomMessageRequest.castType) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* temp = _impl_.casttype_; + _impl_.casttype_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL SendRoomMessageRequest::_internal_mutable_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.casttype_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.casttype_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.casttype_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL SendRoomMessageRequest::mutable_casttype() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* _msg = _internal_mutable_casttype(); + // @@protoc_insertion_point(field_mutable:np2_structs.SendRoomMessageRequest.castType) + return _msg; +} +inline void SendRoomMessageRequest::set_allocated_casttype(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.casttype_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.casttype_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.SendRoomMessageRequest.castType) +} + +// repeated .np2_structs.uint16 dst = 3; +inline int SendRoomMessageRequest::_internal_dst_size() const { + return _internal_dst().size(); +} +inline int SendRoomMessageRequest::dst_size() const { + return _internal_dst_size(); +} +inline void SendRoomMessageRequest::clear_dst() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dst_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SendRoomMessageRequest::mutable_dst(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SendRoomMessageRequest.dst) + return _internal_mutable_dst()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL SendRoomMessageRequest::mutable_dst() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SendRoomMessageRequest.dst) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_dst(); +} +inline const ::np2_structs::uint16& SendRoomMessageRequest::dst(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SendRoomMessageRequest.dst) + return _internal_dst().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL SendRoomMessageRequest::add_dst() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_dst()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SendRoomMessageRequest.dst) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& SendRoomMessageRequest::dst() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SendRoomMessageRequest.dst) + return _internal_dst(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +SendRoomMessageRequest::_internal_dst() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dst_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +SendRoomMessageRequest::_internal_mutable_dst() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.dst_; +} + +// bytes msg = 4; +inline void SendRoomMessageRequest::clear_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msg_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& SendRoomMessageRequest::msg() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SendRoomMessageRequest.msg) + return _internal_msg(); +} +template +PROTOBUF_ALWAYS_INLINE void SendRoomMessageRequest::set_msg(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.msg_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SendRoomMessageRequest.msg) +} +inline ::std::string* PROTOBUF_NONNULL SendRoomMessageRequest::mutable_msg() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_msg(); + // @@protoc_insertion_point(field_mutable:np2_structs.SendRoomMessageRequest.msg) + return _s; +} +inline const ::std::string& SendRoomMessageRequest::_internal_msg() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.msg_.Get(); +} +inline void SendRoomMessageRequest::_internal_set_msg(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msg_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SendRoomMessageRequest::_internal_mutable_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.msg_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SendRoomMessageRequest::release_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SendRoomMessageRequest.msg) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.msg_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.msg_.Set("", GetArena()); + } + return released; +} +inline void SendRoomMessageRequest::set_allocated_msg(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.msg_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.msg_.IsDefault()) { + _impl_.msg_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SendRoomMessageRequest.msg) +} + +// .np2_structs.uint8 option = 5; +inline bool SendRoomMessageRequest::has_option() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); + PROTOBUF_ASSUME(!value || _impl_.option_ != nullptr); + return value; +} +inline void SendRoomMessageRequest::clear_option() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.option_ != nullptr) _impl_.option_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::np2_structs::uint8& SendRoomMessageRequest::_internal_option() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.option_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& SendRoomMessageRequest::option() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SendRoomMessageRequest.option) + return _internal_option(); +} +inline void SendRoomMessageRequest::unsafe_arena_set_allocated_option( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.option_); + } + _impl_.option_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.SendRoomMessageRequest.option) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE SendRoomMessageRequest::release_option() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::uint8* released = _impl_.option_; + _impl_.option_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE SendRoomMessageRequest::unsafe_arena_release_option() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SendRoomMessageRequest.option) + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::uint8* temp = _impl_.option_; + _impl_.option_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL SendRoomMessageRequest::_internal_mutable_option() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.option_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.option_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.option_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL SendRoomMessageRequest::mutable_option() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::uint8* _msg = _internal_mutable_option(); + // @@protoc_insertion_point(field_mutable:np2_structs.SendRoomMessageRequest.option) + return _msg; +} +inline void SendRoomMessageRequest::set_allocated_option(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.option_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + + _impl_.option_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.SendRoomMessageRequest.option) +} + +// ------------------------------------------------------------------- + +// RoomMessageInfo + +// bool filtered = 1; +inline void RoomMessageInfo::clear_filtered() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.filtered_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline bool RoomMessageInfo::filtered() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMessageInfo.filtered) + return _internal_filtered(); +} +inline void RoomMessageInfo::set_filtered(bool value) { + _internal_set_filtered(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMessageInfo.filtered) +} +inline bool RoomMessageInfo::_internal_filtered() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.filtered_; +} +inline void RoomMessageInfo::_internal_set_filtered(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.filtered_ = value; +} + +// .np2_structs.uint8 castType = 2; +inline bool RoomMessageInfo::has_casttype() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.casttype_ != nullptr); + return value; +} +inline void RoomMessageInfo::clear_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.casttype_ != nullptr) _impl_.casttype_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::uint8& RoomMessageInfo::_internal_casttype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.casttype_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomMessageInfo::casttype() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMessageInfo.castType) + return _internal_casttype(); +} +inline void RoomMessageInfo::unsafe_arena_set_allocated_casttype( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.casttype_); + } + _impl_.casttype_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMessageInfo.castType) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMessageInfo::release_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* released = _impl_.casttype_; + _impl_.casttype_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMessageInfo::unsafe_arena_release_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMessageInfo.castType) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* temp = _impl_.casttype_; + _impl_.casttype_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMessageInfo::_internal_mutable_casttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.casttype_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.casttype_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.casttype_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMessageInfo::mutable_casttype() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::uint8* _msg = _internal_mutable_casttype(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMessageInfo.castType) + return _msg; +} +inline void RoomMessageInfo::set_allocated_casttype(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.casttype_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.casttype_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMessageInfo.castType) +} + +// repeated .np2_structs.uint16 dst = 3; +inline int RoomMessageInfo::_internal_dst_size() const { + return _internal_dst().size(); +} +inline int RoomMessageInfo::dst_size() const { + return _internal_dst_size(); +} +inline void RoomMessageInfo::clear_dst() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dst_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomMessageInfo::mutable_dst(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMessageInfo.dst) + return _internal_mutable_dst()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL RoomMessageInfo::mutable_dst() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.RoomMessageInfo.dst) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_dst(); +} +inline const ::np2_structs::uint16& RoomMessageInfo::dst(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMessageInfo.dst) + return _internal_dst().Get(index); +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL RoomMessageInfo::add_dst() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::uint16* _add = + _internal_mutable_dst()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.RoomMessageInfo.dst) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& RoomMessageInfo::dst() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.RoomMessageInfo.dst) + return _internal_dst(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>& +RoomMessageInfo::_internal_dst() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dst_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::uint16>* PROTOBUF_NONNULL +RoomMessageInfo::_internal_mutable_dst() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.dst_; +} + +// .np2_structs.UserInfo srcMember = 4; +inline bool RoomMessageInfo::has_srcmember() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); + PROTOBUF_ASSUME(!value || _impl_.srcmember_ != nullptr); + return value; +} +inline void RoomMessageInfo::clear_srcmember() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.srcmember_ != nullptr) _impl_.srcmember_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::np2_structs::UserInfo& RoomMessageInfo::_internal_srcmember() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::UserInfo* p = _impl_.srcmember_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_UserInfo_default_instance_); +} +inline const ::np2_structs::UserInfo& RoomMessageInfo::srcmember() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMessageInfo.srcMember) + return _internal_srcmember(); +} +inline void RoomMessageInfo::unsafe_arena_set_allocated_srcmember( + ::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.srcmember_); + } + _impl_.srcmember_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMessageInfo.srcMember) +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomMessageInfo::release_srcmember() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::UserInfo* released = _impl_.srcmember_; + _impl_.srcmember_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomMessageInfo::unsafe_arena_release_srcmember() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMessageInfo.srcMember) + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::UserInfo* temp = _impl_.srcmember_; + _impl_.srcmember_ = nullptr; + return temp; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomMessageInfo::_internal_mutable_srcmember() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.srcmember_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::UserInfo>(GetArena()); + _impl_.srcmember_ = reinterpret_cast<::np2_structs::UserInfo*>(p); + } + return _impl_.srcmember_; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomMessageInfo::mutable_srcmember() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::UserInfo* _msg = _internal_mutable_srcmember(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMessageInfo.srcMember) + return _msg; +} +inline void RoomMessageInfo::set_allocated_srcmember(::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.srcmember_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + + _impl_.srcmember_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMessageInfo.srcMember) +} + +// bytes msg = 5; +inline void RoomMessageInfo::clear_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msg_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& RoomMessageInfo::msg() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMessageInfo.msg) + return _internal_msg(); +} +template +PROTOBUF_ALWAYS_INLINE void RoomMessageInfo::set_msg(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.msg_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.RoomMessageInfo.msg) +} +inline ::std::string* PROTOBUF_NONNULL RoomMessageInfo::mutable_msg() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_msg(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMessageInfo.msg) + return _s; +} +inline const ::std::string& RoomMessageInfo::_internal_msg() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.msg_.Get(); +} +inline void RoomMessageInfo::_internal_set_msg(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msg_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL RoomMessageInfo::_internal_mutable_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.msg_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE RoomMessageInfo::release_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMessageInfo.msg) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.msg_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.msg_.Set("", GetArena()); + } + return released; +} +inline void RoomMessageInfo::set_allocated_msg(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.msg_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.msg_.IsDefault()) { + _impl_.msg_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMessageInfo.msg) +} + +// ------------------------------------------------------------------- + +// MessageDetails + +// string communicationId = 1; +inline void MessageDetails::clear_communicationid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.communicationid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& MessageDetails::communicationid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.communicationId) + return _internal_communicationid(); +} +template +PROTOBUF_ALWAYS_INLINE void MessageDetails::set_communicationid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.communicationid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MessageDetails.communicationId) +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::mutable_communicationid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_communicationid(); + // @@protoc_insertion_point(field_mutable:np2_structs.MessageDetails.communicationId) + return _s; +} +inline const ::std::string& MessageDetails::_internal_communicationid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.communicationid_.Get(); +} +inline void MessageDetails::_internal_set_communicationid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.communicationid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::_internal_mutable_communicationid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.communicationid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MessageDetails::release_communicationid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MessageDetails.communicationId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.communicationid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.communicationid_.Set("", GetArena()); + } + return released; +} +inline void MessageDetails::set_allocated_communicationid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.communicationid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.communicationid_.IsDefault()) { + _impl_.communicationid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MessageDetails.communicationId) +} + +// uint64 msgId = 2; +inline void MessageDetails::clear_msgid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msgid_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::uint64_t MessageDetails::msgid() const { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.msgId) + return _internal_msgid(); +} +inline void MessageDetails::set_msgid(::uint64_t value) { + _internal_set_msgid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.MessageDetails.msgId) +} +inline ::uint64_t MessageDetails::_internal_msgid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.msgid_; +} +inline void MessageDetails::_internal_set_msgid(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msgid_ = value; +} + +// .np2_structs.uint16 mainType = 3; +inline bool MessageDetails::has_maintype() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + PROTOBUF_ASSUME(!value || _impl_.maintype_ != nullptr); + return value; +} +inline void MessageDetails::clear_maintype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.maintype_ != nullptr) _impl_.maintype_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::np2_structs::uint16& MessageDetails::_internal_maintype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.maintype_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& MessageDetails::maintype() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.mainType) + return _internal_maintype(); +} +inline void MessageDetails::unsafe_arena_set_allocated_maintype( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.maintype_); + } + _impl_.maintype_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.MessageDetails.mainType) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE MessageDetails::release_maintype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* released = _impl_.maintype_; + _impl_.maintype_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE MessageDetails::unsafe_arena_release_maintype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MessageDetails.mainType) + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* temp = _impl_.maintype_; + _impl_.maintype_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL MessageDetails::_internal_mutable_maintype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.maintype_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.maintype_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.maintype_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL MessageDetails::mutable_maintype() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::uint16* _msg = _internal_mutable_maintype(); + // @@protoc_insertion_point(field_mutable:np2_structs.MessageDetails.mainType) + return _msg; +} +inline void MessageDetails::set_allocated_maintype(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.maintype_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + + _impl_.maintype_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.MessageDetails.mainType) +} + +// .np2_structs.uint16 subType = 4; +inline bool MessageDetails::has_subtype() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000020U); + PROTOBUF_ASSUME(!value || _impl_.subtype_ != nullptr); + return value; +} +inline void MessageDetails::clear_subtype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.subtype_ != nullptr) _impl_.subtype_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline const ::np2_structs::uint16& MessageDetails::_internal_subtype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint16* p = _impl_.subtype_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint16_default_instance_); +} +inline const ::np2_structs::uint16& MessageDetails::subtype() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.subType) + return _internal_subtype(); +} +inline void MessageDetails::unsafe_arena_set_allocated_subtype( + ::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.subtype_); + } + _impl_.subtype_ = reinterpret_cast<::np2_structs::uint16*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.MessageDetails.subType) +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE MessageDetails::release_subtype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ::np2_structs::uint16* released = _impl_.subtype_; + _impl_.subtype_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint16* PROTOBUF_NULLABLE MessageDetails::unsafe_arena_release_subtype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MessageDetails.subType) + + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ::np2_structs::uint16* temp = _impl_.subtype_; + _impl_.subtype_ = nullptr; + return temp; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL MessageDetails::_internal_mutable_subtype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.subtype_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint16>(GetArena()); + _impl_.subtype_ = reinterpret_cast<::np2_structs::uint16*>(p); + } + return _impl_.subtype_; +} +inline ::np2_structs::uint16* PROTOBUF_NONNULL MessageDetails::mutable_subtype() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + ::np2_structs::uint16* _msg = _internal_mutable_subtype(); + // @@protoc_insertion_point(field_mutable:np2_structs.MessageDetails.subType) + return _msg; +} +inline void MessageDetails::set_allocated_subtype(::np2_structs::uint16* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.subtype_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + } + + _impl_.subtype_ = reinterpret_cast<::np2_structs::uint16*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.MessageDetails.subType) +} + +// uint32 msgFeatures = 5; +inline void MessageDetails::clear_msgfeatures() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msgfeatures_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000080U); +} +inline ::uint32_t MessageDetails::msgfeatures() const { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.msgFeatures) + return _internal_msgfeatures(); +} +inline void MessageDetails::set_msgfeatures(::uint32_t value) { + _internal_set_msgfeatures(value); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); + // @@protoc_insertion_point(field_set:np2_structs.MessageDetails.msgFeatures) +} +inline ::uint32_t MessageDetails::_internal_msgfeatures() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.msgfeatures_; +} +inline void MessageDetails::_internal_set_msgfeatures(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.msgfeatures_ = value; +} + +// string subject = 6; +inline void MessageDetails::clear_subject() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.subject_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& MessageDetails::subject() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.subject) + return _internal_subject(); +} +template +PROTOBUF_ALWAYS_INLINE void MessageDetails::set_subject(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.subject_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MessageDetails.subject) +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::mutable_subject() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_subject(); + // @@protoc_insertion_point(field_mutable:np2_structs.MessageDetails.subject) + return _s; +} +inline const ::std::string& MessageDetails::_internal_subject() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.subject_.Get(); +} +inline void MessageDetails::_internal_set_subject(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.subject_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::_internal_mutable_subject() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.subject_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MessageDetails::release_subject() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MessageDetails.subject) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.subject_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.subject_.Set("", GetArena()); + } + return released; +} +inline void MessageDetails::set_allocated_subject(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.subject_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.subject_.IsDefault()) { + _impl_.subject_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MessageDetails.subject) +} + +// string body = 7; +inline void MessageDetails::clear_body() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.body_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& MessageDetails::body() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.body) + return _internal_body(); +} +template +PROTOBUF_ALWAYS_INLINE void MessageDetails::set_body(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.body_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MessageDetails.body) +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::mutable_body() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:np2_structs.MessageDetails.body) + return _s; +} +inline const ::std::string& MessageDetails::_internal_body() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.body_.Get(); +} +inline void MessageDetails::_internal_set_body(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.body_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::_internal_mutable_body() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.body_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MessageDetails::release_body() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MessageDetails.body) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.body_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.body_.Set("", GetArena()); + } + return released; +} +inline void MessageDetails::set_allocated_body(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.body_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.body_.IsDefault()) { + _impl_.body_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MessageDetails.body) +} + +// bytes data = 8; +inline void MessageDetails::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::std::string& MessageDetails::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MessageDetails.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void MessageDetails::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MessageDetails.data) +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.MessageDetails.data) + return _s; +} +inline const ::std::string& MessageDetails::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void MessageDetails::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MessageDetails::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MessageDetails::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MessageDetails.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void MessageDetails::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MessageDetails.data) +} + +// ------------------------------------------------------------------- + +// SendMessageRequest + +// bytes message = 1; +inline void SendMessageRequest::clear_message() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.message_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& SendMessageRequest::message() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SendMessageRequest.message) + return _internal_message(); +} +template +PROTOBUF_ALWAYS_INLINE void SendMessageRequest::set_message(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.message_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SendMessageRequest.message) +} +inline ::std::string* PROTOBUF_NONNULL SendMessageRequest::mutable_message() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:np2_structs.SendMessageRequest.message) + return _s; +} +inline const ::std::string& SendMessageRequest::_internal_message() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.message_.Get(); +} +inline void SendMessageRequest::_internal_set_message(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.message_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SendMessageRequest::_internal_mutable_message() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.message_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SendMessageRequest::release_message() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SendMessageRequest.message) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.message_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.message_.Set("", GetArena()); + } + return released; +} +inline void SendMessageRequest::set_allocated_message(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.message_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.message_.IsDefault()) { + _impl_.message_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SendMessageRequest.message) +} + +// repeated string npids = 2; +inline int SendMessageRequest::_internal_npids_size() const { + return _internal_npids().size(); +} +inline int SendMessageRequest::npids_size() const { + return _internal_npids_size(); +} +inline void SendMessageRequest::clear_npids() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npids_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::std::string* PROTOBUF_NONNULL SendMessageRequest::add_npids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::std::string* _s = + _internal_mutable_npids()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add_mutable:np2_structs.SendMessageRequest.npids) + return _s; +} +inline const ::std::string& SendMessageRequest::npids(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SendMessageRequest.npids) + return _internal_npids().Get(index); +} +inline ::std::string* PROTOBUF_NONNULL SendMessageRequest::mutable_npids(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SendMessageRequest.npids) + return _internal_mutable_npids()->Mutable(index); +} +template +inline void SendMessageRequest::set_npids(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString(*_internal_mutable_npids()->Mutable(index), ::std::forward(value), + args... ); + // @@protoc_insertion_point(field_set:np2_structs.SendMessageRequest.npids) +} +template +inline void SendMessageRequest::add_npids(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField( + ::google::protobuf::MessageLite::internal_visibility(), GetArena(), + *_internal_mutable_npids(), ::std::forward(value), + args... ); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SendMessageRequest.npids) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& SendMessageRequest::npids() + const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SendMessageRequest.npids) + return _internal_npids(); +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +SendMessageRequest::mutable_npids() ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SendMessageRequest.npids) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_npids(); +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +SendMessageRequest::_internal_npids() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npids_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +SendMessageRequest::_internal_mutable_npids() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.npids_; +} + +// ------------------------------------------------------------------- + +// BoardInfo + +// uint32 rankLimit = 1; +inline void BoardInfo::clear_ranklimit() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ranklimit_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t BoardInfo::ranklimit() const { + // @@protoc_insertion_point(field_get:np2_structs.BoardInfo.rankLimit) + return _internal_ranklimit(); +} +inline void BoardInfo::set_ranklimit(::uint32_t value) { + _internal_set_ranklimit(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.BoardInfo.rankLimit) +} +inline ::uint32_t BoardInfo::_internal_ranklimit() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ranklimit_; +} +inline void BoardInfo::_internal_set_ranklimit(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ranklimit_ = value; +} + +// uint32 updateMode = 2; +inline void BoardInfo::clear_updatemode() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatemode_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t BoardInfo::updatemode() const { + // @@protoc_insertion_point(field_get:np2_structs.BoardInfo.updateMode) + return _internal_updatemode(); +} +inline void BoardInfo::set_updatemode(::uint32_t value) { + _internal_set_updatemode(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.BoardInfo.updateMode) +} +inline ::uint32_t BoardInfo::_internal_updatemode() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.updatemode_; +} +inline void BoardInfo::_internal_set_updatemode(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatemode_ = value; +} + +// uint32 sortMode = 3; +inline void BoardInfo::clear_sortmode() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sortmode_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t BoardInfo::sortmode() const { + // @@protoc_insertion_point(field_get:np2_structs.BoardInfo.sortMode) + return _internal_sortmode(); +} +inline void BoardInfo::set_sortmode(::uint32_t value) { + _internal_set_sortmode(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.BoardInfo.sortMode) +} +inline ::uint32_t BoardInfo::_internal_sortmode() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sortmode_; +} +inline void BoardInfo::_internal_set_sortmode(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sortmode_ = value; +} + +// uint32 uploadNumLimit = 4; +inline void BoardInfo::clear_uploadnumlimit() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.uploadnumlimit_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t BoardInfo::uploadnumlimit() const { + // @@protoc_insertion_point(field_get:np2_structs.BoardInfo.uploadNumLimit) + return _internal_uploadnumlimit(); +} +inline void BoardInfo::set_uploadnumlimit(::uint32_t value) { + _internal_set_uploadnumlimit(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.BoardInfo.uploadNumLimit) +} +inline ::uint32_t BoardInfo::_internal_uploadnumlimit() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.uploadnumlimit_; +} +inline void BoardInfo::_internal_set_uploadnumlimit(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.uploadnumlimit_ = value; +} + +// uint32 uploadSizeLimit = 5; +inline void BoardInfo::clear_uploadsizelimit() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.uploadsizelimit_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint32_t BoardInfo::uploadsizelimit() const { + // @@protoc_insertion_point(field_get:np2_structs.BoardInfo.uploadSizeLimit) + return _internal_uploadsizelimit(); +} +inline void BoardInfo::set_uploadsizelimit(::uint32_t value) { + _internal_set_uploadsizelimit(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.BoardInfo.uploadSizeLimit) +} +inline ::uint32_t BoardInfo::_internal_uploadsizelimit() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.uploadsizelimit_; +} +inline void BoardInfo::_internal_set_uploadsizelimit(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.uploadsizelimit_ = value; +} + +// ------------------------------------------------------------------- + +// RecordScoreRequest + +// uint32 boardId = 1; +inline void RecordScoreRequest::clear_boardid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t RecordScoreRequest::boardid() const { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreRequest.boardId) + return _internal_boardid(); +} +inline void RecordScoreRequest::set_boardid(::uint32_t value) { + _internal_set_boardid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreRequest.boardId) +} +inline ::uint32_t RecordScoreRequest::_internal_boardid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.boardid_; +} +inline void RecordScoreRequest::_internal_set_boardid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = value; +} + +// int32 pcId = 2; +inline void RecordScoreRequest::clear_pcid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::int32_t RecordScoreRequest::pcid() const { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreRequest.pcId) + return _internal_pcid(); +} +inline void RecordScoreRequest::set_pcid(::int32_t value) { + _internal_set_pcid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreRequest.pcId) +} +inline ::int32_t RecordScoreRequest::_internal_pcid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.pcid_; +} +inline void RecordScoreRequest::_internal_set_pcid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = value; +} + +// int64 score = 3; +inline void RecordScoreRequest::clear_score() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.score_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::int64_t RecordScoreRequest::score() const { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreRequest.score) + return _internal_score(); +} +inline void RecordScoreRequest::set_score(::int64_t value) { + _internal_set_score(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreRequest.score) +} +inline ::int64_t RecordScoreRequest::_internal_score() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.score_; +} +inline void RecordScoreRequest::_internal_set_score(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.score_ = value; +} + +// string comment = 4; +inline void RecordScoreRequest::clear_comment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comment_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& RecordScoreRequest::comment() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreRequest.comment) + return _internal_comment(); +} +template +PROTOBUF_ALWAYS_INLINE void RecordScoreRequest::set_comment(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.comment_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreRequest.comment) +} +inline ::std::string* PROTOBUF_NONNULL RecordScoreRequest::mutable_comment() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_comment(); + // @@protoc_insertion_point(field_mutable:np2_structs.RecordScoreRequest.comment) + return _s; +} +inline const ::std::string& RecordScoreRequest::_internal_comment() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.comment_.Get(); +} +inline void RecordScoreRequest::_internal_set_comment(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comment_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL RecordScoreRequest::_internal_mutable_comment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.comment_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE RecordScoreRequest::release_comment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RecordScoreRequest.comment) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.comment_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.comment_.Set("", GetArena()); + } + return released; +} +inline void RecordScoreRequest::set_allocated_comment(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.comment_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.comment_.IsDefault()) { + _impl_.comment_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.RecordScoreRequest.comment) +} + +// bytes data = 5; +inline void RecordScoreRequest::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& RecordScoreRequest::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreRequest.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void RecordScoreRequest::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreRequest.data) +} +inline ::std::string* PROTOBUF_NONNULL RecordScoreRequest::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.RecordScoreRequest.data) + return _s; +} +inline const ::std::string& RecordScoreRequest::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void RecordScoreRequest::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL RecordScoreRequest::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE RecordScoreRequest::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RecordScoreRequest.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void RecordScoreRequest::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.RecordScoreRequest.data) +} + +// ------------------------------------------------------------------- + +// GetScoreRangeRequest + +// uint32 boardId = 1; +inline void GetScoreRangeRequest::clear_boardid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t GetScoreRangeRequest::boardid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreRangeRequest.boardId) + return _internal_boardid(); +} +inline void GetScoreRangeRequest::set_boardid(::uint32_t value) { + _internal_set_boardid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreRangeRequest.boardId) +} +inline ::uint32_t GetScoreRangeRequest::_internal_boardid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.boardid_; +} +inline void GetScoreRangeRequest::_internal_set_boardid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = value; +} + +// uint32 startRank = 2; +inline void GetScoreRangeRequest::clear_startrank() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.startrank_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t GetScoreRangeRequest::startrank() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreRangeRequest.startRank) + return _internal_startrank(); +} +inline void GetScoreRangeRequest::set_startrank(::uint32_t value) { + _internal_set_startrank(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreRangeRequest.startRank) +} +inline ::uint32_t GetScoreRangeRequest::_internal_startrank() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.startrank_; +} +inline void GetScoreRangeRequest::_internal_set_startrank(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.startrank_ = value; +} + +// uint32 numRanks = 3; +inline void GetScoreRangeRequest::clear_numranks() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.numranks_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t GetScoreRangeRequest::numranks() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreRangeRequest.numRanks) + return _internal_numranks(); +} +inline void GetScoreRangeRequest::set_numranks(::uint32_t value) { + _internal_set_numranks(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreRangeRequest.numRanks) +} +inline ::uint32_t GetScoreRangeRequest::_internal_numranks() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.numranks_; +} +inline void GetScoreRangeRequest::_internal_set_numranks(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.numranks_ = value; +} + +// bool withComment = 4; +inline void GetScoreRangeRequest::clear_withcomment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withcomment_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline bool GetScoreRangeRequest::withcomment() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreRangeRequest.withComment) + return _internal_withcomment(); +} +inline void GetScoreRangeRequest::set_withcomment(bool value) { + _internal_set_withcomment(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreRangeRequest.withComment) +} +inline bool GetScoreRangeRequest::_internal_withcomment() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withcomment_; +} +inline void GetScoreRangeRequest::_internal_set_withcomment(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withcomment_ = value; +} + +// bool withGameInfo = 5; +inline void GetScoreRangeRequest::clear_withgameinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withgameinfo_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline bool GetScoreRangeRequest::withgameinfo() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreRangeRequest.withGameInfo) + return _internal_withgameinfo(); +} +inline void GetScoreRangeRequest::set_withgameinfo(bool value) { + _internal_set_withgameinfo(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreRangeRequest.withGameInfo) +} +inline bool GetScoreRangeRequest::_internal_withgameinfo() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withgameinfo_; +} +inline void GetScoreRangeRequest::_internal_set_withgameinfo(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withgameinfo_ = value; +} + +// ------------------------------------------------------------------- + +// ScoreNpIdPcId + +// string npid = 1; +inline void ScoreNpIdPcId::clear_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ScoreNpIdPcId::npid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.ScoreNpIdPcId.npid) + return _internal_npid(); +} +template +PROTOBUF_ALWAYS_INLINE void ScoreNpIdPcId::set_npid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.npid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.ScoreNpIdPcId.npid) +} +inline ::std::string* PROTOBUF_NONNULL ScoreNpIdPcId::mutable_npid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_npid(); + // @@protoc_insertion_point(field_mutable:np2_structs.ScoreNpIdPcId.npid) + return _s; +} +inline const ::std::string& ScoreNpIdPcId::_internal_npid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npid_.Get(); +} +inline void ScoreNpIdPcId::_internal_set_npid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ScoreNpIdPcId::_internal_mutable_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.npid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ScoreNpIdPcId::release_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.ScoreNpIdPcId.npid) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.npid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.npid_.Set("", GetArena()); + } + return released; +} +inline void ScoreNpIdPcId::set_allocated_npid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.npid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.npid_.IsDefault()) { + _impl_.npid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.ScoreNpIdPcId.npid) +} + +// int32 pcId = 2; +inline void ScoreNpIdPcId::clear_pcid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int32_t ScoreNpIdPcId::pcid() const { + // @@protoc_insertion_point(field_get:np2_structs.ScoreNpIdPcId.pcId) + return _internal_pcid(); +} +inline void ScoreNpIdPcId::set_pcid(::int32_t value) { + _internal_set_pcid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.ScoreNpIdPcId.pcId) +} +inline ::int32_t ScoreNpIdPcId::_internal_pcid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.pcid_; +} +inline void ScoreNpIdPcId::_internal_set_pcid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = value; +} + +// ------------------------------------------------------------------- + +// GetScoreNpIdRequest + +// uint32 boardId = 1; +inline void GetScoreNpIdRequest::clear_boardid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t GetScoreNpIdRequest::boardid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreNpIdRequest.boardId) + return _internal_boardid(); +} +inline void GetScoreNpIdRequest::set_boardid(::uint32_t value) { + _internal_set_boardid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreNpIdRequest.boardId) +} +inline ::uint32_t GetScoreNpIdRequest::_internal_boardid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.boardid_; +} +inline void GetScoreNpIdRequest::_internal_set_boardid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = value; +} + +// repeated .np2_structs.ScoreNpIdPcId npids = 2; +inline int GetScoreNpIdRequest::_internal_npids_size() const { + return _internal_npids().size(); +} +inline int GetScoreNpIdRequest::npids_size() const { + return _internal_npids_size(); +} +inline void GetScoreNpIdRequest::clear_npids() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npids_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::ScoreNpIdPcId* PROTOBUF_NONNULL GetScoreNpIdRequest::mutable_npids(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetScoreNpIdRequest.npids) + return _internal_mutable_npids()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>* PROTOBUF_NONNULL GetScoreNpIdRequest::mutable_npids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetScoreNpIdRequest.npids) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_npids(); +} +inline const ::np2_structs::ScoreNpIdPcId& GetScoreNpIdRequest::npids(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreNpIdRequest.npids) + return _internal_npids().Get(index); +} +inline ::np2_structs::ScoreNpIdPcId* PROTOBUF_NONNULL GetScoreNpIdRequest::add_npids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::ScoreNpIdPcId* _add = + _internal_mutable_npids()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetScoreNpIdRequest.npids) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>& GetScoreNpIdRequest::npids() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetScoreNpIdRequest.npids) + return _internal_npids(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>& +GetScoreNpIdRequest::_internal_npids() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npids_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreNpIdPcId>* PROTOBUF_NONNULL +GetScoreNpIdRequest::_internal_mutable_npids() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.npids_; +} + +// bool withComment = 3; +inline void GetScoreNpIdRequest::clear_withcomment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withcomment_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline bool GetScoreNpIdRequest::withcomment() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreNpIdRequest.withComment) + return _internal_withcomment(); +} +inline void GetScoreNpIdRequest::set_withcomment(bool value) { + _internal_set_withcomment(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreNpIdRequest.withComment) +} +inline bool GetScoreNpIdRequest::_internal_withcomment() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withcomment_; +} +inline void GetScoreNpIdRequest::_internal_set_withcomment(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withcomment_ = value; +} + +// bool withGameInfo = 4; +inline void GetScoreNpIdRequest::clear_withgameinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withgameinfo_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline bool GetScoreNpIdRequest::withgameinfo() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreNpIdRequest.withGameInfo) + return _internal_withgameinfo(); +} +inline void GetScoreNpIdRequest::set_withgameinfo(bool value) { + _internal_set_withgameinfo(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreNpIdRequest.withGameInfo) +} +inline bool GetScoreNpIdRequest::_internal_withgameinfo() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withgameinfo_; +} +inline void GetScoreNpIdRequest::_internal_set_withgameinfo(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withgameinfo_ = value; +} + +// ------------------------------------------------------------------- + +// GetScoreFriendsRequest + +// uint32 boardId = 1; +inline void GetScoreFriendsRequest::clear_boardid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t GetScoreFriendsRequest::boardid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreFriendsRequest.boardId) + return _internal_boardid(); +} +inline void GetScoreFriendsRequest::set_boardid(::uint32_t value) { + _internal_set_boardid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreFriendsRequest.boardId) +} +inline ::uint32_t GetScoreFriendsRequest::_internal_boardid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.boardid_; +} +inline void GetScoreFriendsRequest::_internal_set_boardid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = value; +} + +// bool include_self = 2; +inline void GetScoreFriendsRequest::clear_include_self() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.include_self_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline bool GetScoreFriendsRequest::include_self() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreFriendsRequest.include_self) + return _internal_include_self(); +} +inline void GetScoreFriendsRequest::set_include_self(bool value) { + _internal_set_include_self(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreFriendsRequest.include_self) +} +inline bool GetScoreFriendsRequest::_internal_include_self() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.include_self_; +} +inline void GetScoreFriendsRequest::_internal_set_include_self(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.include_self_ = value; +} + +// uint32 max = 3; +inline void GetScoreFriendsRequest::clear_max() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t GetScoreFriendsRequest::max() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreFriendsRequest.max) + return _internal_max(); +} +inline void GetScoreFriendsRequest::set_max(::uint32_t value) { + _internal_set_max(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreFriendsRequest.max) +} +inline ::uint32_t GetScoreFriendsRequest::_internal_max() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_; +} +inline void GetScoreFriendsRequest::_internal_set_max(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_ = value; +} + +// bool withComment = 4; +inline void GetScoreFriendsRequest::clear_withcomment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withcomment_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline bool GetScoreFriendsRequest::withcomment() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreFriendsRequest.withComment) + return _internal_withcomment(); +} +inline void GetScoreFriendsRequest::set_withcomment(bool value) { + _internal_set_withcomment(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreFriendsRequest.withComment) +} +inline bool GetScoreFriendsRequest::_internal_withcomment() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withcomment_; +} +inline void GetScoreFriendsRequest::_internal_set_withcomment(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withcomment_ = value; +} + +// bool withGameInfo = 5; +inline void GetScoreFriendsRequest::clear_withgameinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withgameinfo_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline bool GetScoreFriendsRequest::withgameinfo() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreFriendsRequest.withGameInfo) + return _internal_withgameinfo(); +} +inline void GetScoreFriendsRequest::set_withgameinfo(bool value) { + _internal_set_withgameinfo(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreFriendsRequest.withGameInfo) +} +inline bool GetScoreFriendsRequest::_internal_withgameinfo() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.withgameinfo_; +} +inline void GetScoreFriendsRequest::_internal_set_withgameinfo(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.withgameinfo_ = value; +} + +// ------------------------------------------------------------------- + +// ScoreRankData + +// string npId = 1; +inline void ScoreRankData::clear_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ScoreRankData::npid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.npId) + return _internal_npid(); +} +template +PROTOBUF_ALWAYS_INLINE void ScoreRankData::set_npid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.npid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.npId) +} +inline ::std::string* PROTOBUF_NONNULL ScoreRankData::mutable_npid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_npid(); + // @@protoc_insertion_point(field_mutable:np2_structs.ScoreRankData.npId) + return _s; +} +inline const ::std::string& ScoreRankData::_internal_npid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npid_.Get(); +} +inline void ScoreRankData::_internal_set_npid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ScoreRankData::_internal_mutable_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.npid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ScoreRankData::release_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.ScoreRankData.npId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.npid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.npid_.Set("", GetArena()); + } + return released; +} +inline void ScoreRankData::set_allocated_npid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.npid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.npid_.IsDefault()) { + _impl_.npid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.ScoreRankData.npId) +} + +// string onlineName = 2; +inline void ScoreRankData::clear_onlinename() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.onlinename_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& ScoreRankData::onlinename() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.onlineName) + return _internal_onlinename(); +} +template +PROTOBUF_ALWAYS_INLINE void ScoreRankData::set_onlinename(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.onlinename_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.onlineName) +} +inline ::std::string* PROTOBUF_NONNULL ScoreRankData::mutable_onlinename() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_onlinename(); + // @@protoc_insertion_point(field_mutable:np2_structs.ScoreRankData.onlineName) + return _s; +} +inline const ::std::string& ScoreRankData::_internal_onlinename() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.onlinename_.Get(); +} +inline void ScoreRankData::_internal_set_onlinename(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.onlinename_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ScoreRankData::_internal_mutable_onlinename() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.onlinename_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ScoreRankData::release_onlinename() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.ScoreRankData.onlineName) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.onlinename_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.onlinename_.Set("", GetArena()); + } + return released; +} +inline void ScoreRankData::set_allocated_onlinename(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.onlinename_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.onlinename_.IsDefault()) { + _impl_.onlinename_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.ScoreRankData.onlineName) +} + +// int32 pcId = 3; +inline void ScoreRankData::clear_pcid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t ScoreRankData::pcid() const { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.pcId) + return _internal_pcid(); +} +inline void ScoreRankData::set_pcid(::int32_t value) { + _internal_set_pcid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.pcId) +} +inline ::int32_t ScoreRankData::_internal_pcid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.pcid_; +} +inline void ScoreRankData::_internal_set_pcid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = value; +} + +// uint32 rank = 4; +inline void ScoreRankData::clear_rank() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rank_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t ScoreRankData::rank() const { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.rank) + return _internal_rank(); +} +inline void ScoreRankData::set_rank(::uint32_t value) { + _internal_set_rank(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.rank) +} +inline ::uint32_t ScoreRankData::_internal_rank() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rank_; +} +inline void ScoreRankData::_internal_set_rank(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rank_ = value; +} + +// int64 score = 5; +inline void ScoreRankData::clear_score() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.score_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::int64_t ScoreRankData::score() const { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.score) + return _internal_score(); +} +inline void ScoreRankData::set_score(::int64_t value) { + _internal_set_score(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.score) +} +inline ::int64_t ScoreRankData::_internal_score() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.score_; +} +inline void ScoreRankData::_internal_set_score(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.score_ = value; +} + +// bool hasGameData = 6; +inline void ScoreRankData::clear_hasgamedata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.hasgamedata_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline bool ScoreRankData::hasgamedata() const { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.hasGameData) + return _internal_hasgamedata(); +} +inline void ScoreRankData::set_hasgamedata(bool value) { + _internal_set_hasgamedata(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.hasGameData) +} +inline bool ScoreRankData::_internal_hasgamedata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.hasgamedata_; +} +inline void ScoreRankData::_internal_set_hasgamedata(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.hasgamedata_ = value; +} + +// uint64 recordDate = 7; +inline void ScoreRankData::clear_recorddate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.recorddate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::uint64_t ScoreRankData::recorddate() const { + // @@protoc_insertion_point(field_get:np2_structs.ScoreRankData.recordDate) + return _internal_recorddate(); +} +inline void ScoreRankData::set_recorddate(::uint64_t value) { + _internal_set_recorddate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.ScoreRankData.recordDate) +} +inline ::uint64_t ScoreRankData::_internal_recorddate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.recorddate_; +} +inline void ScoreRankData::_internal_set_recorddate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.recorddate_ = value; +} + +// ------------------------------------------------------------------- + +// ScoreInfo + +// bytes data = 1; +inline void ScoreInfo::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& ScoreInfo::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.ScoreInfo.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void ScoreInfo::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.ScoreInfo.data) +} +inline ::std::string* PROTOBUF_NONNULL ScoreInfo::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.ScoreInfo.data) + return _s; +} +inline const ::std::string& ScoreInfo::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void ScoreInfo::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL ScoreInfo::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE ScoreInfo::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.ScoreInfo.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void ScoreInfo::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.ScoreInfo.data) +} + +// ------------------------------------------------------------------- + +// GetScoreResponse + +// repeated .np2_structs.ScoreRankData rankArray = 1; +inline int GetScoreResponse::_internal_rankarray_size() const { + return _internal_rankarray().size(); +} +inline int GetScoreResponse::rankarray_size() const { + return _internal_rankarray_size(); +} +inline void GetScoreResponse::clear_rankarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rankarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::ScoreRankData* PROTOBUF_NONNULL GetScoreResponse::mutable_rankarray(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetScoreResponse.rankArray) + return _internal_mutable_rankarray()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>* PROTOBUF_NONNULL GetScoreResponse::mutable_rankarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetScoreResponse.rankArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_rankarray(); +} +inline const ::np2_structs::ScoreRankData& GetScoreResponse::rankarray(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreResponse.rankArray) + return _internal_rankarray().Get(index); +} +inline ::np2_structs::ScoreRankData* PROTOBUF_NONNULL GetScoreResponse::add_rankarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::ScoreRankData* _add = + _internal_mutable_rankarray()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetScoreResponse.rankArray) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>& GetScoreResponse::rankarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetScoreResponse.rankArray) + return _internal_rankarray(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>& +GetScoreResponse::_internal_rankarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rankarray_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreRankData>* PROTOBUF_NONNULL +GetScoreResponse::_internal_mutable_rankarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.rankarray_; +} + +// repeated string commentArray = 2; +inline int GetScoreResponse::_internal_commentarray_size() const { + return _internal_commentarray().size(); +} +inline int GetScoreResponse::commentarray_size() const { + return _internal_commentarray_size(); +} +inline void GetScoreResponse::clear_commentarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.commentarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::std::string* PROTOBUF_NONNULL GetScoreResponse::add_commentarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::std::string* _s = + _internal_mutable_commentarray()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add_mutable:np2_structs.GetScoreResponse.commentArray) + return _s; +} +inline const ::std::string& GetScoreResponse::commentarray(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreResponse.commentArray) + return _internal_commentarray().Get(index); +} +inline ::std::string* PROTOBUF_NONNULL GetScoreResponse::mutable_commentarray(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetScoreResponse.commentArray) + return _internal_mutable_commentarray()->Mutable(index); +} +template +inline void GetScoreResponse::set_commentarray(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString(*_internal_mutable_commentarray()->Mutable(index), ::std::forward(value), + args... ); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreResponse.commentArray) +} +template +inline void GetScoreResponse::add_commentarray(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField( + ::google::protobuf::MessageLite::internal_visibility(), GetArena(), + *_internal_mutable_commentarray(), ::std::forward(value), + args... ); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.GetScoreResponse.commentArray) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& GetScoreResponse::commentarray() + const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetScoreResponse.commentArray) + return _internal_commentarray(); +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +GetScoreResponse::mutable_commentarray() ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetScoreResponse.commentArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_commentarray(); +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +GetScoreResponse::_internal_commentarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.commentarray_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +GetScoreResponse::_internal_mutable_commentarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.commentarray_; +} + +// repeated .np2_structs.ScoreInfo infoArray = 3; +inline int GetScoreResponse::_internal_infoarray_size() const { + return _internal_infoarray().size(); +} +inline int GetScoreResponse::infoarray_size() const { + return _internal_infoarray_size(); +} +inline void GetScoreResponse::clear_infoarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.infoarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::np2_structs::ScoreInfo* PROTOBUF_NONNULL GetScoreResponse::mutable_infoarray(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetScoreResponse.infoArray) + return _internal_mutable_infoarray()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>* PROTOBUF_NONNULL GetScoreResponse::mutable_infoarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetScoreResponse.infoArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_infoarray(); +} +inline const ::np2_structs::ScoreInfo& GetScoreResponse::infoarray(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreResponse.infoArray) + return _internal_infoarray().Get(index); +} +inline ::np2_structs::ScoreInfo* PROTOBUF_NONNULL GetScoreResponse::add_infoarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::ScoreInfo* _add = + _internal_mutable_infoarray()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_add:np2_structs.GetScoreResponse.infoArray) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>& GetScoreResponse::infoarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetScoreResponse.infoArray) + return _internal_infoarray(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>& +GetScoreResponse::_internal_infoarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.infoarray_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::ScoreInfo>* PROTOBUF_NONNULL +GetScoreResponse::_internal_mutable_infoarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.infoarray_; +} + +// uint64 lastSortDate = 4; +inline void GetScoreResponse::clear_lastsortdate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastsortdate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint64_t GetScoreResponse::lastsortdate() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreResponse.lastSortDate) + return _internal_lastsortdate(); +} +inline void GetScoreResponse::set_lastsortdate(::uint64_t value) { + _internal_set_lastsortdate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreResponse.lastSortDate) +} +inline ::uint64_t GetScoreResponse::_internal_lastsortdate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lastsortdate_; +} +inline void GetScoreResponse::_internal_set_lastsortdate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastsortdate_ = value; +} + +// uint32 totalRecord = 5; +inline void GetScoreResponse::clear_totalrecord() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.totalrecord_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::uint32_t GetScoreResponse::totalrecord() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreResponse.totalRecord) + return _internal_totalrecord(); +} +inline void GetScoreResponse::set_totalrecord(::uint32_t value) { + _internal_set_totalrecord(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreResponse.totalRecord) +} +inline ::uint32_t GetScoreResponse::_internal_totalrecord() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.totalrecord_; +} +inline void GetScoreResponse::_internal_set_totalrecord(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.totalrecord_ = value; +} + +// ------------------------------------------------------------------- + +// RecordScoreGameDataRequest + +// uint32 boardId = 1; +inline void RecordScoreGameDataRequest::clear_boardid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t RecordScoreGameDataRequest::boardid() const { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreGameDataRequest.boardId) + return _internal_boardid(); +} +inline void RecordScoreGameDataRequest::set_boardid(::uint32_t value) { + _internal_set_boardid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreGameDataRequest.boardId) +} +inline ::uint32_t RecordScoreGameDataRequest::_internal_boardid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.boardid_; +} +inline void RecordScoreGameDataRequest::_internal_set_boardid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = value; +} + +// int32 pcId = 2; +inline void RecordScoreGameDataRequest::clear_pcid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int32_t RecordScoreGameDataRequest::pcid() const { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreGameDataRequest.pcId) + return _internal_pcid(); +} +inline void RecordScoreGameDataRequest::set_pcid(::int32_t value) { + _internal_set_pcid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreGameDataRequest.pcId) +} +inline ::int32_t RecordScoreGameDataRequest::_internal_pcid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.pcid_; +} +inline void RecordScoreGameDataRequest::_internal_set_pcid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = value; +} + +// int64 score = 3; +inline void RecordScoreGameDataRequest::clear_score() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.score_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int64_t RecordScoreGameDataRequest::score() const { + // @@protoc_insertion_point(field_get:np2_structs.RecordScoreGameDataRequest.score) + return _internal_score(); +} +inline void RecordScoreGameDataRequest::set_score(::int64_t value) { + _internal_set_score(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.RecordScoreGameDataRequest.score) +} +inline ::int64_t RecordScoreGameDataRequest::_internal_score() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.score_; +} +inline void RecordScoreGameDataRequest::_internal_set_score(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.score_ = value; +} + +// ------------------------------------------------------------------- + +// GetScoreGameDataRequest + +// uint32 boardId = 1; +inline void GetScoreGameDataRequest::clear_boardid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t GetScoreGameDataRequest::boardid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreGameDataRequest.boardId) + return _internal_boardid(); +} +inline void GetScoreGameDataRequest::set_boardid(::uint32_t value) { + _internal_set_boardid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreGameDataRequest.boardId) +} +inline ::uint32_t GetScoreGameDataRequest::_internal_boardid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.boardid_; +} +inline void GetScoreGameDataRequest::_internal_set_boardid(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.boardid_ = value; +} + +// string npId = 2; +inline void GetScoreGameDataRequest::clear_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& GetScoreGameDataRequest::npid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreGameDataRequest.npId) + return _internal_npid(); +} +template +PROTOBUF_ALWAYS_INLINE void GetScoreGameDataRequest::set_npid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.npid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreGameDataRequest.npId) +} +inline ::std::string* PROTOBUF_NONNULL GetScoreGameDataRequest::mutable_npid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_npid(); + // @@protoc_insertion_point(field_mutable:np2_structs.GetScoreGameDataRequest.npId) + return _s; +} +inline const ::std::string& GetScoreGameDataRequest::_internal_npid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npid_.Get(); +} +inline void GetScoreGameDataRequest::_internal_set_npid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL GetScoreGameDataRequest::_internal_mutable_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.npid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE GetScoreGameDataRequest::release_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.GetScoreGameDataRequest.npId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.npid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.npid_.Set("", GetArena()); + } + return released; +} +inline void GetScoreGameDataRequest::set_allocated_npid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.npid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.npid_.IsDefault()) { + _impl_.npid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.GetScoreGameDataRequest.npId) +} + +// int32 pcId = 3; +inline void GetScoreGameDataRequest::clear_pcid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t GetScoreGameDataRequest::pcid() const { + // @@protoc_insertion_point(field_get:np2_structs.GetScoreGameDataRequest.pcId) + return _internal_pcid(); +} +inline void GetScoreGameDataRequest::set_pcid(::int32_t value) { + _internal_set_pcid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetScoreGameDataRequest.pcId) +} +inline ::int32_t GetScoreGameDataRequest::_internal_pcid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.pcid_; +} +inline void GetScoreGameDataRequest::_internal_set_pcid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.pcid_ = value; +} + +// ------------------------------------------------------------------- + +// TusUser + +// bool vuser = 1; +inline void TusUser::clear_vuser() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.vuser_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool TusUser::vuser() const { + // @@protoc_insertion_point(field_get:np2_structs.TusUser.vuser) + return _internal_vuser(); +} +inline void TusUser::set_vuser(bool value) { + _internal_set_vuser(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.TusUser.vuser) +} +inline bool TusUser::_internal_vuser() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.vuser_; +} +inline void TusUser::_internal_set_vuser(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.vuser_ = value; +} + +// string npid = 2; +inline void TusUser::clear_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& TusUser::npid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusUser.npid) + return _internal_npid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusUser::set_npid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.npid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusUser.npid) +} +inline ::std::string* PROTOBUF_NONNULL TusUser::mutable_npid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_npid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusUser.npid) + return _s; +} +inline const ::std::string& TusUser::_internal_npid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.npid_.Get(); +} +inline void TusUser::_internal_set_npid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.npid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusUser::_internal_mutable_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.npid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusUser::release_npid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusUser.npid) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.npid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.npid_.Set("", GetArena()); + } + return released; +} +inline void TusUser::set_allocated_npid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.npid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.npid_.IsDefault()) { + _impl_.npid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusUser.npid) +} + +// ------------------------------------------------------------------- + +// TusVariable + +// string ownerId = 1; +inline void TusVariable::clear_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ownerid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& TusVariable::ownerid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusVariable.ownerId) + return _internal_ownerid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusVariable::set_ownerid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.ownerid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusVariable.ownerId) +} +inline ::std::string* PROTOBUF_NONNULL TusVariable::mutable_ownerid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_ownerid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusVariable.ownerId) + return _s; +} +inline const ::std::string& TusVariable::_internal_ownerid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ownerid_.Get(); +} +inline void TusVariable::_internal_set_ownerid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ownerid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusVariable::_internal_mutable_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.ownerid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusVariable::release_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusVariable.ownerId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.ownerid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.ownerid_.Set("", GetArena()); + } + return released; +} +inline void TusVariable::set_allocated_ownerid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.ownerid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.ownerid_.IsDefault()) { + _impl_.ownerid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusVariable.ownerId) +} + +// bool hasData = 2; +inline void TusVariable::clear_hasdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.hasdata_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline bool TusVariable::hasdata() const { + // @@protoc_insertion_point(field_get:np2_structs.TusVariable.hasData) + return _internal_hasdata(); +} +inline void TusVariable::set_hasdata(bool value) { + _internal_set_hasdata(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.TusVariable.hasData) +} +inline bool TusVariable::_internal_hasdata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.hasdata_; +} +inline void TusVariable::_internal_set_hasdata(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.hasdata_ = value; +} + +// uint64 lastChangedDate = 3; +inline void TusVariable::clear_lastchangeddate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangeddate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t TusVariable::lastchangeddate() const { + // @@protoc_insertion_point(field_get:np2_structs.TusVariable.lastChangedDate) + return _internal_lastchangeddate(); +} +inline void TusVariable::set_lastchangeddate(::uint64_t value) { + _internal_set_lastchangeddate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.TusVariable.lastChangedDate) +} +inline ::uint64_t TusVariable::_internal_lastchangeddate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lastchangeddate_; +} +inline void TusVariable::_internal_set_lastchangeddate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangeddate_ = value; +} + +// string lastChangedAuthorId = 4; +inline void TusVariable::clear_lastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangedauthorid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& TusVariable::lastchangedauthorid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusVariable.lastChangedAuthorId) + return _internal_lastchangedauthorid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusVariable::set_lastchangedauthorid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.lastchangedauthorid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusVariable.lastChangedAuthorId) +} +inline ::std::string* PROTOBUF_NONNULL TusVariable::mutable_lastchangedauthorid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_lastchangedauthorid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusVariable.lastChangedAuthorId) + return _s; +} +inline const ::std::string& TusVariable::_internal_lastchangedauthorid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lastchangedauthorid_.Get(); +} +inline void TusVariable::_internal_set_lastchangedauthorid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangedauthorid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusVariable::_internal_mutable_lastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.lastchangedauthorid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusVariable::release_lastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusVariable.lastChangedAuthorId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.lastchangedauthorid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.lastchangedauthorid_.Set("", GetArena()); + } + return released; +} +inline void TusVariable::set_allocated_lastchangedauthorid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.lastchangedauthorid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.lastchangedauthorid_.IsDefault()) { + _impl_.lastchangedauthorid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusVariable.lastChangedAuthorId) +} + +// int64 variable = 5; +inline void TusVariable::clear_variable() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.variable_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::int64_t TusVariable::variable() const { + // @@protoc_insertion_point(field_get:np2_structs.TusVariable.variable) + return _internal_variable(); +} +inline void TusVariable::set_variable(::int64_t value) { + _internal_set_variable(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.TusVariable.variable) +} +inline ::int64_t TusVariable::_internal_variable() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.variable_; +} +inline void TusVariable::_internal_set_variable(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.variable_ = value; +} + +// int64 oldVariable = 6; +inline void TusVariable::clear_oldvariable() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.oldvariable_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::int64_t TusVariable::oldvariable() const { + // @@protoc_insertion_point(field_get:np2_structs.TusVariable.oldVariable) + return _internal_oldvariable(); +} +inline void TusVariable::set_oldvariable(::int64_t value) { + _internal_set_oldvariable(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.TusVariable.oldVariable) +} +inline ::int64_t TusVariable::_internal_oldvariable() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.oldvariable_; +} +inline void TusVariable::_internal_set_oldvariable(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.oldvariable_ = value; +} + +// ------------------------------------------------------------------- + +// TusVarResponse + +// repeated .np2_structs.TusVariable vars = 1; +inline int TusVarResponse::_internal_vars_size() const { + return _internal_vars().size(); +} +inline int TusVarResponse::vars_size() const { + return _internal_vars_size(); +} +inline void TusVarResponse::clear_vars() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.vars_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::TusVariable* PROTOBUF_NONNULL TusVarResponse::mutable_vars(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.TusVarResponse.vars) + return _internal_mutable_vars()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>* PROTOBUF_NONNULL TusVarResponse::mutable_vars() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusVarResponse.vars) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_vars(); +} +inline const ::np2_structs::TusVariable& TusVarResponse::vars(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusVarResponse.vars) + return _internal_vars().Get(index); +} +inline ::np2_structs::TusVariable* PROTOBUF_NONNULL TusVarResponse::add_vars() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::TusVariable* _add = + _internal_mutable_vars()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusVarResponse.vars) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>& TusVarResponse::vars() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusVarResponse.vars) + return _internal_vars(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>& +TusVarResponse::_internal_vars() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.vars_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusVariable>* PROTOBUF_NONNULL +TusVarResponse::_internal_mutable_vars() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.vars_; +} + +// ------------------------------------------------------------------- + +// TusSetMultiSlotVariableRequest + +// .np2_structs.TusUser user = 1; +inline bool TusSetMultiSlotVariableRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusSetMultiSlotVariableRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::TusUser& TusSetMultiSlotVariableRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusSetMultiSlotVariableRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusSetMultiSlotVariableRequest.user) + return _internal_user(); +} +inline void TusSetMultiSlotVariableRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusSetMultiSlotVariableRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusSetMultiSlotVariableRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusSetMultiSlotVariableRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusSetMultiSlotVariableRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusSetMultiSlotVariableRequest.user) + return _msg; +} +inline void TusSetMultiSlotVariableRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusSetMultiSlotVariableRequest.user) +} + +// repeated int32 slotIdArray = 2; +inline int TusSetMultiSlotVariableRequest::_internal_slotidarray_size() const { + return _internal_slotidarray().size(); +} +inline int TusSetMultiSlotVariableRequest::slotidarray_size() const { + return _internal_slotidarray_size(); +} +inline void TusSetMultiSlotVariableRequest::clear_slotidarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotidarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusSetMultiSlotVariableRequest::slotidarray(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusSetMultiSlotVariableRequest.slotIdArray) + return _internal_slotidarray().Get(index); +} +inline void TusSetMultiSlotVariableRequest::set_slotidarray(int index, ::int32_t value) { + _internal_mutable_slotidarray()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusSetMultiSlotVariableRequest.slotIdArray) +} +inline void TusSetMultiSlotVariableRequest::add_slotidarray(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_slotidarray()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusSetMultiSlotVariableRequest.slotIdArray) +} +inline const ::google::protobuf::RepeatedField<::int32_t>& TusSetMultiSlotVariableRequest::slotidarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusSetMultiSlotVariableRequest.slotIdArray) + return _internal_slotidarray(); +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::mutable_slotidarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusSetMultiSlotVariableRequest.slotIdArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_slotidarray(); +} +inline const ::google::protobuf::RepeatedField<::int32_t>& +TusSetMultiSlotVariableRequest::_internal_slotidarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotidarray_; +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL +TusSetMultiSlotVariableRequest::_internal_mutable_slotidarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.slotidarray_; +} + +// repeated int64 variableArray = 3; +inline int TusSetMultiSlotVariableRequest::_internal_variablearray_size() const { + return _internal_variablearray().size(); +} +inline int TusSetMultiSlotVariableRequest::variablearray_size() const { + return _internal_variablearray_size(); +} +inline void TusSetMultiSlotVariableRequest::clear_variablearray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.variablearray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int64_t TusSetMultiSlotVariableRequest::variablearray(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusSetMultiSlotVariableRequest.variableArray) + return _internal_variablearray().Get(index); +} +inline void TusSetMultiSlotVariableRequest::set_variablearray(int index, ::int64_t value) { + _internal_mutable_variablearray()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusSetMultiSlotVariableRequest.variableArray) +} +inline void TusSetMultiSlotVariableRequest::add_variablearray(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_variablearray()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.TusSetMultiSlotVariableRequest.variableArray) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& TusSetMultiSlotVariableRequest::variablearray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusSetMultiSlotVariableRequest.variableArray) + return _internal_variablearray(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL TusSetMultiSlotVariableRequest::mutable_variablearray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusSetMultiSlotVariableRequest.variableArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_variablearray(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +TusSetMultiSlotVariableRequest::_internal_variablearray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.variablearray_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL +TusSetMultiSlotVariableRequest::_internal_mutable_variablearray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.variablearray_; +} + +// ------------------------------------------------------------------- + +// TusGetMultiSlotVariableRequest + +// .np2_structs.TusUser user = 1; +inline bool TusGetMultiSlotVariableRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusGetMultiSlotVariableRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::TusUser& TusGetMultiSlotVariableRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusGetMultiSlotVariableRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiSlotVariableRequest.user) + return _internal_user(); +} +inline void TusGetMultiSlotVariableRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusGetMultiSlotVariableRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusGetMultiSlotVariableRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusGetMultiSlotVariableRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusGetMultiSlotVariableRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiSlotVariableRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiSlotVariableRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusGetMultiSlotVariableRequest.user) + return _msg; +} +inline void TusGetMultiSlotVariableRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusGetMultiSlotVariableRequest.user) +} + +// repeated int32 slotIdArray = 2; +inline int TusGetMultiSlotVariableRequest::_internal_slotidarray_size() const { + return _internal_slotidarray().size(); +} +inline int TusGetMultiSlotVariableRequest::slotidarray_size() const { + return _internal_slotidarray_size(); +} +inline void TusGetMultiSlotVariableRequest::clear_slotidarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotidarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusGetMultiSlotVariableRequest::slotidarray(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiSlotVariableRequest.slotIdArray) + return _internal_slotidarray().Get(index); +} +inline void TusGetMultiSlotVariableRequest::set_slotidarray(int index, ::int32_t value) { + _internal_mutable_slotidarray()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusGetMultiSlotVariableRequest.slotIdArray) +} +inline void TusGetMultiSlotVariableRequest::add_slotidarray(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_slotidarray()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusGetMultiSlotVariableRequest.slotIdArray) +} +inline const ::google::protobuf::RepeatedField<::int32_t>& TusGetMultiSlotVariableRequest::slotidarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusGetMultiSlotVariableRequest.slotIdArray) + return _internal_slotidarray(); +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL TusGetMultiSlotVariableRequest::mutable_slotidarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusGetMultiSlotVariableRequest.slotIdArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_slotidarray(); +} +inline const ::google::protobuf::RepeatedField<::int32_t>& +TusGetMultiSlotVariableRequest::_internal_slotidarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotidarray_; +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL +TusGetMultiSlotVariableRequest::_internal_mutable_slotidarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.slotidarray_; +} + +// ------------------------------------------------------------------- + +// TusGetMultiUserVariableRequest + +// repeated .np2_structs.TusUser users = 1; +inline int TusGetMultiUserVariableRequest::_internal_users_size() const { + return _internal_users().size(); +} +inline int TusGetMultiUserVariableRequest::users_size() const { + return _internal_users_size(); +} +inline void TusGetMultiUserVariableRequest::clear_users() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.users_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiUserVariableRequest::mutable_users(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.TusGetMultiUserVariableRequest.users) + return _internal_mutable_users()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL TusGetMultiUserVariableRequest::mutable_users() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusGetMultiUserVariableRequest.users) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_users(); +} +inline const ::np2_structs::TusUser& TusGetMultiUserVariableRequest::users(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiUserVariableRequest.users) + return _internal_users().Get(index); +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiUserVariableRequest::add_users() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::TusUser* _add = + _internal_mutable_users()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusGetMultiUserVariableRequest.users) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& TusGetMultiUserVariableRequest::users() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusGetMultiUserVariableRequest.users) + return _internal_users(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& +TusGetMultiUserVariableRequest::_internal_users() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.users_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL +TusGetMultiUserVariableRequest::_internal_mutable_users() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.users_; +} + +// int32 slotId = 2; +inline void TusGetMultiUserVariableRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int32_t TusGetMultiUserVariableRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiUserVariableRequest.slotId) + return _internal_slotid(); +} +inline void TusGetMultiUserVariableRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetMultiUserVariableRequest.slotId) +} +inline ::int32_t TusGetMultiUserVariableRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusGetMultiUserVariableRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// ------------------------------------------------------------------- + +// TusGetFriendsVariableRequest + +// int32 slotId = 1; +inline void TusGetFriendsVariableRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusGetFriendsVariableRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsVariableRequest.slotId) + return _internal_slotid(); +} +inline void TusGetFriendsVariableRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsVariableRequest.slotId) +} +inline ::int32_t TusGetFriendsVariableRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusGetFriendsVariableRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// bool includeSelf = 2; +inline void TusGetFriendsVariableRequest::clear_includeself() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.includeself_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool TusGetFriendsVariableRequest::includeself() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsVariableRequest.includeSelf) + return _internal_includeself(); +} +inline void TusGetFriendsVariableRequest::set_includeself(bool value) { + _internal_set_includeself(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsVariableRequest.includeSelf) +} +inline bool TusGetFriendsVariableRequest::_internal_includeself() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.includeself_; +} +inline void TusGetFriendsVariableRequest::_internal_set_includeself(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.includeself_ = value; +} + +// int32 sortType = 3; +inline void TusGetFriendsVariableRequest::clear_sorttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sorttype_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t TusGetFriendsVariableRequest::sorttype() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsVariableRequest.sortType) + return _internal_sorttype(); +} +inline void TusGetFriendsVariableRequest::set_sorttype(::int32_t value) { + _internal_set_sorttype(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsVariableRequest.sortType) +} +inline ::int32_t TusGetFriendsVariableRequest::_internal_sorttype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sorttype_; +} +inline void TusGetFriendsVariableRequest::_internal_set_sorttype(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sorttype_ = value; +} + +// uint32 arrayNum = 4; +inline void TusGetFriendsVariableRequest::clear_arraynum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.arraynum_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t TusGetFriendsVariableRequest::arraynum() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsVariableRequest.arrayNum) + return _internal_arraynum(); +} +inline void TusGetFriendsVariableRequest::set_arraynum(::uint32_t value) { + _internal_set_arraynum(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsVariableRequest.arrayNum) +} +inline ::uint32_t TusGetFriendsVariableRequest::_internal_arraynum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.arraynum_; +} +inline void TusGetFriendsVariableRequest::_internal_set_arraynum(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.arraynum_ = value; +} + +// ------------------------------------------------------------------- + +// TusAddAndGetVariableRequest + +// .np2_structs.TusUser user = 1; +inline bool TusAddAndGetVariableRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusAddAndGetVariableRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::TusUser& TusAddAndGetVariableRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusAddAndGetVariableRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusAddAndGetVariableRequest.user) + return _internal_user(); +} +inline void TusAddAndGetVariableRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusAddAndGetVariableRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusAddAndGetVariableRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusAddAndGetVariableRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusAddAndGetVariableRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusAddAndGetVariableRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusAddAndGetVariableRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusAddAndGetVariableRequest.user) + return _msg; +} +inline void TusAddAndGetVariableRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusAddAndGetVariableRequest.user) +} + +// int32 slotId = 2; +inline void TusAddAndGetVariableRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::int32_t TusAddAndGetVariableRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusAddAndGetVariableRequest.slotId) + return _internal_slotid(); +} +inline void TusAddAndGetVariableRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.TusAddAndGetVariableRequest.slotId) +} +inline ::int32_t TusAddAndGetVariableRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusAddAndGetVariableRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// int64 inVariable = 3; +inline void TusAddAndGetVariableRequest::clear_invariable() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.invariable_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::int64_t TusAddAndGetVariableRequest::invariable() const { + // @@protoc_insertion_point(field_get:np2_structs.TusAddAndGetVariableRequest.inVariable) + return _internal_invariable(); +} +inline void TusAddAndGetVariableRequest::set_invariable(::int64_t value) { + _internal_set_invariable(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.TusAddAndGetVariableRequest.inVariable) +} +inline ::int64_t TusAddAndGetVariableRequest::_internal_invariable() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.invariable_; +} +inline void TusAddAndGetVariableRequest::_internal_set_invariable(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.invariable_ = value; +} + +// repeated uint64 isLastChangedDate = 4; +inline int TusAddAndGetVariableRequest::_internal_islastchangeddate_size() const { + return _internal_islastchangeddate().size(); +} +inline int TusAddAndGetVariableRequest::islastchangeddate_size() const { + return _internal_islastchangeddate_size(); +} +inline void TusAddAndGetVariableRequest::clear_islastchangeddate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangeddate_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint64_t TusAddAndGetVariableRequest::islastchangeddate(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusAddAndGetVariableRequest.isLastChangedDate) + return _internal_islastchangeddate().Get(index); +} +inline void TusAddAndGetVariableRequest::set_islastchangeddate(int index, ::uint64_t value) { + _internal_mutable_islastchangeddate()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusAddAndGetVariableRequest.isLastChangedDate) +} +inline void TusAddAndGetVariableRequest::add_islastchangeddate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_islastchangeddate()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusAddAndGetVariableRequest.isLastChangedDate) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& TusAddAndGetVariableRequest::islastchangeddate() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusAddAndGetVariableRequest.isLastChangedDate) + return _internal_islastchangeddate(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL TusAddAndGetVariableRequest::mutable_islastchangeddate() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusAddAndGetVariableRequest.isLastChangedDate) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_islastchangeddate(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +TusAddAndGetVariableRequest::_internal_islastchangeddate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.islastchangeddate_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL +TusAddAndGetVariableRequest::_internal_mutable_islastchangeddate() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.islastchangeddate_; +} + +// string isLastChangedAuthorId = 5; +inline void TusAddAndGetVariableRequest::clear_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangedauthorid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& TusAddAndGetVariableRequest::islastchangedauthorid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusAddAndGetVariableRequest.isLastChangedAuthorId) + return _internal_islastchangedauthorid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusAddAndGetVariableRequest::set_islastchangedauthorid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.islastchangedauthorid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusAddAndGetVariableRequest.isLastChangedAuthorId) +} +inline ::std::string* PROTOBUF_NONNULL TusAddAndGetVariableRequest::mutable_islastchangedauthorid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_islastchangedauthorid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusAddAndGetVariableRequest.isLastChangedAuthorId) + return _s; +} +inline const ::std::string& TusAddAndGetVariableRequest::_internal_islastchangedauthorid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.islastchangedauthorid_.Get(); +} +inline void TusAddAndGetVariableRequest::_internal_set_islastchangedauthorid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangedauthorid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusAddAndGetVariableRequest::_internal_mutable_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.islastchangedauthorid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusAddAndGetVariableRequest::release_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusAddAndGetVariableRequest.isLastChangedAuthorId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.islastchangedauthorid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.islastchangedauthorid_.Set("", GetArena()); + } + return released; +} +inline void TusAddAndGetVariableRequest::set_allocated_islastchangedauthorid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.islastchangedauthorid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.islastchangedauthorid_.IsDefault()) { + _impl_.islastchangedauthorid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusAddAndGetVariableRequest.isLastChangedAuthorId) +} + +// ------------------------------------------------------------------- + +// TusTryAndSetVariableRequest + +// .np2_structs.TusUser user = 1; +inline bool TusTryAndSetVariableRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusTryAndSetVariableRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::np2_structs::TusUser& TusTryAndSetVariableRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusTryAndSetVariableRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.user) + return _internal_user(); +} +inline void TusTryAndSetVariableRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusTryAndSetVariableRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusTryAndSetVariableRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusTryAndSetVariableRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusTryAndSetVariableRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusTryAndSetVariableRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusTryAndSetVariableRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusTryAndSetVariableRequest.user) + return _msg; +} +inline void TusTryAndSetVariableRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusTryAndSetVariableRequest.user) +} + +// int32 slotId = 2; +inline void TusTryAndSetVariableRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline ::int32_t TusTryAndSetVariableRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.slotId) + return _internal_slotid(); +} +inline void TusTryAndSetVariableRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.TusTryAndSetVariableRequest.slotId) +} +inline ::int32_t TusTryAndSetVariableRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusTryAndSetVariableRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// int32 opeType = 3; +inline void TusTryAndSetVariableRequest::clear_opetype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.opetype_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::int32_t TusTryAndSetVariableRequest::opetype() const { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.opeType) + return _internal_opetype(); +} +inline void TusTryAndSetVariableRequest::set_opetype(::int32_t value) { + _internal_set_opetype(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.TusTryAndSetVariableRequest.opeType) +} +inline ::int32_t TusTryAndSetVariableRequest::_internal_opetype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.opetype_; +} +inline void TusTryAndSetVariableRequest::_internal_set_opetype(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.opetype_ = value; +} + +// int64 variable = 4; +inline void TusTryAndSetVariableRequest::clear_variable() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.variable_ = ::int64_t{0}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000040U); +} +inline ::int64_t TusTryAndSetVariableRequest::variable() const { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.variable) + return _internal_variable(); +} +inline void TusTryAndSetVariableRequest::set_variable(::int64_t value) { + _internal_set_variable(value); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); + // @@protoc_insertion_point(field_set:np2_structs.TusTryAndSetVariableRequest.variable) +} +inline ::int64_t TusTryAndSetVariableRequest::_internal_variable() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.variable_; +} +inline void TusTryAndSetVariableRequest::_internal_set_variable(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.variable_ = value; +} + +// repeated uint64 isLastChangedDate = 5; +inline int TusTryAndSetVariableRequest::_internal_islastchangeddate_size() const { + return _internal_islastchangeddate().size(); +} +inline int TusTryAndSetVariableRequest::islastchangeddate_size() const { + return _internal_islastchangeddate_size(); +} +inline void TusTryAndSetVariableRequest::clear_islastchangeddate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangeddate_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint64_t TusTryAndSetVariableRequest::islastchangeddate(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.isLastChangedDate) + return _internal_islastchangeddate().Get(index); +} +inline void TusTryAndSetVariableRequest::set_islastchangeddate(int index, ::uint64_t value) { + _internal_mutable_islastchangeddate()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusTryAndSetVariableRequest.isLastChangedDate) +} +inline void TusTryAndSetVariableRequest::add_islastchangeddate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_islastchangeddate()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusTryAndSetVariableRequest.isLastChangedDate) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& TusTryAndSetVariableRequest::islastchangeddate() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusTryAndSetVariableRequest.isLastChangedDate) + return _internal_islastchangeddate(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL TusTryAndSetVariableRequest::mutable_islastchangeddate() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusTryAndSetVariableRequest.isLastChangedDate) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_islastchangeddate(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +TusTryAndSetVariableRequest::_internal_islastchangeddate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.islastchangeddate_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL +TusTryAndSetVariableRequest::_internal_mutable_islastchangeddate() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.islastchangeddate_; +} + +// string isLastChangedAuthorId = 6; +inline void TusTryAndSetVariableRequest::clear_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangedauthorid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& TusTryAndSetVariableRequest::islastchangedauthorid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.isLastChangedAuthorId) + return _internal_islastchangedauthorid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusTryAndSetVariableRequest::set_islastchangedauthorid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.islastchangedauthorid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusTryAndSetVariableRequest.isLastChangedAuthorId) +} +inline ::std::string* PROTOBUF_NONNULL TusTryAndSetVariableRequest::mutable_islastchangedauthorid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_islastchangedauthorid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusTryAndSetVariableRequest.isLastChangedAuthorId) + return _s; +} +inline const ::std::string& TusTryAndSetVariableRequest::_internal_islastchangedauthorid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.islastchangedauthorid_.Get(); +} +inline void TusTryAndSetVariableRequest::_internal_set_islastchangedauthorid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangedauthorid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusTryAndSetVariableRequest::_internal_mutable_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.islastchangedauthorid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusTryAndSetVariableRequest::release_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusTryAndSetVariableRequest.isLastChangedAuthorId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.islastchangedauthorid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.islastchangedauthorid_.Set("", GetArena()); + } + return released; +} +inline void TusTryAndSetVariableRequest::set_allocated_islastchangedauthorid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.islastchangedauthorid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.islastchangedauthorid_.IsDefault()) { + _impl_.islastchangedauthorid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusTryAndSetVariableRequest.isLastChangedAuthorId) +} + +// repeated int64 compareValue = 7; +inline int TusTryAndSetVariableRequest::_internal_comparevalue_size() const { + return _internal_comparevalue().size(); +} +inline int TusTryAndSetVariableRequest::comparevalue_size() const { + return _internal_comparevalue_size(); +} +inline void TusTryAndSetVariableRequest::clear_comparevalue() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comparevalue_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int64_t TusTryAndSetVariableRequest::comparevalue(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusTryAndSetVariableRequest.compareValue) + return _internal_comparevalue().Get(index); +} +inline void TusTryAndSetVariableRequest::set_comparevalue(int index, ::int64_t value) { + _internal_mutable_comparevalue()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusTryAndSetVariableRequest.compareValue) +} +inline void TusTryAndSetVariableRequest::add_comparevalue(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_comparevalue()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.TusTryAndSetVariableRequest.compareValue) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& TusTryAndSetVariableRequest::comparevalue() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusTryAndSetVariableRequest.compareValue) + return _internal_comparevalue(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL TusTryAndSetVariableRequest::mutable_comparevalue() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusTryAndSetVariableRequest.compareValue) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_comparevalue(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +TusTryAndSetVariableRequest::_internal_comparevalue() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.comparevalue_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL +TusTryAndSetVariableRequest::_internal_mutable_comparevalue() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.comparevalue_; +} + +// ------------------------------------------------------------------- + +// TusDeleteMultiSlotVariableRequest + +// .np2_structs.TusUser user = 1; +inline bool TusDeleteMultiSlotVariableRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusDeleteMultiSlotVariableRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::TusUser& TusDeleteMultiSlotVariableRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusDeleteMultiSlotVariableRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusDeleteMultiSlotVariableRequest.user) + return _internal_user(); +} +inline void TusDeleteMultiSlotVariableRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusDeleteMultiSlotVariableRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusDeleteMultiSlotVariableRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusDeleteMultiSlotVariableRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusDeleteMultiSlotVariableRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusDeleteMultiSlotVariableRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusDeleteMultiSlotVariableRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusDeleteMultiSlotVariableRequest.user) + return _msg; +} +inline void TusDeleteMultiSlotVariableRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusDeleteMultiSlotVariableRequest.user) +} + +// repeated int32 slotIdArray = 2; +inline int TusDeleteMultiSlotVariableRequest::_internal_slotidarray_size() const { + return _internal_slotidarray().size(); +} +inline int TusDeleteMultiSlotVariableRequest::slotidarray_size() const { + return _internal_slotidarray_size(); +} +inline void TusDeleteMultiSlotVariableRequest::clear_slotidarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotidarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusDeleteMultiSlotVariableRequest::slotidarray(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusDeleteMultiSlotVariableRequest.slotIdArray) + return _internal_slotidarray().Get(index); +} +inline void TusDeleteMultiSlotVariableRequest::set_slotidarray(int index, ::int32_t value) { + _internal_mutable_slotidarray()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusDeleteMultiSlotVariableRequest.slotIdArray) +} +inline void TusDeleteMultiSlotVariableRequest::add_slotidarray(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_slotidarray()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusDeleteMultiSlotVariableRequest.slotIdArray) +} +inline const ::google::protobuf::RepeatedField<::int32_t>& TusDeleteMultiSlotVariableRequest::slotidarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusDeleteMultiSlotVariableRequest.slotIdArray) + return _internal_slotidarray(); +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL TusDeleteMultiSlotVariableRequest::mutable_slotidarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusDeleteMultiSlotVariableRequest.slotIdArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_slotidarray(); +} +inline const ::google::protobuf::RepeatedField<::int32_t>& +TusDeleteMultiSlotVariableRequest::_internal_slotidarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotidarray_; +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL +TusDeleteMultiSlotVariableRequest::_internal_mutable_slotidarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.slotidarray_; +} + +// ------------------------------------------------------------------- + +// TusSetDataRequest + +// .np2_structs.TusUser user = 1; +inline bool TusSetDataRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusSetDataRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline const ::np2_structs::TusUser& TusSetDataRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusSetDataRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusSetDataRequest.user) + return _internal_user(); +} +inline void TusSetDataRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusSetDataRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusSetDataRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusSetDataRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusSetDataRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusSetDataRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusSetDataRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusSetDataRequest.user) + return _msg; +} +inline void TusSetDataRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusSetDataRequest.user) +} + +// int32 slotId = 2; +inline void TusSetDataRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000020U); +} +inline ::int32_t TusSetDataRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusSetDataRequest.slotId) + return _internal_slotid(); +} +inline void TusSetDataRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); + // @@protoc_insertion_point(field_set:np2_structs.TusSetDataRequest.slotId) +} +inline ::int32_t TusSetDataRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusSetDataRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// bytes data = 3; +inline void TusSetDataRequest::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& TusSetDataRequest::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusSetDataRequest.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void TusSetDataRequest::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusSetDataRequest.data) +} +inline ::std::string* PROTOBUF_NONNULL TusSetDataRequest::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusSetDataRequest.data) + return _s; +} +inline const ::std::string& TusSetDataRequest::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void TusSetDataRequest::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusSetDataRequest::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusSetDataRequest::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusSetDataRequest.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void TusSetDataRequest::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusSetDataRequest.data) +} + +// bytes info = 4; +inline void TusSetDataRequest::clear_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.info_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& TusSetDataRequest::info() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusSetDataRequest.info) + return _internal_info(); +} +template +PROTOBUF_ALWAYS_INLINE void TusSetDataRequest::set_info(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.info_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusSetDataRequest.info) +} +inline ::std::string* PROTOBUF_NONNULL TusSetDataRequest::mutable_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_info(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusSetDataRequest.info) + return _s; +} +inline const ::std::string& TusSetDataRequest::_internal_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.info_.Get(); +} +inline void TusSetDataRequest::_internal_set_info(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.info_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusSetDataRequest::_internal_mutable_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.info_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusSetDataRequest::release_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusSetDataRequest.info) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.info_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.info_.Set("", GetArena()); + } + return released; +} +inline void TusSetDataRequest::set_allocated_info(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.info_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.info_.IsDefault()) { + _impl_.info_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusSetDataRequest.info) +} + +// repeated uint64 isLastChangedDate = 5; +inline int TusSetDataRequest::_internal_islastchangeddate_size() const { + return _internal_islastchangeddate().size(); +} +inline int TusSetDataRequest::islastchangeddate_size() const { + return _internal_islastchangeddate_size(); +} +inline void TusSetDataRequest::clear_islastchangeddate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangeddate_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint64_t TusSetDataRequest::islastchangeddate(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusSetDataRequest.isLastChangedDate) + return _internal_islastchangeddate().Get(index); +} +inline void TusSetDataRequest::set_islastchangeddate(int index, ::uint64_t value) { + _internal_mutable_islastchangeddate()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusSetDataRequest.isLastChangedDate) +} +inline void TusSetDataRequest::add_islastchangeddate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_islastchangeddate()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusSetDataRequest.isLastChangedDate) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& TusSetDataRequest::islastchangeddate() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusSetDataRequest.isLastChangedDate) + return _internal_islastchangeddate(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL TusSetDataRequest::mutable_islastchangeddate() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusSetDataRequest.isLastChangedDate) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_islastchangeddate(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +TusSetDataRequest::_internal_islastchangeddate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.islastchangeddate_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* PROTOBUF_NONNULL +TusSetDataRequest::_internal_mutable_islastchangeddate() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.islastchangeddate_; +} + +// string isLastChangedAuthorId = 6; +inline void TusSetDataRequest::clear_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangedauthorid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::std::string& TusSetDataRequest::islastchangedauthorid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusSetDataRequest.isLastChangedAuthorId) + return _internal_islastchangedauthorid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusSetDataRequest::set_islastchangedauthorid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + _impl_.islastchangedauthorid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusSetDataRequest.isLastChangedAuthorId) +} +inline ::std::string* PROTOBUF_NONNULL TusSetDataRequest::mutable_islastchangedauthorid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_islastchangedauthorid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusSetDataRequest.isLastChangedAuthorId) + return _s; +} +inline const ::std::string& TusSetDataRequest::_internal_islastchangedauthorid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.islastchangedauthorid_.Get(); +} +inline void TusSetDataRequest::_internal_set_islastchangedauthorid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.islastchangedauthorid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusSetDataRequest::_internal_mutable_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.islastchangedauthorid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusSetDataRequest::release_islastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusSetDataRequest.isLastChangedAuthorId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.islastchangedauthorid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.islastchangedauthorid_.Set("", GetArena()); + } + return released; +} +inline void TusSetDataRequest::set_allocated_islastchangedauthorid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + _impl_.islastchangedauthorid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.islastchangedauthorid_.IsDefault()) { + _impl_.islastchangedauthorid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusSetDataRequest.isLastChangedAuthorId) +} + +// ------------------------------------------------------------------- + +// TusDataStatus + +// string ownerId = 1; +inline void TusDataStatus::clear_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ownerid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& TusDataStatus::ownerid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusDataStatus.ownerId) + return _internal_ownerid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusDataStatus::set_ownerid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.ownerid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusDataStatus.ownerId) +} +inline ::std::string* PROTOBUF_NONNULL TusDataStatus::mutable_ownerid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_ownerid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusDataStatus.ownerId) + return _s; +} +inline const ::std::string& TusDataStatus::_internal_ownerid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ownerid_.Get(); +} +inline void TusDataStatus::_internal_set_ownerid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ownerid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusDataStatus::_internal_mutable_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.ownerid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusDataStatus::release_ownerid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusDataStatus.ownerId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.ownerid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.ownerid_.Set("", GetArena()); + } + return released; +} +inline void TusDataStatus::set_allocated_ownerid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.ownerid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.ownerid_.IsDefault()) { + _impl_.ownerid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusDataStatus.ownerId) +} + +// bool hasData = 2; +inline void TusDataStatus::clear_hasdata() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.hasdata_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline bool TusDataStatus::hasdata() const { + // @@protoc_insertion_point(field_get:np2_structs.TusDataStatus.hasData) + return _internal_hasdata(); +} +inline void TusDataStatus::set_hasdata(bool value) { + _internal_set_hasdata(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.TusDataStatus.hasData) +} +inline bool TusDataStatus::_internal_hasdata() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.hasdata_; +} +inline void TusDataStatus::_internal_set_hasdata(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.hasdata_ = value; +} + +// uint64 lastChangedDate = 3; +inline void TusDataStatus::clear_lastchangeddate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangeddate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint64_t TusDataStatus::lastchangeddate() const { + // @@protoc_insertion_point(field_get:np2_structs.TusDataStatus.lastChangedDate) + return _internal_lastchangeddate(); +} +inline void TusDataStatus::set_lastchangeddate(::uint64_t value) { + _internal_set_lastchangeddate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.TusDataStatus.lastChangedDate) +} +inline ::uint64_t TusDataStatus::_internal_lastchangeddate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lastchangeddate_; +} +inline void TusDataStatus::_internal_set_lastchangeddate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangeddate_ = value; +} + +// string lastChangedAuthorId = 4; +inline void TusDataStatus::clear_lastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangedauthorid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& TusDataStatus::lastchangedauthorid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusDataStatus.lastChangedAuthorId) + return _internal_lastchangedauthorid(); +} +template +PROTOBUF_ALWAYS_INLINE void TusDataStatus::set_lastchangedauthorid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.lastchangedauthorid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusDataStatus.lastChangedAuthorId) +} +inline ::std::string* PROTOBUF_NONNULL TusDataStatus::mutable_lastchangedauthorid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_lastchangedauthorid(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusDataStatus.lastChangedAuthorId) + return _s; +} +inline const ::std::string& TusDataStatus::_internal_lastchangedauthorid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lastchangedauthorid_.Get(); +} +inline void TusDataStatus::_internal_set_lastchangedauthorid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastchangedauthorid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusDataStatus::_internal_mutable_lastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.lastchangedauthorid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusDataStatus::release_lastchangedauthorid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusDataStatus.lastChangedAuthorId) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.lastchangedauthorid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.lastchangedauthorid_.Set("", GetArena()); + } + return released; +} +inline void TusDataStatus::set_allocated_lastchangedauthorid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.lastchangedauthorid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.lastchangedauthorid_.IsDefault()) { + _impl_.lastchangedauthorid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusDataStatus.lastChangedAuthorId) +} + +// bytes info = 5; +inline void TusDataStatus::clear_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.info_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& TusDataStatus::info() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusDataStatus.info) + return _internal_info(); +} +template +PROTOBUF_ALWAYS_INLINE void TusDataStatus::set_info(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.info_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusDataStatus.info) +} +inline ::std::string* PROTOBUF_NONNULL TusDataStatus::mutable_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_info(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusDataStatus.info) + return _s; +} +inline const ::std::string& TusDataStatus::_internal_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.info_.Get(); +} +inline void TusDataStatus::_internal_set_info(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.info_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusDataStatus::_internal_mutable_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.info_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusDataStatus::release_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusDataStatus.info) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.info_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.info_.Set("", GetArena()); + } + return released; +} +inline void TusDataStatus::set_allocated_info(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.info_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.info_.IsDefault()) { + _impl_.info_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusDataStatus.info) +} + +// ------------------------------------------------------------------- + +// TusData + +// .np2_structs.TusDataStatus status = 1; +inline bool TusData::has_status() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.status_ != nullptr); + return value; +} +inline void TusData::clear_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.status_ != nullptr) _impl_.status_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::TusDataStatus& TusData::_internal_status() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusDataStatus* p = _impl_.status_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusDataStatus_default_instance_); +} +inline const ::np2_structs::TusDataStatus& TusData::status() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusData.status) + return _internal_status(); +} +inline void TusData::unsafe_arena_set_allocated_status( + ::np2_structs::TusDataStatus* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.status_); + } + _impl_.status_ = reinterpret_cast<::np2_structs::TusDataStatus*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusData.status) +} +inline ::np2_structs::TusDataStatus* PROTOBUF_NULLABLE TusData::release_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusDataStatus* released = _impl_.status_; + _impl_.status_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusDataStatus* PROTOBUF_NULLABLE TusData::unsafe_arena_release_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusData.status) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusDataStatus* temp = _impl_.status_; + _impl_.status_ = nullptr; + return temp; +} +inline ::np2_structs::TusDataStatus* PROTOBUF_NONNULL TusData::_internal_mutable_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.status_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusDataStatus>(GetArena()); + _impl_.status_ = reinterpret_cast<::np2_structs::TusDataStatus*>(p); + } + return _impl_.status_; +} +inline ::np2_structs::TusDataStatus* PROTOBUF_NONNULL TusData::mutable_status() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusDataStatus* _msg = _internal_mutable_status(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusData.status) + return _msg; +} +inline void TusData::set_allocated_status(::np2_structs::TusDataStatus* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.status_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.status_ = reinterpret_cast<::np2_structs::TusDataStatus*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusData.status) +} + +// bytes data = 2; +inline void TusData::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& TusData::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusData.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void TusData::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.TusData.data) +} +inline ::std::string* PROTOBUF_NONNULL TusData::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusData.data) + return _s; +} +inline const ::std::string& TusData::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void TusData::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL TusData::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE TusData::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusData.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void TusData::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusData.data) +} + +// ------------------------------------------------------------------- + +// TusDataStatusResponse + +// repeated .np2_structs.TusDataStatus status = 1; +inline int TusDataStatusResponse::_internal_status_size() const { + return _internal_status().size(); +} +inline int TusDataStatusResponse::status_size() const { + return _internal_status_size(); +} +inline void TusDataStatusResponse::clear_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.status_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::TusDataStatus* PROTOBUF_NONNULL TusDataStatusResponse::mutable_status(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.TusDataStatusResponse.status) + return _internal_mutable_status()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>* PROTOBUF_NONNULL TusDataStatusResponse::mutable_status() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusDataStatusResponse.status) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_status(); +} +inline const ::np2_structs::TusDataStatus& TusDataStatusResponse::status(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusDataStatusResponse.status) + return _internal_status().Get(index); +} +inline ::np2_structs::TusDataStatus* PROTOBUF_NONNULL TusDataStatusResponse::add_status() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::TusDataStatus* _add = + _internal_mutable_status()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusDataStatusResponse.status) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>& TusDataStatusResponse::status() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusDataStatusResponse.status) + return _internal_status(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>& +TusDataStatusResponse::_internal_status() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.status_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusDataStatus>* PROTOBUF_NONNULL +TusDataStatusResponse::_internal_mutable_status() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.status_; +} + +// ------------------------------------------------------------------- + +// TusGetDataRequest + +// .np2_structs.TusUser user = 1; +inline bool TusGetDataRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusGetDataRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::TusUser& TusGetDataRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusGetDataRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusGetDataRequest.user) + return _internal_user(); +} +inline void TusGetDataRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusGetDataRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusGetDataRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusGetDataRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusGetDataRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetDataRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetDataRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusGetDataRequest.user) + return _msg; +} +inline void TusGetDataRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusGetDataRequest.user) +} + +// int32 slotId = 2; +inline void TusGetDataRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int32_t TusGetDataRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetDataRequest.slotId) + return _internal_slotid(); +} +inline void TusGetDataRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetDataRequest.slotId) +} +inline ::int32_t TusGetDataRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusGetDataRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// ------------------------------------------------------------------- + +// TusGetMultiSlotDataStatusRequest + +// .np2_structs.TusUser user = 1; +inline bool TusGetMultiSlotDataStatusRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusGetMultiSlotDataStatusRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::TusUser& TusGetMultiSlotDataStatusRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusGetMultiSlotDataStatusRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiSlotDataStatusRequest.user) + return _internal_user(); +} +inline void TusGetMultiSlotDataStatusRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusGetMultiSlotDataStatusRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusGetMultiSlotDataStatusRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusGetMultiSlotDataStatusRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusGetMultiSlotDataStatusRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiSlotDataStatusRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiSlotDataStatusRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusGetMultiSlotDataStatusRequest.user) + return _msg; +} +inline void TusGetMultiSlotDataStatusRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusGetMultiSlotDataStatusRequest.user) +} + +// repeated int32 slotIdArray = 2; +inline int TusGetMultiSlotDataStatusRequest::_internal_slotidarray_size() const { + return _internal_slotidarray().size(); +} +inline int TusGetMultiSlotDataStatusRequest::slotidarray_size() const { + return _internal_slotidarray_size(); +} +inline void TusGetMultiSlotDataStatusRequest::clear_slotidarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotidarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusGetMultiSlotDataStatusRequest::slotidarray(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiSlotDataStatusRequest.slotIdArray) + return _internal_slotidarray().Get(index); +} +inline void TusGetMultiSlotDataStatusRequest::set_slotidarray(int index, ::int32_t value) { + _internal_mutable_slotidarray()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusGetMultiSlotDataStatusRequest.slotIdArray) +} +inline void TusGetMultiSlotDataStatusRequest::add_slotidarray(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_slotidarray()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusGetMultiSlotDataStatusRequest.slotIdArray) +} +inline const ::google::protobuf::RepeatedField<::int32_t>& TusGetMultiSlotDataStatusRequest::slotidarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusGetMultiSlotDataStatusRequest.slotIdArray) + return _internal_slotidarray(); +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL TusGetMultiSlotDataStatusRequest::mutable_slotidarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusGetMultiSlotDataStatusRequest.slotIdArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_slotidarray(); +} +inline const ::google::protobuf::RepeatedField<::int32_t>& +TusGetMultiSlotDataStatusRequest::_internal_slotidarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotidarray_; +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL +TusGetMultiSlotDataStatusRequest::_internal_mutable_slotidarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.slotidarray_; +} + +// ------------------------------------------------------------------- + +// TusGetMultiUserDataStatusRequest + +// repeated .np2_structs.TusUser users = 1; +inline int TusGetMultiUserDataStatusRequest::_internal_users_size() const { + return _internal_users().size(); +} +inline int TusGetMultiUserDataStatusRequest::users_size() const { + return _internal_users_size(); +} +inline void TusGetMultiUserDataStatusRequest::clear_users() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.users_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiUserDataStatusRequest::mutable_users(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.TusGetMultiUserDataStatusRequest.users) + return _internal_mutable_users()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL TusGetMultiUserDataStatusRequest::mutable_users() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusGetMultiUserDataStatusRequest.users) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_users(); +} +inline const ::np2_structs::TusUser& TusGetMultiUserDataStatusRequest::users(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiUserDataStatusRequest.users) + return _internal_users().Get(index); +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusGetMultiUserDataStatusRequest::add_users() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::TusUser* _add = + _internal_mutable_users()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusGetMultiUserDataStatusRequest.users) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& TusGetMultiUserDataStatusRequest::users() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusGetMultiUserDataStatusRequest.users) + return _internal_users(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>& +TusGetMultiUserDataStatusRequest::_internal_users() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.users_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::TusUser>* PROTOBUF_NONNULL +TusGetMultiUserDataStatusRequest::_internal_mutable_users() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.users_; +} + +// int32 slotId = 2; +inline void TusGetMultiUserDataStatusRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::int32_t TusGetMultiUserDataStatusRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetMultiUserDataStatusRequest.slotId) + return _internal_slotid(); +} +inline void TusGetMultiUserDataStatusRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetMultiUserDataStatusRequest.slotId) +} +inline ::int32_t TusGetMultiUserDataStatusRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusGetMultiUserDataStatusRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// ------------------------------------------------------------------- + +// TusGetFriendsDataStatusRequest + +// int32 slotId = 1; +inline void TusGetFriendsDataStatusRequest::clear_slotid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusGetFriendsDataStatusRequest::slotid() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsDataStatusRequest.slotId) + return _internal_slotid(); +} +inline void TusGetFriendsDataStatusRequest::set_slotid(::int32_t value) { + _internal_set_slotid(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsDataStatusRequest.slotId) +} +inline ::int32_t TusGetFriendsDataStatusRequest::_internal_slotid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotid_; +} +inline void TusGetFriendsDataStatusRequest::_internal_set_slotid(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotid_ = value; +} + +// bool includeSelf = 2; +inline void TusGetFriendsDataStatusRequest::clear_includeself() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.includeself_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool TusGetFriendsDataStatusRequest::includeself() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsDataStatusRequest.includeSelf) + return _internal_includeself(); +} +inline void TusGetFriendsDataStatusRequest::set_includeself(bool value) { + _internal_set_includeself(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsDataStatusRequest.includeSelf) +} +inline bool TusGetFriendsDataStatusRequest::_internal_includeself() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.includeself_; +} +inline void TusGetFriendsDataStatusRequest::_internal_set_includeself(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.includeself_ = value; +} + +// int32 sortType = 3; +inline void TusGetFriendsDataStatusRequest::clear_sorttype() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sorttype_ = 0; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::int32_t TusGetFriendsDataStatusRequest::sorttype() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsDataStatusRequest.sortType) + return _internal_sorttype(); +} +inline void TusGetFriendsDataStatusRequest::set_sorttype(::int32_t value) { + _internal_set_sorttype(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsDataStatusRequest.sortType) +} +inline ::int32_t TusGetFriendsDataStatusRequest::_internal_sorttype() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sorttype_; +} +inline void TusGetFriendsDataStatusRequest::_internal_set_sorttype(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sorttype_ = value; +} + +// uint32 arrayNum = 4; +inline void TusGetFriendsDataStatusRequest::clear_arraynum() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.arraynum_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t TusGetFriendsDataStatusRequest::arraynum() const { + // @@protoc_insertion_point(field_get:np2_structs.TusGetFriendsDataStatusRequest.arrayNum) + return _internal_arraynum(); +} +inline void TusGetFriendsDataStatusRequest::set_arraynum(::uint32_t value) { + _internal_set_arraynum(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.TusGetFriendsDataStatusRequest.arrayNum) +} +inline ::uint32_t TusGetFriendsDataStatusRequest::_internal_arraynum() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.arraynum_; +} +inline void TusGetFriendsDataStatusRequest::_internal_set_arraynum(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.arraynum_ = value; +} + +// ------------------------------------------------------------------- + +// TusDeleteMultiSlotDataRequest + +// .np2_structs.TusUser user = 1; +inline bool TusDeleteMultiSlotDataRequest::has_user() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.user_ != nullptr); + return value; +} +inline void TusDeleteMultiSlotDataRequest::clear_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ != nullptr) _impl_.user_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::TusUser& TusDeleteMultiSlotDataRequest::_internal_user() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::TusUser* p = _impl_.user_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_TusUser_default_instance_); +} +inline const ::np2_structs::TusUser& TusDeleteMultiSlotDataRequest::user() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.TusDeleteMultiSlotDataRequest.user) + return _internal_user(); +} +inline void TusDeleteMultiSlotDataRequest::unsafe_arena_set_allocated_user( + ::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.TusDeleteMultiSlotDataRequest.user) +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusDeleteMultiSlotDataRequest::release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* released = _impl_.user_; + _impl_.user_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::TusUser* PROTOBUF_NULLABLE TusDeleteMultiSlotDataRequest::unsafe_arena_release_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.TusDeleteMultiSlotDataRequest.user) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* temp = _impl_.user_; + _impl_.user_ = nullptr; + return temp; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusDeleteMultiSlotDataRequest::_internal_mutable_user() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.user_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::TusUser>(GetArena()); + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(p); + } + return _impl_.user_; +} +inline ::np2_structs::TusUser* PROTOBUF_NONNULL TusDeleteMultiSlotDataRequest::mutable_user() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::TusUser* _msg = _internal_mutable_user(); + // @@protoc_insertion_point(field_mutable:np2_structs.TusDeleteMultiSlotDataRequest.user) + return _msg; +} +inline void TusDeleteMultiSlotDataRequest::set_allocated_user(::np2_structs::TusUser* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.user_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.user_ = reinterpret_cast<::np2_structs::TusUser*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.TusDeleteMultiSlotDataRequest.user) +} + +// repeated int32 slotIdArray = 2; +inline int TusDeleteMultiSlotDataRequest::_internal_slotidarray_size() const { + return _internal_slotidarray().size(); +} +inline int TusDeleteMultiSlotDataRequest::slotidarray_size() const { + return _internal_slotidarray_size(); +} +inline void TusDeleteMultiSlotDataRequest::clear_slotidarray() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.slotidarray_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::int32_t TusDeleteMultiSlotDataRequest::slotidarray(int index) const { + // @@protoc_insertion_point(field_get:np2_structs.TusDeleteMultiSlotDataRequest.slotIdArray) + return _internal_slotidarray().Get(index); +} +inline void TusDeleteMultiSlotDataRequest::set_slotidarray(int index, ::int32_t value) { + _internal_mutable_slotidarray()->Set(index, value); + // @@protoc_insertion_point(field_set:np2_structs.TusDeleteMultiSlotDataRequest.slotIdArray) +} +inline void TusDeleteMultiSlotDataRequest::add_slotidarray(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_slotidarray()->Add(value); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.TusDeleteMultiSlotDataRequest.slotIdArray) +} +inline const ::google::protobuf::RepeatedField<::int32_t>& TusDeleteMultiSlotDataRequest::slotidarray() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.TusDeleteMultiSlotDataRequest.slotIdArray) + return _internal_slotidarray(); +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL TusDeleteMultiSlotDataRequest::mutable_slotidarray() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.TusDeleteMultiSlotDataRequest.slotIdArray) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_slotidarray(); +} +inline const ::google::protobuf::RepeatedField<::int32_t>& +TusDeleteMultiSlotDataRequest::_internal_slotidarray() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.slotidarray_; +} +inline ::google::protobuf::RepeatedField<::int32_t>* PROTOBUF_NONNULL +TusDeleteMultiSlotDataRequest::_internal_mutable_slotidarray() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.slotidarray_; +} + +// ------------------------------------------------------------------- + +// SetPresenceRequest + +// string title = 1; +inline void SetPresenceRequest::clear_title() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.title_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& SetPresenceRequest::title() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetPresenceRequest.title) + return _internal_title(); +} +template +PROTOBUF_ALWAYS_INLINE void SetPresenceRequest::set_title(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.title_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SetPresenceRequest.title) +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::mutable_title() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_title(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetPresenceRequest.title) + return _s; +} +inline const ::std::string& SetPresenceRequest::_internal_title() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.title_.Get(); +} +inline void SetPresenceRequest::_internal_set_title(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.title_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::_internal_mutable_title() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.title_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SetPresenceRequest::release_title() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetPresenceRequest.title) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.title_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.title_.Set("", GetArena()); + } + return released; +} +inline void SetPresenceRequest::set_allocated_title(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.title_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.title_.IsDefault()) { + _impl_.title_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetPresenceRequest.title) +} + +// string status = 2; +inline void SetPresenceRequest::clear_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.status_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& SetPresenceRequest::status() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetPresenceRequest.status) + return _internal_status(); +} +template +PROTOBUF_ALWAYS_INLINE void SetPresenceRequest::set_status(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.status_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SetPresenceRequest.status) +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::mutable_status() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_status(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetPresenceRequest.status) + return _s; +} +inline const ::std::string& SetPresenceRequest::_internal_status() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.status_.Get(); +} +inline void SetPresenceRequest::_internal_set_status(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.status_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::_internal_mutable_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.status_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SetPresenceRequest::release_status() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetPresenceRequest.status) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.status_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.status_.Set("", GetArena()); + } + return released; +} +inline void SetPresenceRequest::set_allocated_status(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.status_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.status_.IsDefault()) { + _impl_.status_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetPresenceRequest.status) +} + +// string comment = 3; +inline void SetPresenceRequest::clear_comment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comment_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& SetPresenceRequest::comment() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetPresenceRequest.comment) + return _internal_comment(); +} +template +PROTOBUF_ALWAYS_INLINE void SetPresenceRequest::set_comment(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.comment_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SetPresenceRequest.comment) +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::mutable_comment() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_comment(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetPresenceRequest.comment) + return _s; +} +inline const ::std::string& SetPresenceRequest::_internal_comment() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.comment_.Get(); +} +inline void SetPresenceRequest::_internal_set_comment(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comment_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::_internal_mutable_comment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.comment_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SetPresenceRequest::release_comment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetPresenceRequest.comment) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.comment_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.comment_.Set("", GetArena()); + } + return released; +} +inline void SetPresenceRequest::set_allocated_comment(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.comment_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.comment_.IsDefault()) { + _impl_.comment_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetPresenceRequest.comment) +} + +// bytes data = 4; +inline void SetPresenceRequest::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::std::string& SetPresenceRequest::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetPresenceRequest.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void SetPresenceRequest::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SetPresenceRequest.data) +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetPresenceRequest.data) + return _s; +} +inline const ::std::string& SetPresenceRequest::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void SetPresenceRequest::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SetPresenceRequest::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SetPresenceRequest::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetPresenceRequest.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void SetPresenceRequest::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetPresenceRequest.data) +} + +// ------------------------------------------------------------------- + +// MatchingSearchCondition + +// uint32 attr_type = 1; +inline void MatchingSearchCondition::clear_attr_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_type_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::uint32_t MatchingSearchCondition::attr_type() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSearchCondition.attr_type) + return _internal_attr_type(); +} +inline void MatchingSearchCondition::set_attr_type(::uint32_t value) { + _internal_set_attr_type(value); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingSearchCondition.attr_type) +} +inline ::uint32_t MatchingSearchCondition::_internal_attr_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attr_type_; +} +inline void MatchingSearchCondition::_internal_set_attr_type(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_type_ = value; +} + +// uint32 attr_id = 2; +inline void MatchingSearchCondition::clear_attr_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_id_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t MatchingSearchCondition::attr_id() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSearchCondition.attr_id) + return _internal_attr_id(); +} +inline void MatchingSearchCondition::set_attr_id(::uint32_t value) { + _internal_set_attr_id(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingSearchCondition.attr_id) +} +inline ::uint32_t MatchingSearchCondition::_internal_attr_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attr_id_; +} +inline void MatchingSearchCondition::_internal_set_attr_id(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_id_ = value; +} + +// uint32 comp_op = 3; +inline void MatchingSearchCondition::clear_comp_op() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comp_op_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t MatchingSearchCondition::comp_op() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSearchCondition.comp_op) + return _internal_comp_op(); +} +inline void MatchingSearchCondition::set_comp_op(::uint32_t value) { + _internal_set_comp_op(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingSearchCondition.comp_op) +} +inline ::uint32_t MatchingSearchCondition::_internal_comp_op() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.comp_op_; +} +inline void MatchingSearchCondition::_internal_set_comp_op(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comp_op_ = value; +} + +// uint32 comp_value = 4; +inline void MatchingSearchCondition::clear_comp_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comp_value_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t MatchingSearchCondition::comp_value() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSearchCondition.comp_value) + return _internal_comp_value(); +} +inline void MatchingSearchCondition::set_comp_value(::uint32_t value) { + _internal_set_comp_value(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingSearchCondition.comp_value) +} +inline ::uint32_t MatchingSearchCondition::_internal_comp_value() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.comp_value_; +} +inline void MatchingSearchCondition::_internal_set_comp_value(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.comp_value_ = value; +} + +// ------------------------------------------------------------------- + +// MatchingAttr + +// uint32 attr_type = 1; +inline void MatchingAttr::clear_attr_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_type_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t MatchingAttr::attr_type() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingAttr.attr_type) + return _internal_attr_type(); +} +inline void MatchingAttr::set_attr_type(::uint32_t value) { + _internal_set_attr_type(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingAttr.attr_type) +} +inline ::uint32_t MatchingAttr::_internal_attr_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attr_type_; +} +inline void MatchingAttr::_internal_set_attr_type(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_type_ = value; +} + +// uint32 attr_id = 2; +inline void MatchingAttr::clear_attr_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_id_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t MatchingAttr::attr_id() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingAttr.attr_id) + return _internal_attr_id(); +} +inline void MatchingAttr::set_attr_id(::uint32_t value) { + _internal_set_attr_id(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingAttr.attr_id) +} +inline ::uint32_t MatchingAttr::_internal_attr_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attr_id_; +} +inline void MatchingAttr::_internal_set_attr_id(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_id_ = value; +} + +// uint32 num = 3; +inline void MatchingAttr::clear_num() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.num_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t MatchingAttr::num() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingAttr.num) + return _internal_num(); +} +inline void MatchingAttr::set_num(::uint32_t value) { + _internal_set_num(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingAttr.num) +} +inline ::uint32_t MatchingAttr::_internal_num() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.num_; +} +inline void MatchingAttr::_internal_set_num(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.num_ = value; +} + +// bytes data = 4; +inline void MatchingAttr::clear_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& MatchingAttr::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingAttr.data) + return _internal_data(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingAttr::set_data(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingAttr.data) +} +inline ::std::string* PROTOBUF_NONNULL MatchingAttr::mutable_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingAttr.data) + return _s; +} +inline const ::std::string& MatchingAttr::_internal_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_.Get(); +} +inline void MatchingAttr::_internal_set_data(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingAttr::_internal_mutable_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.data_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingAttr::release_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingAttr.data) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.data_.Set("", GetArena()); + } + return released; +} +inline void MatchingAttr::set_allocated_data(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingAttr.data) +} + +// ------------------------------------------------------------------- + +// CreateRoomGUIRequest + +// uint32 total_slots = 1; +inline void CreateRoomGUIRequest::clear_total_slots() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.total_slots_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t CreateRoomGUIRequest::total_slots() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomGUIRequest.total_slots) + return _internal_total_slots(); +} +inline void CreateRoomGUIRequest::set_total_slots(::uint32_t value) { + _internal_set_total_slots(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.CreateRoomGUIRequest.total_slots) +} +inline ::uint32_t CreateRoomGUIRequest::_internal_total_slots() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.total_slots_; +} +inline void CreateRoomGUIRequest::_internal_set_total_slots(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.total_slots_ = value; +} + +// uint32 private_slots = 2; +inline void CreateRoomGUIRequest::clear_private_slots() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.private_slots_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t CreateRoomGUIRequest::private_slots() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomGUIRequest.private_slots) + return _internal_private_slots(); +} +inline void CreateRoomGUIRequest::set_private_slots(::uint32_t value) { + _internal_set_private_slots(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.CreateRoomGUIRequest.private_slots) +} +inline ::uint32_t CreateRoomGUIRequest::_internal_private_slots() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.private_slots_; +} +inline void CreateRoomGUIRequest::_internal_set_private_slots(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.private_slots_ = value; +} + +// bool privilege_grant = 3; +inline void CreateRoomGUIRequest::clear_privilege_grant() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.privilege_grant_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline bool CreateRoomGUIRequest::privilege_grant() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomGUIRequest.privilege_grant) + return _internal_privilege_grant(); +} +inline void CreateRoomGUIRequest::set_privilege_grant(bool value) { + _internal_set_privilege_grant(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.CreateRoomGUIRequest.privilege_grant) +} +inline bool CreateRoomGUIRequest::_internal_privilege_grant() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.privilege_grant_; +} +inline void CreateRoomGUIRequest::_internal_set_privilege_grant(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.privilege_grant_ = value; +} + +// bool stealth = 4; +inline void CreateRoomGUIRequest::clear_stealth() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.stealth_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000010U); +} +inline bool CreateRoomGUIRequest::stealth() const { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomGUIRequest.stealth) + return _internal_stealth(); +} +inline void CreateRoomGUIRequest::set_stealth(bool value) { + _internal_set_stealth(value); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); + // @@protoc_insertion_point(field_set:np2_structs.CreateRoomGUIRequest.stealth) +} +inline bool CreateRoomGUIRequest::_internal_stealth() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.stealth_; +} +inline void CreateRoomGUIRequest::_internal_set_stealth(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.stealth_ = value; +} + +// repeated .np2_structs.MatchingAttr game_attrs = 5; +inline int CreateRoomGUIRequest::_internal_game_attrs_size() const { + return _internal_game_attrs().size(); +} +inline int CreateRoomGUIRequest::game_attrs_size() const { + return _internal_game_attrs_size(); +} +inline void CreateRoomGUIRequest::clear_game_attrs() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.game_attrs_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL CreateRoomGUIRequest::mutable_game_attrs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.CreateRoomGUIRequest.game_attrs) + return _internal_mutable_game_attrs()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL CreateRoomGUIRequest::mutable_game_attrs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.CreateRoomGUIRequest.game_attrs) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_game_attrs(); +} +inline const ::np2_structs::MatchingAttr& CreateRoomGUIRequest::game_attrs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomGUIRequest.game_attrs) + return _internal_game_attrs().Get(index); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL CreateRoomGUIRequest::add_game_attrs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingAttr* _add = + _internal_mutable_game_attrs()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.CreateRoomGUIRequest.game_attrs) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& CreateRoomGUIRequest::game_attrs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.CreateRoomGUIRequest.game_attrs) + return _internal_game_attrs(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& +CreateRoomGUIRequest::_internal_game_attrs() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.game_attrs_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL +CreateRoomGUIRequest::_internal_mutable_game_attrs() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.game_attrs_; +} + +// ------------------------------------------------------------------- + +// GUIUserInfo + +// .np2_structs.UserInfo info = 1; +inline bool GUIUserInfo::has_info() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.info_ != nullptr); + return value; +} +inline void GUIUserInfo::clear_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.info_ != nullptr) _impl_.info_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::UserInfo& GUIUserInfo::_internal_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::UserInfo* p = _impl_.info_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_UserInfo_default_instance_); +} +inline const ::np2_structs::UserInfo& GUIUserInfo::info() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GUIUserInfo.info) + return _internal_info(); +} +inline void GUIUserInfo::unsafe_arena_set_allocated_info( + ::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.info_); + } + _impl_.info_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.GUIUserInfo.info) +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE GUIUserInfo::release_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::UserInfo* released = _impl_.info_; + _impl_.info_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE GUIUserInfo::unsafe_arena_release_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.GUIUserInfo.info) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::UserInfo* temp = _impl_.info_; + _impl_.info_ = nullptr; + return temp; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL GUIUserInfo::_internal_mutable_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.info_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::UserInfo>(GetArena()); + _impl_.info_ = reinterpret_cast<::np2_structs::UserInfo*>(p); + } + return _impl_.info_; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL GUIUserInfo::mutable_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::UserInfo* _msg = _internal_mutable_info(); + // @@protoc_insertion_point(field_mutable:np2_structs.GUIUserInfo.info) + return _msg; +} +inline void GUIUserInfo::set_allocated_info(::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.info_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.info_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.GUIUserInfo.info) +} + +// bool owner = 2; +inline void GUIUserInfo::clear_owner() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.owner_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool GUIUserInfo::owner() const { + // @@protoc_insertion_point(field_get:np2_structs.GUIUserInfo.owner) + return _internal_owner(); +} +inline void GUIUserInfo::set_owner(bool value) { + _internal_set_owner(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.GUIUserInfo.owner) +} +inline bool GUIUserInfo::_internal_owner() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.owner_; +} +inline void GUIUserInfo::_internal_set_owner(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.owner_ = value; +} + +// ------------------------------------------------------------------- + +// MatchingRoomStatus + +// bytes id = 1; +inline void MatchingRoomStatus::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& MatchingRoomStatus::id() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomStatus.id) + return _internal_id(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingRoomStatus::set_id(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.id_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingRoomStatus.id) +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoomStatus::mutable_id() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoomStatus.id) + return _s; +} +inline const ::std::string& MatchingRoomStatus::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_.Get(); +} +inline void MatchingRoomStatus::_internal_set_id(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoomStatus::_internal_mutable_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.id_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingRoomStatus::release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingRoomStatus.id) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.id_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.id_.Set("", GetArena()); + } + return released; +} +inline void MatchingRoomStatus::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingRoomStatus.id) +} + +// repeated .np2_structs.GUIUserInfo members = 2; +inline int MatchingRoomStatus::_internal_members_size() const { + return _internal_members().size(); +} +inline int MatchingRoomStatus::members_size() const { + return _internal_members_size(); +} +inline void MatchingRoomStatus::clear_members() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.members_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::GUIUserInfo* PROTOBUF_NONNULL MatchingRoomStatus::mutable_members(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoomStatus.members) + return _internal_mutable_members()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>* PROTOBUF_NONNULL MatchingRoomStatus::mutable_members() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.MatchingRoomStatus.members) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_members(); +} +inline const ::np2_structs::GUIUserInfo& MatchingRoomStatus::members(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomStatus.members) + return _internal_members().Get(index); +} +inline ::np2_structs::GUIUserInfo* PROTOBUF_NONNULL MatchingRoomStatus::add_members() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::GUIUserInfo* _add = + _internal_mutable_members()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.MatchingRoomStatus.members) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>& MatchingRoomStatus::members() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.MatchingRoomStatus.members) + return _internal_members(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>& +MatchingRoomStatus::_internal_members() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.members_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::GUIUserInfo>* PROTOBUF_NONNULL +MatchingRoomStatus::_internal_mutable_members() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.members_; +} + +// string kick_actor = 3; +inline void MatchingRoomStatus::clear_kick_actor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.kick_actor_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::std::string& MatchingRoomStatus::kick_actor() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomStatus.kick_actor) + return _internal_kick_actor(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingRoomStatus::set_kick_actor(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + _impl_.kick_actor_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingRoomStatus.kick_actor) +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoomStatus::mutable_kick_actor() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::std::string* _s = _internal_mutable_kick_actor(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoomStatus.kick_actor) + return _s; +} +inline const ::std::string& MatchingRoomStatus::_internal_kick_actor() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.kick_actor_.Get(); +} +inline void MatchingRoomStatus::_internal_set_kick_actor(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.kick_actor_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoomStatus::_internal_mutable_kick_actor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.kick_actor_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingRoomStatus::release_kick_actor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingRoomStatus.kick_actor) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + auto* released = _impl_.kick_actor_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.kick_actor_.Set("", GetArena()); + } + return released; +} +inline void MatchingRoomStatus::set_allocated_kick_actor(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + _impl_.kick_actor_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.kick_actor_.IsDefault()) { + _impl_.kick_actor_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingRoomStatus.kick_actor) +} + +// bytes opt = 4; +inline void MatchingRoomStatus::clear_opt() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.opt_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline const ::std::string& MatchingRoomStatus::opt() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomStatus.opt) + return _internal_opt(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingRoomStatus::set_opt(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + _impl_.opt_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingRoomStatus.opt) +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoomStatus::mutable_opt() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + ::std::string* _s = _internal_mutable_opt(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoomStatus.opt) + return _s; +} +inline const ::std::string& MatchingRoomStatus::_internal_opt() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.opt_.Get(); +} +inline void MatchingRoomStatus::_internal_set_opt(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.opt_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoomStatus::_internal_mutable_opt() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.opt_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingRoomStatus::release_opt() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingRoomStatus.opt) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + auto* released = _impl_.opt_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.opt_.Set("", GetArena()); + } + return released; +} +inline void MatchingRoomStatus::set_allocated_opt(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + } + _impl_.opt_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.opt_.IsDefault()) { + _impl_.opt_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingRoomStatus.opt) +} + +// ------------------------------------------------------------------- + +// GetRoomListGUIRequest + +// uint32 range_start = 1; +inline void GetRoomListGUIRequest::clear_range_start() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.range_start_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t GetRoomListGUIRequest::range_start() const { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomListGUIRequest.range_start) + return _internal_range_start(); +} +inline void GetRoomListGUIRequest::set_range_start(::uint32_t value) { + _internal_set_range_start(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.GetRoomListGUIRequest.range_start) +} +inline ::uint32_t GetRoomListGUIRequest::_internal_range_start() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.range_start_; +} +inline void GetRoomListGUIRequest::_internal_set_range_start(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.range_start_ = value; +} + +// uint32 range_max = 2; +inline void GetRoomListGUIRequest::clear_range_max() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.range_max_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000008U); +} +inline ::uint32_t GetRoomListGUIRequest::range_max() const { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomListGUIRequest.range_max) + return _internal_range_max(); +} +inline void GetRoomListGUIRequest::set_range_max(::uint32_t value) { + _internal_set_range_max(value); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); + // @@protoc_insertion_point(field_set:np2_structs.GetRoomListGUIRequest.range_max) +} +inline ::uint32_t GetRoomListGUIRequest::_internal_range_max() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.range_max_; +} +inline void GetRoomListGUIRequest::_internal_set_range_max(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.range_max_ = value; +} + +// repeated .np2_structs.MatchingSearchCondition conds = 3; +inline int GetRoomListGUIRequest::_internal_conds_size() const { + return _internal_conds().size(); +} +inline int GetRoomListGUIRequest::conds_size() const { + return _internal_conds_size(); +} +inline void GetRoomListGUIRequest::clear_conds() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.conds_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL GetRoomListGUIRequest::mutable_conds(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomListGUIRequest.conds) + return _internal_mutable_conds()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL GetRoomListGUIRequest::mutable_conds() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomListGUIRequest.conds) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_conds(); +} +inline const ::np2_structs::MatchingSearchCondition& GetRoomListGUIRequest::conds(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomListGUIRequest.conds) + return _internal_conds().Get(index); +} +inline ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL GetRoomListGUIRequest::add_conds() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingSearchCondition* _add = + _internal_mutable_conds()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomListGUIRequest.conds) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& GetRoomListGUIRequest::conds() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomListGUIRequest.conds) + return _internal_conds(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& +GetRoomListGUIRequest::_internal_conds() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.conds_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL +GetRoomListGUIRequest::_internal_mutable_conds() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.conds_; +} + +// repeated .np2_structs.MatchingAttr attrs = 4; +inline int GetRoomListGUIRequest::_internal_attrs_size() const { + return _internal_attrs().size(); +} +inline int GetRoomListGUIRequest::attrs_size() const { + return _internal_attrs_size(); +} +inline void GetRoomListGUIRequest::clear_attrs() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attrs_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL GetRoomListGUIRequest::mutable_attrs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomListGUIRequest.attrs) + return _internal_mutable_attrs()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL GetRoomListGUIRequest::mutable_attrs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomListGUIRequest.attrs) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attrs(); +} +inline const ::np2_structs::MatchingAttr& GetRoomListGUIRequest::attrs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomListGUIRequest.attrs) + return _internal_attrs().Get(index); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL GetRoomListGUIRequest::add_attrs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingAttr* _add = + _internal_mutable_attrs()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomListGUIRequest.attrs) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& GetRoomListGUIRequest::attrs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomListGUIRequest.attrs) + return _internal_attrs(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& +GetRoomListGUIRequest::_internal_attrs() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attrs_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL +GetRoomListGUIRequest::_internal_mutable_attrs() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attrs_; +} + +// ------------------------------------------------------------------- + +// MatchingRoom + +// bytes id = 1; +inline void MatchingRoom::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::std::string& MatchingRoom::id() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoom.id) + return _internal_id(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingRoom::set_id(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + _impl_.id_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingRoom.id) +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoom::mutable_id() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoom.id) + return _s; +} +inline const ::std::string& MatchingRoom::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_.Get(); +} +inline void MatchingRoom::_internal_set_id(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingRoom::_internal_mutable_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.id_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingRoom::release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingRoom.id) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + auto* released = _impl_.id_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.id_.Set("", GetArena()); + } + return released; +} +inline void MatchingRoom::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingRoom.id) +} + +// repeated .np2_structs.MatchingAttr attr = 2; +inline int MatchingRoom::_internal_attr_size() const { + return _internal_attr().size(); +} +inline int MatchingRoom::attr_size() const { + return _internal_attr_size(); +} +inline void MatchingRoom::clear_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL MatchingRoom::mutable_attr(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoom.attr) + return _internal_mutable_attr()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL MatchingRoom::mutable_attr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.MatchingRoom.attr) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attr(); +} +inline const ::np2_structs::MatchingAttr& MatchingRoom::attr(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoom.attr) + return _internal_attr().Get(index); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL MatchingRoom::add_attr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingAttr* _add = + _internal_mutable_attr()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.MatchingRoom.attr) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& MatchingRoom::attr() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.MatchingRoom.attr) + return _internal_attr(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& +MatchingRoom::_internal_attr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attr_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL +MatchingRoom::_internal_mutable_attr() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attr_; +} + +// ------------------------------------------------------------------- + +// MatchingRoomList + +// uint32 start = 1; +inline void MatchingRoomList::clear_start() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.start_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t MatchingRoomList::start() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomList.start) + return _internal_start(); +} +inline void MatchingRoomList::set_start(::uint32_t value) { + _internal_set_start(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingRoomList.start) +} +inline ::uint32_t MatchingRoomList::_internal_start() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.start_; +} +inline void MatchingRoomList::_internal_set_start(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.start_ = value; +} + +// uint32 total = 2; +inline void MatchingRoomList::clear_total() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.total_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint32_t MatchingRoomList::total() const { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomList.total) + return _internal_total(); +} +inline void MatchingRoomList::set_total(::uint32_t value) { + _internal_set_total(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.MatchingRoomList.total) +} +inline ::uint32_t MatchingRoomList::_internal_total() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.total_; +} +inline void MatchingRoomList::_internal_set_total(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.total_ = value; +} + +// repeated .np2_structs.MatchingRoom rooms = 3; +inline int MatchingRoomList::_internal_rooms_size() const { + return _internal_rooms().size(); +} +inline int MatchingRoomList::rooms_size() const { + return _internal_rooms_size(); +} +inline void MatchingRoomList::clear_rooms() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rooms_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingRoom* PROTOBUF_NONNULL MatchingRoomList::mutable_rooms(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingRoomList.rooms) + return _internal_mutable_rooms()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>* PROTOBUF_NONNULL MatchingRoomList::mutable_rooms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.MatchingRoomList.rooms) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_rooms(); +} +inline const ::np2_structs::MatchingRoom& MatchingRoomList::rooms(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingRoomList.rooms) + return _internal_rooms().Get(index); +} +inline ::np2_structs::MatchingRoom* PROTOBUF_NONNULL MatchingRoomList::add_rooms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingRoom* _add = + _internal_mutable_rooms()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.MatchingRoomList.rooms) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>& MatchingRoomList::rooms() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.MatchingRoomList.rooms) + return _internal_rooms(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>& +MatchingRoomList::_internal_rooms() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rooms_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingRoom>* PROTOBUF_NONNULL +MatchingRoomList::_internal_mutable_rooms() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.rooms_; +} + +// ------------------------------------------------------------------- + +// MatchingGuiRoomId + +// bytes id = 1; +inline void MatchingGuiRoomId::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& MatchingGuiRoomId::id() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingGuiRoomId.id) + return _internal_id(); +} +template +PROTOBUF_ALWAYS_INLINE void MatchingGuiRoomId::set_id(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.id_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.MatchingGuiRoomId.id) +} +inline ::std::string* PROTOBUF_NONNULL MatchingGuiRoomId::mutable_id() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingGuiRoomId.id) + return _s; +} +inline const ::std::string& MatchingGuiRoomId::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_.Get(); +} +inline void MatchingGuiRoomId::_internal_set_id(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL MatchingGuiRoomId::_internal_mutable_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.id_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE MatchingGuiRoomId::release_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingGuiRoomId.id) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.id_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.id_.Set("", GetArena()); + } + return released; +} +inline void MatchingGuiRoomId::set_allocated_id(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.id_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingGuiRoomId.id) +} + +// ------------------------------------------------------------------- + +// SetRoomSearchFlagGUI + +// bytes roomid = 1; +inline void SetRoomSearchFlagGUI::clear_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_.ClearToEmpty(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::std::string& SetRoomSearchFlagGUI::roomid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomSearchFlagGUI.roomid) + return _internal_roomid(); +} +template +PROTOBUF_ALWAYS_INLINE void SetRoomSearchFlagGUI::set_roomid(Arg_&& arg, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + _impl_.roomid_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomSearchFlagGUI.roomid) +} +inline ::std::string* PROTOBUF_NONNULL SetRoomSearchFlagGUI::mutable_roomid() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::std::string* _s = _internal_mutable_roomid(); + // @@protoc_insertion_point(field_mutable:np2_structs.SetRoomSearchFlagGUI.roomid) + return _s; +} +inline const ::std::string& SetRoomSearchFlagGUI::_internal_roomid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.roomid_.Get(); +} +inline void SetRoomSearchFlagGUI::_internal_set_roomid(const ::std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.roomid_.Set(value, GetArena()); +} +inline ::std::string* PROTOBUF_NONNULL SetRoomSearchFlagGUI::_internal_mutable_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.roomid_.Mutable( GetArena()); +} +inline ::std::string* PROTOBUF_NULLABLE SetRoomSearchFlagGUI::release_roomid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.SetRoomSearchFlagGUI.roomid) + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + return nullptr; + } + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + auto* released = _impl_.roomid_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.roomid_.Set("", GetArena()); + } + return released; +} +inline void SetRoomSearchFlagGUI::set_allocated_roomid(::std::string* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + _impl_.roomid_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.roomid_.IsDefault()) { + _impl_.roomid_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:np2_structs.SetRoomSearchFlagGUI.roomid) +} + +// bool stealth = 2; +inline void SetRoomSearchFlagGUI::clear_stealth() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.stealth_ = false; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline bool SetRoomSearchFlagGUI::stealth() const { + // @@protoc_insertion_point(field_get:np2_structs.SetRoomSearchFlagGUI.stealth) + return _internal_stealth(); +} +inline void SetRoomSearchFlagGUI::set_stealth(bool value) { + _internal_set_stealth(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.SetRoomSearchFlagGUI.stealth) +} +inline bool SetRoomSearchFlagGUI::_internal_stealth() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.stealth_; +} +inline void SetRoomSearchFlagGUI::_internal_set_stealth(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.stealth_ = value; +} + +// ------------------------------------------------------------------- + +// QuickMatchGUIRequest + +// repeated .np2_structs.MatchingSearchCondition conds = 1; +inline int QuickMatchGUIRequest::_internal_conds_size() const { + return _internal_conds().size(); +} +inline int QuickMatchGUIRequest::conds_size() const { + return _internal_conds_size(); +} +inline void QuickMatchGUIRequest::clear_conds() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.conds_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL QuickMatchGUIRequest::mutable_conds(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.QuickMatchGUIRequest.conds) + return _internal_mutable_conds()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL QuickMatchGUIRequest::mutable_conds() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.QuickMatchGUIRequest.conds) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_conds(); +} +inline const ::np2_structs::MatchingSearchCondition& QuickMatchGUIRequest::conds(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.QuickMatchGUIRequest.conds) + return _internal_conds().Get(index); +} +inline ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL QuickMatchGUIRequest::add_conds() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingSearchCondition* _add = + _internal_mutable_conds()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.QuickMatchGUIRequest.conds) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& QuickMatchGUIRequest::conds() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.QuickMatchGUIRequest.conds) + return _internal_conds(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& +QuickMatchGUIRequest::_internal_conds() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.conds_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL +QuickMatchGUIRequest::_internal_mutable_conds() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.conds_; +} + +// uint32 available_num = 2; +inline void QuickMatchGUIRequest::clear_available_num() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.available_num_ = 0u; + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::uint32_t QuickMatchGUIRequest::available_num() const { + // @@protoc_insertion_point(field_get:np2_structs.QuickMatchGUIRequest.available_num) + return _internal_available_num(); +} +inline void QuickMatchGUIRequest::set_available_num(::uint32_t value) { + _internal_set_available_num(value); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_set:np2_structs.QuickMatchGUIRequest.available_num) +} +inline ::uint32_t QuickMatchGUIRequest::_internal_available_num() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.available_num_; +} +inline void QuickMatchGUIRequest::_internal_set_available_num(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.available_num_ = value; +} + +// ------------------------------------------------------------------- + +// SearchJoinRoomGUIRequest + +// repeated .np2_structs.MatchingSearchCondition conds = 1; +inline int SearchJoinRoomGUIRequest::_internal_conds_size() const { + return _internal_conds().size(); +} +inline int SearchJoinRoomGUIRequest::conds_size() const { + return _internal_conds_size(); +} +inline void SearchJoinRoomGUIRequest::clear_conds() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.conds_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::mutable_conds(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SearchJoinRoomGUIRequest.conds) + return _internal_mutable_conds()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::mutable_conds() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SearchJoinRoomGUIRequest.conds) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_conds(); +} +inline const ::np2_structs::MatchingSearchCondition& SearchJoinRoomGUIRequest::conds(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SearchJoinRoomGUIRequest.conds) + return _internal_conds().Get(index); +} +inline ::np2_structs::MatchingSearchCondition* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::add_conds() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingSearchCondition* _add = + _internal_mutable_conds()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.SearchJoinRoomGUIRequest.conds) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& SearchJoinRoomGUIRequest::conds() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SearchJoinRoomGUIRequest.conds) + return _internal_conds(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>& +SearchJoinRoomGUIRequest::_internal_conds() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.conds_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingSearchCondition>* PROTOBUF_NONNULL +SearchJoinRoomGUIRequest::_internal_mutable_conds() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.conds_; +} + +// repeated .np2_structs.MatchingAttr attrs = 2; +inline int SearchJoinRoomGUIRequest::_internal_attrs_size() const { + return _internal_attrs().size(); +} +inline int SearchJoinRoomGUIRequest::attrs_size() const { + return _internal_attrs_size(); +} +inline void SearchJoinRoomGUIRequest::clear_attrs() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attrs_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000002U); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::mutable_attrs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.SearchJoinRoomGUIRequest.attrs) + return _internal_mutable_attrs()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::mutable_attrs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.SearchJoinRoomGUIRequest.attrs) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attrs(); +} +inline const ::np2_structs::MatchingAttr& SearchJoinRoomGUIRequest::attrs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.SearchJoinRoomGUIRequest.attrs) + return _internal_attrs().Get(index); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL SearchJoinRoomGUIRequest::add_attrs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingAttr* _add = + _internal_mutable_attrs()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000002U); + // @@protoc_insertion_point(field_add:np2_structs.SearchJoinRoomGUIRequest.attrs) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& SearchJoinRoomGUIRequest::attrs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.SearchJoinRoomGUIRequest.attrs) + return _internal_attrs(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& +SearchJoinRoomGUIRequest::_internal_attrs() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attrs_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL +SearchJoinRoomGUIRequest::_internal_mutable_attrs() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attrs_; +} + +// ------------------------------------------------------------------- + +// MatchingSearchJoinRoomInfo + +// .np2_structs.MatchingRoomStatus room = 1; +inline bool MatchingSearchJoinRoomInfo::has_room() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.room_ != nullptr); + return value; +} +inline void MatchingSearchJoinRoomInfo::clear_room() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.room_ != nullptr) _impl_.room_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::MatchingRoomStatus& MatchingSearchJoinRoomInfo::_internal_room() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::MatchingRoomStatus* p = _impl_.room_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_MatchingRoomStatus_default_instance_); +} +inline const ::np2_structs::MatchingRoomStatus& MatchingSearchJoinRoomInfo::room() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSearchJoinRoomInfo.room) + return _internal_room(); +} +inline void MatchingSearchJoinRoomInfo::unsafe_arena_set_allocated_room( + ::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.room_); + } + _impl_.room_ = reinterpret_cast<::np2_structs::MatchingRoomStatus*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.MatchingSearchJoinRoomInfo.room) +} +inline ::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE MatchingSearchJoinRoomInfo::release_room() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::MatchingRoomStatus* released = _impl_.room_; + _impl_.room_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE MatchingSearchJoinRoomInfo::unsafe_arena_release_room() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.MatchingSearchJoinRoomInfo.room) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::MatchingRoomStatus* temp = _impl_.room_; + _impl_.room_ = nullptr; + return temp; +} +inline ::np2_structs::MatchingRoomStatus* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::_internal_mutable_room() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.room_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::MatchingRoomStatus>(GetArena()); + _impl_.room_ = reinterpret_cast<::np2_structs::MatchingRoomStatus*>(p); + } + return _impl_.room_; +} +inline ::np2_structs::MatchingRoomStatus* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::mutable_room() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::MatchingRoomStatus* _msg = _internal_mutable_room(); + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingSearchJoinRoomInfo.room) + return _msg; +} +inline void MatchingSearchJoinRoomInfo::set_allocated_room(::np2_structs::MatchingRoomStatus* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.room_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.room_ = reinterpret_cast<::np2_structs::MatchingRoomStatus*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.MatchingSearchJoinRoomInfo.room) +} + +// repeated .np2_structs.MatchingAttr attr = 2; +inline int MatchingSearchJoinRoomInfo::_internal_attr_size() const { + return _internal_attr().size(); +} +inline int MatchingSearchJoinRoomInfo::attr_size() const { + return _internal_attr_size(); +} +inline void MatchingSearchJoinRoomInfo::clear_attr() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attr_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::mutable_attr(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.MatchingSearchJoinRoomInfo.attr) + return _internal_mutable_attr()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::mutable_attr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.MatchingSearchJoinRoomInfo.attr) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attr(); +} +inline const ::np2_structs::MatchingAttr& MatchingSearchJoinRoomInfo::attr(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.MatchingSearchJoinRoomInfo.attr) + return _internal_attr().Get(index); +} +inline ::np2_structs::MatchingAttr* PROTOBUF_NONNULL MatchingSearchJoinRoomInfo::add_attr() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::MatchingAttr* _add = + _internal_mutable_attr()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.MatchingSearchJoinRoomInfo.attr) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& MatchingSearchJoinRoomInfo::attr() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.MatchingSearchJoinRoomInfo.attr) + return _internal_attr(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>& +MatchingSearchJoinRoomInfo::_internal_attr() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attr_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::MatchingAttr>* PROTOBUF_NONNULL +MatchingSearchJoinRoomInfo::_internal_mutable_attr() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attr_; +} + +// ------------------------------------------------------------------- + +// RoomMemberDataExternal + +// .np2_structs.UserInfo userInfo = 1; +inline bool RoomMemberDataExternal::has_userinfo() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.userinfo_ != nullptr); + return value; +} +inline void RoomMemberDataExternal::clear_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.userinfo_ != nullptr) _impl_.userinfo_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::UserInfo& RoomMemberDataExternal::_internal_userinfo() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::UserInfo* p = _impl_.userinfo_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_UserInfo_default_instance_); +} +inline const ::np2_structs::UserInfo& RoomMemberDataExternal::userinfo() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataExternal.userInfo) + return _internal_userinfo(); +} +inline void RoomMemberDataExternal::unsafe_arena_set_allocated_userinfo( + ::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.userinfo_); + } + _impl_.userinfo_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataExternal.userInfo) +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomMemberDataExternal::release_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::UserInfo* released = _impl_.userinfo_; + _impl_.userinfo_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::UserInfo* PROTOBUF_NULLABLE RoomMemberDataExternal::unsafe_arena_release_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataExternal.userInfo) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::UserInfo* temp = _impl_.userinfo_; + _impl_.userinfo_ = nullptr; + return temp; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomMemberDataExternal::_internal_mutable_userinfo() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.userinfo_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::UserInfo>(GetArena()); + _impl_.userinfo_ = reinterpret_cast<::np2_structs::UserInfo*>(p); + } + return _impl_.userinfo_; +} +inline ::np2_structs::UserInfo* PROTOBUF_NONNULL RoomMemberDataExternal::mutable_userinfo() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::UserInfo* _msg = _internal_mutable_userinfo(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataExternal.userInfo) + return _msg; +} +inline void RoomMemberDataExternal::set_allocated_userinfo(::np2_structs::UserInfo* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.userinfo_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.userinfo_ = reinterpret_cast<::np2_structs::UserInfo*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataExternal.userInfo) +} + +// uint64 joinDate = 2; +inline void RoomMemberDataExternal::clear_joindate() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joindate_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline ::uint64_t RoomMemberDataExternal::joindate() const { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataExternal.joinDate) + return _internal_joindate(); +} +inline void RoomMemberDataExternal::set_joindate(::uint64_t value) { + _internal_set_joindate(value); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + // @@protoc_insertion_point(field_set:np2_structs.RoomMemberDataExternal.joinDate) +} +inline ::uint64_t RoomMemberDataExternal::_internal_joindate() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.joindate_; +} +inline void RoomMemberDataExternal::_internal_set_joindate(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.joindate_ = value; +} + +// .np2_structs.uint8 role = 3; +inline bool RoomMemberDataExternal::has_role() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.role_ != nullptr); + return value; +} +inline void RoomMemberDataExternal::clear_role() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.role_ != nullptr) _impl_.role_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::uint8& RoomMemberDataExternal::_internal_role() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::uint8* p = _impl_.role_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_uint8_default_instance_); +} +inline const ::np2_structs::uint8& RoomMemberDataExternal::role() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.RoomMemberDataExternal.role) + return _internal_role(); +} +inline void RoomMemberDataExternal::unsafe_arena_set_allocated_role( + ::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.role_); + } + _impl_.role_ = reinterpret_cast<::np2_structs::uint8*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.RoomMemberDataExternal.role) +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataExternal::release_role() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* released = _impl_.role_; + _impl_.role_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::uint8* PROTOBUF_NULLABLE RoomMemberDataExternal::unsafe_arena_release_role() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.RoomMemberDataExternal.role) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* temp = _impl_.role_; + _impl_.role_ = nullptr; + return temp; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataExternal::_internal_mutable_role() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.role_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::uint8>(GetArena()); + _impl_.role_ = reinterpret_cast<::np2_structs::uint8*>(p); + } + return _impl_.role_; +} +inline ::np2_structs::uint8* PROTOBUF_NONNULL RoomMemberDataExternal::mutable_role() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::uint8* _msg = _internal_mutable_role(); + // @@protoc_insertion_point(field_mutable:np2_structs.RoomMemberDataExternal.role) + return _msg; +} +inline void RoomMemberDataExternal::set_allocated_role(::np2_structs::uint8* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.role_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.role_ = reinterpret_cast<::np2_structs::uint8*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.RoomMemberDataExternal.role) +} + +// ------------------------------------------------------------------- + +// GetRoomMemberDataExternalListResponse + +// repeated .np2_structs.RoomMemberDataExternal members = 1; +inline int GetRoomMemberDataExternalListResponse::_internal_members_size() const { + return _internal_members().size(); +} +inline int GetRoomMemberDataExternalListResponse::members_size() const { + return _internal_members_size(); +} +inline void GetRoomMemberDataExternalListResponse::clear_members() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.members_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::np2_structs::RoomMemberDataExternal* PROTOBUF_NONNULL GetRoomMemberDataExternalListResponse::mutable_members(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:np2_structs.GetRoomMemberDataExternalListResponse.members) + return _internal_mutable_members()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>* PROTOBUF_NONNULL GetRoomMemberDataExternalListResponse::mutable_members() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:np2_structs.GetRoomMemberDataExternalListResponse.members) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_members(); +} +inline const ::np2_structs::RoomMemberDataExternal& GetRoomMemberDataExternalListResponse::members(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.GetRoomMemberDataExternalListResponse.members) + return _internal_members().Get(index); +} +inline ::np2_structs::RoomMemberDataExternal* PROTOBUF_NONNULL GetRoomMemberDataExternalListResponse::add_members() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::np2_structs::RoomMemberDataExternal* _add = + _internal_mutable_members()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:np2_structs.GetRoomMemberDataExternalListResponse.members) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>& GetRoomMemberDataExternalListResponse::members() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:np2_structs.GetRoomMemberDataExternalListResponse.members) + return _internal_members(); +} +inline const ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>& +GetRoomMemberDataExternalListResponse::_internal_members() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.members_; +} +inline ::google::protobuf::RepeatedPtrField<::np2_structs::RoomMemberDataExternal>* PROTOBUF_NONNULL +GetRoomMemberDataExternalListResponse::_internal_mutable_members() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.members_; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace np2_structs + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // np2_5fstructs_2eproto_2epb_2eh diff --git a/rpcs3/Emu/NP/generated/np2_structs.proto b/rpcs3/Emu/NP/generated/np2_structs.proto new file mode 100644 index 0000000000..fcb5c7304e --- /dev/null +++ b/rpcs3/Emu/NP/generated/np2_structs.proto @@ -0,0 +1,619 @@ +// Protocol Buffers definition for np2_structs + +syntax = "proto3"; + +option optimize_for = LITE_RUNTIME; + +package np2_structs; + +// These types exist to ease the transition from flatbuffers +message uint8 { + uint32 value = 1; +} + +message uint16 { + uint32 value = 1; +} + + +message SignalingAddr { + bytes ip = 1; + uint16 port = 2; +} + +message MatchingSignalingInfo { + string npid = 1; + SignalingAddr addr = 2; +} + +message Matching2SignalingInfo { + uint16 member_id = 1; + SignalingAddr addr = 2; +} + +message BinAttr { + uint16 id = 1; + bytes data = 2; +} + +message IntAttr { + uint16 id = 1; + uint32 num = 2; +} + +message RoomMemberBinAttrInternal { + uint64 updateDate = 1; + BinAttr data = 2; +} + +message BinAttrInternal { + uint64 updateDate = 1; + uint16 updateMemberId = 2; + BinAttr data = 3; +} + +message OptParam { + uint8 type = 1; + uint8 flag = 2; + uint16 hubMemberId = 3; +} + +message GroupConfig { + uint32 slotNum = 1; + bytes label = 2; + bool withPassword = 3; +} + +message UserInfo { + string npId = 1; + string onlineName = 2; + string avatarUrl = 3; +} + +message RoomMemberDataInternal { + UserInfo userInfo = 1; + uint64 joinDate = 2; + uint32 memberId = 3; + uint8 teamId = 4; + RoomGroup roomGroup = 5; + uint8 natType = 6; + uint32 flagAttr = 7; + repeated RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; +} + +message RoomGroup { + uint8 groupId = 1; + bool withPassword = 2; + bytes label = 3; + uint32 slotNum = 4; + uint32 curGroupMemberNum = 5; +} + +message RoomDataInternal { + uint16 serverId = 1; + uint32 worldId = 2; + uint64 lobbyId = 3; + uint64 roomId = 4; + uint64 passwordSlotMask = 5; + uint32 maxSlot = 6; + repeated RoomMemberDataInternal memberList = 7; + uint16 ownerId = 8; + repeated RoomGroup roomGroup = 9; + uint32 flagAttr = 10; + repeated BinAttrInternal roomBinAttrInternal = 11; +} + +message RoomDataExternal { + uint16 serverId = 1; + uint32 worldId = 2; + uint16 publicSlotNum = 3; + uint16 privateSlotNum = 4; + uint64 lobbyId = 5; + uint64 roomId = 6; + uint16 openPublicSlotNum = 7; + uint16 maxSlot = 8; + uint16 openPrivateSlotNum = 9; + uint16 curMemberNum = 10; + uint64 passwordSlotMask = 11; + UserInfo owner = 12; + repeated RoomGroup roomGroup = 13; + uint32 flagAttr = 14; + repeated IntAttr roomSearchableIntAttrExternal = 15; + repeated BinAttr roomSearchableBinAttrExternal = 16; + repeated BinAttr roomBinAttrExternal = 17; +} + +message IntSearchFilter { + uint8 searchOperator = 1; + IntAttr attr = 2; +} + +message BinSearchFilter { + uint8 searchOperator = 1; + BinAttr attr = 2; +} + +message PresenceOptionData { + bytes data = 1; + uint32 len = 2; +} + +message RoomGroupPasswordConfig { + uint8 groupId = 1; + bool withPassword = 2; +} + +message SearchRoomRequest { + int32 option = 1; + uint32 worldId = 2; + uint64 lobbyId = 3; + uint32 rangeFilter_startIndex = 4; + uint32 rangeFilter_max = 5; + uint32 flagFilter = 6; + uint32 flagAttr = 7; + repeated IntSearchFilter intFilter = 8; + repeated BinSearchFilter binFilter = 9; + repeated uint16 attrId = 10; +} + +message SearchRoomResponse { + uint32 startIndex = 1; + uint32 total = 2; + repeated RoomDataExternal rooms = 3; +} + +message CreateJoinRoomRequest { + uint32 worldId = 1; + uint64 lobbyId = 2; + uint32 maxSlot = 3; + uint32 flagAttr = 4; + repeated BinAttr roomBinAttrInternal = 5; + repeated IntAttr roomSearchableIntAttrExternal = 6; + repeated BinAttr roomSearchableBinAttrExternal = 7; + repeated BinAttr roomBinAttrExternal = 8; + bytes roomPassword = 9; + repeated GroupConfig groupConfig = 10; + uint64 passwordSlotMask = 11; + repeated string allowedUser = 12; + repeated string blockedUser = 13; + bytes joinRoomGroupLabel = 14; + repeated BinAttr roomMemberBinAttrInternal = 15; + uint8 teamId = 16; + OptParam sigOptParam = 17; +} + +// Reply on creating a room +message CreateRoomResponse { + RoomDataInternal internal = 1; + OptParam opt_param = 2; +} + +message JoinRoomRequest { + uint64 roomId = 1; + bytes roomPassword = 2; + bytes joinRoomGroupLabel = 3; + repeated BinAttr roomMemberBinAttrInternal = 4; + PresenceOptionData optData = 5; + uint8 teamId = 6; +} + +message JoinRoomResponse { + RoomDataInternal room_data = 1; + repeated Matching2SignalingInfo signaling_data = 2; + OptParam opt_param = 3; +} + +message LeaveRoomRequest { + uint64 roomId = 1; + PresenceOptionData optData = 2; +} + +message GetRoomDataExternalListRequest { + repeated uint64 roomIds = 1; + repeated uint16 attrIds = 2; +} + +message GetRoomDataExternalListResponse { + repeated RoomDataExternal rooms = 1; +} + +message SetRoomDataExternalRequest { + uint64 roomId = 1; + repeated IntAttr roomSearchableIntAttrExternal = 2; + repeated BinAttr roomSearchableBinAttrExternal = 3; + repeated BinAttr roomBinAttrExternal = 4; +} + +message SetRoomDataInternalRequest { + uint64 roomId = 1; + uint32 flagFilter = 2; + uint32 flagAttr = 3; + repeated BinAttr roomBinAttrInternal = 4; + repeated RoomGroupPasswordConfig passwordConfig = 5; + repeated uint64 passwordSlotMask = 6; + repeated uint16 ownerPrivilegeRank = 7; +} + +message GetRoomMemberDataInternalRequest { + uint64 roomId = 1; + uint16 memberId = 2; + repeated uint16 attrId = 3; +} + +message SetRoomMemberDataInternalRequest { + uint64 roomId = 1; + uint16 memberId = 2; + uint8 teamId = 3; + repeated BinAttr roomMemberBinAttrInternal = 4; +} + +message SetUserInfo { + uint16 serverId = 1; + repeated BinAttr userBinAttr = 2; +} + +message GetRoomDataInternalRequest { + uint64 roomId = 1; + repeated uint16 attrId = 2; +} + +message RoomMemberUpdateInfo { + RoomMemberDataInternal roomMemberDataInternal = 1; + uint8 eventCause = 2; + PresenceOptionData optData = 3; +} + +message NotificationUserJoinedRoom { + uint64 room_id = 1; + RoomMemberUpdateInfo update_info = 2; + SignalingAddr signaling = 3; +} + +message RoomUpdateInfo { + uint8 eventCause = 1; + int32 errorCode = 2; + PresenceOptionData optData = 3; +} + +message RoomDataInternalUpdateInfo { + RoomDataInternal newRoomDataInternal = 1; + uint32 prevFlagAttr = 2; + uint64 prevRoomPasswordSlotMask = 3; + bytes newRoomGroup = 4; + repeated uint16 newRoomBinAttrInternal = 5; +} + +message RoomMemberDataInternalUpdateInfo { + RoomMemberDataInternal newRoomMemberDataInternal = 1; + uint32 prevFlagAttr = 2; + uint8 prevTeamId = 3; + repeated uint16 newRoomMemberBinAttrInternal = 4; +} + +message GetPingInfoResponse { + uint16 serverId = 1; + uint32 worldId = 2; + uint64 roomId = 3; + uint32 rtt = 4; +} + +message SendRoomMessageRequest { + uint64 roomId = 1; + uint8 castType = 2; + repeated uint16 dst = 3; + bytes msg = 4; + uint8 option = 5; +} + +message RoomMessageInfo { + bool filtered = 1; + uint8 castType = 2; + repeated uint16 dst = 3; + UserInfo srcMember = 4; + bytes msg = 5; +} + +message MessageDetails { + string communicationId = 1; + uint64 msgId = 2; + uint16 mainType = 3; + uint16 subType = 4; + uint32 msgFeatures = 5; + string subject = 6; + string body = 7; + bytes data = 8; +} + +message SendMessageRequest { + bytes message = 1; + repeated string npids = 2; +} + +message BoardInfo { + uint32 rankLimit = 1; + uint32 updateMode = 2; + uint32 sortMode = 3; + uint32 uploadNumLimit = 4; + uint32 uploadSizeLimit = 5; +} + +message RecordScoreRequest { + uint32 boardId = 1; + int32 pcId = 2; + int64 score = 3; + string comment = 4; + bytes data = 5; +} + +message GetScoreRangeRequest { + uint32 boardId = 1; + uint32 startRank = 2; + uint32 numRanks = 3; + bool withComment = 4; + bool withGameInfo = 5; +} + +message ScoreNpIdPcId { + string npid = 1; + int32 pcId = 2; +} + +message GetScoreNpIdRequest { + uint32 boardId = 1; + repeated ScoreNpIdPcId npids = 2; + bool withComment = 3; + bool withGameInfo = 4; +} + +message GetScoreFriendsRequest { + uint32 boardId = 1; + bool include_self = 2; + uint32 max = 3; + bool withComment = 4; + bool withGameInfo = 5; +} + +message ScoreRankData { + string npId = 1; + string onlineName = 2; + int32 pcId = 3; + uint32 rank = 4; + int64 score = 5; + bool hasGameData = 6; + uint64 recordDate = 7; +} + +message ScoreInfo { + bytes data = 1; +} + +message GetScoreResponse { + repeated ScoreRankData rankArray = 1; + repeated string commentArray = 2; + repeated ScoreInfo infoArray = 3; + uint64 lastSortDate = 4; + uint32 totalRecord = 5; +} + +message RecordScoreGameDataRequest { + uint32 boardId = 1; + int32 pcId = 2; + int64 score = 3; +} + +message GetScoreGameDataRequest { + uint32 boardId = 1; + string npId = 2; + int32 pcId = 3; +} + +message TusUser { + bool vuser = 1; + string npid = 2; +} + +message TusVariable { + string ownerId = 1; + bool hasData = 2; + uint64 lastChangedDate = 3; + string lastChangedAuthorId = 4; + int64 variable = 5; + int64 oldVariable = 6; +} + +message TusVarResponse { + repeated TusVariable vars = 1; +} + +message TusSetMultiSlotVariableRequest { + TusUser user = 1; + repeated int32 slotIdArray = 2; + repeated int64 variableArray = 3; +} + +message TusGetMultiSlotVariableRequest { + TusUser user = 1; + repeated int32 slotIdArray = 2; +} + +message TusGetMultiUserVariableRequest { + repeated TusUser users = 1; + int32 slotId = 2; +} + +message TusGetFriendsVariableRequest { + int32 slotId = 1; + bool includeSelf = 2; + int32 sortType = 3; + uint32 arrayNum = 4; +} + +message TusAddAndGetVariableRequest { + TusUser user = 1; + int32 slotId = 2; + int64 inVariable = 3; + repeated uint64 isLastChangedDate = 4; + string isLastChangedAuthorId = 5; +} + +message TusTryAndSetVariableRequest { + TusUser user = 1; + int32 slotId = 2; + int32 opeType = 3; + int64 variable = 4; + repeated uint64 isLastChangedDate = 5; + string isLastChangedAuthorId = 6; + repeated int64 compareValue = 7; +} + +message TusDeleteMultiSlotVariableRequest { + TusUser user = 1; + repeated int32 slotIdArray = 2; +} + +message TusSetDataRequest { + TusUser user = 1; + int32 slotId = 2; + bytes data = 3; + bytes info = 4; + repeated uint64 isLastChangedDate = 5; + string isLastChangedAuthorId = 6; +} + +message TusDataStatus { + string ownerId = 1; + bool hasData = 2; + uint64 lastChangedDate = 3; + string lastChangedAuthorId = 4; + bytes info = 5; +} + +message TusData { + TusDataStatus status = 1; + bytes data = 2; +} + +message TusDataStatusResponse { + repeated TusDataStatus status = 1; +} + +message TusGetDataRequest { + TusUser user = 1; + int32 slotId = 2; +} + +message TusGetMultiSlotDataStatusRequest { + TusUser user = 1; + repeated int32 slotIdArray = 2; +} + +message TusGetMultiUserDataStatusRequest { + repeated TusUser users = 1; + int32 slotId = 2; +} + +message TusGetFriendsDataStatusRequest { + int32 slotId = 1; + bool includeSelf = 2; + int32 sortType = 3; + uint32 arrayNum = 4; +} + +message TusDeleteMultiSlotDataRequest { + TusUser user = 1; + repeated int32 slotIdArray = 2; +} + +message SetPresenceRequest { + string title = 1; + string status = 2; + string comment = 3; + bytes data = 4; +} + +message MatchingSearchCondition { + uint32 attr_type = 1; + uint32 attr_id = 2; + uint32 comp_op = 3; + uint32 comp_value = 4; +} + +message MatchingAttr { + uint32 attr_type = 1; + uint32 attr_id = 2; + uint32 num = 3; + bytes data = 4; +} + +message CreateRoomGUIRequest { + uint32 total_slots = 1; + uint32 private_slots = 2; + bool privilege_grant = 3; + bool stealth = 4; + repeated MatchingAttr game_attrs = 5; +} + +message GUIUserInfo { + UserInfo info = 1; + bool owner = 2; +} + +message MatchingRoomStatus { + bytes id = 1; + repeated GUIUserInfo members = 2; + string kick_actor = 3; + bytes opt = 4; +} + +message GetRoomListGUIRequest { + uint32 range_start = 1; + uint32 range_max = 2; + repeated MatchingSearchCondition conds = 3; + repeated MatchingAttr attrs = 4; +} + +message MatchingRoom { + bytes id = 1; + repeated MatchingAttr attr = 2; +} + +message MatchingRoomList { + uint32 start = 1; + uint32 total = 2; + repeated MatchingRoom rooms = 3; +} + +message MatchingGuiRoomId { + bytes id = 1; +} + +message SetRoomSearchFlagGUI { + bytes roomid = 1; + bool stealth = 2; +} + +message QuickMatchGUIRequest { + repeated MatchingSearchCondition conds = 1; + uint32 available_num = 2; +} + +message SearchJoinRoomGUIRequest { + repeated MatchingSearchCondition conds = 1; + repeated MatchingAttr attrs = 2; +} + +message MatchingSearchJoinRoomInfo { + MatchingRoomStatus room = 1; + repeated MatchingAttr attr = 2; +} + +message RoomMemberDataExternal { + UserInfo userInfo = 1; + uint64 joinDate = 2; + uint8 role = 3; +} + +message GetRoomMemberDataExternalListResponse +{ + repeated RoomMemberDataExternal members = 1; +} diff --git a/rpcs3/Emu/NP/generated/np2_structs_generated.h b/rpcs3/Emu/NP/generated/np2_structs_generated.h deleted file mode 100644 index 5dabacbbc9..0000000000 --- a/rpcs3/Emu/NP/generated/np2_structs_generated.h +++ /dev/null @@ -1,7429 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - - -#ifndef FLATBUFFERS_GENERATED_NP2STRUCTS_H_ -#define FLATBUFFERS_GENERATED_NP2STRUCTS_H_ - -#include "flatbuffers/flatbuffers.h" - -// Ensure the included flatbuffers.h is the same version as when this file was -// generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 25 && - FLATBUFFERS_VERSION_MINOR == 9 && - FLATBUFFERS_VERSION_REVISION == 23, - "Non-compatible flatbuffers version included"); - -struct SignalingAddr; -struct SignalingAddrBuilder; - -struct MatchingSignalingInfo; -struct MatchingSignalingInfoBuilder; - -struct Matching2SignalingInfo; -struct Matching2SignalingInfoBuilder; - -struct BinAttr; -struct BinAttrBuilder; - -struct IntAttr; -struct IntAttrBuilder; - -struct RoomMemberBinAttrInternal; -struct RoomMemberBinAttrInternalBuilder; - -struct BinAttrInternal; -struct BinAttrInternalBuilder; - -struct OptParam; -struct OptParamBuilder; - -struct GroupConfig; -struct GroupConfigBuilder; - -struct UserInfo; -struct UserInfoBuilder; - -struct RoomMemberDataInternal; -struct RoomMemberDataInternalBuilder; - -struct RoomGroup; -struct RoomGroupBuilder; - -struct RoomDataInternal; -struct RoomDataInternalBuilder; - -struct RoomDataExternal; -struct RoomDataExternalBuilder; - -struct IntSearchFilter; -struct IntSearchFilterBuilder; - -struct BinSearchFilter; -struct BinSearchFilterBuilder; - -struct PresenceOptionData; -struct PresenceOptionDataBuilder; - -struct RoomGroupPasswordConfig; -struct RoomGroupPasswordConfigBuilder; - -struct SearchRoomRequest; -struct SearchRoomRequestBuilder; - -struct SearchRoomResponse; -struct SearchRoomResponseBuilder; - -struct CreateJoinRoomRequest; -struct CreateJoinRoomRequestBuilder; - -struct JoinRoomRequest; -struct JoinRoomRequestBuilder; - -struct JoinRoomResponse; -struct JoinRoomResponseBuilder; - -struct LeaveRoomRequest; -struct LeaveRoomRequestBuilder; - -struct GetRoomDataExternalListRequest; -struct GetRoomDataExternalListRequestBuilder; - -struct GetRoomDataExternalListResponse; -struct GetRoomDataExternalListResponseBuilder; - -struct SetRoomDataExternalRequest; -struct SetRoomDataExternalRequestBuilder; - -struct SetRoomDataInternalRequest; -struct SetRoomDataInternalRequestBuilder; - -struct GetRoomMemberDataInternalRequest; -struct GetRoomMemberDataInternalRequestBuilder; - -struct SetRoomMemberDataInternalRequest; -struct SetRoomMemberDataInternalRequestBuilder; - -struct SetUserInfo; -struct SetUserInfoBuilder; - -struct GetRoomDataInternalRequest; -struct GetRoomDataInternalRequestBuilder; - -struct RoomMemberUpdateInfo; -struct RoomMemberUpdateInfoBuilder; - -struct NotificationUserJoinedRoom; -struct NotificationUserJoinedRoomBuilder; - -struct RoomUpdateInfo; -struct RoomUpdateInfoBuilder; - -struct RoomDataInternalUpdateInfo; -struct RoomDataInternalUpdateInfoBuilder; - -struct RoomMemberDataInternalUpdateInfo; -struct RoomMemberDataInternalUpdateInfoBuilder; - -struct GetPingInfoResponse; -struct GetPingInfoResponseBuilder; - -struct SendRoomMessageRequest; -struct SendRoomMessageRequestBuilder; - -struct RoomMessageInfo; -struct RoomMessageInfoBuilder; - -struct MessageDetails; -struct MessageDetailsBuilder; - -struct SendMessageRequest; -struct SendMessageRequestBuilder; - -struct BoardInfo; -struct BoardInfoBuilder; - -struct RecordScoreRequest; -struct RecordScoreRequestBuilder; - -struct GetScoreRangeRequest; -struct GetScoreRangeRequestBuilder; - -struct ScoreNpIdPcId; -struct ScoreNpIdPcIdBuilder; - -struct GetScoreNpIdRequest; -struct GetScoreNpIdRequestBuilder; - -struct GetScoreFriendsRequest; -struct GetScoreFriendsRequestBuilder; - -struct ScoreRankData; -struct ScoreRankDataBuilder; - -struct ScoreInfo; -struct ScoreInfoBuilder; - -struct GetScoreResponse; -struct GetScoreResponseBuilder; - -struct RecordScoreGameDataRequest; -struct RecordScoreGameDataRequestBuilder; - -struct GetScoreGameDataRequest; -struct GetScoreGameDataRequestBuilder; - -struct TusUser; -struct TusUserBuilder; - -struct TusVariable; -struct TusVariableBuilder; - -struct TusVarResponse; -struct TusVarResponseBuilder; - -struct TusSetMultiSlotVariableRequest; -struct TusSetMultiSlotVariableRequestBuilder; - -struct TusGetMultiSlotVariableRequest; -struct TusGetMultiSlotVariableRequestBuilder; - -struct TusGetMultiUserVariableRequest; -struct TusGetMultiUserVariableRequestBuilder; - -struct TusGetFriendsVariableRequest; -struct TusGetFriendsVariableRequestBuilder; - -struct TusAddAndGetVariableRequest; -struct TusAddAndGetVariableRequestBuilder; - -struct TusTryAndSetVariableRequest; -struct TusTryAndSetVariableRequestBuilder; - -struct TusDeleteMultiSlotVariableRequest; -struct TusDeleteMultiSlotVariableRequestBuilder; - -struct TusSetDataRequest; -struct TusSetDataRequestBuilder; - -struct TusDataStatus; -struct TusDataStatusBuilder; - -struct TusData; -struct TusDataBuilder; - -struct TusDataStatusResponse; -struct TusDataStatusResponseBuilder; - -struct TusGetDataRequest; -struct TusGetDataRequestBuilder; - -struct TusGetMultiSlotDataStatusRequest; -struct TusGetMultiSlotDataStatusRequestBuilder; - -struct TusGetMultiUserDataStatusRequest; -struct TusGetMultiUserDataStatusRequestBuilder; - -struct TusGetFriendsDataStatusRequest; -struct TusGetFriendsDataStatusRequestBuilder; - -struct TusDeleteMultiSlotDataRequest; -struct TusDeleteMultiSlotDataRequestBuilder; - -struct SetPresenceRequest; -struct SetPresenceRequestBuilder; - -struct MatchingSearchCondition; -struct MatchingSearchConditionBuilder; - -struct MatchingAttr; -struct MatchingAttrBuilder; - -struct CreateRoomGUIRequest; -struct CreateRoomGUIRequestBuilder; - -struct GUIUserInfo; -struct GUIUserInfoBuilder; - -struct MatchingRoomStatus; -struct MatchingRoomStatusBuilder; - -struct GetRoomListGUIRequest; -struct GetRoomListGUIRequestBuilder; - -struct MatchingRoom; -struct MatchingRoomBuilder; - -struct MatchingRoomList; -struct MatchingRoomListBuilder; - -struct MatchingGuiRoomId; -struct MatchingGuiRoomIdBuilder; - -struct SetRoomSearchFlagGUI; -struct SetRoomSearchFlagGUIBuilder; - -struct QuickMatchGUIRequest; -struct QuickMatchGUIRequestBuilder; - -struct SearchJoinRoomGUIRequest; -struct SearchJoinRoomGUIRequestBuilder; - -struct MatchingSearchJoinRoomInfo; -struct MatchingSearchJoinRoomInfoBuilder; - -struct SignalingAddr FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SignalingAddrBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_IP = 4, - VT_PORT = 6 - }; - const ::flatbuffers::Vector *ip() const { - return GetPointer *>(VT_IP); - } - uint16_t port() const { - return GetField(VT_PORT, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_IP) && - verifier.VerifyVector(ip()) && - VerifyField(verifier, VT_PORT, 2) && - verifier.EndTable(); - } -}; - -struct SignalingAddrBuilder { - typedef SignalingAddr Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_ip(::flatbuffers::Offset<::flatbuffers::Vector> ip) { - fbb_.AddOffset(SignalingAddr::VT_IP, ip); - } - void add_port(uint16_t port) { - fbb_.AddElement(SignalingAddr::VT_PORT, port, 0); - } - explicit SignalingAddrBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSignalingAddr( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> ip = 0, - uint16_t port = 0) { - SignalingAddrBuilder builder_(_fbb); - builder_.add_ip(ip); - builder_.add_port(port); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSignalingAddrDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *ip = nullptr, - uint16_t port = 0) { - auto ip__ = ip ? _fbb.CreateVector(*ip) : 0; - return CreateSignalingAddr( - _fbb, - ip__, - port); -} - -struct MatchingSignalingInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingSignalingInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NPID = 4, - VT_ADDR = 6 - }; - const ::flatbuffers::String *npid() const { - return GetPointer(VT_NPID); - } - const SignalingAddr *addr() const { - return GetPointer(VT_ADDR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NPID) && - verifier.VerifyString(npid()) && - VerifyOffset(verifier, VT_ADDR) && - verifier.VerifyTable(addr()) && - verifier.EndTable(); - } -}; - -struct MatchingSignalingInfoBuilder { - typedef MatchingSignalingInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_npid(::flatbuffers::Offset<::flatbuffers::String> npid) { - fbb_.AddOffset(MatchingSignalingInfo::VT_NPID, npid); - } - void add_addr(::flatbuffers::Offset addr) { - fbb_.AddOffset(MatchingSignalingInfo::VT_ADDR, addr); - } - explicit MatchingSignalingInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingSignalingInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> npid = 0, - ::flatbuffers::Offset addr = 0) { - MatchingSignalingInfoBuilder builder_(_fbb); - builder_.add_addr(addr); - builder_.add_npid(npid); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingSignalingInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *npid = nullptr, - ::flatbuffers::Offset addr = 0) { - auto npid__ = npid ? _fbb.CreateString(npid) : 0; - return CreateMatchingSignalingInfo( - _fbb, - npid__, - addr); -} - -struct Matching2SignalingInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef Matching2SignalingInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MEMBER_ID = 4, - VT_ADDR = 6 - }; - uint16_t member_id() const { - return GetField(VT_MEMBER_ID, 0); - } - const SignalingAddr *addr() const { - return GetPointer(VT_ADDR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_MEMBER_ID, 2) && - VerifyOffset(verifier, VT_ADDR) && - verifier.VerifyTable(addr()) && - verifier.EndTable(); - } -}; - -struct Matching2SignalingInfoBuilder { - typedef Matching2SignalingInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_member_id(uint16_t member_id) { - fbb_.AddElement(Matching2SignalingInfo::VT_MEMBER_ID, member_id, 0); - } - void add_addr(::flatbuffers::Offset addr) { - fbb_.AddOffset(Matching2SignalingInfo::VT_ADDR, addr); - } - explicit Matching2SignalingInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatching2SignalingInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t member_id = 0, - ::flatbuffers::Offset addr = 0) { - Matching2SignalingInfoBuilder builder_(_fbb); - builder_.add_addr(addr); - builder_.add_member_id(member_id); - return builder_.Finish(); -} - -struct BinAttr FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef BinAttrBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4, - VT_DATA = 6 - }; - uint16_t id() const { - return GetField(VT_ID, 0); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ID, 2) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct BinAttrBuilder { - typedef BinAttr Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_id(uint16_t id) { - fbb_.AddElement(BinAttr::VT_ID, id, 0); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(BinAttr::VT_DATA, data); - } - explicit BinAttrBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateBinAttr( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t id = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - BinAttrBuilder builder_(_fbb); - builder_.add_data(data); - builder_.add_id(id); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateBinAttrDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t id = 0, - const std::vector *data = nullptr) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateBinAttr( - _fbb, - id, - data__); -} - -struct IntAttr FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef IntAttrBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4, - VT_NUM = 6 - }; - uint16_t id() const { - return GetField(VT_ID, 0); - } - uint32_t num() const { - return GetField(VT_NUM, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ID, 2) && - VerifyField(verifier, VT_NUM, 4) && - verifier.EndTable(); - } -}; - -struct IntAttrBuilder { - typedef IntAttr Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_id(uint16_t id) { - fbb_.AddElement(IntAttr::VT_ID, id, 0); - } - void add_num(uint32_t num) { - fbb_.AddElement(IntAttr::VT_NUM, num, 0); - } - explicit IntAttrBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateIntAttr( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t id = 0, - uint32_t num = 0) { - IntAttrBuilder builder_(_fbb); - builder_.add_num(num); - builder_.add_id(id); - return builder_.Finish(); -} - -struct RoomMemberBinAttrInternal FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomMemberBinAttrInternalBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_UPDATEDATE = 4, - VT_DATA = 6 - }; - uint64_t updateDate() const { - return GetField(VT_UPDATEDATE, 0); - } - const BinAttr *data() const { - return GetPointer(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_UPDATEDATE, 8) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyTable(data()) && - verifier.EndTable(); - } -}; - -struct RoomMemberBinAttrInternalBuilder { - typedef RoomMemberBinAttrInternal Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_updateDate(uint64_t updateDate) { - fbb_.AddElement(RoomMemberBinAttrInternal::VT_UPDATEDATE, updateDate, 0); - } - void add_data(::flatbuffers::Offset data) { - fbb_.AddOffset(RoomMemberBinAttrInternal::VT_DATA, data); - } - explicit RoomMemberBinAttrInternalBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomMemberBinAttrInternal( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t updateDate = 0, - ::flatbuffers::Offset data = 0) { - RoomMemberBinAttrInternalBuilder builder_(_fbb); - builder_.add_updateDate(updateDate); - builder_.add_data(data); - return builder_.Finish(); -} - -struct BinAttrInternal FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef BinAttrInternalBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_UPDATEDATE = 4, - VT_UPDATEMEMBERID = 6, - VT_DATA = 8 - }; - uint64_t updateDate() const { - return GetField(VT_UPDATEDATE, 0); - } - uint16_t updateMemberId() const { - return GetField(VT_UPDATEMEMBERID, 0); - } - const BinAttr *data() const { - return GetPointer(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_UPDATEDATE, 8) && - VerifyField(verifier, VT_UPDATEMEMBERID, 2) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyTable(data()) && - verifier.EndTable(); - } -}; - -struct BinAttrInternalBuilder { - typedef BinAttrInternal Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_updateDate(uint64_t updateDate) { - fbb_.AddElement(BinAttrInternal::VT_UPDATEDATE, updateDate, 0); - } - void add_updateMemberId(uint16_t updateMemberId) { - fbb_.AddElement(BinAttrInternal::VT_UPDATEMEMBERID, updateMemberId, 0); - } - void add_data(::flatbuffers::Offset data) { - fbb_.AddOffset(BinAttrInternal::VT_DATA, data); - } - explicit BinAttrInternalBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateBinAttrInternal( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t updateDate = 0, - uint16_t updateMemberId = 0, - ::flatbuffers::Offset data = 0) { - BinAttrInternalBuilder builder_(_fbb); - builder_.add_updateDate(updateDate); - builder_.add_data(data); - builder_.add_updateMemberId(updateMemberId); - return builder_.Finish(); -} - -struct OptParam FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef OptParamBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TYPE = 4, - VT_FLAG = 6, - VT_HUBMEMBERID = 8 - }; - uint8_t type() const { - return GetField(VT_TYPE, 0); - } - uint8_t flag() const { - return GetField(VT_FLAG, 0); - } - uint16_t hubMemberId() const { - return GetField(VT_HUBMEMBERID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TYPE, 1) && - VerifyField(verifier, VT_FLAG, 1) && - VerifyField(verifier, VT_HUBMEMBERID, 2) && - verifier.EndTable(); - } -}; - -struct OptParamBuilder { - typedef OptParam Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_type(uint8_t type) { - fbb_.AddElement(OptParam::VT_TYPE, type, 0); - } - void add_flag(uint8_t flag) { - fbb_.AddElement(OptParam::VT_FLAG, flag, 0); - } - void add_hubMemberId(uint16_t hubMemberId) { - fbb_.AddElement(OptParam::VT_HUBMEMBERID, hubMemberId, 0); - } - explicit OptParamBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateOptParam( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t type = 0, - uint8_t flag = 0, - uint16_t hubMemberId = 0) { - OptParamBuilder builder_(_fbb); - builder_.add_hubMemberId(hubMemberId); - builder_.add_flag(flag); - builder_.add_type(type); - return builder_.Finish(); -} - -struct GroupConfig FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GroupConfigBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SLOTNUM = 4, - VT_LABEL = 6, - VT_WITHPASSWORD = 8 - }; - uint32_t slotNum() const { - return GetField(VT_SLOTNUM, 0); - } - const ::flatbuffers::Vector *label() const { - return GetPointer *>(VT_LABEL); - } - bool withPassword() const { - return GetField(VT_WITHPASSWORD, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SLOTNUM, 4) && - VerifyOffset(verifier, VT_LABEL) && - verifier.VerifyVector(label()) && - VerifyField(verifier, VT_WITHPASSWORD, 1) && - verifier.EndTable(); - } -}; - -struct GroupConfigBuilder { - typedef GroupConfig Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_slotNum(uint32_t slotNum) { - fbb_.AddElement(GroupConfig::VT_SLOTNUM, slotNum, 0); - } - void add_label(::flatbuffers::Offset<::flatbuffers::Vector> label) { - fbb_.AddOffset(GroupConfig::VT_LABEL, label); - } - void add_withPassword(bool withPassword) { - fbb_.AddElement(GroupConfig::VT_WITHPASSWORD, static_cast(withPassword), 0); - } - explicit GroupConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGroupConfig( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t slotNum = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> label = 0, - bool withPassword = false) { - GroupConfigBuilder builder_(_fbb); - builder_.add_label(label); - builder_.add_slotNum(slotNum); - builder_.add_withPassword(withPassword); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGroupConfigDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t slotNum = 0, - const std::vector *label = nullptr, - bool withPassword = false) { - auto label__ = label ? _fbb.CreateVector(*label) : 0; - return CreateGroupConfig( - _fbb, - slotNum, - label__, - withPassword); -} - -struct UserInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef UserInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NPID = 4, - VT_ONLINENAME = 6, - VT_AVATARURL = 8 - }; - const ::flatbuffers::String *npId() const { - return GetPointer(VT_NPID); - } - const ::flatbuffers::String *onlineName() const { - return GetPointer(VT_ONLINENAME); - } - const ::flatbuffers::String *avatarUrl() const { - return GetPointer(VT_AVATARURL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NPID) && - verifier.VerifyString(npId()) && - VerifyOffset(verifier, VT_ONLINENAME) && - verifier.VerifyString(onlineName()) && - VerifyOffset(verifier, VT_AVATARURL) && - verifier.VerifyString(avatarUrl()) && - verifier.EndTable(); - } -}; - -struct UserInfoBuilder { - typedef UserInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_npId(::flatbuffers::Offset<::flatbuffers::String> npId) { - fbb_.AddOffset(UserInfo::VT_NPID, npId); - } - void add_onlineName(::flatbuffers::Offset<::flatbuffers::String> onlineName) { - fbb_.AddOffset(UserInfo::VT_ONLINENAME, onlineName); - } - void add_avatarUrl(::flatbuffers::Offset<::flatbuffers::String> avatarUrl) { - fbb_.AddOffset(UserInfo::VT_AVATARURL, avatarUrl); - } - explicit UserInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateUserInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> npId = 0, - ::flatbuffers::Offset<::flatbuffers::String> onlineName = 0, - ::flatbuffers::Offset<::flatbuffers::String> avatarUrl = 0) { - UserInfoBuilder builder_(_fbb); - builder_.add_avatarUrl(avatarUrl); - builder_.add_onlineName(onlineName); - builder_.add_npId(npId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateUserInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *npId = nullptr, - const char *onlineName = nullptr, - const char *avatarUrl = nullptr) { - auto npId__ = npId ? _fbb.CreateString(npId) : 0; - auto onlineName__ = onlineName ? _fbb.CreateString(onlineName) : 0; - auto avatarUrl__ = avatarUrl ? _fbb.CreateString(avatarUrl) : 0; - return CreateUserInfo( - _fbb, - npId__, - onlineName__, - avatarUrl__); -} - -struct RoomMemberDataInternal FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomMemberDataInternalBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USERINFO = 4, - VT_JOINDATE = 6, - VT_MEMBERID = 8, - VT_TEAMID = 10, - VT_ROOMGROUP = 12, - VT_NATTYPE = 14, - VT_FLAGATTR = 16, - VT_ROOMMEMBERBINATTRINTERNAL = 18 - }; - const UserInfo *userInfo() const { - return GetPointer(VT_USERINFO); - } - uint64_t joinDate() const { - return GetField(VT_JOINDATE, 0); - } - uint16_t memberId() const { - return GetField(VT_MEMBERID, 0); - } - uint8_t teamId() const { - return GetField(VT_TEAMID, 0); - } - const RoomGroup *roomGroup() const { - return GetPointer(VT_ROOMGROUP); - } - uint8_t natType() const { - return GetField(VT_NATTYPE, 0); - } - uint32_t flagAttr() const { - return GetField(VT_FLAGATTR, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomMemberBinAttrInternal() const { - return GetPointer> *>(VT_ROOMMEMBERBINATTRINTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USERINFO) && - verifier.VerifyTable(userInfo()) && - VerifyField(verifier, VT_JOINDATE, 8) && - VerifyField(verifier, VT_MEMBERID, 2) && - VerifyField(verifier, VT_TEAMID, 1) && - VerifyOffset(verifier, VT_ROOMGROUP) && - verifier.VerifyTable(roomGroup()) && - VerifyField(verifier, VT_NATTYPE, 1) && - VerifyField(verifier, VT_FLAGATTR, 4) && - VerifyOffset(verifier, VT_ROOMMEMBERBINATTRINTERNAL) && - verifier.VerifyVector(roomMemberBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomMemberBinAttrInternal()) && - verifier.EndTable(); - } -}; - -struct RoomMemberDataInternalBuilder { - typedef RoomMemberDataInternal Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_userInfo(::flatbuffers::Offset userInfo) { - fbb_.AddOffset(RoomMemberDataInternal::VT_USERINFO, userInfo); - } - void add_joinDate(uint64_t joinDate) { - fbb_.AddElement(RoomMemberDataInternal::VT_JOINDATE, joinDate, 0); - } - void add_memberId(uint16_t memberId) { - fbb_.AddElement(RoomMemberDataInternal::VT_MEMBERID, memberId, 0); - } - void add_teamId(uint8_t teamId) { - fbb_.AddElement(RoomMemberDataInternal::VT_TEAMID, teamId, 0); - } - void add_roomGroup(::flatbuffers::Offset roomGroup) { - fbb_.AddOffset(RoomMemberDataInternal::VT_ROOMGROUP, roomGroup); - } - void add_natType(uint8_t natType) { - fbb_.AddElement(RoomMemberDataInternal::VT_NATTYPE, natType, 0); - } - void add_flagAttr(uint32_t flagAttr) { - fbb_.AddElement(RoomMemberDataInternal::VT_FLAGATTR, flagAttr, 0); - } - void add_roomMemberBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal) { - fbb_.AddOffset(RoomMemberDataInternal::VT_ROOMMEMBERBINATTRINTERNAL, roomMemberBinAttrInternal); - } - explicit RoomMemberDataInternalBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomMemberDataInternal( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset userInfo = 0, - uint64_t joinDate = 0, - uint16_t memberId = 0, - uint8_t teamId = 0, - ::flatbuffers::Offset roomGroup = 0, - uint8_t natType = 0, - uint32_t flagAttr = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal = 0) { - RoomMemberDataInternalBuilder builder_(_fbb); - builder_.add_joinDate(joinDate); - builder_.add_roomMemberBinAttrInternal(roomMemberBinAttrInternal); - builder_.add_flagAttr(flagAttr); - builder_.add_roomGroup(roomGroup); - builder_.add_userInfo(userInfo); - builder_.add_memberId(memberId); - builder_.add_natType(natType); - builder_.add_teamId(teamId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomMemberDataInternalDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset userInfo = 0, - uint64_t joinDate = 0, - uint16_t memberId = 0, - uint8_t teamId = 0, - ::flatbuffers::Offset roomGroup = 0, - uint8_t natType = 0, - uint32_t flagAttr = 0, - const std::vector<::flatbuffers::Offset> *roomMemberBinAttrInternal = nullptr) { - auto roomMemberBinAttrInternal__ = roomMemberBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomMemberBinAttrInternal) : 0; - return CreateRoomMemberDataInternal( - _fbb, - userInfo, - joinDate, - memberId, - teamId, - roomGroup, - natType, - flagAttr, - roomMemberBinAttrInternal__); -} - -struct RoomGroup FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomGroupBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_GROUPID = 4, - VT_WITHPASSWORD = 6, - VT_LABEL = 8, - VT_SLOTNUM = 10, - VT_CURGROUPMEMBERNUM = 12 - }; - uint8_t groupId() const { - return GetField(VT_GROUPID, 0); - } - bool withPassword() const { - return GetField(VT_WITHPASSWORD, 0) != 0; - } - const ::flatbuffers::Vector *label() const { - return GetPointer *>(VT_LABEL); - } - uint32_t slotNum() const { - return GetField(VT_SLOTNUM, 0); - } - uint32_t curGroupMemberNum() const { - return GetField(VT_CURGROUPMEMBERNUM, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_GROUPID, 1) && - VerifyField(verifier, VT_WITHPASSWORD, 1) && - VerifyOffset(verifier, VT_LABEL) && - verifier.VerifyVector(label()) && - VerifyField(verifier, VT_SLOTNUM, 4) && - VerifyField(verifier, VT_CURGROUPMEMBERNUM, 4) && - verifier.EndTable(); - } -}; - -struct RoomGroupBuilder { - typedef RoomGroup Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_groupId(uint8_t groupId) { - fbb_.AddElement(RoomGroup::VT_GROUPID, groupId, 0); - } - void add_withPassword(bool withPassword) { - fbb_.AddElement(RoomGroup::VT_WITHPASSWORD, static_cast(withPassword), 0); - } - void add_label(::flatbuffers::Offset<::flatbuffers::Vector> label) { - fbb_.AddOffset(RoomGroup::VT_LABEL, label); - } - void add_slotNum(uint32_t slotNum) { - fbb_.AddElement(RoomGroup::VT_SLOTNUM, slotNum, 0); - } - void add_curGroupMemberNum(uint32_t curGroupMemberNum) { - fbb_.AddElement(RoomGroup::VT_CURGROUPMEMBERNUM, curGroupMemberNum, 0); - } - explicit RoomGroupBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomGroup( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t groupId = 0, - bool withPassword = false, - ::flatbuffers::Offset<::flatbuffers::Vector> label = 0, - uint32_t slotNum = 0, - uint32_t curGroupMemberNum = 0) { - RoomGroupBuilder builder_(_fbb); - builder_.add_curGroupMemberNum(curGroupMemberNum); - builder_.add_slotNum(slotNum); - builder_.add_label(label); - builder_.add_withPassword(withPassword); - builder_.add_groupId(groupId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomGroupDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t groupId = 0, - bool withPassword = false, - const std::vector *label = nullptr, - uint32_t slotNum = 0, - uint32_t curGroupMemberNum = 0) { - auto label__ = label ? _fbb.CreateVector(*label) : 0; - return CreateRoomGroup( - _fbb, - groupId, - withPassword, - label__, - slotNum, - curGroupMemberNum); -} - -struct RoomDataInternal FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomDataInternalBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SERVERID = 4, - VT_WORLDID = 6, - VT_LOBBYID = 8, - VT_ROOMID = 10, - VT_PASSWORDSLOTMASK = 12, - VT_MAXSLOT = 14, - VT_MEMBERLIST = 16, - VT_OWNERID = 18, - VT_ROOMGROUP = 20, - VT_FLAGATTR = 22, - VT_ROOMBINATTRINTERNAL = 24 - }; - uint16_t serverId() const { - return GetField(VT_SERVERID, 0); - } - uint32_t worldId() const { - return GetField(VT_WORLDID, 0); - } - uint64_t lobbyId() const { - return GetField(VT_LOBBYID, 0); - } - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint64_t passwordSlotMask() const { - return GetField(VT_PASSWORDSLOTMASK, 0); - } - uint32_t maxSlot() const { - return GetField(VT_MAXSLOT, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *memberList() const { - return GetPointer> *>(VT_MEMBERLIST); - } - uint16_t ownerId() const { - return GetField(VT_OWNERID, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomGroup() const { - return GetPointer> *>(VT_ROOMGROUP); - } - uint32_t flagAttr() const { - return GetField(VT_FLAGATTR, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomBinAttrInternal() const { - return GetPointer> *>(VT_ROOMBINATTRINTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SERVERID, 2) && - VerifyField(verifier, VT_WORLDID, 4) && - VerifyField(verifier, VT_LOBBYID, 8) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_PASSWORDSLOTMASK, 8) && - VerifyField(verifier, VT_MAXSLOT, 4) && - VerifyOffset(verifier, VT_MEMBERLIST) && - verifier.VerifyVector(memberList()) && - verifier.VerifyVectorOfTables(memberList()) && - VerifyField(verifier, VT_OWNERID, 2) && - VerifyOffset(verifier, VT_ROOMGROUP) && - verifier.VerifyVector(roomGroup()) && - verifier.VerifyVectorOfTables(roomGroup()) && - VerifyField(verifier, VT_FLAGATTR, 4) && - VerifyOffset(verifier, VT_ROOMBINATTRINTERNAL) && - verifier.VerifyVector(roomBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomBinAttrInternal()) && - verifier.EndTable(); - } -}; - -struct RoomDataInternalBuilder { - typedef RoomDataInternal Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_serverId(uint16_t serverId) { - fbb_.AddElement(RoomDataInternal::VT_SERVERID, serverId, 0); - } - void add_worldId(uint32_t worldId) { - fbb_.AddElement(RoomDataInternal::VT_WORLDID, worldId, 0); - } - void add_lobbyId(uint64_t lobbyId) { - fbb_.AddElement(RoomDataInternal::VT_LOBBYID, lobbyId, 0); - } - void add_roomId(uint64_t roomId) { - fbb_.AddElement(RoomDataInternal::VT_ROOMID, roomId, 0); - } - void add_passwordSlotMask(uint64_t passwordSlotMask) { - fbb_.AddElement(RoomDataInternal::VT_PASSWORDSLOTMASK, passwordSlotMask, 0); - } - void add_maxSlot(uint32_t maxSlot) { - fbb_.AddElement(RoomDataInternal::VT_MAXSLOT, maxSlot, 0); - } - void add_memberList(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> memberList) { - fbb_.AddOffset(RoomDataInternal::VT_MEMBERLIST, memberList); - } - void add_ownerId(uint16_t ownerId) { - fbb_.AddElement(RoomDataInternal::VT_OWNERID, ownerId, 0); - } - void add_roomGroup(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomGroup) { - fbb_.AddOffset(RoomDataInternal::VT_ROOMGROUP, roomGroup); - } - void add_flagAttr(uint32_t flagAttr) { - fbb_.AddElement(RoomDataInternal::VT_FLAGATTR, flagAttr, 0); - } - void add_roomBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal) { - fbb_.AddOffset(RoomDataInternal::VT_ROOMBINATTRINTERNAL, roomBinAttrInternal); - } - explicit RoomDataInternalBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomDataInternal( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - uint32_t worldId = 0, - uint64_t lobbyId = 0, - uint64_t roomId = 0, - uint64_t passwordSlotMask = 0, - uint32_t maxSlot = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> memberList = 0, - uint16_t ownerId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomGroup = 0, - uint32_t flagAttr = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal = 0) { - RoomDataInternalBuilder builder_(_fbb); - builder_.add_passwordSlotMask(passwordSlotMask); - builder_.add_roomId(roomId); - builder_.add_lobbyId(lobbyId); - builder_.add_roomBinAttrInternal(roomBinAttrInternal); - builder_.add_flagAttr(flagAttr); - builder_.add_roomGroup(roomGroup); - builder_.add_memberList(memberList); - builder_.add_maxSlot(maxSlot); - builder_.add_worldId(worldId); - builder_.add_ownerId(ownerId); - builder_.add_serverId(serverId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomDataInternalDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - uint32_t worldId = 0, - uint64_t lobbyId = 0, - uint64_t roomId = 0, - uint64_t passwordSlotMask = 0, - uint32_t maxSlot = 0, - const std::vector<::flatbuffers::Offset> *memberList = nullptr, - uint16_t ownerId = 0, - const std::vector<::flatbuffers::Offset> *roomGroup = nullptr, - uint32_t flagAttr = 0, - const std::vector<::flatbuffers::Offset> *roomBinAttrInternal = nullptr) { - auto memberList__ = memberList ? _fbb.CreateVector<::flatbuffers::Offset>(*memberList) : 0; - auto roomGroup__ = roomGroup ? _fbb.CreateVector<::flatbuffers::Offset>(*roomGroup) : 0; - auto roomBinAttrInternal__ = roomBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrInternal) : 0; - return CreateRoomDataInternal( - _fbb, - serverId, - worldId, - lobbyId, - roomId, - passwordSlotMask, - maxSlot, - memberList__, - ownerId, - roomGroup__, - flagAttr, - roomBinAttrInternal__); -} - -struct RoomDataExternal FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomDataExternalBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SERVERID = 4, - VT_WORLDID = 6, - VT_PUBLICSLOTNUM = 8, - VT_PRIVATESLOTNUM = 10, - VT_LOBBYID = 12, - VT_ROOMID = 14, - VT_OPENPUBLICSLOTNUM = 16, - VT_MAXSLOT = 18, - VT_OPENPRIVATESLOTNUM = 20, - VT_CURMEMBERNUM = 22, - VT_PASSWORDSLOTMASK = 24, - VT_OWNER = 26, - VT_ROOMGROUP = 28, - VT_FLAGATTR = 30, - VT_ROOMSEARCHABLEINTATTREXTERNAL = 32, - VT_ROOMSEARCHABLEBINATTREXTERNAL = 34, - VT_ROOMBINATTREXTERNAL = 36 - }; - uint16_t serverId() const { - return GetField(VT_SERVERID, 0); - } - uint32_t worldId() const { - return GetField(VT_WORLDID, 0); - } - uint16_t publicSlotNum() const { - return GetField(VT_PUBLICSLOTNUM, 0); - } - uint16_t privateSlotNum() const { - return GetField(VT_PRIVATESLOTNUM, 0); - } - uint64_t lobbyId() const { - return GetField(VT_LOBBYID, 0); - } - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint16_t openPublicSlotNum() const { - return GetField(VT_OPENPUBLICSLOTNUM, 0); - } - uint16_t maxSlot() const { - return GetField(VT_MAXSLOT, 0); - } - uint16_t openPrivateSlotNum() const { - return GetField(VT_OPENPRIVATESLOTNUM, 0); - } - uint16_t curMemberNum() const { - return GetField(VT_CURMEMBERNUM, 0); - } - uint64_t passwordSlotMask() const { - return GetField(VT_PASSWORDSLOTMASK, 0); - } - const UserInfo *owner() const { - return GetPointer(VT_OWNER); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomGroup() const { - return GetPointer> *>(VT_ROOMGROUP); - } - uint32_t flagAttr() const { - return GetField(VT_FLAGATTR, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomSearchableIntAttrExternal() const { - return GetPointer> *>(VT_ROOMSEARCHABLEINTATTREXTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomSearchableBinAttrExternal() const { - return GetPointer> *>(VT_ROOMSEARCHABLEBINATTREXTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomBinAttrExternal() const { - return GetPointer> *>(VT_ROOMBINATTREXTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SERVERID, 2) && - VerifyField(verifier, VT_WORLDID, 4) && - VerifyField(verifier, VT_PUBLICSLOTNUM, 2) && - VerifyField(verifier, VT_PRIVATESLOTNUM, 2) && - VerifyField(verifier, VT_LOBBYID, 8) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_OPENPUBLICSLOTNUM, 2) && - VerifyField(verifier, VT_MAXSLOT, 2) && - VerifyField(verifier, VT_OPENPRIVATESLOTNUM, 2) && - VerifyField(verifier, VT_CURMEMBERNUM, 2) && - VerifyField(verifier, VT_PASSWORDSLOTMASK, 8) && - VerifyOffset(verifier, VT_OWNER) && - verifier.VerifyTable(owner()) && - VerifyOffset(verifier, VT_ROOMGROUP) && - verifier.VerifyVector(roomGroup()) && - verifier.VerifyVectorOfTables(roomGroup()) && - VerifyField(verifier, VT_FLAGATTR, 4) && - VerifyOffset(verifier, VT_ROOMSEARCHABLEINTATTREXTERNAL) && - verifier.VerifyVector(roomSearchableIntAttrExternal()) && - verifier.VerifyVectorOfTables(roomSearchableIntAttrExternal()) && - VerifyOffset(verifier, VT_ROOMSEARCHABLEBINATTREXTERNAL) && - verifier.VerifyVector(roomSearchableBinAttrExternal()) && - verifier.VerifyVectorOfTables(roomSearchableBinAttrExternal()) && - VerifyOffset(verifier, VT_ROOMBINATTREXTERNAL) && - verifier.VerifyVector(roomBinAttrExternal()) && - verifier.VerifyVectorOfTables(roomBinAttrExternal()) && - verifier.EndTable(); - } -}; - -struct RoomDataExternalBuilder { - typedef RoomDataExternal Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_serverId(uint16_t serverId) { - fbb_.AddElement(RoomDataExternal::VT_SERVERID, serverId, 0); - } - void add_worldId(uint32_t worldId) { - fbb_.AddElement(RoomDataExternal::VT_WORLDID, worldId, 0); - } - void add_publicSlotNum(uint16_t publicSlotNum) { - fbb_.AddElement(RoomDataExternal::VT_PUBLICSLOTNUM, publicSlotNum, 0); - } - void add_privateSlotNum(uint16_t privateSlotNum) { - fbb_.AddElement(RoomDataExternal::VT_PRIVATESLOTNUM, privateSlotNum, 0); - } - void add_lobbyId(uint64_t lobbyId) { - fbb_.AddElement(RoomDataExternal::VT_LOBBYID, lobbyId, 0); - } - void add_roomId(uint64_t roomId) { - fbb_.AddElement(RoomDataExternal::VT_ROOMID, roomId, 0); - } - void add_openPublicSlotNum(uint16_t openPublicSlotNum) { - fbb_.AddElement(RoomDataExternal::VT_OPENPUBLICSLOTNUM, openPublicSlotNum, 0); - } - void add_maxSlot(uint16_t maxSlot) { - fbb_.AddElement(RoomDataExternal::VT_MAXSLOT, maxSlot, 0); - } - void add_openPrivateSlotNum(uint16_t openPrivateSlotNum) { - fbb_.AddElement(RoomDataExternal::VT_OPENPRIVATESLOTNUM, openPrivateSlotNum, 0); - } - void add_curMemberNum(uint16_t curMemberNum) { - fbb_.AddElement(RoomDataExternal::VT_CURMEMBERNUM, curMemberNum, 0); - } - void add_passwordSlotMask(uint64_t passwordSlotMask) { - fbb_.AddElement(RoomDataExternal::VT_PASSWORDSLOTMASK, passwordSlotMask, 0); - } - void add_owner(::flatbuffers::Offset owner) { - fbb_.AddOffset(RoomDataExternal::VT_OWNER, owner); - } - void add_roomGroup(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomGroup) { - fbb_.AddOffset(RoomDataExternal::VT_ROOMGROUP, roomGroup); - } - void add_flagAttr(uint32_t flagAttr) { - fbb_.AddElement(RoomDataExternal::VT_FLAGATTR, flagAttr, 0); - } - void add_roomSearchableIntAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableIntAttrExternal) { - fbb_.AddOffset(RoomDataExternal::VT_ROOMSEARCHABLEINTATTREXTERNAL, roomSearchableIntAttrExternal); - } - void add_roomSearchableBinAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableBinAttrExternal) { - fbb_.AddOffset(RoomDataExternal::VT_ROOMSEARCHABLEBINATTREXTERNAL, roomSearchableBinAttrExternal); - } - void add_roomBinAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrExternal) { - fbb_.AddOffset(RoomDataExternal::VT_ROOMBINATTREXTERNAL, roomBinAttrExternal); - } - explicit RoomDataExternalBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomDataExternal( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - uint32_t worldId = 0, - uint16_t publicSlotNum = 0, - uint16_t privateSlotNum = 0, - uint64_t lobbyId = 0, - uint64_t roomId = 0, - uint16_t openPublicSlotNum = 0, - uint16_t maxSlot = 0, - uint16_t openPrivateSlotNum = 0, - uint16_t curMemberNum = 0, - uint64_t passwordSlotMask = 0, - ::flatbuffers::Offset owner = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomGroup = 0, - uint32_t flagAttr = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableIntAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableBinAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrExternal = 0) { - RoomDataExternalBuilder builder_(_fbb); - builder_.add_passwordSlotMask(passwordSlotMask); - builder_.add_roomId(roomId); - builder_.add_lobbyId(lobbyId); - builder_.add_roomBinAttrExternal(roomBinAttrExternal); - builder_.add_roomSearchableBinAttrExternal(roomSearchableBinAttrExternal); - builder_.add_roomSearchableIntAttrExternal(roomSearchableIntAttrExternal); - builder_.add_flagAttr(flagAttr); - builder_.add_roomGroup(roomGroup); - builder_.add_owner(owner); - builder_.add_worldId(worldId); - builder_.add_curMemberNum(curMemberNum); - builder_.add_openPrivateSlotNum(openPrivateSlotNum); - builder_.add_maxSlot(maxSlot); - builder_.add_openPublicSlotNum(openPublicSlotNum); - builder_.add_privateSlotNum(privateSlotNum); - builder_.add_publicSlotNum(publicSlotNum); - builder_.add_serverId(serverId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomDataExternalDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - uint32_t worldId = 0, - uint16_t publicSlotNum = 0, - uint16_t privateSlotNum = 0, - uint64_t lobbyId = 0, - uint64_t roomId = 0, - uint16_t openPublicSlotNum = 0, - uint16_t maxSlot = 0, - uint16_t openPrivateSlotNum = 0, - uint16_t curMemberNum = 0, - uint64_t passwordSlotMask = 0, - ::flatbuffers::Offset owner = 0, - const std::vector<::flatbuffers::Offset> *roomGroup = nullptr, - uint32_t flagAttr = 0, - const std::vector<::flatbuffers::Offset> *roomSearchableIntAttrExternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomSearchableBinAttrExternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomBinAttrExternal = nullptr) { - auto roomGroup__ = roomGroup ? _fbb.CreateVector<::flatbuffers::Offset>(*roomGroup) : 0; - auto roomSearchableIntAttrExternal__ = roomSearchableIntAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomSearchableIntAttrExternal) : 0; - auto roomSearchableBinAttrExternal__ = roomSearchableBinAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomSearchableBinAttrExternal) : 0; - auto roomBinAttrExternal__ = roomBinAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrExternal) : 0; - return CreateRoomDataExternal( - _fbb, - serverId, - worldId, - publicSlotNum, - privateSlotNum, - lobbyId, - roomId, - openPublicSlotNum, - maxSlot, - openPrivateSlotNum, - curMemberNum, - passwordSlotMask, - owner, - roomGroup__, - flagAttr, - roomSearchableIntAttrExternal__, - roomSearchableBinAttrExternal__, - roomBinAttrExternal__); -} - -struct IntSearchFilter FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef IntSearchFilterBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SEARCHOPERATOR = 4, - VT_ATTR = 6 - }; - uint8_t searchOperator() const { - return GetField(VT_SEARCHOPERATOR, 0); - } - const IntAttr *attr() const { - return GetPointer(VT_ATTR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SEARCHOPERATOR, 1) && - VerifyOffset(verifier, VT_ATTR) && - verifier.VerifyTable(attr()) && - verifier.EndTable(); - } -}; - -struct IntSearchFilterBuilder { - typedef IntSearchFilter Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_searchOperator(uint8_t searchOperator) { - fbb_.AddElement(IntSearchFilter::VT_SEARCHOPERATOR, searchOperator, 0); - } - void add_attr(::flatbuffers::Offset attr) { - fbb_.AddOffset(IntSearchFilter::VT_ATTR, attr); - } - explicit IntSearchFilterBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateIntSearchFilter( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t searchOperator = 0, - ::flatbuffers::Offset attr = 0) { - IntSearchFilterBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_searchOperator(searchOperator); - return builder_.Finish(); -} - -struct BinSearchFilter FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef BinSearchFilterBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SEARCHOPERATOR = 4, - VT_ATTR = 6 - }; - uint8_t searchOperator() const { - return GetField(VT_SEARCHOPERATOR, 0); - } - const BinAttr *attr() const { - return GetPointer(VT_ATTR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SEARCHOPERATOR, 1) && - VerifyOffset(verifier, VT_ATTR) && - verifier.VerifyTable(attr()) && - verifier.EndTable(); - } -}; - -struct BinSearchFilterBuilder { - typedef BinSearchFilter Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_searchOperator(uint8_t searchOperator) { - fbb_.AddElement(BinSearchFilter::VT_SEARCHOPERATOR, searchOperator, 0); - } - void add_attr(::flatbuffers::Offset attr) { - fbb_.AddOffset(BinSearchFilter::VT_ATTR, attr); - } - explicit BinSearchFilterBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateBinSearchFilter( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t searchOperator = 0, - ::flatbuffers::Offset attr = 0) { - BinSearchFilterBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_searchOperator(searchOperator); - return builder_.Finish(); -} - -struct PresenceOptionData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef PresenceOptionDataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DATA = 4, - VT_LEN = 6 - }; - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - uint32_t len() const { - return GetField(VT_LEN, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - VerifyField(verifier, VT_LEN, 4) && - verifier.EndTable(); - } -}; - -struct PresenceOptionDataBuilder { - typedef PresenceOptionData Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(PresenceOptionData::VT_DATA, data); - } - void add_len(uint32_t len) { - fbb_.AddElement(PresenceOptionData::VT_LEN, len, 0); - } - explicit PresenceOptionDataBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreatePresenceOptionData( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0, - uint32_t len = 0) { - PresenceOptionDataBuilder builder_(_fbb); - builder_.add_len(len); - builder_.add_data(data); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreatePresenceOptionDataDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *data = nullptr, - uint32_t len = 0) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreatePresenceOptionData( - _fbb, - data__, - len); -} - -struct RoomGroupPasswordConfig FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomGroupPasswordConfigBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_GROUPID = 4, - VT_WITHPASSWORD = 6 - }; - uint8_t groupId() const { - return GetField(VT_GROUPID, 0); - } - bool withPassword() const { - return GetField(VT_WITHPASSWORD, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_GROUPID, 1) && - VerifyField(verifier, VT_WITHPASSWORD, 1) && - verifier.EndTable(); - } -}; - -struct RoomGroupPasswordConfigBuilder { - typedef RoomGroupPasswordConfig Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_groupId(uint8_t groupId) { - fbb_.AddElement(RoomGroupPasswordConfig::VT_GROUPID, groupId, 0); - } - void add_withPassword(bool withPassword) { - fbb_.AddElement(RoomGroupPasswordConfig::VT_WITHPASSWORD, static_cast(withPassword), 0); - } - explicit RoomGroupPasswordConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomGroupPasswordConfig( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t groupId = 0, - bool withPassword = false) { - RoomGroupPasswordConfigBuilder builder_(_fbb); - builder_.add_withPassword(withPassword); - builder_.add_groupId(groupId); - return builder_.Finish(); -} - -struct SearchRoomRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SearchRoomRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OPTION = 4, - VT_WORLDID = 6, - VT_LOBBYID = 8, - VT_RANGEFILTER_STARTINDEX = 10, - VT_RANGEFILTER_MAX = 12, - VT_FLAGFILTER = 14, - VT_FLAGATTR = 16, - VT_INTFILTER = 18, - VT_BINFILTER = 20, - VT_ATTRID = 22 - }; - int32_t option() const { - return GetField(VT_OPTION, 0); - } - uint32_t worldId() const { - return GetField(VT_WORLDID, 0); - } - uint64_t lobbyId() const { - return GetField(VT_LOBBYID, 0); - } - uint32_t rangeFilter_startIndex() const { - return GetField(VT_RANGEFILTER_STARTINDEX, 0); - } - uint32_t rangeFilter_max() const { - return GetField(VT_RANGEFILTER_MAX, 0); - } - uint32_t flagFilter() const { - return GetField(VT_FLAGFILTER, 0); - } - uint32_t flagAttr() const { - return GetField(VT_FLAGATTR, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *intFilter() const { - return GetPointer> *>(VT_INTFILTER); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *binFilter() const { - return GetPointer> *>(VT_BINFILTER); - } - const ::flatbuffers::Vector *attrId() const { - return GetPointer *>(VT_ATTRID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_OPTION, 4) && - VerifyField(verifier, VT_WORLDID, 4) && - VerifyField(verifier, VT_LOBBYID, 8) && - VerifyField(verifier, VT_RANGEFILTER_STARTINDEX, 4) && - VerifyField(verifier, VT_RANGEFILTER_MAX, 4) && - VerifyField(verifier, VT_FLAGFILTER, 4) && - VerifyField(verifier, VT_FLAGATTR, 4) && - VerifyOffset(verifier, VT_INTFILTER) && - verifier.VerifyVector(intFilter()) && - verifier.VerifyVectorOfTables(intFilter()) && - VerifyOffset(verifier, VT_BINFILTER) && - verifier.VerifyVector(binFilter()) && - verifier.VerifyVectorOfTables(binFilter()) && - VerifyOffset(verifier, VT_ATTRID) && - verifier.VerifyVector(attrId()) && - verifier.EndTable(); - } -}; - -struct SearchRoomRequestBuilder { - typedef SearchRoomRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_option(int32_t option) { - fbb_.AddElement(SearchRoomRequest::VT_OPTION, option, 0); - } - void add_worldId(uint32_t worldId) { - fbb_.AddElement(SearchRoomRequest::VT_WORLDID, worldId, 0); - } - void add_lobbyId(uint64_t lobbyId) { - fbb_.AddElement(SearchRoomRequest::VT_LOBBYID, lobbyId, 0); - } - void add_rangeFilter_startIndex(uint32_t rangeFilter_startIndex) { - fbb_.AddElement(SearchRoomRequest::VT_RANGEFILTER_STARTINDEX, rangeFilter_startIndex, 0); - } - void add_rangeFilter_max(uint32_t rangeFilter_max) { - fbb_.AddElement(SearchRoomRequest::VT_RANGEFILTER_MAX, rangeFilter_max, 0); - } - void add_flagFilter(uint32_t flagFilter) { - fbb_.AddElement(SearchRoomRequest::VT_FLAGFILTER, flagFilter, 0); - } - void add_flagAttr(uint32_t flagAttr) { - fbb_.AddElement(SearchRoomRequest::VT_FLAGATTR, flagAttr, 0); - } - void add_intFilter(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> intFilter) { - fbb_.AddOffset(SearchRoomRequest::VT_INTFILTER, intFilter); - } - void add_binFilter(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> binFilter) { - fbb_.AddOffset(SearchRoomRequest::VT_BINFILTER, binFilter); - } - void add_attrId(::flatbuffers::Offset<::flatbuffers::Vector> attrId) { - fbb_.AddOffset(SearchRoomRequest::VT_ATTRID, attrId); - } - explicit SearchRoomRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSearchRoomRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - int32_t option = 0, - uint32_t worldId = 0, - uint64_t lobbyId = 0, - uint32_t rangeFilter_startIndex = 0, - uint32_t rangeFilter_max = 0, - uint32_t flagFilter = 0, - uint32_t flagAttr = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> intFilter = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> binFilter = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> attrId = 0) { - SearchRoomRequestBuilder builder_(_fbb); - builder_.add_lobbyId(lobbyId); - builder_.add_attrId(attrId); - builder_.add_binFilter(binFilter); - builder_.add_intFilter(intFilter); - builder_.add_flagAttr(flagAttr); - builder_.add_flagFilter(flagFilter); - builder_.add_rangeFilter_max(rangeFilter_max); - builder_.add_rangeFilter_startIndex(rangeFilter_startIndex); - builder_.add_worldId(worldId); - builder_.add_option(option); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSearchRoomRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - int32_t option = 0, - uint32_t worldId = 0, - uint64_t lobbyId = 0, - uint32_t rangeFilter_startIndex = 0, - uint32_t rangeFilter_max = 0, - uint32_t flagFilter = 0, - uint32_t flagAttr = 0, - const std::vector<::flatbuffers::Offset> *intFilter = nullptr, - const std::vector<::flatbuffers::Offset> *binFilter = nullptr, - const std::vector *attrId = nullptr) { - auto intFilter__ = intFilter ? _fbb.CreateVector<::flatbuffers::Offset>(*intFilter) : 0; - auto binFilter__ = binFilter ? _fbb.CreateVector<::flatbuffers::Offset>(*binFilter) : 0; - auto attrId__ = attrId ? _fbb.CreateVector(*attrId) : 0; - return CreateSearchRoomRequest( - _fbb, - option, - worldId, - lobbyId, - rangeFilter_startIndex, - rangeFilter_max, - flagFilter, - flagAttr, - intFilter__, - binFilter__, - attrId__); -} - -struct SearchRoomResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SearchRoomResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STARTINDEX = 4, - VT_TOTAL = 6, - VT_ROOMS = 8 - }; - uint32_t startIndex() const { - return GetField(VT_STARTINDEX, 0); - } - uint32_t total() const { - return GetField(VT_TOTAL, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *rooms() const { - return GetPointer> *>(VT_ROOMS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_STARTINDEX, 4) && - VerifyField(verifier, VT_TOTAL, 4) && - VerifyOffset(verifier, VT_ROOMS) && - verifier.VerifyVector(rooms()) && - verifier.VerifyVectorOfTables(rooms()) && - verifier.EndTable(); - } -}; - -struct SearchRoomResponseBuilder { - typedef SearchRoomResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_startIndex(uint32_t startIndex) { - fbb_.AddElement(SearchRoomResponse::VT_STARTINDEX, startIndex, 0); - } - void add_total(uint32_t total) { - fbb_.AddElement(SearchRoomResponse::VT_TOTAL, total, 0); - } - void add_rooms(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rooms) { - fbb_.AddOffset(SearchRoomResponse::VT_ROOMS, rooms); - } - explicit SearchRoomResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSearchRoomResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t startIndex = 0, - uint32_t total = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rooms = 0) { - SearchRoomResponseBuilder builder_(_fbb); - builder_.add_rooms(rooms); - builder_.add_total(total); - builder_.add_startIndex(startIndex); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSearchRoomResponseDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t startIndex = 0, - uint32_t total = 0, - const std::vector<::flatbuffers::Offset> *rooms = nullptr) { - auto rooms__ = rooms ? _fbb.CreateVector<::flatbuffers::Offset>(*rooms) : 0; - return CreateSearchRoomResponse( - _fbb, - startIndex, - total, - rooms__); -} - -struct CreateJoinRoomRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef CreateJoinRoomRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_WORLDID = 4, - VT_LOBBYID = 6, - VT_MAXSLOT = 8, - VT_FLAGATTR = 10, - VT_ROOMBINATTRINTERNAL = 12, - VT_ROOMSEARCHABLEINTATTREXTERNAL = 14, - VT_ROOMSEARCHABLEBINATTREXTERNAL = 16, - VT_ROOMBINATTREXTERNAL = 18, - VT_ROOMPASSWORD = 20, - VT_GROUPCONFIG = 22, - VT_PASSWORDSLOTMASK = 24, - VT_ALLOWEDUSER = 26, - VT_BLOCKEDUSER = 28, - VT_JOINROOMGROUPLABEL = 30, - VT_ROOMMEMBERBINATTRINTERNAL = 32, - VT_TEAMID = 34, - VT_SIGOPTPARAM = 36 - }; - uint32_t worldId() const { - return GetField(VT_WORLDID, 0); - } - uint64_t lobbyId() const { - return GetField(VT_LOBBYID, 0); - } - uint32_t maxSlot() const { - return GetField(VT_MAXSLOT, 0); - } - uint32_t flagAttr() const { - return GetField(VT_FLAGATTR, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomBinAttrInternal() const { - return GetPointer> *>(VT_ROOMBINATTRINTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomSearchableIntAttrExternal() const { - return GetPointer> *>(VT_ROOMSEARCHABLEINTATTREXTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomSearchableBinAttrExternal() const { - return GetPointer> *>(VT_ROOMSEARCHABLEBINATTREXTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomBinAttrExternal() const { - return GetPointer> *>(VT_ROOMBINATTREXTERNAL); - } - const ::flatbuffers::Vector *roomPassword() const { - return GetPointer *>(VT_ROOMPASSWORD); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *groupConfig() const { - return GetPointer> *>(VT_GROUPCONFIG); - } - uint64_t passwordSlotMask() const { - return GetField(VT_PASSWORDSLOTMASK, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *allowedUser() const { - return GetPointer> *>(VT_ALLOWEDUSER); - } - const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *blockedUser() const { - return GetPointer> *>(VT_BLOCKEDUSER); - } - const ::flatbuffers::Vector *joinRoomGroupLabel() const { - return GetPointer *>(VT_JOINROOMGROUPLABEL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomMemberBinAttrInternal() const { - return GetPointer> *>(VT_ROOMMEMBERBINATTRINTERNAL); - } - uint8_t teamId() const { - return GetField(VT_TEAMID, 0); - } - const OptParam *sigOptParam() const { - return GetPointer(VT_SIGOPTPARAM); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_WORLDID, 4) && - VerifyField(verifier, VT_LOBBYID, 8) && - VerifyField(verifier, VT_MAXSLOT, 4) && - VerifyField(verifier, VT_FLAGATTR, 4) && - VerifyOffset(verifier, VT_ROOMBINATTRINTERNAL) && - verifier.VerifyVector(roomBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomBinAttrInternal()) && - VerifyOffset(verifier, VT_ROOMSEARCHABLEINTATTREXTERNAL) && - verifier.VerifyVector(roomSearchableIntAttrExternal()) && - verifier.VerifyVectorOfTables(roomSearchableIntAttrExternal()) && - VerifyOffset(verifier, VT_ROOMSEARCHABLEBINATTREXTERNAL) && - verifier.VerifyVector(roomSearchableBinAttrExternal()) && - verifier.VerifyVectorOfTables(roomSearchableBinAttrExternal()) && - VerifyOffset(verifier, VT_ROOMBINATTREXTERNAL) && - verifier.VerifyVector(roomBinAttrExternal()) && - verifier.VerifyVectorOfTables(roomBinAttrExternal()) && - VerifyOffset(verifier, VT_ROOMPASSWORD) && - verifier.VerifyVector(roomPassword()) && - VerifyOffset(verifier, VT_GROUPCONFIG) && - verifier.VerifyVector(groupConfig()) && - verifier.VerifyVectorOfTables(groupConfig()) && - VerifyField(verifier, VT_PASSWORDSLOTMASK, 8) && - VerifyOffset(verifier, VT_ALLOWEDUSER) && - verifier.VerifyVector(allowedUser()) && - verifier.VerifyVectorOfStrings(allowedUser()) && - VerifyOffset(verifier, VT_BLOCKEDUSER) && - verifier.VerifyVector(blockedUser()) && - verifier.VerifyVectorOfStrings(blockedUser()) && - VerifyOffset(verifier, VT_JOINROOMGROUPLABEL) && - verifier.VerifyVector(joinRoomGroupLabel()) && - VerifyOffset(verifier, VT_ROOMMEMBERBINATTRINTERNAL) && - verifier.VerifyVector(roomMemberBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomMemberBinAttrInternal()) && - VerifyField(verifier, VT_TEAMID, 1) && - VerifyOffset(verifier, VT_SIGOPTPARAM) && - verifier.VerifyTable(sigOptParam()) && - verifier.EndTable(); - } -}; - -struct CreateJoinRoomRequestBuilder { - typedef CreateJoinRoomRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_worldId(uint32_t worldId) { - fbb_.AddElement(CreateJoinRoomRequest::VT_WORLDID, worldId, 0); - } - void add_lobbyId(uint64_t lobbyId) { - fbb_.AddElement(CreateJoinRoomRequest::VT_LOBBYID, lobbyId, 0); - } - void add_maxSlot(uint32_t maxSlot) { - fbb_.AddElement(CreateJoinRoomRequest::VT_MAXSLOT, maxSlot, 0); - } - void add_flagAttr(uint32_t flagAttr) { - fbb_.AddElement(CreateJoinRoomRequest::VT_FLAGATTR, flagAttr, 0); - } - void add_roomBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ROOMBINATTRINTERNAL, roomBinAttrInternal); - } - void add_roomSearchableIntAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableIntAttrExternal) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ROOMSEARCHABLEINTATTREXTERNAL, roomSearchableIntAttrExternal); - } - void add_roomSearchableBinAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableBinAttrExternal) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ROOMSEARCHABLEBINATTREXTERNAL, roomSearchableBinAttrExternal); - } - void add_roomBinAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrExternal) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ROOMBINATTREXTERNAL, roomBinAttrExternal); - } - void add_roomPassword(::flatbuffers::Offset<::flatbuffers::Vector> roomPassword) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ROOMPASSWORD, roomPassword); - } - void add_groupConfig(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> groupConfig) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_GROUPCONFIG, groupConfig); - } - void add_passwordSlotMask(uint64_t passwordSlotMask) { - fbb_.AddElement(CreateJoinRoomRequest::VT_PASSWORDSLOTMASK, passwordSlotMask, 0); - } - void add_allowedUser(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> allowedUser) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ALLOWEDUSER, allowedUser); - } - void add_blockedUser(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> blockedUser) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_BLOCKEDUSER, blockedUser); - } - void add_joinRoomGroupLabel(::flatbuffers::Offset<::flatbuffers::Vector> joinRoomGroupLabel) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_JOINROOMGROUPLABEL, joinRoomGroupLabel); - } - void add_roomMemberBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_ROOMMEMBERBINATTRINTERNAL, roomMemberBinAttrInternal); - } - void add_teamId(uint8_t teamId) { - fbb_.AddElement(CreateJoinRoomRequest::VT_TEAMID, teamId, 0); - } - void add_sigOptParam(::flatbuffers::Offset sigOptParam) { - fbb_.AddOffset(CreateJoinRoomRequest::VT_SIGOPTPARAM, sigOptParam); - } - explicit CreateJoinRoomRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateCreateJoinRoomRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t worldId = 0, - uint64_t lobbyId = 0, - uint32_t maxSlot = 0, - uint32_t flagAttr = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableIntAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableBinAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> roomPassword = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> groupConfig = 0, - uint64_t passwordSlotMask = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> allowedUser = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> blockedUser = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> joinRoomGroupLabel = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal = 0, - uint8_t teamId = 0, - ::flatbuffers::Offset sigOptParam = 0) { - CreateJoinRoomRequestBuilder builder_(_fbb); - builder_.add_passwordSlotMask(passwordSlotMask); - builder_.add_lobbyId(lobbyId); - builder_.add_sigOptParam(sigOptParam); - builder_.add_roomMemberBinAttrInternal(roomMemberBinAttrInternal); - builder_.add_joinRoomGroupLabel(joinRoomGroupLabel); - builder_.add_blockedUser(blockedUser); - builder_.add_allowedUser(allowedUser); - builder_.add_groupConfig(groupConfig); - builder_.add_roomPassword(roomPassword); - builder_.add_roomBinAttrExternal(roomBinAttrExternal); - builder_.add_roomSearchableBinAttrExternal(roomSearchableBinAttrExternal); - builder_.add_roomSearchableIntAttrExternal(roomSearchableIntAttrExternal); - builder_.add_roomBinAttrInternal(roomBinAttrInternal); - builder_.add_flagAttr(flagAttr); - builder_.add_maxSlot(maxSlot); - builder_.add_worldId(worldId); - builder_.add_teamId(teamId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateCreateJoinRoomRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t worldId = 0, - uint64_t lobbyId = 0, - uint32_t maxSlot = 0, - uint32_t flagAttr = 0, - const std::vector<::flatbuffers::Offset> *roomBinAttrInternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomSearchableIntAttrExternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomSearchableBinAttrExternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomBinAttrExternal = nullptr, - const std::vector *roomPassword = nullptr, - const std::vector<::flatbuffers::Offset> *groupConfig = nullptr, - uint64_t passwordSlotMask = 0, - const std::vector<::flatbuffers::Offset<::flatbuffers::String>> *allowedUser = nullptr, - const std::vector<::flatbuffers::Offset<::flatbuffers::String>> *blockedUser = nullptr, - const std::vector *joinRoomGroupLabel = nullptr, - const std::vector<::flatbuffers::Offset> *roomMemberBinAttrInternal = nullptr, - uint8_t teamId = 0, - ::flatbuffers::Offset sigOptParam = 0) { - auto roomBinAttrInternal__ = roomBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrInternal) : 0; - auto roomSearchableIntAttrExternal__ = roomSearchableIntAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomSearchableIntAttrExternal) : 0; - auto roomSearchableBinAttrExternal__ = roomSearchableBinAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomSearchableBinAttrExternal) : 0; - auto roomBinAttrExternal__ = roomBinAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrExternal) : 0; - auto roomPassword__ = roomPassword ? _fbb.CreateVector(*roomPassword) : 0; - auto groupConfig__ = groupConfig ? _fbb.CreateVector<::flatbuffers::Offset>(*groupConfig) : 0; - auto allowedUser__ = allowedUser ? _fbb.CreateVector<::flatbuffers::Offset<::flatbuffers::String>>(*allowedUser) : 0; - auto blockedUser__ = blockedUser ? _fbb.CreateVector<::flatbuffers::Offset<::flatbuffers::String>>(*blockedUser) : 0; - auto joinRoomGroupLabel__ = joinRoomGroupLabel ? _fbb.CreateVector(*joinRoomGroupLabel) : 0; - auto roomMemberBinAttrInternal__ = roomMemberBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomMemberBinAttrInternal) : 0; - return CreateCreateJoinRoomRequest( - _fbb, - worldId, - lobbyId, - maxSlot, - flagAttr, - roomBinAttrInternal__, - roomSearchableIntAttrExternal__, - roomSearchableBinAttrExternal__, - roomBinAttrExternal__, - roomPassword__, - groupConfig__, - passwordSlotMask, - allowedUser__, - blockedUser__, - joinRoomGroupLabel__, - roomMemberBinAttrInternal__, - teamId, - sigOptParam); -} - -struct JoinRoomRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef JoinRoomRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_ROOMPASSWORD = 6, - VT_JOINROOMGROUPLABEL = 8, - VT_ROOMMEMBERBINATTRINTERNAL = 10, - VT_OPTDATA = 12, - VT_TEAMID = 14 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - const ::flatbuffers::Vector *roomPassword() const { - return GetPointer *>(VT_ROOMPASSWORD); - } - const ::flatbuffers::Vector *joinRoomGroupLabel() const { - return GetPointer *>(VT_JOINROOMGROUPLABEL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomMemberBinAttrInternal() const { - return GetPointer> *>(VT_ROOMMEMBERBINATTRINTERNAL); - } - const PresenceOptionData *optData() const { - return GetPointer(VT_OPTDATA); - } - uint8_t teamId() const { - return GetField(VT_TEAMID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyOffset(verifier, VT_ROOMPASSWORD) && - verifier.VerifyVector(roomPassword()) && - VerifyOffset(verifier, VT_JOINROOMGROUPLABEL) && - verifier.VerifyVector(joinRoomGroupLabel()) && - VerifyOffset(verifier, VT_ROOMMEMBERBINATTRINTERNAL) && - verifier.VerifyVector(roomMemberBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomMemberBinAttrInternal()) && - VerifyOffset(verifier, VT_OPTDATA) && - verifier.VerifyTable(optData()) && - VerifyField(verifier, VT_TEAMID, 1) && - verifier.EndTable(); - } -}; - -struct JoinRoomRequestBuilder { - typedef JoinRoomRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(JoinRoomRequest::VT_ROOMID, roomId, 0); - } - void add_roomPassword(::flatbuffers::Offset<::flatbuffers::Vector> roomPassword) { - fbb_.AddOffset(JoinRoomRequest::VT_ROOMPASSWORD, roomPassword); - } - void add_joinRoomGroupLabel(::flatbuffers::Offset<::flatbuffers::Vector> joinRoomGroupLabel) { - fbb_.AddOffset(JoinRoomRequest::VT_JOINROOMGROUPLABEL, joinRoomGroupLabel); - } - void add_roomMemberBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal) { - fbb_.AddOffset(JoinRoomRequest::VT_ROOMMEMBERBINATTRINTERNAL, roomMemberBinAttrInternal); - } - void add_optData(::flatbuffers::Offset optData) { - fbb_.AddOffset(JoinRoomRequest::VT_OPTDATA, optData); - } - void add_teamId(uint8_t teamId) { - fbb_.AddElement(JoinRoomRequest::VT_TEAMID, teamId, 0); - } - explicit JoinRoomRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateJoinRoomRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> roomPassword = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> joinRoomGroupLabel = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal = 0, - ::flatbuffers::Offset optData = 0, - uint8_t teamId = 0) { - JoinRoomRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_optData(optData); - builder_.add_roomMemberBinAttrInternal(roomMemberBinAttrInternal); - builder_.add_joinRoomGroupLabel(joinRoomGroupLabel); - builder_.add_roomPassword(roomPassword); - builder_.add_teamId(teamId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateJoinRoomRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - const std::vector *roomPassword = nullptr, - const std::vector *joinRoomGroupLabel = nullptr, - const std::vector<::flatbuffers::Offset> *roomMemberBinAttrInternal = nullptr, - ::flatbuffers::Offset optData = 0, - uint8_t teamId = 0) { - auto roomPassword__ = roomPassword ? _fbb.CreateVector(*roomPassword) : 0; - auto joinRoomGroupLabel__ = joinRoomGroupLabel ? _fbb.CreateVector(*joinRoomGroupLabel) : 0; - auto roomMemberBinAttrInternal__ = roomMemberBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomMemberBinAttrInternal) : 0; - return CreateJoinRoomRequest( - _fbb, - roomId, - roomPassword__, - joinRoomGroupLabel__, - roomMemberBinAttrInternal__, - optData, - teamId); -} - -struct JoinRoomResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef JoinRoomResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOM_DATA = 4, - VT_SIGNALING_DATA = 6 - }; - const RoomDataInternal *room_data() const { - return GetPointer(VT_ROOM_DATA); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *signaling_data() const { - return GetPointer> *>(VT_SIGNALING_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ROOM_DATA) && - verifier.VerifyTable(room_data()) && - VerifyOffset(verifier, VT_SIGNALING_DATA) && - verifier.VerifyVector(signaling_data()) && - verifier.VerifyVectorOfTables(signaling_data()) && - verifier.EndTable(); - } -}; - -struct JoinRoomResponseBuilder { - typedef JoinRoomResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_room_data(::flatbuffers::Offset room_data) { - fbb_.AddOffset(JoinRoomResponse::VT_ROOM_DATA, room_data); - } - void add_signaling_data(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> signaling_data) { - fbb_.AddOffset(JoinRoomResponse::VT_SIGNALING_DATA, signaling_data); - } - explicit JoinRoomResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateJoinRoomResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset room_data = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> signaling_data = 0) { - JoinRoomResponseBuilder builder_(_fbb); - builder_.add_signaling_data(signaling_data); - builder_.add_room_data(room_data); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateJoinRoomResponseDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset room_data = 0, - const std::vector<::flatbuffers::Offset> *signaling_data = nullptr) { - auto signaling_data__ = signaling_data ? _fbb.CreateVector<::flatbuffers::Offset>(*signaling_data) : 0; - return CreateJoinRoomResponse( - _fbb, - room_data, - signaling_data__); -} - -struct LeaveRoomRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef LeaveRoomRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_OPTDATA = 6 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - const PresenceOptionData *optData() const { - return GetPointer(VT_OPTDATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyOffset(verifier, VT_OPTDATA) && - verifier.VerifyTable(optData()) && - verifier.EndTable(); - } -}; - -struct LeaveRoomRequestBuilder { - typedef LeaveRoomRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(LeaveRoomRequest::VT_ROOMID, roomId, 0); - } - void add_optData(::flatbuffers::Offset optData) { - fbb_.AddOffset(LeaveRoomRequest::VT_OPTDATA, optData); - } - explicit LeaveRoomRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateLeaveRoomRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - ::flatbuffers::Offset optData = 0) { - LeaveRoomRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_optData(optData); - return builder_.Finish(); -} - -struct GetRoomDataExternalListRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetRoomDataExternalListRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMIDS = 4, - VT_ATTRIDS = 6 - }; - const ::flatbuffers::Vector *roomIds() const { - return GetPointer *>(VT_ROOMIDS); - } - const ::flatbuffers::Vector *attrIds() const { - return GetPointer *>(VT_ATTRIDS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ROOMIDS) && - verifier.VerifyVector(roomIds()) && - VerifyOffset(verifier, VT_ATTRIDS) && - verifier.VerifyVector(attrIds()) && - verifier.EndTable(); - } -}; - -struct GetRoomDataExternalListRequestBuilder { - typedef GetRoomDataExternalListRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomIds(::flatbuffers::Offset<::flatbuffers::Vector> roomIds) { - fbb_.AddOffset(GetRoomDataExternalListRequest::VT_ROOMIDS, roomIds); - } - void add_attrIds(::flatbuffers::Offset<::flatbuffers::Vector> attrIds) { - fbb_.AddOffset(GetRoomDataExternalListRequest::VT_ATTRIDS, attrIds); - } - explicit GetRoomDataExternalListRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetRoomDataExternalListRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> roomIds = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> attrIds = 0) { - GetRoomDataExternalListRequestBuilder builder_(_fbb); - builder_.add_attrIds(attrIds); - builder_.add_roomIds(roomIds); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetRoomDataExternalListRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *roomIds = nullptr, - const std::vector *attrIds = nullptr) { - auto roomIds__ = roomIds ? _fbb.CreateVector(*roomIds) : 0; - auto attrIds__ = attrIds ? _fbb.CreateVector(*attrIds) : 0; - return CreateGetRoomDataExternalListRequest( - _fbb, - roomIds__, - attrIds__); -} - -struct GetRoomDataExternalListResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetRoomDataExternalListResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMS = 4 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *rooms() const { - return GetPointer> *>(VT_ROOMS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ROOMS) && - verifier.VerifyVector(rooms()) && - verifier.VerifyVectorOfTables(rooms()) && - verifier.EndTable(); - } -}; - -struct GetRoomDataExternalListResponseBuilder { - typedef GetRoomDataExternalListResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_rooms(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rooms) { - fbb_.AddOffset(GetRoomDataExternalListResponse::VT_ROOMS, rooms); - } - explicit GetRoomDataExternalListResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetRoomDataExternalListResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rooms = 0) { - GetRoomDataExternalListResponseBuilder builder_(_fbb); - builder_.add_rooms(rooms); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetRoomDataExternalListResponseDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *rooms = nullptr) { - auto rooms__ = rooms ? _fbb.CreateVector<::flatbuffers::Offset>(*rooms) : 0; - return CreateGetRoomDataExternalListResponse( - _fbb, - rooms__); -} - -struct SetRoomDataExternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SetRoomDataExternalRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_ROOMSEARCHABLEINTATTREXTERNAL = 6, - VT_ROOMSEARCHABLEBINATTREXTERNAL = 8, - VT_ROOMBINATTREXTERNAL = 10 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomSearchableIntAttrExternal() const { - return GetPointer> *>(VT_ROOMSEARCHABLEINTATTREXTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomSearchableBinAttrExternal() const { - return GetPointer> *>(VT_ROOMSEARCHABLEBINATTREXTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomBinAttrExternal() const { - return GetPointer> *>(VT_ROOMBINATTREXTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyOffset(verifier, VT_ROOMSEARCHABLEINTATTREXTERNAL) && - verifier.VerifyVector(roomSearchableIntAttrExternal()) && - verifier.VerifyVectorOfTables(roomSearchableIntAttrExternal()) && - VerifyOffset(verifier, VT_ROOMSEARCHABLEBINATTREXTERNAL) && - verifier.VerifyVector(roomSearchableBinAttrExternal()) && - verifier.VerifyVectorOfTables(roomSearchableBinAttrExternal()) && - VerifyOffset(verifier, VT_ROOMBINATTREXTERNAL) && - verifier.VerifyVector(roomBinAttrExternal()) && - verifier.VerifyVectorOfTables(roomBinAttrExternal()) && - verifier.EndTable(); - } -}; - -struct SetRoomDataExternalRequestBuilder { - typedef SetRoomDataExternalRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(SetRoomDataExternalRequest::VT_ROOMID, roomId, 0); - } - void add_roomSearchableIntAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableIntAttrExternal) { - fbb_.AddOffset(SetRoomDataExternalRequest::VT_ROOMSEARCHABLEINTATTREXTERNAL, roomSearchableIntAttrExternal); - } - void add_roomSearchableBinAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableBinAttrExternal) { - fbb_.AddOffset(SetRoomDataExternalRequest::VT_ROOMSEARCHABLEBINATTREXTERNAL, roomSearchableBinAttrExternal); - } - void add_roomBinAttrExternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrExternal) { - fbb_.AddOffset(SetRoomDataExternalRequest::VT_ROOMBINATTREXTERNAL, roomBinAttrExternal); - } - explicit SetRoomDataExternalRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSetRoomDataExternalRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableIntAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomSearchableBinAttrExternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrExternal = 0) { - SetRoomDataExternalRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_roomBinAttrExternal(roomBinAttrExternal); - builder_.add_roomSearchableBinAttrExternal(roomSearchableBinAttrExternal); - builder_.add_roomSearchableIntAttrExternal(roomSearchableIntAttrExternal); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSetRoomDataExternalRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - const std::vector<::flatbuffers::Offset> *roomSearchableIntAttrExternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomSearchableBinAttrExternal = nullptr, - const std::vector<::flatbuffers::Offset> *roomBinAttrExternal = nullptr) { - auto roomSearchableIntAttrExternal__ = roomSearchableIntAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomSearchableIntAttrExternal) : 0; - auto roomSearchableBinAttrExternal__ = roomSearchableBinAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomSearchableBinAttrExternal) : 0; - auto roomBinAttrExternal__ = roomBinAttrExternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrExternal) : 0; - return CreateSetRoomDataExternalRequest( - _fbb, - roomId, - roomSearchableIntAttrExternal__, - roomSearchableBinAttrExternal__, - roomBinAttrExternal__); -} - -struct SetRoomDataInternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SetRoomDataInternalRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_FLAGFILTER = 6, - VT_FLAGATTR = 8, - VT_ROOMBINATTRINTERNAL = 10, - VT_PASSWORDCONFIG = 12, - VT_PASSWORDSLOTMASK = 14, - VT_OWNERPRIVILEGERANK = 16 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint32_t flagFilter() const { - return GetField(VT_FLAGFILTER, 0); - } - uint32_t flagAttr() const { - return GetField(VT_FLAGATTR, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomBinAttrInternal() const { - return GetPointer> *>(VT_ROOMBINATTRINTERNAL); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *passwordConfig() const { - return GetPointer> *>(VT_PASSWORDCONFIG); - } - const ::flatbuffers::Vector *passwordSlotMask() const { - return GetPointer *>(VT_PASSWORDSLOTMASK); - } - const ::flatbuffers::Vector *ownerPrivilegeRank() const { - return GetPointer *>(VT_OWNERPRIVILEGERANK); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_FLAGFILTER, 4) && - VerifyField(verifier, VT_FLAGATTR, 4) && - VerifyOffset(verifier, VT_ROOMBINATTRINTERNAL) && - verifier.VerifyVector(roomBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomBinAttrInternal()) && - VerifyOffset(verifier, VT_PASSWORDCONFIG) && - verifier.VerifyVector(passwordConfig()) && - verifier.VerifyVectorOfTables(passwordConfig()) && - VerifyOffset(verifier, VT_PASSWORDSLOTMASK) && - verifier.VerifyVector(passwordSlotMask()) && - VerifyOffset(verifier, VT_OWNERPRIVILEGERANK) && - verifier.VerifyVector(ownerPrivilegeRank()) && - verifier.EndTable(); - } -}; - -struct SetRoomDataInternalRequestBuilder { - typedef SetRoomDataInternalRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(SetRoomDataInternalRequest::VT_ROOMID, roomId, 0); - } - void add_flagFilter(uint32_t flagFilter) { - fbb_.AddElement(SetRoomDataInternalRequest::VT_FLAGFILTER, flagFilter, 0); - } - void add_flagAttr(uint32_t flagAttr) { - fbb_.AddElement(SetRoomDataInternalRequest::VT_FLAGATTR, flagAttr, 0); - } - void add_roomBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal) { - fbb_.AddOffset(SetRoomDataInternalRequest::VT_ROOMBINATTRINTERNAL, roomBinAttrInternal); - } - void add_passwordConfig(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> passwordConfig) { - fbb_.AddOffset(SetRoomDataInternalRequest::VT_PASSWORDCONFIG, passwordConfig); - } - void add_passwordSlotMask(::flatbuffers::Offset<::flatbuffers::Vector> passwordSlotMask) { - fbb_.AddOffset(SetRoomDataInternalRequest::VT_PASSWORDSLOTMASK, passwordSlotMask); - } - void add_ownerPrivilegeRank(::flatbuffers::Offset<::flatbuffers::Vector> ownerPrivilegeRank) { - fbb_.AddOffset(SetRoomDataInternalRequest::VT_OWNERPRIVILEGERANK, ownerPrivilegeRank); - } - explicit SetRoomDataInternalRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSetRoomDataInternalRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint32_t flagFilter = 0, - uint32_t flagAttr = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> passwordConfig = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> passwordSlotMask = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> ownerPrivilegeRank = 0) { - SetRoomDataInternalRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_ownerPrivilegeRank(ownerPrivilegeRank); - builder_.add_passwordSlotMask(passwordSlotMask); - builder_.add_passwordConfig(passwordConfig); - builder_.add_roomBinAttrInternal(roomBinAttrInternal); - builder_.add_flagAttr(flagAttr); - builder_.add_flagFilter(flagFilter); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSetRoomDataInternalRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint32_t flagFilter = 0, - uint32_t flagAttr = 0, - const std::vector<::flatbuffers::Offset> *roomBinAttrInternal = nullptr, - const std::vector<::flatbuffers::Offset> *passwordConfig = nullptr, - const std::vector *passwordSlotMask = nullptr, - const std::vector *ownerPrivilegeRank = nullptr) { - auto roomBinAttrInternal__ = roomBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrInternal) : 0; - auto passwordConfig__ = passwordConfig ? _fbb.CreateVector<::flatbuffers::Offset>(*passwordConfig) : 0; - auto passwordSlotMask__ = passwordSlotMask ? _fbb.CreateVector(*passwordSlotMask) : 0; - auto ownerPrivilegeRank__ = ownerPrivilegeRank ? _fbb.CreateVector(*ownerPrivilegeRank) : 0; - return CreateSetRoomDataInternalRequest( - _fbb, - roomId, - flagFilter, - flagAttr, - roomBinAttrInternal__, - passwordConfig__, - passwordSlotMask__, - ownerPrivilegeRank__); -} - -struct GetRoomMemberDataInternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetRoomMemberDataInternalRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_MEMBERID = 6, - VT_ATTRID = 8 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint16_t memberId() const { - return GetField(VT_MEMBERID, 0); - } - const ::flatbuffers::Vector *attrId() const { - return GetPointer *>(VT_ATTRID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_MEMBERID, 2) && - VerifyOffset(verifier, VT_ATTRID) && - verifier.VerifyVector(attrId()) && - verifier.EndTable(); - } -}; - -struct GetRoomMemberDataInternalRequestBuilder { - typedef GetRoomMemberDataInternalRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(GetRoomMemberDataInternalRequest::VT_ROOMID, roomId, 0); - } - void add_memberId(uint16_t memberId) { - fbb_.AddElement(GetRoomMemberDataInternalRequest::VT_MEMBERID, memberId, 0); - } - void add_attrId(::flatbuffers::Offset<::flatbuffers::Vector> attrId) { - fbb_.AddOffset(GetRoomMemberDataInternalRequest::VT_ATTRID, attrId); - } - explicit GetRoomMemberDataInternalRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetRoomMemberDataInternalRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint16_t memberId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> attrId = 0) { - GetRoomMemberDataInternalRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_attrId(attrId); - builder_.add_memberId(memberId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetRoomMemberDataInternalRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint16_t memberId = 0, - const std::vector *attrId = nullptr) { - auto attrId__ = attrId ? _fbb.CreateVector(*attrId) : 0; - return CreateGetRoomMemberDataInternalRequest( - _fbb, - roomId, - memberId, - attrId__); -} - -struct SetRoomMemberDataInternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SetRoomMemberDataInternalRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_MEMBERID = 6, - VT_TEAMID = 8, - VT_ROOMMEMBERBINATTRINTERNAL = 10 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint16_t memberId() const { - return GetField(VT_MEMBERID, 0); - } - uint8_t teamId() const { - return GetField(VT_TEAMID, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *roomMemberBinAttrInternal() const { - return GetPointer> *>(VT_ROOMMEMBERBINATTRINTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_MEMBERID, 2) && - VerifyField(verifier, VT_TEAMID, 1) && - VerifyOffset(verifier, VT_ROOMMEMBERBINATTRINTERNAL) && - verifier.VerifyVector(roomMemberBinAttrInternal()) && - verifier.VerifyVectorOfTables(roomMemberBinAttrInternal()) && - verifier.EndTable(); - } -}; - -struct SetRoomMemberDataInternalRequestBuilder { - typedef SetRoomMemberDataInternalRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(SetRoomMemberDataInternalRequest::VT_ROOMID, roomId, 0); - } - void add_memberId(uint16_t memberId) { - fbb_.AddElement(SetRoomMemberDataInternalRequest::VT_MEMBERID, memberId, 0); - } - void add_teamId(uint8_t teamId) { - fbb_.AddElement(SetRoomMemberDataInternalRequest::VT_TEAMID, teamId, 0); - } - void add_roomMemberBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal) { - fbb_.AddOffset(SetRoomMemberDataInternalRequest::VT_ROOMMEMBERBINATTRINTERNAL, roomMemberBinAttrInternal); - } - explicit SetRoomMemberDataInternalRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSetRoomMemberDataInternalRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint16_t memberId = 0, - uint8_t teamId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomMemberBinAttrInternal = 0) { - SetRoomMemberDataInternalRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_roomMemberBinAttrInternal(roomMemberBinAttrInternal); - builder_.add_memberId(memberId); - builder_.add_teamId(teamId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSetRoomMemberDataInternalRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint16_t memberId = 0, - uint8_t teamId = 0, - const std::vector<::flatbuffers::Offset> *roomMemberBinAttrInternal = nullptr) { - auto roomMemberBinAttrInternal__ = roomMemberBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomMemberBinAttrInternal) : 0; - return CreateSetRoomMemberDataInternalRequest( - _fbb, - roomId, - memberId, - teamId, - roomMemberBinAttrInternal__); -} - -struct SetUserInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SetUserInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SERVERID = 4, - VT_USERBINATTR = 6 - }; - uint16_t serverId() const { - return GetField(VT_SERVERID, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *userBinAttr() const { - return GetPointer> *>(VT_USERBINATTR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SERVERID, 2) && - VerifyOffset(verifier, VT_USERBINATTR) && - verifier.VerifyVector(userBinAttr()) && - verifier.VerifyVectorOfTables(userBinAttr()) && - verifier.EndTable(); - } -}; - -struct SetUserInfoBuilder { - typedef SetUserInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_serverId(uint16_t serverId) { - fbb_.AddElement(SetUserInfo::VT_SERVERID, serverId, 0); - } - void add_userBinAttr(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> userBinAttr) { - fbb_.AddOffset(SetUserInfo::VT_USERBINATTR, userBinAttr); - } - explicit SetUserInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSetUserInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> userBinAttr = 0) { - SetUserInfoBuilder builder_(_fbb); - builder_.add_userBinAttr(userBinAttr); - builder_.add_serverId(serverId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSetUserInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - const std::vector<::flatbuffers::Offset> *userBinAttr = nullptr) { - auto userBinAttr__ = userBinAttr ? _fbb.CreateVector<::flatbuffers::Offset>(*userBinAttr) : 0; - return CreateSetUserInfo( - _fbb, - serverId, - userBinAttr__); -} - -struct GetRoomDataInternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetRoomDataInternalRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_ATTRID = 6 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - const ::flatbuffers::Vector *attrId() const { - return GetPointer *>(VT_ATTRID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyOffset(verifier, VT_ATTRID) && - verifier.VerifyVector(attrId()) && - verifier.EndTable(); - } -}; - -struct GetRoomDataInternalRequestBuilder { - typedef GetRoomDataInternalRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(GetRoomDataInternalRequest::VT_ROOMID, roomId, 0); - } - void add_attrId(::flatbuffers::Offset<::flatbuffers::Vector> attrId) { - fbb_.AddOffset(GetRoomDataInternalRequest::VT_ATTRID, attrId); - } - explicit GetRoomDataInternalRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetRoomDataInternalRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> attrId = 0) { - GetRoomDataInternalRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_attrId(attrId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetRoomDataInternalRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - const std::vector *attrId = nullptr) { - auto attrId__ = attrId ? _fbb.CreateVector(*attrId) : 0; - return CreateGetRoomDataInternalRequest( - _fbb, - roomId, - attrId__); -} - -struct RoomMemberUpdateInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomMemberUpdateInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMMEMBERDATAINTERNAL = 4, - VT_EVENTCAUSE = 6, - VT_OPTDATA = 8 - }; - const RoomMemberDataInternal *roomMemberDataInternal() const { - return GetPointer(VT_ROOMMEMBERDATAINTERNAL); - } - uint8_t eventCause() const { - return GetField(VT_EVENTCAUSE, 0); - } - const PresenceOptionData *optData() const { - return GetPointer(VT_OPTDATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ROOMMEMBERDATAINTERNAL) && - verifier.VerifyTable(roomMemberDataInternal()) && - VerifyField(verifier, VT_EVENTCAUSE, 1) && - VerifyOffset(verifier, VT_OPTDATA) && - verifier.VerifyTable(optData()) && - verifier.EndTable(); - } -}; - -struct RoomMemberUpdateInfoBuilder { - typedef RoomMemberUpdateInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomMemberDataInternal(::flatbuffers::Offset roomMemberDataInternal) { - fbb_.AddOffset(RoomMemberUpdateInfo::VT_ROOMMEMBERDATAINTERNAL, roomMemberDataInternal); - } - void add_eventCause(uint8_t eventCause) { - fbb_.AddElement(RoomMemberUpdateInfo::VT_EVENTCAUSE, eventCause, 0); - } - void add_optData(::flatbuffers::Offset optData) { - fbb_.AddOffset(RoomMemberUpdateInfo::VT_OPTDATA, optData); - } - explicit RoomMemberUpdateInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomMemberUpdateInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset roomMemberDataInternal = 0, - uint8_t eventCause = 0, - ::flatbuffers::Offset optData = 0) { - RoomMemberUpdateInfoBuilder builder_(_fbb); - builder_.add_optData(optData); - builder_.add_roomMemberDataInternal(roomMemberDataInternal); - builder_.add_eventCause(eventCause); - return builder_.Finish(); -} - -struct NotificationUserJoinedRoom FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef NotificationUserJoinedRoomBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOM_ID = 4, - VT_UPDATE_INFO = 6, - VT_SIGNALING = 8 - }; - uint64_t room_id() const { - return GetField(VT_ROOM_ID, 0); - } - const RoomMemberUpdateInfo *update_info() const { - return GetPointer(VT_UPDATE_INFO); - } - const SignalingAddr *signaling() const { - return GetPointer(VT_SIGNALING); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOM_ID, 8) && - VerifyOffset(verifier, VT_UPDATE_INFO) && - verifier.VerifyTable(update_info()) && - VerifyOffset(verifier, VT_SIGNALING) && - verifier.VerifyTable(signaling()) && - verifier.EndTable(); - } -}; - -struct NotificationUserJoinedRoomBuilder { - typedef NotificationUserJoinedRoom Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_room_id(uint64_t room_id) { - fbb_.AddElement(NotificationUserJoinedRoom::VT_ROOM_ID, room_id, 0); - } - void add_update_info(::flatbuffers::Offset update_info) { - fbb_.AddOffset(NotificationUserJoinedRoom::VT_UPDATE_INFO, update_info); - } - void add_signaling(::flatbuffers::Offset signaling) { - fbb_.AddOffset(NotificationUserJoinedRoom::VT_SIGNALING, signaling); - } - explicit NotificationUserJoinedRoomBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateNotificationUserJoinedRoom( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t room_id = 0, - ::flatbuffers::Offset update_info = 0, - ::flatbuffers::Offset signaling = 0) { - NotificationUserJoinedRoomBuilder builder_(_fbb); - builder_.add_room_id(room_id); - builder_.add_signaling(signaling); - builder_.add_update_info(update_info); - return builder_.Finish(); -} - -struct RoomUpdateInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomUpdateInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_EVENTCAUSE = 4, - VT_ERRORCODE = 6, - VT_OPTDATA = 8 - }; - uint8_t eventCause() const { - return GetField(VT_EVENTCAUSE, 0); - } - int32_t errorCode() const { - return GetField(VT_ERRORCODE, 0); - } - const PresenceOptionData *optData() const { - return GetPointer(VT_OPTDATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_EVENTCAUSE, 1) && - VerifyField(verifier, VT_ERRORCODE, 4) && - VerifyOffset(verifier, VT_OPTDATA) && - verifier.VerifyTable(optData()) && - verifier.EndTable(); - } -}; - -struct RoomUpdateInfoBuilder { - typedef RoomUpdateInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_eventCause(uint8_t eventCause) { - fbb_.AddElement(RoomUpdateInfo::VT_EVENTCAUSE, eventCause, 0); - } - void add_errorCode(int32_t errorCode) { - fbb_.AddElement(RoomUpdateInfo::VT_ERRORCODE, errorCode, 0); - } - void add_optData(::flatbuffers::Offset optData) { - fbb_.AddOffset(RoomUpdateInfo::VT_OPTDATA, optData); - } - explicit RoomUpdateInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomUpdateInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint8_t eventCause = 0, - int32_t errorCode = 0, - ::flatbuffers::Offset optData = 0) { - RoomUpdateInfoBuilder builder_(_fbb); - builder_.add_optData(optData); - builder_.add_errorCode(errorCode); - builder_.add_eventCause(eventCause); - return builder_.Finish(); -} - -struct RoomDataInternalUpdateInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomDataInternalUpdateInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NEWROOMDATAINTERNAL = 4, - VT_PREVFLAGATTR = 6, - VT_PREVROOMPASSWORDSLOTMASK = 8, - VT_NEWROOMGROUP = 10, - VT_NEWROOMBINATTRINTERNAL = 12 - }; - const RoomDataInternal *newRoomDataInternal() const { - return GetPointer(VT_NEWROOMDATAINTERNAL); - } - uint32_t prevFlagAttr() const { - return GetField(VT_PREVFLAGATTR, 0); - } - uint64_t prevRoomPasswordSlotMask() const { - return GetField(VT_PREVROOMPASSWORDSLOTMASK, 0); - } - const ::flatbuffers::Vector *newRoomGroup() const { - return GetPointer *>(VT_NEWROOMGROUP); - } - const ::flatbuffers::Vector *newRoomBinAttrInternal() const { - return GetPointer *>(VT_NEWROOMBINATTRINTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NEWROOMDATAINTERNAL) && - verifier.VerifyTable(newRoomDataInternal()) && - VerifyField(verifier, VT_PREVFLAGATTR, 4) && - VerifyField(verifier, VT_PREVROOMPASSWORDSLOTMASK, 8) && - VerifyOffset(verifier, VT_NEWROOMGROUP) && - verifier.VerifyVector(newRoomGroup()) && - VerifyOffset(verifier, VT_NEWROOMBINATTRINTERNAL) && - verifier.VerifyVector(newRoomBinAttrInternal()) && - verifier.EndTable(); - } -}; - -struct RoomDataInternalUpdateInfoBuilder { - typedef RoomDataInternalUpdateInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_newRoomDataInternal(::flatbuffers::Offset newRoomDataInternal) { - fbb_.AddOffset(RoomDataInternalUpdateInfo::VT_NEWROOMDATAINTERNAL, newRoomDataInternal); - } - void add_prevFlagAttr(uint32_t prevFlagAttr) { - fbb_.AddElement(RoomDataInternalUpdateInfo::VT_PREVFLAGATTR, prevFlagAttr, 0); - } - void add_prevRoomPasswordSlotMask(uint64_t prevRoomPasswordSlotMask) { - fbb_.AddElement(RoomDataInternalUpdateInfo::VT_PREVROOMPASSWORDSLOTMASK, prevRoomPasswordSlotMask, 0); - } - void add_newRoomGroup(::flatbuffers::Offset<::flatbuffers::Vector> newRoomGroup) { - fbb_.AddOffset(RoomDataInternalUpdateInfo::VT_NEWROOMGROUP, newRoomGroup); - } - void add_newRoomBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector> newRoomBinAttrInternal) { - fbb_.AddOffset(RoomDataInternalUpdateInfo::VT_NEWROOMBINATTRINTERNAL, newRoomBinAttrInternal); - } - explicit RoomDataInternalUpdateInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomDataInternalUpdateInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset newRoomDataInternal = 0, - uint32_t prevFlagAttr = 0, - uint64_t prevRoomPasswordSlotMask = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> newRoomGroup = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> newRoomBinAttrInternal = 0) { - RoomDataInternalUpdateInfoBuilder builder_(_fbb); - builder_.add_prevRoomPasswordSlotMask(prevRoomPasswordSlotMask); - builder_.add_newRoomBinAttrInternal(newRoomBinAttrInternal); - builder_.add_newRoomGroup(newRoomGroup); - builder_.add_prevFlagAttr(prevFlagAttr); - builder_.add_newRoomDataInternal(newRoomDataInternal); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomDataInternalUpdateInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset newRoomDataInternal = 0, - uint32_t prevFlagAttr = 0, - uint64_t prevRoomPasswordSlotMask = 0, - const std::vector *newRoomGroup = nullptr, - const std::vector *newRoomBinAttrInternal = nullptr) { - auto newRoomGroup__ = newRoomGroup ? _fbb.CreateVector(*newRoomGroup) : 0; - auto newRoomBinAttrInternal__ = newRoomBinAttrInternal ? _fbb.CreateVector(*newRoomBinAttrInternal) : 0; - return CreateRoomDataInternalUpdateInfo( - _fbb, - newRoomDataInternal, - prevFlagAttr, - prevRoomPasswordSlotMask, - newRoomGroup__, - newRoomBinAttrInternal__); -} - -struct RoomMemberDataInternalUpdateInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomMemberDataInternalUpdateInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NEWROOMMEMBERDATAINTERNAL = 4, - VT_PREVFLAGATTR = 6, - VT_PREVTEAMID = 8, - VT_NEWROOMMEMBERBINATTRINTERNAL = 10 - }; - const RoomMemberDataInternal *newRoomMemberDataInternal() const { - return GetPointer(VT_NEWROOMMEMBERDATAINTERNAL); - } - uint32_t prevFlagAttr() const { - return GetField(VT_PREVFLAGATTR, 0); - } - uint8_t prevTeamId() const { - return GetField(VT_PREVTEAMID, 0); - } - const ::flatbuffers::Vector *newRoomMemberBinAttrInternal() const { - return GetPointer *>(VT_NEWROOMMEMBERBINATTRINTERNAL); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NEWROOMMEMBERDATAINTERNAL) && - verifier.VerifyTable(newRoomMemberDataInternal()) && - VerifyField(verifier, VT_PREVFLAGATTR, 4) && - VerifyField(verifier, VT_PREVTEAMID, 1) && - VerifyOffset(verifier, VT_NEWROOMMEMBERBINATTRINTERNAL) && - verifier.VerifyVector(newRoomMemberBinAttrInternal()) && - verifier.EndTable(); - } -}; - -struct RoomMemberDataInternalUpdateInfoBuilder { - typedef RoomMemberDataInternalUpdateInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_newRoomMemberDataInternal(::flatbuffers::Offset newRoomMemberDataInternal) { - fbb_.AddOffset(RoomMemberDataInternalUpdateInfo::VT_NEWROOMMEMBERDATAINTERNAL, newRoomMemberDataInternal); - } - void add_prevFlagAttr(uint32_t prevFlagAttr) { - fbb_.AddElement(RoomMemberDataInternalUpdateInfo::VT_PREVFLAGATTR, prevFlagAttr, 0); - } - void add_prevTeamId(uint8_t prevTeamId) { - fbb_.AddElement(RoomMemberDataInternalUpdateInfo::VT_PREVTEAMID, prevTeamId, 0); - } - void add_newRoomMemberBinAttrInternal(::flatbuffers::Offset<::flatbuffers::Vector> newRoomMemberBinAttrInternal) { - fbb_.AddOffset(RoomMemberDataInternalUpdateInfo::VT_NEWROOMMEMBERBINATTRINTERNAL, newRoomMemberBinAttrInternal); - } - explicit RoomMemberDataInternalUpdateInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomMemberDataInternalUpdateInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset newRoomMemberDataInternal = 0, - uint32_t prevFlagAttr = 0, - uint8_t prevTeamId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> newRoomMemberBinAttrInternal = 0) { - RoomMemberDataInternalUpdateInfoBuilder builder_(_fbb); - builder_.add_newRoomMemberBinAttrInternal(newRoomMemberBinAttrInternal); - builder_.add_prevFlagAttr(prevFlagAttr); - builder_.add_newRoomMemberDataInternal(newRoomMemberDataInternal); - builder_.add_prevTeamId(prevTeamId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomMemberDataInternalUpdateInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset newRoomMemberDataInternal = 0, - uint32_t prevFlagAttr = 0, - uint8_t prevTeamId = 0, - const std::vector *newRoomMemberBinAttrInternal = nullptr) { - auto newRoomMemberBinAttrInternal__ = newRoomMemberBinAttrInternal ? _fbb.CreateVector(*newRoomMemberBinAttrInternal) : 0; - return CreateRoomMemberDataInternalUpdateInfo( - _fbb, - newRoomMemberDataInternal, - prevFlagAttr, - prevTeamId, - newRoomMemberBinAttrInternal__); -} - -struct GetPingInfoResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetPingInfoResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SERVERID = 4, - VT_WORLDID = 6, - VT_ROOMID = 8, - VT_RTT = 10 - }; - uint16_t serverId() const { - return GetField(VT_SERVERID, 0); - } - uint32_t worldId() const { - return GetField(VT_WORLDID, 0); - } - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint32_t rtt() const { - return GetField(VT_RTT, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SERVERID, 2) && - VerifyField(verifier, VT_WORLDID, 4) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_RTT, 4) && - verifier.EndTable(); - } -}; - -struct GetPingInfoResponseBuilder { - typedef GetPingInfoResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_serverId(uint16_t serverId) { - fbb_.AddElement(GetPingInfoResponse::VT_SERVERID, serverId, 0); - } - void add_worldId(uint32_t worldId) { - fbb_.AddElement(GetPingInfoResponse::VT_WORLDID, worldId, 0); - } - void add_roomId(uint64_t roomId) { - fbb_.AddElement(GetPingInfoResponse::VT_ROOMID, roomId, 0); - } - void add_rtt(uint32_t rtt) { - fbb_.AddElement(GetPingInfoResponse::VT_RTT, rtt, 0); - } - explicit GetPingInfoResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetPingInfoResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint16_t serverId = 0, - uint32_t worldId = 0, - uint64_t roomId = 0, - uint32_t rtt = 0) { - GetPingInfoResponseBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_rtt(rtt); - builder_.add_worldId(worldId); - builder_.add_serverId(serverId); - return builder_.Finish(); -} - -struct SendRoomMessageRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SendRoomMessageRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_CASTTYPE = 6, - VT_DST = 8, - VT_MSG = 10, - VT_OPTION = 12 - }; - uint64_t roomId() const { - return GetField(VT_ROOMID, 0); - } - uint8_t castType() const { - return GetField(VT_CASTTYPE, 0); - } - const ::flatbuffers::Vector *dst() const { - return GetPointer *>(VT_DST); - } - const ::flatbuffers::Vector *msg() const { - return GetPointer *>(VT_MSG); - } - uint8_t option() const { - return GetField(VT_OPTION, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ROOMID, 8) && - VerifyField(verifier, VT_CASTTYPE, 1) && - VerifyOffset(verifier, VT_DST) && - verifier.VerifyVector(dst()) && - VerifyOffset(verifier, VT_MSG) && - verifier.VerifyVector(msg()) && - VerifyField(verifier, VT_OPTION, 1) && - verifier.EndTable(); - } -}; - -struct SendRoomMessageRequestBuilder { - typedef SendRoomMessageRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomId(uint64_t roomId) { - fbb_.AddElement(SendRoomMessageRequest::VT_ROOMID, roomId, 0); - } - void add_castType(uint8_t castType) { - fbb_.AddElement(SendRoomMessageRequest::VT_CASTTYPE, castType, 0); - } - void add_dst(::flatbuffers::Offset<::flatbuffers::Vector> dst) { - fbb_.AddOffset(SendRoomMessageRequest::VT_DST, dst); - } - void add_msg(::flatbuffers::Offset<::flatbuffers::Vector> msg) { - fbb_.AddOffset(SendRoomMessageRequest::VT_MSG, msg); - } - void add_option(uint8_t option) { - fbb_.AddElement(SendRoomMessageRequest::VT_OPTION, option, 0); - } - explicit SendRoomMessageRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSendRoomMessageRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint8_t castType = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> dst = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> msg = 0, - uint8_t option = 0) { - SendRoomMessageRequestBuilder builder_(_fbb); - builder_.add_roomId(roomId); - builder_.add_msg(msg); - builder_.add_dst(dst); - builder_.add_option(option); - builder_.add_castType(castType); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSendRoomMessageRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint64_t roomId = 0, - uint8_t castType = 0, - const std::vector *dst = nullptr, - const std::vector *msg = nullptr, - uint8_t option = 0) { - auto dst__ = dst ? _fbb.CreateVector(*dst) : 0; - auto msg__ = msg ? _fbb.CreateVector(*msg) : 0; - return CreateSendRoomMessageRequest( - _fbb, - roomId, - castType, - dst__, - msg__, - option); -} - -struct RoomMessageInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RoomMessageInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_FILTERED = 4, - VT_CASTTYPE = 6, - VT_DST = 8, - VT_SRCMEMBER = 10, - VT_MSG = 12 - }; - bool filtered() const { - return GetField(VT_FILTERED, 0) != 0; - } - uint8_t castType() const { - return GetField(VT_CASTTYPE, 0); - } - const ::flatbuffers::Vector *dst() const { - return GetPointer *>(VT_DST); - } - const UserInfo *srcMember() const { - return GetPointer(VT_SRCMEMBER); - } - const ::flatbuffers::Vector *msg() const { - return GetPointer *>(VT_MSG); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FILTERED, 1) && - VerifyField(verifier, VT_CASTTYPE, 1) && - VerifyOffset(verifier, VT_DST) && - verifier.VerifyVector(dst()) && - VerifyOffset(verifier, VT_SRCMEMBER) && - verifier.VerifyTable(srcMember()) && - VerifyOffset(verifier, VT_MSG) && - verifier.VerifyVector(msg()) && - verifier.EndTable(); - } -}; - -struct RoomMessageInfoBuilder { - typedef RoomMessageInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_filtered(bool filtered) { - fbb_.AddElement(RoomMessageInfo::VT_FILTERED, static_cast(filtered), 0); - } - void add_castType(uint8_t castType) { - fbb_.AddElement(RoomMessageInfo::VT_CASTTYPE, castType, 0); - } - void add_dst(::flatbuffers::Offset<::flatbuffers::Vector> dst) { - fbb_.AddOffset(RoomMessageInfo::VT_DST, dst); - } - void add_srcMember(::flatbuffers::Offset srcMember) { - fbb_.AddOffset(RoomMessageInfo::VT_SRCMEMBER, srcMember); - } - void add_msg(::flatbuffers::Offset<::flatbuffers::Vector> msg) { - fbb_.AddOffset(RoomMessageInfo::VT_MSG, msg); - } - explicit RoomMessageInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRoomMessageInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - bool filtered = false, - uint8_t castType = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> dst = 0, - ::flatbuffers::Offset srcMember = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> msg = 0) { - RoomMessageInfoBuilder builder_(_fbb); - builder_.add_msg(msg); - builder_.add_srcMember(srcMember); - builder_.add_dst(dst); - builder_.add_castType(castType); - builder_.add_filtered(filtered); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRoomMessageInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - bool filtered = false, - uint8_t castType = 0, - const std::vector *dst = nullptr, - ::flatbuffers::Offset srcMember = 0, - const std::vector *msg = nullptr) { - auto dst__ = dst ? _fbb.CreateVector(*dst) : 0; - auto msg__ = msg ? _fbb.CreateVector(*msg) : 0; - return CreateRoomMessageInfo( - _fbb, - filtered, - castType, - dst__, - srcMember, - msg__); -} - -struct MessageDetails FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MessageDetailsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_COMMUNICATIONID = 4, - VT_MSGID = 6, - VT_MAINTYPE = 8, - VT_SUBTYPE = 10, - VT_MSGFEATURES = 12, - VT_SUBJECT = 14, - VT_BODY = 16, - VT_DATA = 18 - }; - const ::flatbuffers::String *communicationId() const { - return GetPointer(VT_COMMUNICATIONID); - } - uint64_t msgId() const { - return GetField(VT_MSGID, 0); - } - uint16_t mainType() const { - return GetField(VT_MAINTYPE, 0); - } - uint16_t subType() const { - return GetField(VT_SUBTYPE, 0); - } - uint32_t msgFeatures() const { - return GetField(VT_MSGFEATURES, 0); - } - const ::flatbuffers::String *subject() const { - return GetPointer(VT_SUBJECT); - } - const ::flatbuffers::String *body() const { - return GetPointer(VT_BODY); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_COMMUNICATIONID) && - verifier.VerifyString(communicationId()) && - VerifyField(verifier, VT_MSGID, 8) && - VerifyField(verifier, VT_MAINTYPE, 2) && - VerifyField(verifier, VT_SUBTYPE, 2) && - VerifyField(verifier, VT_MSGFEATURES, 4) && - VerifyOffset(verifier, VT_SUBJECT) && - verifier.VerifyString(subject()) && - VerifyOffset(verifier, VT_BODY) && - verifier.VerifyString(body()) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct MessageDetailsBuilder { - typedef MessageDetails Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_communicationId(::flatbuffers::Offset<::flatbuffers::String> communicationId) { - fbb_.AddOffset(MessageDetails::VT_COMMUNICATIONID, communicationId); - } - void add_msgId(uint64_t msgId) { - fbb_.AddElement(MessageDetails::VT_MSGID, msgId, 0); - } - void add_mainType(uint16_t mainType) { - fbb_.AddElement(MessageDetails::VT_MAINTYPE, mainType, 0); - } - void add_subType(uint16_t subType) { - fbb_.AddElement(MessageDetails::VT_SUBTYPE, subType, 0); - } - void add_msgFeatures(uint32_t msgFeatures) { - fbb_.AddElement(MessageDetails::VT_MSGFEATURES, msgFeatures, 0); - } - void add_subject(::flatbuffers::Offset<::flatbuffers::String> subject) { - fbb_.AddOffset(MessageDetails::VT_SUBJECT, subject); - } - void add_body(::flatbuffers::Offset<::flatbuffers::String> body) { - fbb_.AddOffset(MessageDetails::VT_BODY, body); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(MessageDetails::VT_DATA, data); - } - explicit MessageDetailsBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMessageDetails( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> communicationId = 0, - uint64_t msgId = 0, - uint16_t mainType = 0, - uint16_t subType = 0, - uint32_t msgFeatures = 0, - ::flatbuffers::Offset<::flatbuffers::String> subject = 0, - ::flatbuffers::Offset<::flatbuffers::String> body = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - MessageDetailsBuilder builder_(_fbb); - builder_.add_msgId(msgId); - builder_.add_data(data); - builder_.add_body(body); - builder_.add_subject(subject); - builder_.add_msgFeatures(msgFeatures); - builder_.add_communicationId(communicationId); - builder_.add_subType(subType); - builder_.add_mainType(mainType); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMessageDetailsDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *communicationId = nullptr, - uint64_t msgId = 0, - uint16_t mainType = 0, - uint16_t subType = 0, - uint32_t msgFeatures = 0, - const char *subject = nullptr, - const char *body = nullptr, - const std::vector *data = nullptr) { - auto communicationId__ = communicationId ? _fbb.CreateString(communicationId) : 0; - auto subject__ = subject ? _fbb.CreateString(subject) : 0; - auto body__ = body ? _fbb.CreateString(body) : 0; - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateMessageDetails( - _fbb, - communicationId__, - msgId, - mainType, - subType, - msgFeatures, - subject__, - body__, - data__); -} - -struct SendMessageRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SendMessageRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MESSAGE = 4, - VT_NPIDS = 6 - }; - const ::flatbuffers::Vector *message() const { - return GetPointer *>(VT_MESSAGE); - } - const MessageDetails *message_nested_root() const { - const auto _f = message(); - return _f ? ::flatbuffers::GetRoot(_f->Data()) - : nullptr; - } - const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *npids() const { - return GetPointer> *>(VT_NPIDS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_MESSAGE) && - verifier.VerifyVector(message()) && - verifier.VerifyNestedFlatBuffer(message(), nullptr) && - VerifyOffset(verifier, VT_NPIDS) && - verifier.VerifyVector(npids()) && - verifier.VerifyVectorOfStrings(npids()) && - verifier.EndTable(); - } -}; - -struct SendMessageRequestBuilder { - typedef SendMessageRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_message(::flatbuffers::Offset<::flatbuffers::Vector> message) { - fbb_.AddOffset(SendMessageRequest::VT_MESSAGE, message); - } - void add_npids(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> npids) { - fbb_.AddOffset(SendMessageRequest::VT_NPIDS, npids); - } - explicit SendMessageRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSendMessageRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> message = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> npids = 0) { - SendMessageRequestBuilder builder_(_fbb); - builder_.add_npids(npids); - builder_.add_message(message); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSendMessageRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *message = nullptr, - const std::vector<::flatbuffers::Offset<::flatbuffers::String>> *npids = nullptr) { - auto message__ = message ? _fbb.CreateVector(*message) : 0; - auto npids__ = npids ? _fbb.CreateVector<::flatbuffers::Offset<::flatbuffers::String>>(*npids) : 0; - return CreateSendMessageRequest( - _fbb, - message__, - npids__); -} - -struct BoardInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef BoardInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RANKLIMIT = 4, - VT_UPDATEMODE = 6, - VT_SORTMODE = 8, - VT_UPLOADNUMLIMIT = 10, - VT_UPLOADSIZELIMIT = 12 - }; - uint32_t rankLimit() const { - return GetField(VT_RANKLIMIT, 0); - } - uint32_t updateMode() const { - return GetField(VT_UPDATEMODE, 0); - } - uint32_t sortMode() const { - return GetField(VT_SORTMODE, 0); - } - uint32_t uploadNumLimit() const { - return GetField(VT_UPLOADNUMLIMIT, 0); - } - uint32_t uploadSizeLimit() const { - return GetField(VT_UPLOADSIZELIMIT, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_RANKLIMIT, 4) && - VerifyField(verifier, VT_UPDATEMODE, 4) && - VerifyField(verifier, VT_SORTMODE, 4) && - VerifyField(verifier, VT_UPLOADNUMLIMIT, 4) && - VerifyField(verifier, VT_UPLOADSIZELIMIT, 4) && - verifier.EndTable(); - } -}; - -struct BoardInfoBuilder { - typedef BoardInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_rankLimit(uint32_t rankLimit) { - fbb_.AddElement(BoardInfo::VT_RANKLIMIT, rankLimit, 0); - } - void add_updateMode(uint32_t updateMode) { - fbb_.AddElement(BoardInfo::VT_UPDATEMODE, updateMode, 0); - } - void add_sortMode(uint32_t sortMode) { - fbb_.AddElement(BoardInfo::VT_SORTMODE, sortMode, 0); - } - void add_uploadNumLimit(uint32_t uploadNumLimit) { - fbb_.AddElement(BoardInfo::VT_UPLOADNUMLIMIT, uploadNumLimit, 0); - } - void add_uploadSizeLimit(uint32_t uploadSizeLimit) { - fbb_.AddElement(BoardInfo::VT_UPLOADSIZELIMIT, uploadSizeLimit, 0); - } - explicit BoardInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateBoardInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t rankLimit = 0, - uint32_t updateMode = 0, - uint32_t sortMode = 0, - uint32_t uploadNumLimit = 0, - uint32_t uploadSizeLimit = 0) { - BoardInfoBuilder builder_(_fbb); - builder_.add_uploadSizeLimit(uploadSizeLimit); - builder_.add_uploadNumLimit(uploadNumLimit); - builder_.add_sortMode(sortMode); - builder_.add_updateMode(updateMode); - builder_.add_rankLimit(rankLimit); - return builder_.Finish(); -} - -struct RecordScoreRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RecordScoreRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BOARDID = 4, - VT_PCID = 6, - VT_SCORE = 8, - VT_COMMENT = 10, - VT_DATA = 12 - }; - uint32_t boardId() const { - return GetField(VT_BOARDID, 0); - } - int32_t pcId() const { - return GetField(VT_PCID, 0); - } - int64_t score() const { - return GetField(VT_SCORE, 0); - } - const ::flatbuffers::String *comment() const { - return GetPointer(VT_COMMENT); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BOARDID, 4) && - VerifyField(verifier, VT_PCID, 4) && - VerifyField(verifier, VT_SCORE, 8) && - VerifyOffset(verifier, VT_COMMENT) && - verifier.VerifyString(comment()) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct RecordScoreRequestBuilder { - typedef RecordScoreRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_boardId(uint32_t boardId) { - fbb_.AddElement(RecordScoreRequest::VT_BOARDID, boardId, 0); - } - void add_pcId(int32_t pcId) { - fbb_.AddElement(RecordScoreRequest::VT_PCID, pcId, 0); - } - void add_score(int64_t score) { - fbb_.AddElement(RecordScoreRequest::VT_SCORE, score, 0); - } - void add_comment(::flatbuffers::Offset<::flatbuffers::String> comment) { - fbb_.AddOffset(RecordScoreRequest::VT_COMMENT, comment); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(RecordScoreRequest::VT_DATA, data); - } - explicit RecordScoreRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRecordScoreRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - int32_t pcId = 0, - int64_t score = 0, - ::flatbuffers::Offset<::flatbuffers::String> comment = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - RecordScoreRequestBuilder builder_(_fbb); - builder_.add_score(score); - builder_.add_data(data); - builder_.add_comment(comment); - builder_.add_pcId(pcId); - builder_.add_boardId(boardId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateRecordScoreRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - int32_t pcId = 0, - int64_t score = 0, - const char *comment = nullptr, - const std::vector *data = nullptr) { - auto comment__ = comment ? _fbb.CreateString(comment) : 0; - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateRecordScoreRequest( - _fbb, - boardId, - pcId, - score, - comment__, - data__); -} - -struct GetScoreRangeRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetScoreRangeRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BOARDID = 4, - VT_STARTRANK = 6, - VT_NUMRANKS = 8, - VT_WITHCOMMENT = 10, - VT_WITHGAMEINFO = 12 - }; - uint32_t boardId() const { - return GetField(VT_BOARDID, 0); - } - uint32_t startRank() const { - return GetField(VT_STARTRANK, 0); - } - uint32_t numRanks() const { - return GetField(VT_NUMRANKS, 0); - } - bool withComment() const { - return GetField(VT_WITHCOMMENT, 0) != 0; - } - bool withGameInfo() const { - return GetField(VT_WITHGAMEINFO, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BOARDID, 4) && - VerifyField(verifier, VT_STARTRANK, 4) && - VerifyField(verifier, VT_NUMRANKS, 4) && - VerifyField(verifier, VT_WITHCOMMENT, 1) && - VerifyField(verifier, VT_WITHGAMEINFO, 1) && - verifier.EndTable(); - } -}; - -struct GetScoreRangeRequestBuilder { - typedef GetScoreRangeRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_boardId(uint32_t boardId) { - fbb_.AddElement(GetScoreRangeRequest::VT_BOARDID, boardId, 0); - } - void add_startRank(uint32_t startRank) { - fbb_.AddElement(GetScoreRangeRequest::VT_STARTRANK, startRank, 0); - } - void add_numRanks(uint32_t numRanks) { - fbb_.AddElement(GetScoreRangeRequest::VT_NUMRANKS, numRanks, 0); - } - void add_withComment(bool withComment) { - fbb_.AddElement(GetScoreRangeRequest::VT_WITHCOMMENT, static_cast(withComment), 0); - } - void add_withGameInfo(bool withGameInfo) { - fbb_.AddElement(GetScoreRangeRequest::VT_WITHGAMEINFO, static_cast(withGameInfo), 0); - } - explicit GetScoreRangeRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetScoreRangeRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - uint32_t startRank = 0, - uint32_t numRanks = 0, - bool withComment = false, - bool withGameInfo = false) { - GetScoreRangeRequestBuilder builder_(_fbb); - builder_.add_numRanks(numRanks); - builder_.add_startRank(startRank); - builder_.add_boardId(boardId); - builder_.add_withGameInfo(withGameInfo); - builder_.add_withComment(withComment); - return builder_.Finish(); -} - -struct ScoreNpIdPcId FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef ScoreNpIdPcIdBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NPID = 4, - VT_PCID = 6 - }; - const ::flatbuffers::String *npid() const { - return GetPointer(VT_NPID); - } - int32_t pcId() const { - return GetField(VT_PCID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NPID) && - verifier.VerifyString(npid()) && - VerifyField(verifier, VT_PCID, 4) && - verifier.EndTable(); - } -}; - -struct ScoreNpIdPcIdBuilder { - typedef ScoreNpIdPcId Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_npid(::flatbuffers::Offset<::flatbuffers::String> npid) { - fbb_.AddOffset(ScoreNpIdPcId::VT_NPID, npid); - } - void add_pcId(int32_t pcId) { - fbb_.AddElement(ScoreNpIdPcId::VT_PCID, pcId, 0); - } - explicit ScoreNpIdPcIdBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateScoreNpIdPcId( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> npid = 0, - int32_t pcId = 0) { - ScoreNpIdPcIdBuilder builder_(_fbb); - builder_.add_pcId(pcId); - builder_.add_npid(npid); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateScoreNpIdPcIdDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *npid = nullptr, - int32_t pcId = 0) { - auto npid__ = npid ? _fbb.CreateString(npid) : 0; - return CreateScoreNpIdPcId( - _fbb, - npid__, - pcId); -} - -struct GetScoreNpIdRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetScoreNpIdRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BOARDID = 4, - VT_NPIDS = 6, - VT_WITHCOMMENT = 8, - VT_WITHGAMEINFO = 10 - }; - uint32_t boardId() const { - return GetField(VT_BOARDID, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *npids() const { - return GetPointer> *>(VT_NPIDS); - } - bool withComment() const { - return GetField(VT_WITHCOMMENT, 0) != 0; - } - bool withGameInfo() const { - return GetField(VT_WITHGAMEINFO, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BOARDID, 4) && - VerifyOffset(verifier, VT_NPIDS) && - verifier.VerifyVector(npids()) && - verifier.VerifyVectorOfTables(npids()) && - VerifyField(verifier, VT_WITHCOMMENT, 1) && - VerifyField(verifier, VT_WITHGAMEINFO, 1) && - verifier.EndTable(); - } -}; - -struct GetScoreNpIdRequestBuilder { - typedef GetScoreNpIdRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_boardId(uint32_t boardId) { - fbb_.AddElement(GetScoreNpIdRequest::VT_BOARDID, boardId, 0); - } - void add_npids(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> npids) { - fbb_.AddOffset(GetScoreNpIdRequest::VT_NPIDS, npids); - } - void add_withComment(bool withComment) { - fbb_.AddElement(GetScoreNpIdRequest::VT_WITHCOMMENT, static_cast(withComment), 0); - } - void add_withGameInfo(bool withGameInfo) { - fbb_.AddElement(GetScoreNpIdRequest::VT_WITHGAMEINFO, static_cast(withGameInfo), 0); - } - explicit GetScoreNpIdRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetScoreNpIdRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> npids = 0, - bool withComment = false, - bool withGameInfo = false) { - GetScoreNpIdRequestBuilder builder_(_fbb); - builder_.add_npids(npids); - builder_.add_boardId(boardId); - builder_.add_withGameInfo(withGameInfo); - builder_.add_withComment(withComment); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetScoreNpIdRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - const std::vector<::flatbuffers::Offset> *npids = nullptr, - bool withComment = false, - bool withGameInfo = false) { - auto npids__ = npids ? _fbb.CreateVector<::flatbuffers::Offset>(*npids) : 0; - return CreateGetScoreNpIdRequest( - _fbb, - boardId, - npids__, - withComment, - withGameInfo); -} - -struct GetScoreFriendsRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetScoreFriendsRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BOARDID = 4, - VT_INCLUDE_SELF = 6, - VT_MAX = 8, - VT_WITHCOMMENT = 10, - VT_WITHGAMEINFO = 12 - }; - uint32_t boardId() const { - return GetField(VT_BOARDID, 0); - } - bool include_self() const { - return GetField(VT_INCLUDE_SELF, 0) != 0; - } - uint32_t max() const { - return GetField(VT_MAX, 0); - } - bool withComment() const { - return GetField(VT_WITHCOMMENT, 0) != 0; - } - bool withGameInfo() const { - return GetField(VT_WITHGAMEINFO, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BOARDID, 4) && - VerifyField(verifier, VT_INCLUDE_SELF, 1) && - VerifyField(verifier, VT_MAX, 4) && - VerifyField(verifier, VT_WITHCOMMENT, 1) && - VerifyField(verifier, VT_WITHGAMEINFO, 1) && - verifier.EndTable(); - } -}; - -struct GetScoreFriendsRequestBuilder { - typedef GetScoreFriendsRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_boardId(uint32_t boardId) { - fbb_.AddElement(GetScoreFriendsRequest::VT_BOARDID, boardId, 0); - } - void add_include_self(bool include_self) { - fbb_.AddElement(GetScoreFriendsRequest::VT_INCLUDE_SELF, static_cast(include_self), 0); - } - void add_max(uint32_t max) { - fbb_.AddElement(GetScoreFriendsRequest::VT_MAX, max, 0); - } - void add_withComment(bool withComment) { - fbb_.AddElement(GetScoreFriendsRequest::VT_WITHCOMMENT, static_cast(withComment), 0); - } - void add_withGameInfo(bool withGameInfo) { - fbb_.AddElement(GetScoreFriendsRequest::VT_WITHGAMEINFO, static_cast(withGameInfo), 0); - } - explicit GetScoreFriendsRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetScoreFriendsRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - bool include_self = false, - uint32_t max = 0, - bool withComment = false, - bool withGameInfo = false) { - GetScoreFriendsRequestBuilder builder_(_fbb); - builder_.add_max(max); - builder_.add_boardId(boardId); - builder_.add_withGameInfo(withGameInfo); - builder_.add_withComment(withComment); - builder_.add_include_self(include_self); - return builder_.Finish(); -} - -struct ScoreRankData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef ScoreRankDataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NPID = 4, - VT_ONLINENAME = 6, - VT_PCID = 8, - VT_RANK = 10, - VT_SCORE = 12, - VT_HASGAMEDATA = 14, - VT_RECORDDATE = 16 - }; - const ::flatbuffers::String *npId() const { - return GetPointer(VT_NPID); - } - const ::flatbuffers::String *onlineName() const { - return GetPointer(VT_ONLINENAME); - } - int32_t pcId() const { - return GetField(VT_PCID, 0); - } - uint32_t rank() const { - return GetField(VT_RANK, 0); - } - int64_t score() const { - return GetField(VT_SCORE, 0); - } - bool hasGameData() const { - return GetField(VT_HASGAMEDATA, 0) != 0; - } - uint64_t recordDate() const { - return GetField(VT_RECORDDATE, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NPID) && - verifier.VerifyString(npId()) && - VerifyOffset(verifier, VT_ONLINENAME) && - verifier.VerifyString(onlineName()) && - VerifyField(verifier, VT_PCID, 4) && - VerifyField(verifier, VT_RANK, 4) && - VerifyField(verifier, VT_SCORE, 8) && - VerifyField(verifier, VT_HASGAMEDATA, 1) && - VerifyField(verifier, VT_RECORDDATE, 8) && - verifier.EndTable(); - } -}; - -struct ScoreRankDataBuilder { - typedef ScoreRankData Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_npId(::flatbuffers::Offset<::flatbuffers::String> npId) { - fbb_.AddOffset(ScoreRankData::VT_NPID, npId); - } - void add_onlineName(::flatbuffers::Offset<::flatbuffers::String> onlineName) { - fbb_.AddOffset(ScoreRankData::VT_ONLINENAME, onlineName); - } - void add_pcId(int32_t pcId) { - fbb_.AddElement(ScoreRankData::VT_PCID, pcId, 0); - } - void add_rank(uint32_t rank) { - fbb_.AddElement(ScoreRankData::VT_RANK, rank, 0); - } - void add_score(int64_t score) { - fbb_.AddElement(ScoreRankData::VT_SCORE, score, 0); - } - void add_hasGameData(bool hasGameData) { - fbb_.AddElement(ScoreRankData::VT_HASGAMEDATA, static_cast(hasGameData), 0); - } - void add_recordDate(uint64_t recordDate) { - fbb_.AddElement(ScoreRankData::VT_RECORDDATE, recordDate, 0); - } - explicit ScoreRankDataBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateScoreRankData( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> npId = 0, - ::flatbuffers::Offset<::flatbuffers::String> onlineName = 0, - int32_t pcId = 0, - uint32_t rank = 0, - int64_t score = 0, - bool hasGameData = false, - uint64_t recordDate = 0) { - ScoreRankDataBuilder builder_(_fbb); - builder_.add_recordDate(recordDate); - builder_.add_score(score); - builder_.add_rank(rank); - builder_.add_pcId(pcId); - builder_.add_onlineName(onlineName); - builder_.add_npId(npId); - builder_.add_hasGameData(hasGameData); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateScoreRankDataDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *npId = nullptr, - const char *onlineName = nullptr, - int32_t pcId = 0, - uint32_t rank = 0, - int64_t score = 0, - bool hasGameData = false, - uint64_t recordDate = 0) { - auto npId__ = npId ? _fbb.CreateString(npId) : 0; - auto onlineName__ = onlineName ? _fbb.CreateString(onlineName) : 0; - return CreateScoreRankData( - _fbb, - npId__, - onlineName__, - pcId, - rank, - score, - hasGameData, - recordDate); -} - -struct ScoreInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef ScoreInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DATA = 4 - }; - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct ScoreInfoBuilder { - typedef ScoreInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(ScoreInfo::VT_DATA, data); - } - explicit ScoreInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateScoreInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - ScoreInfoBuilder builder_(_fbb); - builder_.add_data(data); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateScoreInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *data = nullptr) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateScoreInfo( - _fbb, - data__); -} - -struct GetScoreResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetScoreResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RANKARRAY = 4, - VT_COMMENTARRAY = 6, - VT_INFOARRAY = 8, - VT_LASTSORTDATE = 10, - VT_TOTALRECORD = 12 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *rankArray() const { - return GetPointer> *>(VT_RANKARRAY); - } - const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *commentArray() const { - return GetPointer> *>(VT_COMMENTARRAY); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *infoArray() const { - return GetPointer> *>(VT_INFOARRAY); - } - uint64_t lastSortDate() const { - return GetField(VT_LASTSORTDATE, 0); - } - uint32_t totalRecord() const { - return GetField(VT_TOTALRECORD, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_RANKARRAY) && - verifier.VerifyVector(rankArray()) && - verifier.VerifyVectorOfTables(rankArray()) && - VerifyOffset(verifier, VT_COMMENTARRAY) && - verifier.VerifyVector(commentArray()) && - verifier.VerifyVectorOfStrings(commentArray()) && - VerifyOffset(verifier, VT_INFOARRAY) && - verifier.VerifyVector(infoArray()) && - verifier.VerifyVectorOfTables(infoArray()) && - VerifyField(verifier, VT_LASTSORTDATE, 8) && - VerifyField(verifier, VT_TOTALRECORD, 4) && - verifier.EndTable(); - } -}; - -struct GetScoreResponseBuilder { - typedef GetScoreResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_rankArray(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rankArray) { - fbb_.AddOffset(GetScoreResponse::VT_RANKARRAY, rankArray); - } - void add_commentArray(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> commentArray) { - fbb_.AddOffset(GetScoreResponse::VT_COMMENTARRAY, commentArray); - } - void add_infoArray(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> infoArray) { - fbb_.AddOffset(GetScoreResponse::VT_INFOARRAY, infoArray); - } - void add_lastSortDate(uint64_t lastSortDate) { - fbb_.AddElement(GetScoreResponse::VT_LASTSORTDATE, lastSortDate, 0); - } - void add_totalRecord(uint32_t totalRecord) { - fbb_.AddElement(GetScoreResponse::VT_TOTALRECORD, totalRecord, 0); - } - explicit GetScoreResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetScoreResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rankArray = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> commentArray = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> infoArray = 0, - uint64_t lastSortDate = 0, - uint32_t totalRecord = 0) { - GetScoreResponseBuilder builder_(_fbb); - builder_.add_lastSortDate(lastSortDate); - builder_.add_totalRecord(totalRecord); - builder_.add_infoArray(infoArray); - builder_.add_commentArray(commentArray); - builder_.add_rankArray(rankArray); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetScoreResponseDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *rankArray = nullptr, - const std::vector<::flatbuffers::Offset<::flatbuffers::String>> *commentArray = nullptr, - const std::vector<::flatbuffers::Offset> *infoArray = nullptr, - uint64_t lastSortDate = 0, - uint32_t totalRecord = 0) { - auto rankArray__ = rankArray ? _fbb.CreateVector<::flatbuffers::Offset>(*rankArray) : 0; - auto commentArray__ = commentArray ? _fbb.CreateVector<::flatbuffers::Offset<::flatbuffers::String>>(*commentArray) : 0; - auto infoArray__ = infoArray ? _fbb.CreateVector<::flatbuffers::Offset>(*infoArray) : 0; - return CreateGetScoreResponse( - _fbb, - rankArray__, - commentArray__, - infoArray__, - lastSortDate, - totalRecord); -} - -struct RecordScoreGameDataRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef RecordScoreGameDataRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BOARDID = 4, - VT_PCID = 6, - VT_SCORE = 8 - }; - uint32_t boardId() const { - return GetField(VT_BOARDID, 0); - } - int32_t pcId() const { - return GetField(VT_PCID, 0); - } - int64_t score() const { - return GetField(VT_SCORE, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BOARDID, 4) && - VerifyField(verifier, VT_PCID, 4) && - VerifyField(verifier, VT_SCORE, 8) && - verifier.EndTable(); - } -}; - -struct RecordScoreGameDataRequestBuilder { - typedef RecordScoreGameDataRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_boardId(uint32_t boardId) { - fbb_.AddElement(RecordScoreGameDataRequest::VT_BOARDID, boardId, 0); - } - void add_pcId(int32_t pcId) { - fbb_.AddElement(RecordScoreGameDataRequest::VT_PCID, pcId, 0); - } - void add_score(int64_t score) { - fbb_.AddElement(RecordScoreGameDataRequest::VT_SCORE, score, 0); - } - explicit RecordScoreGameDataRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateRecordScoreGameDataRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - int32_t pcId = 0, - int64_t score = 0) { - RecordScoreGameDataRequestBuilder builder_(_fbb); - builder_.add_score(score); - builder_.add_pcId(pcId); - builder_.add_boardId(boardId); - return builder_.Finish(); -} - -struct GetScoreGameDataRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetScoreGameDataRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BOARDID = 4, - VT_NPID = 6, - VT_PCID = 8 - }; - uint32_t boardId() const { - return GetField(VT_BOARDID, 0); - } - const ::flatbuffers::String *npId() const { - return GetPointer(VT_NPID); - } - int32_t pcId() const { - return GetField(VT_PCID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BOARDID, 4) && - VerifyOffset(verifier, VT_NPID) && - verifier.VerifyString(npId()) && - VerifyField(verifier, VT_PCID, 4) && - verifier.EndTable(); - } -}; - -struct GetScoreGameDataRequestBuilder { - typedef GetScoreGameDataRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_boardId(uint32_t boardId) { - fbb_.AddElement(GetScoreGameDataRequest::VT_BOARDID, boardId, 0); - } - void add_npId(::flatbuffers::Offset<::flatbuffers::String> npId) { - fbb_.AddOffset(GetScoreGameDataRequest::VT_NPID, npId); - } - void add_pcId(int32_t pcId) { - fbb_.AddElement(GetScoreGameDataRequest::VT_PCID, pcId, 0); - } - explicit GetScoreGameDataRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetScoreGameDataRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - ::flatbuffers::Offset<::flatbuffers::String> npId = 0, - int32_t pcId = 0) { - GetScoreGameDataRequestBuilder builder_(_fbb); - builder_.add_pcId(pcId); - builder_.add_npId(npId); - builder_.add_boardId(boardId); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetScoreGameDataRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t boardId = 0, - const char *npId = nullptr, - int32_t pcId = 0) { - auto npId__ = npId ? _fbb.CreateString(npId) : 0; - return CreateGetScoreGameDataRequest( - _fbb, - boardId, - npId__, - pcId); -} - -struct TusUser FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusUserBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_VUSER = 4, - VT_NPID = 6 - }; - bool vuser() const { - return GetField(VT_VUSER, 0) != 0; - } - const ::flatbuffers::String *npid() const { - return GetPointer(VT_NPID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_VUSER, 1) && - VerifyOffset(verifier, VT_NPID) && - verifier.VerifyString(npid()) && - verifier.EndTable(); - } -}; - -struct TusUserBuilder { - typedef TusUser Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_vuser(bool vuser) { - fbb_.AddElement(TusUser::VT_VUSER, static_cast(vuser), 0); - } - void add_npid(::flatbuffers::Offset<::flatbuffers::String> npid) { - fbb_.AddOffset(TusUser::VT_NPID, npid); - } - explicit TusUserBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusUser( - ::flatbuffers::FlatBufferBuilder &_fbb, - bool vuser = false, - ::flatbuffers::Offset<::flatbuffers::String> npid = 0) { - TusUserBuilder builder_(_fbb); - builder_.add_npid(npid); - builder_.add_vuser(vuser); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusUserDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - bool vuser = false, - const char *npid = nullptr) { - auto npid__ = npid ? _fbb.CreateString(npid) : 0; - return CreateTusUser( - _fbb, - vuser, - npid__); -} - -struct TusVariable FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusVariableBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OWNERID = 4, - VT_HASDATA = 6, - VT_LASTCHANGEDDATE = 8, - VT_LASTCHANGEDAUTHORID = 10, - VT_VARIABLE = 12, - VT_OLDVARIABLE = 14 - }; - const ::flatbuffers::String *ownerId() const { - return GetPointer(VT_OWNERID); - } - bool hasData() const { - return GetField(VT_HASDATA, 0) != 0; - } - uint64_t lastChangedDate() const { - return GetField(VT_LASTCHANGEDDATE, 0); - } - const ::flatbuffers::String *lastChangedAuthorId() const { - return GetPointer(VT_LASTCHANGEDAUTHORID); - } - int64_t variable() const { - return GetField(VT_VARIABLE, 0); - } - int64_t oldVariable() const { - return GetField(VT_OLDVARIABLE, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_OWNERID) && - verifier.VerifyString(ownerId()) && - VerifyField(verifier, VT_HASDATA, 1) && - VerifyField(verifier, VT_LASTCHANGEDDATE, 8) && - VerifyOffset(verifier, VT_LASTCHANGEDAUTHORID) && - verifier.VerifyString(lastChangedAuthorId()) && - VerifyField(verifier, VT_VARIABLE, 8) && - VerifyField(verifier, VT_OLDVARIABLE, 8) && - verifier.EndTable(); - } -}; - -struct TusVariableBuilder { - typedef TusVariable Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_ownerId(::flatbuffers::Offset<::flatbuffers::String> ownerId) { - fbb_.AddOffset(TusVariable::VT_OWNERID, ownerId); - } - void add_hasData(bool hasData) { - fbb_.AddElement(TusVariable::VT_HASDATA, static_cast(hasData), 0); - } - void add_lastChangedDate(uint64_t lastChangedDate) { - fbb_.AddElement(TusVariable::VT_LASTCHANGEDDATE, lastChangedDate, 0); - } - void add_lastChangedAuthorId(::flatbuffers::Offset<::flatbuffers::String> lastChangedAuthorId) { - fbb_.AddOffset(TusVariable::VT_LASTCHANGEDAUTHORID, lastChangedAuthorId); - } - void add_variable(int64_t variable) { - fbb_.AddElement(TusVariable::VT_VARIABLE, variable, 0); - } - void add_oldVariable(int64_t oldVariable) { - fbb_.AddElement(TusVariable::VT_OLDVARIABLE, oldVariable, 0); - } - explicit TusVariableBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusVariable( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> ownerId = 0, - bool hasData = false, - uint64_t lastChangedDate = 0, - ::flatbuffers::Offset<::flatbuffers::String> lastChangedAuthorId = 0, - int64_t variable = 0, - int64_t oldVariable = 0) { - TusVariableBuilder builder_(_fbb); - builder_.add_oldVariable(oldVariable); - builder_.add_variable(variable); - builder_.add_lastChangedDate(lastChangedDate); - builder_.add_lastChangedAuthorId(lastChangedAuthorId); - builder_.add_ownerId(ownerId); - builder_.add_hasData(hasData); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusVariableDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *ownerId = nullptr, - bool hasData = false, - uint64_t lastChangedDate = 0, - const char *lastChangedAuthorId = nullptr, - int64_t variable = 0, - int64_t oldVariable = 0) { - auto ownerId__ = ownerId ? _fbb.CreateString(ownerId) : 0; - auto lastChangedAuthorId__ = lastChangedAuthorId ? _fbb.CreateString(lastChangedAuthorId) : 0; - return CreateTusVariable( - _fbb, - ownerId__, - hasData, - lastChangedDate, - lastChangedAuthorId__, - variable, - oldVariable); -} - -struct TusVarResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusVarResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_VARS = 4 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *vars() const { - return GetPointer> *>(VT_VARS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_VARS) && - verifier.VerifyVector(vars()) && - verifier.VerifyVectorOfTables(vars()) && - verifier.EndTable(); - } -}; - -struct TusVarResponseBuilder { - typedef TusVarResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_vars(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> vars) { - fbb_.AddOffset(TusVarResponse::VT_VARS, vars); - } - explicit TusVarResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusVarResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> vars = 0) { - TusVarResponseBuilder builder_(_fbb); - builder_.add_vars(vars); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusVarResponseDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *vars = nullptr) { - auto vars__ = vars ? _fbb.CreateVector<::flatbuffers::Offset>(*vars) : 0; - return CreateTusVarResponse( - _fbb, - vars__); -} - -struct TusSetMultiSlotVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusSetMultiSlotVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTIDARRAY = 6, - VT_VARIABLEARRAY = 8 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - const ::flatbuffers::Vector *slotIdArray() const { - return GetPointer *>(VT_SLOTIDARRAY); - } - const ::flatbuffers::Vector *variableArray() const { - return GetPointer *>(VT_VARIABLEARRAY); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyOffset(verifier, VT_SLOTIDARRAY) && - verifier.VerifyVector(slotIdArray()) && - VerifyOffset(verifier, VT_VARIABLEARRAY) && - verifier.VerifyVector(variableArray()) && - verifier.EndTable(); - } -}; - -struct TusSetMultiSlotVariableRequestBuilder { - typedef TusSetMultiSlotVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusSetMultiSlotVariableRequest::VT_USER, user); - } - void add_slotIdArray(::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray) { - fbb_.AddOffset(TusSetMultiSlotVariableRequest::VT_SLOTIDARRAY, slotIdArray); - } - void add_variableArray(::flatbuffers::Offset<::flatbuffers::Vector> variableArray) { - fbb_.AddOffset(TusSetMultiSlotVariableRequest::VT_VARIABLEARRAY, variableArray); - } - explicit TusSetMultiSlotVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusSetMultiSlotVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> variableArray = 0) { - TusSetMultiSlotVariableRequestBuilder builder_(_fbb); - builder_.add_variableArray(variableArray); - builder_.add_slotIdArray(slotIdArray); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusSetMultiSlotVariableRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - const std::vector *slotIdArray = nullptr, - const std::vector *variableArray = nullptr) { - auto slotIdArray__ = slotIdArray ? _fbb.CreateVector(*slotIdArray) : 0; - auto variableArray__ = variableArray ? _fbb.CreateVector(*variableArray) : 0; - return CreateTusSetMultiSlotVariableRequest( - _fbb, - user, - slotIdArray__, - variableArray__); -} - -struct TusGetMultiSlotVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetMultiSlotVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTIDARRAY = 6 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - const ::flatbuffers::Vector *slotIdArray() const { - return GetPointer *>(VT_SLOTIDARRAY); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyOffset(verifier, VT_SLOTIDARRAY) && - verifier.VerifyVector(slotIdArray()) && - verifier.EndTable(); - } -}; - -struct TusGetMultiSlotVariableRequestBuilder { - typedef TusGetMultiSlotVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusGetMultiSlotVariableRequest::VT_USER, user); - } - void add_slotIdArray(::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray) { - fbb_.AddOffset(TusGetMultiSlotVariableRequest::VT_SLOTIDARRAY, slotIdArray); - } - explicit TusGetMultiSlotVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetMultiSlotVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray = 0) { - TusGetMultiSlotVariableRequestBuilder builder_(_fbb); - builder_.add_slotIdArray(slotIdArray); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusGetMultiSlotVariableRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - const std::vector *slotIdArray = nullptr) { - auto slotIdArray__ = slotIdArray ? _fbb.CreateVector(*slotIdArray) : 0; - return CreateTusGetMultiSlotVariableRequest( - _fbb, - user, - slotIdArray__); -} - -struct TusGetMultiUserVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetMultiUserVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USERS = 4, - VT_SLOTID = 6 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *users() const { - return GetPointer> *>(VT_USERS); - } - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USERS) && - verifier.VerifyVector(users()) && - verifier.VerifyVectorOfTables(users()) && - VerifyField(verifier, VT_SLOTID, 4) && - verifier.EndTable(); - } -}; - -struct TusGetMultiUserVariableRequestBuilder { - typedef TusGetMultiUserVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_users(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> users) { - fbb_.AddOffset(TusGetMultiUserVariableRequest::VT_USERS, users); - } - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusGetMultiUserVariableRequest::VT_SLOTID, slotId, 0); - } - explicit TusGetMultiUserVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetMultiUserVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> users = 0, - int32_t slotId = 0) { - TusGetMultiUserVariableRequestBuilder builder_(_fbb); - builder_.add_slotId(slotId); - builder_.add_users(users); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusGetMultiUserVariableRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *users = nullptr, - int32_t slotId = 0) { - auto users__ = users ? _fbb.CreateVector<::flatbuffers::Offset>(*users) : 0; - return CreateTusGetMultiUserVariableRequest( - _fbb, - users__, - slotId); -} - -struct TusGetFriendsVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetFriendsVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SLOTID = 4, - VT_INCLUDESELF = 6, - VT_SORTTYPE = 8, - VT_ARRAYNUM = 10 - }; - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - bool includeSelf() const { - return GetField(VT_INCLUDESELF, 0) != 0; - } - int32_t sortType() const { - return GetField(VT_SORTTYPE, 0); - } - uint32_t arrayNum() const { - return GetField(VT_ARRAYNUM, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SLOTID, 4) && - VerifyField(verifier, VT_INCLUDESELF, 1) && - VerifyField(verifier, VT_SORTTYPE, 4) && - VerifyField(verifier, VT_ARRAYNUM, 4) && - verifier.EndTable(); - } -}; - -struct TusGetFriendsVariableRequestBuilder { - typedef TusGetFriendsVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusGetFriendsVariableRequest::VT_SLOTID, slotId, 0); - } - void add_includeSelf(bool includeSelf) { - fbb_.AddElement(TusGetFriendsVariableRequest::VT_INCLUDESELF, static_cast(includeSelf), 0); - } - void add_sortType(int32_t sortType) { - fbb_.AddElement(TusGetFriendsVariableRequest::VT_SORTTYPE, sortType, 0); - } - void add_arrayNum(uint32_t arrayNum) { - fbb_.AddElement(TusGetFriendsVariableRequest::VT_ARRAYNUM, arrayNum, 0); - } - explicit TusGetFriendsVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetFriendsVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - int32_t slotId = 0, - bool includeSelf = false, - int32_t sortType = 0, - uint32_t arrayNum = 0) { - TusGetFriendsVariableRequestBuilder builder_(_fbb); - builder_.add_arrayNum(arrayNum); - builder_.add_sortType(sortType); - builder_.add_slotId(slotId); - builder_.add_includeSelf(includeSelf); - return builder_.Finish(); -} - -struct TusAddAndGetVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusAddAndGetVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTID = 6, - VT_INVARIABLE = 8, - VT_ISLASTCHANGEDDATE = 10, - VT_ISLASTCHANGEDAUTHORID = 12 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - int64_t inVariable() const { - return GetField(VT_INVARIABLE, 0); - } - const ::flatbuffers::Vector *isLastChangedDate() const { - return GetPointer *>(VT_ISLASTCHANGEDDATE); - } - const ::flatbuffers::String *isLastChangedAuthorId() const { - return GetPointer(VT_ISLASTCHANGEDAUTHORID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyField(verifier, VT_SLOTID, 4) && - VerifyField(verifier, VT_INVARIABLE, 8) && - VerifyOffset(verifier, VT_ISLASTCHANGEDDATE) && - verifier.VerifyVector(isLastChangedDate()) && - VerifyOffset(verifier, VT_ISLASTCHANGEDAUTHORID) && - verifier.VerifyString(isLastChangedAuthorId()) && - verifier.EndTable(); - } -}; - -struct TusAddAndGetVariableRequestBuilder { - typedef TusAddAndGetVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusAddAndGetVariableRequest::VT_USER, user); - } - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusAddAndGetVariableRequest::VT_SLOTID, slotId, 0); - } - void add_inVariable(int64_t inVariable) { - fbb_.AddElement(TusAddAndGetVariableRequest::VT_INVARIABLE, inVariable, 0); - } - void add_isLastChangedDate(::flatbuffers::Offset<::flatbuffers::Vector> isLastChangedDate) { - fbb_.AddOffset(TusAddAndGetVariableRequest::VT_ISLASTCHANGEDDATE, isLastChangedDate); - } - void add_isLastChangedAuthorId(::flatbuffers::Offset<::flatbuffers::String> isLastChangedAuthorId) { - fbb_.AddOffset(TusAddAndGetVariableRequest::VT_ISLASTCHANGEDAUTHORID, isLastChangedAuthorId); - } - explicit TusAddAndGetVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusAddAndGetVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0, - int64_t inVariable = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> isLastChangedDate = 0, - ::flatbuffers::Offset<::flatbuffers::String> isLastChangedAuthorId = 0) { - TusAddAndGetVariableRequestBuilder builder_(_fbb); - builder_.add_inVariable(inVariable); - builder_.add_isLastChangedAuthorId(isLastChangedAuthorId); - builder_.add_isLastChangedDate(isLastChangedDate); - builder_.add_slotId(slotId); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusAddAndGetVariableRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0, - int64_t inVariable = 0, - const std::vector *isLastChangedDate = nullptr, - const char *isLastChangedAuthorId = nullptr) { - auto isLastChangedDate__ = isLastChangedDate ? _fbb.CreateVector(*isLastChangedDate) : 0; - auto isLastChangedAuthorId__ = isLastChangedAuthorId ? _fbb.CreateString(isLastChangedAuthorId) : 0; - return CreateTusAddAndGetVariableRequest( - _fbb, - user, - slotId, - inVariable, - isLastChangedDate__, - isLastChangedAuthorId__); -} - -struct TusTryAndSetVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusTryAndSetVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTID = 6, - VT_OPETYPE = 8, - VT_VARIABLE = 10, - VT_ISLASTCHANGEDDATE = 12, - VT_ISLASTCHANGEDAUTHORID = 14, - VT_COMPAREVALUE = 16 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - int32_t opeType() const { - return GetField(VT_OPETYPE, 0); - } - int64_t variable() const { - return GetField(VT_VARIABLE, 0); - } - const ::flatbuffers::Vector *isLastChangedDate() const { - return GetPointer *>(VT_ISLASTCHANGEDDATE); - } - const ::flatbuffers::String *isLastChangedAuthorId() const { - return GetPointer(VT_ISLASTCHANGEDAUTHORID); - } - const ::flatbuffers::Vector *compareValue() const { - return GetPointer *>(VT_COMPAREVALUE); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyField(verifier, VT_SLOTID, 4) && - VerifyField(verifier, VT_OPETYPE, 4) && - VerifyField(verifier, VT_VARIABLE, 8) && - VerifyOffset(verifier, VT_ISLASTCHANGEDDATE) && - verifier.VerifyVector(isLastChangedDate()) && - VerifyOffset(verifier, VT_ISLASTCHANGEDAUTHORID) && - verifier.VerifyString(isLastChangedAuthorId()) && - VerifyOffset(verifier, VT_COMPAREVALUE) && - verifier.VerifyVector(compareValue()) && - verifier.EndTable(); - } -}; - -struct TusTryAndSetVariableRequestBuilder { - typedef TusTryAndSetVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusTryAndSetVariableRequest::VT_USER, user); - } - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusTryAndSetVariableRequest::VT_SLOTID, slotId, 0); - } - void add_opeType(int32_t opeType) { - fbb_.AddElement(TusTryAndSetVariableRequest::VT_OPETYPE, opeType, 0); - } - void add_variable(int64_t variable) { - fbb_.AddElement(TusTryAndSetVariableRequest::VT_VARIABLE, variable, 0); - } - void add_isLastChangedDate(::flatbuffers::Offset<::flatbuffers::Vector> isLastChangedDate) { - fbb_.AddOffset(TusTryAndSetVariableRequest::VT_ISLASTCHANGEDDATE, isLastChangedDate); - } - void add_isLastChangedAuthorId(::flatbuffers::Offset<::flatbuffers::String> isLastChangedAuthorId) { - fbb_.AddOffset(TusTryAndSetVariableRequest::VT_ISLASTCHANGEDAUTHORID, isLastChangedAuthorId); - } - void add_compareValue(::flatbuffers::Offset<::flatbuffers::Vector> compareValue) { - fbb_.AddOffset(TusTryAndSetVariableRequest::VT_COMPAREVALUE, compareValue); - } - explicit TusTryAndSetVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusTryAndSetVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0, - int32_t opeType = 0, - int64_t variable = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> isLastChangedDate = 0, - ::flatbuffers::Offset<::flatbuffers::String> isLastChangedAuthorId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> compareValue = 0) { - TusTryAndSetVariableRequestBuilder builder_(_fbb); - builder_.add_variable(variable); - builder_.add_compareValue(compareValue); - builder_.add_isLastChangedAuthorId(isLastChangedAuthorId); - builder_.add_isLastChangedDate(isLastChangedDate); - builder_.add_opeType(opeType); - builder_.add_slotId(slotId); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusTryAndSetVariableRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0, - int32_t opeType = 0, - int64_t variable = 0, - const std::vector *isLastChangedDate = nullptr, - const char *isLastChangedAuthorId = nullptr, - const std::vector *compareValue = nullptr) { - auto isLastChangedDate__ = isLastChangedDate ? _fbb.CreateVector(*isLastChangedDate) : 0; - auto isLastChangedAuthorId__ = isLastChangedAuthorId ? _fbb.CreateString(isLastChangedAuthorId) : 0; - auto compareValue__ = compareValue ? _fbb.CreateVector(*compareValue) : 0; - return CreateTusTryAndSetVariableRequest( - _fbb, - user, - slotId, - opeType, - variable, - isLastChangedDate__, - isLastChangedAuthorId__, - compareValue__); -} - -struct TusDeleteMultiSlotVariableRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusDeleteMultiSlotVariableRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTIDARRAY = 6 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - const ::flatbuffers::Vector *slotIdArray() const { - return GetPointer *>(VT_SLOTIDARRAY); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyOffset(verifier, VT_SLOTIDARRAY) && - verifier.VerifyVector(slotIdArray()) && - verifier.EndTable(); - } -}; - -struct TusDeleteMultiSlotVariableRequestBuilder { - typedef TusDeleteMultiSlotVariableRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusDeleteMultiSlotVariableRequest::VT_USER, user); - } - void add_slotIdArray(::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray) { - fbb_.AddOffset(TusDeleteMultiSlotVariableRequest::VT_SLOTIDARRAY, slotIdArray); - } - explicit TusDeleteMultiSlotVariableRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusDeleteMultiSlotVariableRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray = 0) { - TusDeleteMultiSlotVariableRequestBuilder builder_(_fbb); - builder_.add_slotIdArray(slotIdArray); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusDeleteMultiSlotVariableRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - const std::vector *slotIdArray = nullptr) { - auto slotIdArray__ = slotIdArray ? _fbb.CreateVector(*slotIdArray) : 0; - return CreateTusDeleteMultiSlotVariableRequest( - _fbb, - user, - slotIdArray__); -} - -struct TusSetDataRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusSetDataRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTID = 6, - VT_DATA = 8, - VT_INFO = 10, - VT_ISLASTCHANGEDDATE = 12, - VT_ISLASTCHANGEDAUTHORID = 14 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - const ::flatbuffers::Vector *info() const { - return GetPointer *>(VT_INFO); - } - const ::flatbuffers::Vector *isLastChangedDate() const { - return GetPointer *>(VT_ISLASTCHANGEDDATE); - } - const ::flatbuffers::String *isLastChangedAuthorId() const { - return GetPointer(VT_ISLASTCHANGEDAUTHORID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyField(verifier, VT_SLOTID, 4) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - VerifyOffset(verifier, VT_INFO) && - verifier.VerifyVector(info()) && - VerifyOffset(verifier, VT_ISLASTCHANGEDDATE) && - verifier.VerifyVector(isLastChangedDate()) && - VerifyOffset(verifier, VT_ISLASTCHANGEDAUTHORID) && - verifier.VerifyString(isLastChangedAuthorId()) && - verifier.EndTable(); - } -}; - -struct TusSetDataRequestBuilder { - typedef TusSetDataRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusSetDataRequest::VT_USER, user); - } - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusSetDataRequest::VT_SLOTID, slotId, 0); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(TusSetDataRequest::VT_DATA, data); - } - void add_info(::flatbuffers::Offset<::flatbuffers::Vector> info) { - fbb_.AddOffset(TusSetDataRequest::VT_INFO, info); - } - void add_isLastChangedDate(::flatbuffers::Offset<::flatbuffers::Vector> isLastChangedDate) { - fbb_.AddOffset(TusSetDataRequest::VT_ISLASTCHANGEDDATE, isLastChangedDate); - } - void add_isLastChangedAuthorId(::flatbuffers::Offset<::flatbuffers::String> isLastChangedAuthorId) { - fbb_.AddOffset(TusSetDataRequest::VT_ISLASTCHANGEDAUTHORID, isLastChangedAuthorId); - } - explicit TusSetDataRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusSetDataRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> info = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> isLastChangedDate = 0, - ::flatbuffers::Offset<::flatbuffers::String> isLastChangedAuthorId = 0) { - TusSetDataRequestBuilder builder_(_fbb); - builder_.add_isLastChangedAuthorId(isLastChangedAuthorId); - builder_.add_isLastChangedDate(isLastChangedDate); - builder_.add_info(info); - builder_.add_data(data); - builder_.add_slotId(slotId); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusSetDataRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0, - const std::vector *data = nullptr, - const std::vector *info = nullptr, - const std::vector *isLastChangedDate = nullptr, - const char *isLastChangedAuthorId = nullptr) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - auto info__ = info ? _fbb.CreateVector(*info) : 0; - auto isLastChangedDate__ = isLastChangedDate ? _fbb.CreateVector(*isLastChangedDate) : 0; - auto isLastChangedAuthorId__ = isLastChangedAuthorId ? _fbb.CreateString(isLastChangedAuthorId) : 0; - return CreateTusSetDataRequest( - _fbb, - user, - slotId, - data__, - info__, - isLastChangedDate__, - isLastChangedAuthorId__); -} - -struct TusDataStatus FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusDataStatusBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OWNERID = 4, - VT_HASDATA = 6, - VT_LASTCHANGEDDATE = 8, - VT_LASTCHANGEDAUTHORID = 10, - VT_INFO = 12 - }; - const ::flatbuffers::String *ownerId() const { - return GetPointer(VT_OWNERID); - } - bool hasData() const { - return GetField(VT_HASDATA, 0) != 0; - } - uint64_t lastChangedDate() const { - return GetField(VT_LASTCHANGEDDATE, 0); - } - const ::flatbuffers::String *lastChangedAuthorId() const { - return GetPointer(VT_LASTCHANGEDAUTHORID); - } - const ::flatbuffers::Vector *info() const { - return GetPointer *>(VT_INFO); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_OWNERID) && - verifier.VerifyString(ownerId()) && - VerifyField(verifier, VT_HASDATA, 1) && - VerifyField(verifier, VT_LASTCHANGEDDATE, 8) && - VerifyOffset(verifier, VT_LASTCHANGEDAUTHORID) && - verifier.VerifyString(lastChangedAuthorId()) && - VerifyOffset(verifier, VT_INFO) && - verifier.VerifyVector(info()) && - verifier.EndTable(); - } -}; - -struct TusDataStatusBuilder { - typedef TusDataStatus Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_ownerId(::flatbuffers::Offset<::flatbuffers::String> ownerId) { - fbb_.AddOffset(TusDataStatus::VT_OWNERID, ownerId); - } - void add_hasData(bool hasData) { - fbb_.AddElement(TusDataStatus::VT_HASDATA, static_cast(hasData), 0); - } - void add_lastChangedDate(uint64_t lastChangedDate) { - fbb_.AddElement(TusDataStatus::VT_LASTCHANGEDDATE, lastChangedDate, 0); - } - void add_lastChangedAuthorId(::flatbuffers::Offset<::flatbuffers::String> lastChangedAuthorId) { - fbb_.AddOffset(TusDataStatus::VT_LASTCHANGEDAUTHORID, lastChangedAuthorId); - } - void add_info(::flatbuffers::Offset<::flatbuffers::Vector> info) { - fbb_.AddOffset(TusDataStatus::VT_INFO, info); - } - explicit TusDataStatusBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusDataStatus( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> ownerId = 0, - bool hasData = false, - uint64_t lastChangedDate = 0, - ::flatbuffers::Offset<::flatbuffers::String> lastChangedAuthorId = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> info = 0) { - TusDataStatusBuilder builder_(_fbb); - builder_.add_lastChangedDate(lastChangedDate); - builder_.add_info(info); - builder_.add_lastChangedAuthorId(lastChangedAuthorId); - builder_.add_ownerId(ownerId); - builder_.add_hasData(hasData); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusDataStatusDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *ownerId = nullptr, - bool hasData = false, - uint64_t lastChangedDate = 0, - const char *lastChangedAuthorId = nullptr, - const std::vector *info = nullptr) { - auto ownerId__ = ownerId ? _fbb.CreateString(ownerId) : 0; - auto lastChangedAuthorId__ = lastChangedAuthorId ? _fbb.CreateString(lastChangedAuthorId) : 0; - auto info__ = info ? _fbb.CreateVector(*info) : 0; - return CreateTusDataStatus( - _fbb, - ownerId__, - hasData, - lastChangedDate, - lastChangedAuthorId__, - info__); -} - -struct TusData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusDataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STATUS = 4, - VT_DATA = 6 - }; - const TusDataStatus *status() const { - return GetPointer(VT_STATUS); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_STATUS) && - verifier.VerifyTable(status()) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct TusDataBuilder { - typedef TusData Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_status(::flatbuffers::Offset status) { - fbb_.AddOffset(TusData::VT_STATUS, status); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(TusData::VT_DATA, data); - } - explicit TusDataBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusData( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset status = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - TusDataBuilder builder_(_fbb); - builder_.add_data(data); - builder_.add_status(status); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusDataDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset status = 0, - const std::vector *data = nullptr) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateTusData( - _fbb, - status, - data__); -} - -struct TusDataStatusResponse FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusDataStatusResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STATUS = 4 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *status() const { - return GetPointer> *>(VT_STATUS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_STATUS) && - verifier.VerifyVector(status()) && - verifier.VerifyVectorOfTables(status()) && - verifier.EndTable(); - } -}; - -struct TusDataStatusResponseBuilder { - typedef TusDataStatusResponse Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_status(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> status) { - fbb_.AddOffset(TusDataStatusResponse::VT_STATUS, status); - } - explicit TusDataStatusResponseBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusDataStatusResponse( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> status = 0) { - TusDataStatusResponseBuilder builder_(_fbb); - builder_.add_status(status); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusDataStatusResponseDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *status = nullptr) { - auto status__ = status ? _fbb.CreateVector<::flatbuffers::Offset>(*status) : 0; - return CreateTusDataStatusResponse( - _fbb, - status__); -} - -struct TusGetDataRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetDataRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTID = 6 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyField(verifier, VT_SLOTID, 4) && - verifier.EndTable(); - } -}; - -struct TusGetDataRequestBuilder { - typedef TusGetDataRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusGetDataRequest::VT_USER, user); - } - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusGetDataRequest::VT_SLOTID, slotId, 0); - } - explicit TusGetDataRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetDataRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - int32_t slotId = 0) { - TusGetDataRequestBuilder builder_(_fbb); - builder_.add_slotId(slotId); - builder_.add_user(user); - return builder_.Finish(); -} - -struct TusGetMultiSlotDataStatusRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetMultiSlotDataStatusRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTIDARRAY = 6 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - const ::flatbuffers::Vector *slotIdArray() const { - return GetPointer *>(VT_SLOTIDARRAY); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyOffset(verifier, VT_SLOTIDARRAY) && - verifier.VerifyVector(slotIdArray()) && - verifier.EndTable(); - } -}; - -struct TusGetMultiSlotDataStatusRequestBuilder { - typedef TusGetMultiSlotDataStatusRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusGetMultiSlotDataStatusRequest::VT_USER, user); - } - void add_slotIdArray(::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray) { - fbb_.AddOffset(TusGetMultiSlotDataStatusRequest::VT_SLOTIDARRAY, slotIdArray); - } - explicit TusGetMultiSlotDataStatusRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetMultiSlotDataStatusRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray = 0) { - TusGetMultiSlotDataStatusRequestBuilder builder_(_fbb); - builder_.add_slotIdArray(slotIdArray); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusGetMultiSlotDataStatusRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - const std::vector *slotIdArray = nullptr) { - auto slotIdArray__ = slotIdArray ? _fbb.CreateVector(*slotIdArray) : 0; - return CreateTusGetMultiSlotDataStatusRequest( - _fbb, - user, - slotIdArray__); -} - -struct TusGetMultiUserDataStatusRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetMultiUserDataStatusRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USERS = 4, - VT_SLOTID = 6 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *users() const { - return GetPointer> *>(VT_USERS); - } - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USERS) && - verifier.VerifyVector(users()) && - verifier.VerifyVectorOfTables(users()) && - VerifyField(verifier, VT_SLOTID, 4) && - verifier.EndTable(); - } -}; - -struct TusGetMultiUserDataStatusRequestBuilder { - typedef TusGetMultiUserDataStatusRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_users(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> users) { - fbb_.AddOffset(TusGetMultiUserDataStatusRequest::VT_USERS, users); - } - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusGetMultiUserDataStatusRequest::VT_SLOTID, slotId, 0); - } - explicit TusGetMultiUserDataStatusRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetMultiUserDataStatusRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> users = 0, - int32_t slotId = 0) { - TusGetMultiUserDataStatusRequestBuilder builder_(_fbb); - builder_.add_slotId(slotId); - builder_.add_users(users); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusGetMultiUserDataStatusRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *users = nullptr, - int32_t slotId = 0) { - auto users__ = users ? _fbb.CreateVector<::flatbuffers::Offset>(*users) : 0; - return CreateTusGetMultiUserDataStatusRequest( - _fbb, - users__, - slotId); -} - -struct TusGetFriendsDataStatusRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusGetFriendsDataStatusRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SLOTID = 4, - VT_INCLUDESELF = 6, - VT_SORTTYPE = 8, - VT_ARRAYNUM = 10 - }; - int32_t slotId() const { - return GetField(VT_SLOTID, 0); - } - bool includeSelf() const { - return GetField(VT_INCLUDESELF, 0) != 0; - } - int32_t sortType() const { - return GetField(VT_SORTTYPE, 0); - } - uint32_t arrayNum() const { - return GetField(VT_ARRAYNUM, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_SLOTID, 4) && - VerifyField(verifier, VT_INCLUDESELF, 1) && - VerifyField(verifier, VT_SORTTYPE, 4) && - VerifyField(verifier, VT_ARRAYNUM, 4) && - verifier.EndTable(); - } -}; - -struct TusGetFriendsDataStatusRequestBuilder { - typedef TusGetFriendsDataStatusRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_slotId(int32_t slotId) { - fbb_.AddElement(TusGetFriendsDataStatusRequest::VT_SLOTID, slotId, 0); - } - void add_includeSelf(bool includeSelf) { - fbb_.AddElement(TusGetFriendsDataStatusRequest::VT_INCLUDESELF, static_cast(includeSelf), 0); - } - void add_sortType(int32_t sortType) { - fbb_.AddElement(TusGetFriendsDataStatusRequest::VT_SORTTYPE, sortType, 0); - } - void add_arrayNum(uint32_t arrayNum) { - fbb_.AddElement(TusGetFriendsDataStatusRequest::VT_ARRAYNUM, arrayNum, 0); - } - explicit TusGetFriendsDataStatusRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusGetFriendsDataStatusRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - int32_t slotId = 0, - bool includeSelf = false, - int32_t sortType = 0, - uint32_t arrayNum = 0) { - TusGetFriendsDataStatusRequestBuilder builder_(_fbb); - builder_.add_arrayNum(arrayNum); - builder_.add_sortType(sortType); - builder_.add_slotId(slotId); - builder_.add_includeSelf(includeSelf); - return builder_.Finish(); -} - -struct TusDeleteMultiSlotDataRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef TusDeleteMultiSlotDataRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_USER = 4, - VT_SLOTIDARRAY = 6 - }; - const TusUser *user() const { - return GetPointer(VT_USER); - } - const ::flatbuffers::Vector *slotIdArray() const { - return GetPointer *>(VT_SLOTIDARRAY); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_USER) && - verifier.VerifyTable(user()) && - VerifyOffset(verifier, VT_SLOTIDARRAY) && - verifier.VerifyVector(slotIdArray()) && - verifier.EndTable(); - } -}; - -struct TusDeleteMultiSlotDataRequestBuilder { - typedef TusDeleteMultiSlotDataRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_user(::flatbuffers::Offset user) { - fbb_.AddOffset(TusDeleteMultiSlotDataRequest::VT_USER, user); - } - void add_slotIdArray(::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray) { - fbb_.AddOffset(TusDeleteMultiSlotDataRequest::VT_SLOTIDARRAY, slotIdArray); - } - explicit TusDeleteMultiSlotDataRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateTusDeleteMultiSlotDataRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> slotIdArray = 0) { - TusDeleteMultiSlotDataRequestBuilder builder_(_fbb); - builder_.add_slotIdArray(slotIdArray); - builder_.add_user(user); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateTusDeleteMultiSlotDataRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset user = 0, - const std::vector *slotIdArray = nullptr) { - auto slotIdArray__ = slotIdArray ? _fbb.CreateVector(*slotIdArray) : 0; - return CreateTusDeleteMultiSlotDataRequest( - _fbb, - user, - slotIdArray__); -} - -struct SetPresenceRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SetPresenceRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TITLE = 4, - VT_STATUS = 6, - VT_COMMENT = 8, - VT_DATA = 10 - }; - const ::flatbuffers::String *title() const { - return GetPointer(VT_TITLE); - } - const ::flatbuffers::String *status() const { - return GetPointer(VT_STATUS); - } - const ::flatbuffers::String *comment() const { - return GetPointer(VT_COMMENT); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TITLE) && - verifier.VerifyString(title()) && - VerifyOffset(verifier, VT_STATUS) && - verifier.VerifyString(status()) && - VerifyOffset(verifier, VT_COMMENT) && - verifier.VerifyString(comment()) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct SetPresenceRequestBuilder { - typedef SetPresenceRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_title(::flatbuffers::Offset<::flatbuffers::String> title) { - fbb_.AddOffset(SetPresenceRequest::VT_TITLE, title); - } - void add_status(::flatbuffers::Offset<::flatbuffers::String> status) { - fbb_.AddOffset(SetPresenceRequest::VT_STATUS, status); - } - void add_comment(::flatbuffers::Offset<::flatbuffers::String> comment) { - fbb_.AddOffset(SetPresenceRequest::VT_COMMENT, comment); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(SetPresenceRequest::VT_DATA, data); - } - explicit SetPresenceRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSetPresenceRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::String> title = 0, - ::flatbuffers::Offset<::flatbuffers::String> status = 0, - ::flatbuffers::Offset<::flatbuffers::String> comment = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - SetPresenceRequestBuilder builder_(_fbb); - builder_.add_data(data); - builder_.add_comment(comment); - builder_.add_status(status); - builder_.add_title(title); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSetPresenceRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const char *title = nullptr, - const char *status = nullptr, - const char *comment = nullptr, - const std::vector *data = nullptr) { - auto title__ = title ? _fbb.CreateString(title) : 0; - auto status__ = status ? _fbb.CreateString(status) : 0; - auto comment__ = comment ? _fbb.CreateString(comment) : 0; - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateSetPresenceRequest( - _fbb, - title__, - status__, - comment__, - data__); -} - -struct MatchingSearchCondition FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingSearchConditionBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ATTR_TYPE = 4, - VT_ATTR_ID = 6, - VT_COMP_OP = 8, - VT_COMP_VALUE = 10 - }; - uint32_t attr_type() const { - return GetField(VT_ATTR_TYPE, 0); - } - uint32_t attr_id() const { - return GetField(VT_ATTR_ID, 0); - } - uint32_t comp_op() const { - return GetField(VT_COMP_OP, 0); - } - uint32_t comp_value() const { - return GetField(VT_COMP_VALUE, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ATTR_TYPE, 4) && - VerifyField(verifier, VT_ATTR_ID, 4) && - VerifyField(verifier, VT_COMP_OP, 4) && - VerifyField(verifier, VT_COMP_VALUE, 4) && - verifier.EndTable(); - } -}; - -struct MatchingSearchConditionBuilder { - typedef MatchingSearchCondition Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_attr_type(uint32_t attr_type) { - fbb_.AddElement(MatchingSearchCondition::VT_ATTR_TYPE, attr_type, 0); - } - void add_attr_id(uint32_t attr_id) { - fbb_.AddElement(MatchingSearchCondition::VT_ATTR_ID, attr_id, 0); - } - void add_comp_op(uint32_t comp_op) { - fbb_.AddElement(MatchingSearchCondition::VT_COMP_OP, comp_op, 0); - } - void add_comp_value(uint32_t comp_value) { - fbb_.AddElement(MatchingSearchCondition::VT_COMP_VALUE, comp_value, 0); - } - explicit MatchingSearchConditionBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingSearchCondition( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t attr_type = 0, - uint32_t attr_id = 0, - uint32_t comp_op = 0, - uint32_t comp_value = 0) { - MatchingSearchConditionBuilder builder_(_fbb); - builder_.add_comp_value(comp_value); - builder_.add_comp_op(comp_op); - builder_.add_attr_id(attr_id); - builder_.add_attr_type(attr_type); - return builder_.Finish(); -} - -struct MatchingAttr FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingAttrBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ATTR_TYPE = 4, - VT_ATTR_ID = 6, - VT_NUM = 8, - VT_DATA = 10 - }; - uint32_t attr_type() const { - return GetField(VT_ATTR_TYPE, 0); - } - uint32_t attr_id() const { - return GetField(VT_ATTR_ID, 0); - } - uint32_t num() const { - return GetField(VT_NUM, 0); - } - const ::flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ATTR_TYPE, 4) && - VerifyField(verifier, VT_ATTR_ID, 4) && - VerifyField(verifier, VT_NUM, 4) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct MatchingAttrBuilder { - typedef MatchingAttr Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_attr_type(uint32_t attr_type) { - fbb_.AddElement(MatchingAttr::VT_ATTR_TYPE, attr_type, 0); - } - void add_attr_id(uint32_t attr_id) { - fbb_.AddElement(MatchingAttr::VT_ATTR_ID, attr_id, 0); - } - void add_num(uint32_t num) { - fbb_.AddElement(MatchingAttr::VT_NUM, num, 0); - } - void add_data(::flatbuffers::Offset<::flatbuffers::Vector> data) { - fbb_.AddOffset(MatchingAttr::VT_DATA, data); - } - explicit MatchingAttrBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingAttr( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t attr_type = 0, - uint32_t attr_id = 0, - uint32_t num = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> data = 0) { - MatchingAttrBuilder builder_(_fbb); - builder_.add_data(data); - builder_.add_num(num); - builder_.add_attr_id(attr_id); - builder_.add_attr_type(attr_type); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingAttrDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t attr_type = 0, - uint32_t attr_id = 0, - uint32_t num = 0, - const std::vector *data = nullptr) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return CreateMatchingAttr( - _fbb, - attr_type, - attr_id, - num, - data__); -} - -struct CreateRoomGUIRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef CreateRoomGUIRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TOTAL_SLOTS = 4, - VT_PRIVATE_SLOTS = 6, - VT_PRIVILEGE_GRANT = 8, - VT_STEALTH = 10, - VT_GAME_ATTRS = 12 - }; - uint32_t total_slots() const { - return GetField(VT_TOTAL_SLOTS, 0); - } - uint32_t private_slots() const { - return GetField(VT_PRIVATE_SLOTS, 0); - } - bool privilege_grant() const { - return GetField(VT_PRIVILEGE_GRANT, 0) != 0; - } - bool stealth() const { - return GetField(VT_STEALTH, 0) != 0; - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *game_attrs() const { - return GetPointer> *>(VT_GAME_ATTRS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TOTAL_SLOTS, 4) && - VerifyField(verifier, VT_PRIVATE_SLOTS, 4) && - VerifyField(verifier, VT_PRIVILEGE_GRANT, 1) && - VerifyField(verifier, VT_STEALTH, 1) && - VerifyOffset(verifier, VT_GAME_ATTRS) && - verifier.VerifyVector(game_attrs()) && - verifier.VerifyVectorOfTables(game_attrs()) && - verifier.EndTable(); - } -}; - -struct CreateRoomGUIRequestBuilder { - typedef CreateRoomGUIRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_total_slots(uint32_t total_slots) { - fbb_.AddElement(CreateRoomGUIRequest::VT_TOTAL_SLOTS, total_slots, 0); - } - void add_private_slots(uint32_t private_slots) { - fbb_.AddElement(CreateRoomGUIRequest::VT_PRIVATE_SLOTS, private_slots, 0); - } - void add_privilege_grant(bool privilege_grant) { - fbb_.AddElement(CreateRoomGUIRequest::VT_PRIVILEGE_GRANT, static_cast(privilege_grant), 0); - } - void add_stealth(bool stealth) { - fbb_.AddElement(CreateRoomGUIRequest::VT_STEALTH, static_cast(stealth), 0); - } - void add_game_attrs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> game_attrs) { - fbb_.AddOffset(CreateRoomGUIRequest::VT_GAME_ATTRS, game_attrs); - } - explicit CreateRoomGUIRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateCreateRoomGUIRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t total_slots = 0, - uint32_t private_slots = 0, - bool privilege_grant = false, - bool stealth = false, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> game_attrs = 0) { - CreateRoomGUIRequestBuilder builder_(_fbb); - builder_.add_game_attrs(game_attrs); - builder_.add_private_slots(private_slots); - builder_.add_total_slots(total_slots); - builder_.add_stealth(stealth); - builder_.add_privilege_grant(privilege_grant); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateCreateRoomGUIRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t total_slots = 0, - uint32_t private_slots = 0, - bool privilege_grant = false, - bool stealth = false, - const std::vector<::flatbuffers::Offset> *game_attrs = nullptr) { - auto game_attrs__ = game_attrs ? _fbb.CreateVector<::flatbuffers::Offset>(*game_attrs) : 0; - return CreateCreateRoomGUIRequest( - _fbb, - total_slots, - private_slots, - privilege_grant, - stealth, - game_attrs__); -} - -struct GUIUserInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GUIUserInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_INFO = 4, - VT_OWNER = 6 - }; - const UserInfo *info() const { - return GetPointer(VT_INFO); - } - bool owner() const { - return GetField(VT_OWNER, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_INFO) && - verifier.VerifyTable(info()) && - VerifyField(verifier, VT_OWNER, 1) && - verifier.EndTable(); - } -}; - -struct GUIUserInfoBuilder { - typedef GUIUserInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_info(::flatbuffers::Offset info) { - fbb_.AddOffset(GUIUserInfo::VT_INFO, info); - } - void add_owner(bool owner) { - fbb_.AddElement(GUIUserInfo::VT_OWNER, static_cast(owner), 0); - } - explicit GUIUserInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGUIUserInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset info = 0, - bool owner = false) { - GUIUserInfoBuilder builder_(_fbb); - builder_.add_info(info); - builder_.add_owner(owner); - return builder_.Finish(); -} - -struct MatchingRoomStatus FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingRoomStatusBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4, - VT_MEMBERS = 6, - VT_KICK_ACTOR = 8, - VT_OPT = 10 - }; - const ::flatbuffers::Vector *id() const { - return GetPointer *>(VT_ID); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *members() const { - return GetPointer> *>(VT_MEMBERS); - } - const ::flatbuffers::String *kick_actor() const { - return GetPointer(VT_KICK_ACTOR); - } - const ::flatbuffers::Vector *opt() const { - return GetPointer *>(VT_OPT); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ID) && - verifier.VerifyVector(id()) && - VerifyOffset(verifier, VT_MEMBERS) && - verifier.VerifyVector(members()) && - verifier.VerifyVectorOfTables(members()) && - VerifyOffset(verifier, VT_KICK_ACTOR) && - verifier.VerifyString(kick_actor()) && - VerifyOffset(verifier, VT_OPT) && - verifier.VerifyVector(opt()) && - verifier.EndTable(); - } -}; - -struct MatchingRoomStatusBuilder { - typedef MatchingRoomStatus Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_id(::flatbuffers::Offset<::flatbuffers::Vector> id) { - fbb_.AddOffset(MatchingRoomStatus::VT_ID, id); - } - void add_members(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> members) { - fbb_.AddOffset(MatchingRoomStatus::VT_MEMBERS, members); - } - void add_kick_actor(::flatbuffers::Offset<::flatbuffers::String> kick_actor) { - fbb_.AddOffset(MatchingRoomStatus::VT_KICK_ACTOR, kick_actor); - } - void add_opt(::flatbuffers::Offset<::flatbuffers::Vector> opt) { - fbb_.AddOffset(MatchingRoomStatus::VT_OPT, opt); - } - explicit MatchingRoomStatusBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingRoomStatus( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> id = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> members = 0, - ::flatbuffers::Offset<::flatbuffers::String> kick_actor = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> opt = 0) { - MatchingRoomStatusBuilder builder_(_fbb); - builder_.add_opt(opt); - builder_.add_kick_actor(kick_actor); - builder_.add_members(members); - builder_.add_id(id); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingRoomStatusDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *id = nullptr, - const std::vector<::flatbuffers::Offset> *members = nullptr, - const char *kick_actor = nullptr, - const std::vector *opt = nullptr) { - auto id__ = id ? _fbb.CreateVector(*id) : 0; - auto members__ = members ? _fbb.CreateVector<::flatbuffers::Offset>(*members) : 0; - auto kick_actor__ = kick_actor ? _fbb.CreateString(kick_actor) : 0; - auto opt__ = opt ? _fbb.CreateVector(*opt) : 0; - return CreateMatchingRoomStatus( - _fbb, - id__, - members__, - kick_actor__, - opt__); -} - -struct GetRoomListGUIRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef GetRoomListGUIRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RANGE_START = 4, - VT_RANGE_MAX = 6, - VT_CONDS = 8, - VT_ATTRS = 10 - }; - uint32_t range_start() const { - return GetField(VT_RANGE_START, 0); - } - uint32_t range_max() const { - return GetField(VT_RANGE_MAX, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *conds() const { - return GetPointer> *>(VT_CONDS); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *attrs() const { - return GetPointer> *>(VT_ATTRS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_RANGE_START, 4) && - VerifyField(verifier, VT_RANGE_MAX, 4) && - VerifyOffset(verifier, VT_CONDS) && - verifier.VerifyVector(conds()) && - verifier.VerifyVectorOfTables(conds()) && - VerifyOffset(verifier, VT_ATTRS) && - verifier.VerifyVector(attrs()) && - verifier.VerifyVectorOfTables(attrs()) && - verifier.EndTable(); - } -}; - -struct GetRoomListGUIRequestBuilder { - typedef GetRoomListGUIRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_range_start(uint32_t range_start) { - fbb_.AddElement(GetRoomListGUIRequest::VT_RANGE_START, range_start, 0); - } - void add_range_max(uint32_t range_max) { - fbb_.AddElement(GetRoomListGUIRequest::VT_RANGE_MAX, range_max, 0); - } - void add_conds(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> conds) { - fbb_.AddOffset(GetRoomListGUIRequest::VT_CONDS, conds); - } - void add_attrs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attrs) { - fbb_.AddOffset(GetRoomListGUIRequest::VT_ATTRS, attrs); - } - explicit GetRoomListGUIRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateGetRoomListGUIRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t range_start = 0, - uint32_t range_max = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> conds = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attrs = 0) { - GetRoomListGUIRequestBuilder builder_(_fbb); - builder_.add_attrs(attrs); - builder_.add_conds(conds); - builder_.add_range_max(range_max); - builder_.add_range_start(range_start); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateGetRoomListGUIRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t range_start = 0, - uint32_t range_max = 0, - const std::vector<::flatbuffers::Offset> *conds = nullptr, - const std::vector<::flatbuffers::Offset> *attrs = nullptr) { - auto conds__ = conds ? _fbb.CreateVector<::flatbuffers::Offset>(*conds) : 0; - auto attrs__ = attrs ? _fbb.CreateVector<::flatbuffers::Offset>(*attrs) : 0; - return CreateGetRoomListGUIRequest( - _fbb, - range_start, - range_max, - conds__, - attrs__); -} - -struct MatchingRoom FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingRoomBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4, - VT_ATTR = 6 - }; - const ::flatbuffers::Vector *id() const { - return GetPointer *>(VT_ID); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *attr() const { - return GetPointer> *>(VT_ATTR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ID) && - verifier.VerifyVector(id()) && - VerifyOffset(verifier, VT_ATTR) && - verifier.VerifyVector(attr()) && - verifier.VerifyVectorOfTables(attr()) && - verifier.EndTable(); - } -}; - -struct MatchingRoomBuilder { - typedef MatchingRoom Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_id(::flatbuffers::Offset<::flatbuffers::Vector> id) { - fbb_.AddOffset(MatchingRoom::VT_ID, id); - } - void add_attr(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attr) { - fbb_.AddOffset(MatchingRoom::VT_ATTR, attr); - } - explicit MatchingRoomBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingRoom( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> id = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attr = 0) { - MatchingRoomBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_id(id); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingRoomDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *id = nullptr, - const std::vector<::flatbuffers::Offset> *attr = nullptr) { - auto id__ = id ? _fbb.CreateVector(*id) : 0; - auto attr__ = attr ? _fbb.CreateVector<::flatbuffers::Offset>(*attr) : 0; - return CreateMatchingRoom( - _fbb, - id__, - attr__); -} - -struct MatchingRoomList FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingRoomListBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_START = 4, - VT_TOTAL = 6, - VT_ROOMS = 8 - }; - uint32_t start() const { - return GetField(VT_START, 0); - } - uint32_t total() const { - return GetField(VT_TOTAL, 0); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *rooms() const { - return GetPointer> *>(VT_ROOMS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_START, 4) && - VerifyField(verifier, VT_TOTAL, 4) && - VerifyOffset(verifier, VT_ROOMS) && - verifier.VerifyVector(rooms()) && - verifier.VerifyVectorOfTables(rooms()) && - verifier.EndTable(); - } -}; - -struct MatchingRoomListBuilder { - typedef MatchingRoomList Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_start(uint32_t start) { - fbb_.AddElement(MatchingRoomList::VT_START, start, 0); - } - void add_total(uint32_t total) { - fbb_.AddElement(MatchingRoomList::VT_TOTAL, total, 0); - } - void add_rooms(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rooms) { - fbb_.AddOffset(MatchingRoomList::VT_ROOMS, rooms); - } - explicit MatchingRoomListBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingRoomList( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t start = 0, - uint32_t total = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rooms = 0) { - MatchingRoomListBuilder builder_(_fbb); - builder_.add_rooms(rooms); - builder_.add_total(total); - builder_.add_start(start); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingRoomListDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - uint32_t start = 0, - uint32_t total = 0, - const std::vector<::flatbuffers::Offset> *rooms = nullptr) { - auto rooms__ = rooms ? _fbb.CreateVector<::flatbuffers::Offset>(*rooms) : 0; - return CreateMatchingRoomList( - _fbb, - start, - total, - rooms__); -} - -struct MatchingGuiRoomId FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingGuiRoomIdBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4 - }; - const ::flatbuffers::Vector *id() const { - return GetPointer *>(VT_ID); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ID) && - verifier.VerifyVector(id()) && - verifier.EndTable(); - } -}; - -struct MatchingGuiRoomIdBuilder { - typedef MatchingGuiRoomId Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_id(::flatbuffers::Offset<::flatbuffers::Vector> id) { - fbb_.AddOffset(MatchingGuiRoomId::VT_ID, id); - } - explicit MatchingGuiRoomIdBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingGuiRoomId( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> id = 0) { - MatchingGuiRoomIdBuilder builder_(_fbb); - builder_.add_id(id); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingGuiRoomIdDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *id = nullptr) { - auto id__ = id ? _fbb.CreateVector(*id) : 0; - return CreateMatchingGuiRoomId( - _fbb, - id__); -} - -struct SetRoomSearchFlagGUI FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SetRoomSearchFlagGUIBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOMID = 4, - VT_STEALTH = 6 - }; - const ::flatbuffers::Vector *roomid() const { - return GetPointer *>(VT_ROOMID); - } - bool stealth() const { - return GetField(VT_STEALTH, 0) != 0; - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ROOMID) && - verifier.VerifyVector(roomid()) && - VerifyField(verifier, VT_STEALTH, 1) && - verifier.EndTable(); - } -}; - -struct SetRoomSearchFlagGUIBuilder { - typedef SetRoomSearchFlagGUI Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_roomid(::flatbuffers::Offset<::flatbuffers::Vector> roomid) { - fbb_.AddOffset(SetRoomSearchFlagGUI::VT_ROOMID, roomid); - } - void add_stealth(bool stealth) { - fbb_.AddElement(SetRoomSearchFlagGUI::VT_STEALTH, static_cast(stealth), 0); - } - explicit SetRoomSearchFlagGUIBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSetRoomSearchFlagGUI( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector> roomid = 0, - bool stealth = false) { - SetRoomSearchFlagGUIBuilder builder_(_fbb); - builder_.add_roomid(roomid); - builder_.add_stealth(stealth); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSetRoomSearchFlagGUIDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *roomid = nullptr, - bool stealth = false) { - auto roomid__ = roomid ? _fbb.CreateVector(*roomid) : 0; - return CreateSetRoomSearchFlagGUI( - _fbb, - roomid__, - stealth); -} - -struct QuickMatchGUIRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef QuickMatchGUIRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CONDS = 4, - VT_AVAILABLE_NUM = 6 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *conds() const { - return GetPointer> *>(VT_CONDS); - } - uint32_t available_num() const { - return GetField(VT_AVAILABLE_NUM, 0); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_CONDS) && - verifier.VerifyVector(conds()) && - verifier.VerifyVectorOfTables(conds()) && - VerifyField(verifier, VT_AVAILABLE_NUM, 4) && - verifier.EndTable(); - } -}; - -struct QuickMatchGUIRequestBuilder { - typedef QuickMatchGUIRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_conds(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> conds) { - fbb_.AddOffset(QuickMatchGUIRequest::VT_CONDS, conds); - } - void add_available_num(uint32_t available_num) { - fbb_.AddElement(QuickMatchGUIRequest::VT_AVAILABLE_NUM, available_num, 0); - } - explicit QuickMatchGUIRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateQuickMatchGUIRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> conds = 0, - uint32_t available_num = 0) { - QuickMatchGUIRequestBuilder builder_(_fbb); - builder_.add_available_num(available_num); - builder_.add_conds(conds); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateQuickMatchGUIRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *conds = nullptr, - uint32_t available_num = 0) { - auto conds__ = conds ? _fbb.CreateVector<::flatbuffers::Offset>(*conds) : 0; - return CreateQuickMatchGUIRequest( - _fbb, - conds__, - available_num); -} - -struct SearchJoinRoomGUIRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef SearchJoinRoomGUIRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CONDS = 4, - VT_ATTRS = 6 - }; - const ::flatbuffers::Vector<::flatbuffers::Offset> *conds() const { - return GetPointer> *>(VT_CONDS); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *attrs() const { - return GetPointer> *>(VT_ATTRS); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_CONDS) && - verifier.VerifyVector(conds()) && - verifier.VerifyVectorOfTables(conds()) && - VerifyOffset(verifier, VT_ATTRS) && - verifier.VerifyVector(attrs()) && - verifier.VerifyVectorOfTables(attrs()) && - verifier.EndTable(); - } -}; - -struct SearchJoinRoomGUIRequestBuilder { - typedef SearchJoinRoomGUIRequest Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_conds(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> conds) { - fbb_.AddOffset(SearchJoinRoomGUIRequest::VT_CONDS, conds); - } - void add_attrs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attrs) { - fbb_.AddOffset(SearchJoinRoomGUIRequest::VT_ATTRS, attrs); - } - explicit SearchJoinRoomGUIRequestBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateSearchJoinRoomGUIRequest( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> conds = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attrs = 0) { - SearchJoinRoomGUIRequestBuilder builder_(_fbb); - builder_.add_attrs(attrs); - builder_.add_conds(conds); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateSearchJoinRoomGUIRequestDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - const std::vector<::flatbuffers::Offset> *conds = nullptr, - const std::vector<::flatbuffers::Offset> *attrs = nullptr) { - auto conds__ = conds ? _fbb.CreateVector<::flatbuffers::Offset>(*conds) : 0; - auto attrs__ = attrs ? _fbb.CreateVector<::flatbuffers::Offset>(*attrs) : 0; - return CreateSearchJoinRoomGUIRequest( - _fbb, - conds__, - attrs__); -} - -struct MatchingSearchJoinRoomInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef MatchingSearchJoinRoomInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ROOM = 4, - VT_ATTR = 6 - }; - const MatchingRoomStatus *room() const { - return GetPointer(VT_ROOM); - } - const ::flatbuffers::Vector<::flatbuffers::Offset> *attr() const { - return GetPointer> *>(VT_ATTR); - } - bool Verify(::flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ROOM) && - verifier.VerifyTable(room()) && - VerifyOffset(verifier, VT_ATTR) && - verifier.VerifyVector(attr()) && - verifier.VerifyVectorOfTables(attr()) && - verifier.EndTable(); - } -}; - -struct MatchingSearchJoinRoomInfoBuilder { - typedef MatchingSearchJoinRoomInfo Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_room(::flatbuffers::Offset room) { - fbb_.AddOffset(MatchingSearchJoinRoomInfo::VT_ROOM, room); - } - void add_attr(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attr) { - fbb_.AddOffset(MatchingSearchJoinRoomInfo::VT_ATTR, attr); - } - explicit MatchingSearchJoinRoomInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateMatchingSearchJoinRoomInfo( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset room = 0, - ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> attr = 0) { - MatchingSearchJoinRoomInfoBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_room(room); - return builder_.Finish(); -} - -inline ::flatbuffers::Offset CreateMatchingSearchJoinRoomInfoDirect( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset room = 0, - const std::vector<::flatbuffers::Offset> *attr = nullptr) { - auto attr__ = attr ? _fbb.CreateVector<::flatbuffers::Offset>(*attr) : 0; - return CreateMatchingSearchJoinRoomInfo( - _fbb, - room, - attr__); -} - -#endif // FLATBUFFERS_GENERATED_NP2STRUCTS_H_ diff --git a/rpcs3/Emu/NP/ip_address.cpp b/rpcs3/Emu/NP/ip_address.cpp index ce7b460272..7d9d972d7c 100644 --- a/rpcs3/Emu/NP/ip_address.cpp +++ b/rpcs3/Emu/NP/ip_address.cpp @@ -66,28 +66,30 @@ namespace np return sockaddr_ipv6; } - u32 register_ip(const flatbuffers::Vector* vec) + u32 register_ip(const std::string& ip_bytes) { - if (vec->size() == 4) + if (ip_bytes.size() == 4) { - const u32 ip = static_cast(vec->Get(0)) << 24 | static_cast(vec->Get(1)) << 16 | - static_cast(vec->Get(2)) << 8 | static_cast(vec->Get(3)); + const u32 ip = static_cast(static_cast(ip_bytes[0])) << 24 | + static_cast(static_cast(ip_bytes[1])) << 16 | + static_cast(static_cast(ip_bytes[2])) << 8 | + static_cast(static_cast(ip_bytes[3])); u32 result_ip = std::bit_cast>(ip); return result_ip; } - else if (vec->size() == 16) + else if (ip_bytes.size() == 16) { std::array ipv6_addr{}; - std::memcpy(ipv6_addr.data(), vec->Data(), 16); + std::memcpy(ipv6_addr.data(), ip_bytes.data(), 16); auto& translator = g_fxo->get(); return translator.register_ipv6(ipv6_addr); } else { - fmt::throw_exception("Received ip address with size = %d", vec->size()); + fmt::throw_exception("Received ip address with size = %d", ip_bytes.size()); } } diff --git a/rpcs3/Emu/NP/ip_address.h b/rpcs3/Emu/NP/ip_address.h index 3857275aac..f019e299cb 100644 --- a/rpcs3/Emu/NP/ip_address.h +++ b/rpcs3/Emu/NP/ip_address.h @@ -1,10 +1,9 @@ #pragma once #include +#include #include -#include - #include "util/types.hpp" #include "Utilities/mutex.h" @@ -67,7 +66,7 @@ namespace np std::vector> ipv4_to_ipv6; }; - u32 register_ip(const flatbuffers::Vector* vec); + u32 register_ip(const std::string& ip_bytes); enum class IPV6_SUPPORT : u8 { diff --git a/rpcs3/Emu/NP/np_allocator.h b/rpcs3/Emu/NP/np_allocator.h index ee8017cb72..76445a4274 100644 --- a/rpcs3/Emu/NP/np_allocator.h +++ b/rpcs3/Emu/NP/np_allocator.h @@ -39,6 +39,11 @@ namespace np m_allocs.clear(); } + std::tuple get_stats() const + { + return {m_size, m_size - m_avail, m_max_usage}; + } + u32 allocate(u32 size) { std::lock_guard lock(m_mutex); @@ -82,6 +87,12 @@ namespace np m_allocs.emplace(last_free, alloc_size); m_avail -= alloc_size; + const u32 usage = m_size - m_avail; + if (usage > m_max_usage) + { + m_max_usage = usage; + } + memset((static_cast(m_pool.get_ptr())) + last_free, 0, alloc_size); np_mem_allocator.trace("Allocation off:%d size:%d psize:%d, pavail:%d", last_free, alloc_size, m_size, m_avail); @@ -121,6 +132,7 @@ namespace np vm::ptr m_pool{}; u32 m_size = 0; u32 m_avail = 0; + u32 m_max_usage = 0; std::map m_allocs{}; // offset/size }; } // namespace np diff --git a/rpcs3/Emu/NP/np_cache.cpp b/rpcs3/Emu/NP/np_cache.cpp index fc90a641a5..4d70cacaa0 100644 --- a/rpcs3/Emu/NP/np_cache.cpp +++ b/rpcs3/Emu/NP/np_cache.cpp @@ -120,7 +120,12 @@ namespace np rooms[room_id].password = password; } - std::pair> cache_manager::get_slots(SceNpMatching2RoomId room_id) + void cache_manager::update_opt_param(SceNpMatching2RoomId room_id, const SceNpMatching2SignalingOptParam* sce_opt_param) + { + rooms[room_id].opt_param = *sce_opt_param; + } + + std::pair> cache_manager::get_slots(SceNpMatching2RoomId room_id) const { std::lock_guard lock(mutex); @@ -129,7 +134,7 @@ namespace np return {SCE_NP_MATCHING2_ERROR_ROOM_NOT_FOUND, {}}; } - const auto& room = rooms[room_id]; + const auto& room = ::at32(rooms, room_id); SceNpMatching2RoomSlotInfo slots{}; @@ -161,7 +166,7 @@ namespace np return {CELL_OK, slots}; } - std::pair> cache_manager::get_memberids(u64 room_id, s32 sort_method) + std::pair> cache_manager::get_memberids(u64 room_id, s32 sort_method) const { std::lock_guard lock(mutex); @@ -170,7 +175,7 @@ namespace np return {SCE_NP_MATCHING2_ERROR_ROOM_NOT_FOUND, {}}; } - const auto& room = rooms[room_id]; + const auto& room = ::at32(rooms, room_id); std::vector vec_memberids; @@ -206,7 +211,7 @@ namespace np return {CELL_OK, vec_memberids}; } - std::pair> cache_manager::get_password(SceNpMatching2RoomId room_id) + std::pair> cache_manager::get_password(SceNpMatching2RoomId room_id) const { std::lock_guard lock(mutex); @@ -215,15 +220,29 @@ namespace np return {SCE_NP_MATCHING2_ERROR_ROOM_NOT_FOUND, {}}; } - if (!rooms[room_id].owner) + const auto& room = ::at32(rooms, room_id); + + if (!room.owner) { return {SCE_NP_MATCHING2_ERROR_NOT_ALLOWED, {}}; } - return {CELL_OK, rooms[room_id].password}; + return {CELL_OK, room.password}; } - error_code cache_manager::get_member_and_attrs(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, bool include_onlinename, bool include_avatarurl) + std::pair> cache_manager::get_opt_param(SceNpMatching2RoomId room_id) const + { + std::lock_guard lock(mutex); + + if (!rooms.contains(room_id)) + { + return {SCE_NP_MATCHING2_ERROR_ROOM_NOT_FOUND, {}}; + } + + return {CELL_OK, ::at32(rooms, room_id).opt_param}; + } + + error_code cache_manager::get_member_and_attrs(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, bool include_onlinename, bool include_avatarurl) const { std::lock_guard lock(mutex); @@ -232,7 +251,7 @@ namespace np return SCE_NP_MATCHING2_ERROR_ROOM_NOT_FOUND; } - if (!rooms[room_id].members.contains(member_id)) + if (!::at32(rooms, room_id).members.contains(member_id)) { return SCE_NP_MATCHING2_ERROR_ROOM_MEMBER_NOT_FOUND; } @@ -335,7 +354,7 @@ namespace np return not_an_error(needed_data_size); } - std::pair> cache_manager::get_npid(u64 room_id, u16 member_id) + std::pair> cache_manager::get_npid(u64 room_id, u16 member_id) const { std::lock_guard lock(mutex); @@ -354,13 +373,13 @@ namespace np return {CELL_OK, ::at32(::at32(rooms, room_id).members, member_id).userInfo.npId}; } - std::optional cache_manager::get_memberid(u64 room_id, const SceNpId& npid) + std::optional cache_manager::get_memberid(u64 room_id, const SceNpId& npid) const { std::lock_guard lock(mutex); if (!rooms.contains(room_id)) { - np_cache.error("np_cache::get_memberid cache miss room_id: room_id(%d)/npid(%s)", room_id, static_cast(npid.handle.data)); + np_cache.error("np_cache::get_memberid cache miss room_id: room_id(%d)/npid(%s)", room_id, np::npid_to_string(npid)); return std::nullopt; } @@ -372,7 +391,7 @@ namespace np return id; } - np_cache.error("np_cache::get_memberid cache miss member_id: room_id(%d)/npid(%s)", room_id, static_cast(npid.handle.data)); + np_cache.error("np_cache::get_memberid cache miss member_id: room_id(%d)/npid(%s)", room_id, np::npid_to_string(npid)); return std::nullopt; } diff --git a/rpcs3/Emu/NP/np_cache.h b/rpcs3/Emu/NP/np_cache.h index 9e1b496ea5..bd0bd8a736 100644 --- a/rpcs3/Emu/NP/np_cache.h +++ b/rpcs3/Emu/NP/np_cache.h @@ -58,6 +58,8 @@ namespace np std::map groups; std::map members; + SceNpMatching2SignalingOptParam opt_param{}; + bool owner = false; }; @@ -70,16 +72,18 @@ namespace np bool add_member(SceNpMatching2RoomId room_id, const SceNpMatching2RoomMemberDataInternal* sce_roommemberdata); bool del_member(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id); void update_password(SceNpMatching2RoomId room_id, const std::optional& password); + void update_opt_param(SceNpMatching2RoomId room_id, const SceNpMatching2SignalingOptParam* sce_opt_param); - std::pair> get_slots(SceNpMatching2RoomId room_id); - std::pair> get_memberids(u64 room_id, s32 sort_method); - std::pair> get_password(SceNpMatching2RoomId room_id); - error_code get_member_and_attrs(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, bool include_onlinename, bool include_avatarurl); - std::pair> get_npid(u64 room_id, u16 member_id); - std::optional get_memberid(u64 room_id, const SceNpId& npid); + std::pair> get_slots(SceNpMatching2RoomId room_id) const; + std::pair> get_memberids(u64 room_id, s32 sort_method) const; + std::pair> get_password(SceNpMatching2RoomId room_id) const; + std::pair> get_opt_param(SceNpMatching2RoomId room_id) const; + error_code get_member_and_attrs(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, bool include_onlinename, bool include_avatarurl) const; + std::pair> get_npid(u64 room_id, u16 member_id) const; + std::optional get_memberid(u64 room_id, const SceNpId& npid) const; private: - shared_mutex mutex; + mutable shared_mutex mutex; std::map rooms; }; } // namespace np diff --git a/rpcs3/Emu/NP/np_contexts.cpp b/rpcs3/Emu/NP/np_contexts.cpp index 8bcfd5f01c..739a46368b 100644 --- a/rpcs3/Emu/NP/np_contexts.cpp +++ b/rpcs3/Emu/NP/np_contexts.cpp @@ -17,10 +17,15 @@ generic_async_transaction_context::generic_async_transaction_context(const SceNp generic_async_transaction_context::~generic_async_transaction_context() { if (thread.joinable()) - thread.join(); + { + if (std::this_thread::get_id() == thread.get_id()) + thread.detach(); + else + thread.join(); + } } -std::optional generic_async_transaction_context::get_transaction_status() +std::optional generic_async_transaction_context::get_transaction_status() const { std::lock_guard lock(mutex); return result; @@ -41,7 +46,7 @@ error_code generic_async_transaction_context::wait_for_completion() return *result; } - completion_cond.wait(lock); + completion_cond.wait(lock, [this] { return result.has_value(); }); return *result; } diff --git a/rpcs3/Emu/NP/np_contexts.h b/rpcs3/Emu/NP/np_contexts.h index 20e123730b..98ed36fa0a 100644 --- a/rpcs3/Emu/NP/np_contexts.h +++ b/rpcs3/Emu/NP/np_contexts.h @@ -20,12 +20,12 @@ struct generic_async_transaction_context generic_async_transaction_context(const SceNpCommunicationId& communicationId, const SceNpCommunicationPassphrase& passphrase, u64 timeout); - std::optional get_transaction_status(); + std::optional get_transaction_status() const; void abort_transaction(); error_code wait_for_completion(); void set_result_and_wake(error_code err); - shared_mutex mutex; + mutable shared_mutex mutex; std::condition_variable_any wake_cond, completion_cond; std::optional result; SceNpCommunicationId communicationId; diff --git a/rpcs3/Emu/NP/np_gui_cache.cpp b/rpcs3/Emu/NP/np_gui_cache.cpp index fee08356d5..1b85275d24 100644 --- a/rpcs3/Emu/NP/np_gui_cache.cpp +++ b/rpcs3/Emu/NP/np_gui_cache.cpp @@ -63,7 +63,7 @@ namespace np np_gui_cache.error("Cache mismatch: tried to remove a member but it wasn't in the room"); } - error_code gui_cache_manager::get_room_member_list(const SceNpRoomId& room_id, u32 buf_len, vm::ptr data) + error_code gui_cache_manager::get_room_member_list(const SceNpRoomId& room_id, u32 buf_len, vm::ptr data) const { std::lock_guard lock(mutex); diff --git a/rpcs3/Emu/NP/np_gui_cache.h b/rpcs3/Emu/NP/np_gui_cache.h index d742cc5749..431259df6b 100644 --- a/rpcs3/Emu/NP/np_gui_cache.h +++ b/rpcs3/Emu/NP/np_gui_cache.h @@ -45,10 +45,10 @@ namespace np void add_member(const SceNpRoomId& room_id, const SceNpMatchingRoomMember* user_info, bool new_member); void del_member(const SceNpRoomId& room_id, const SceNpMatchingRoomMember* user_info); - error_code get_room_member_list(const SceNpRoomId& room_id, u32 buf_len, vm::ptr data); + error_code get_room_member_list(const SceNpRoomId& room_id, u32 buf_len, vm::ptr data) const; private: - shared_mutex mutex; + mutable shared_mutex mutex; std::map rooms; }; } // namespace np diff --git a/rpcs3/Emu/NP/np_handler.cpp b/rpcs3/Emu/NP/np_handler.cpp index f76788287b..3eb2bef0ed 100644 --- a/rpcs3/Emu/NP/np_handler.cpp +++ b/rpcs3/Emu/NP/np_handler.cpp @@ -111,7 +111,7 @@ namespace np } ticket::ticket(std::vector&& raw_data) - : raw_data(raw_data) + : raw_data(std::move(raw_data)) { parse(); } @@ -254,7 +254,7 @@ namespace np // Trim null characters const auto& vec = node.data.data_vec; - auto it = std::find(vec.begin(), vec.end(), 0); + const auto it = std::find(vec.begin(), vec.end(), 0); return std::string(vec.begin(), it); } @@ -387,7 +387,7 @@ namespace np return; } - if (nodes[0].id != 0x3000 && nodes[1].id != 0x3002) + if (nodes[0].id != 0x3000 || nodes[1].id != 0x3002) { ticket_log.error("The 2 blobs ids are incorrect"); return; @@ -1024,7 +1024,7 @@ namespace np } } - nph_log.notice("basic_event: event:%d, from:%s(%s), size:%d", *event, static_cast(from->userId.handle.data), static_cast(from->name.data), *size); + nph_log.notice("basic_event: event:%d, from:%s(%s), size:%d", *event, np::npid_to_string(from->userId), static_cast(from->name.data), *size); return CELL_OK; } @@ -1085,6 +1085,9 @@ namespace np void np_handler::send_message(const message_data& msg_data, const std::set& npids) { + rpcn_log.notice("Sending message to \"%s\":", fmt::merge(npids, "\",\"")); + msg_data.print(); + get_rpcn()->send_message(msg_data, npids); } @@ -1124,6 +1127,7 @@ namespace np case rpcn::CommandType::LeaveRoom: reply_leave_room(req_id, error, reply_data); break; case rpcn::CommandType::SearchRoom: reply_search_room(req_id, error, reply_data); break; case rpcn::CommandType::GetRoomDataExternalList: reply_get_roomdata_external_list(req_id, error, reply_data); break; + case rpcn::CommandType::GetRoomMemberDataExternalList: reply_get_room_member_data_external_list(req_id, error, reply_data); break; case rpcn::CommandType::SetRoomDataExternal: reply_set_roomdata_external(req_id, error); break; case rpcn::CommandType::GetRoomDataInternal: reply_get_roomdata_internal(req_id, error, reply_data); break; case rpcn::CommandType::SetRoomDataInternal: reply_set_roomdata_internal(req_id, error); break; @@ -1224,16 +1228,22 @@ namespace np } auto messages = rpcn->get_new_messages(); - if (basic_handler_registered) + + for (const auto msg_id : messages) { - for (const auto msg_id : messages) + const auto opt_msg = rpcn->get_message(msg_id); + + if (!opt_msg) + { + continue; + } + + const auto& msg = opt_msg.value(); + const localized_string_id loc_id = (msg->second.mainType == SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE) ? localized_string_id::CELL_NP_MESSAGE_INVITE_RECEIVED : localized_string_id::CELL_NP_MESSAGE_OTHER_RECEIVED; + rsx::overlays::queue_message(get_localized_string(loc_id, msg->first.c_str()), 6'000'000); + + if (basic_handler_registered) { - const auto opt_msg = rpcn->get_message(msg_id); - if (!opt_msg) - { - continue; - } - const auto& msg = opt_msg.value(); if (strncmp(msg->second.commId.data, basic_handler.context.data, sizeof(basic_handler.context.data) - 1) == 0) { u32 event; @@ -1357,7 +1367,7 @@ namespace np player_history& np_handler::get_player_and_set_timestamp(const SceNpId& npid, u64 timestamp) { - std::string npid_str = std::string(npid.handle.data); + std::string npid_str = np::npid_to_string(npid); if (!players_history.contains(npid_str)) { @@ -1371,12 +1381,12 @@ namespace np return history; } - u32 np_handler::get_clan_ticket_ready() + u32 np_handler::get_clan_ticket_ready() const { return clan_ticket_ready.load(); } - ticket np_handler::get_clan_ticket() + ticket np_handler::get_clan_ticket() const { clan_ticket_ready.wait(0, atomic_wait_timeout{60'000'000'000}); // 60 seconds @@ -1437,7 +1447,7 @@ namespace np return req_id; } - u32 np_handler::get_players_history_count(u32 options) + u32 np_handler::get_players_history_count(u32 options) const { const bool all_history = (options == SCE_NP_BASIC_PLAYERS_HISTORY_OPTIONS_ALL); @@ -1455,7 +1465,7 @@ namespace np })); } - bool np_handler::get_player_history_entry(u32 options, u32 index, SceNpId* npid) + bool np_handler::get_player_history_entry(u32 options, u32 index, SceNpId* npid) const { const bool all_history = (options == SCE_NP_BASIC_PLAYERS_HISTORY_OPTIONS_ALL); @@ -1463,14 +1473,13 @@ namespace np if (all_history) { + if (index >= players_history.size()) + return false; + auto it = players_history.begin(); std::advance(it, index); - - if (it != players_history.end()) - { - string_to_npid(it->first, *npid); - return true; - } + string_to_npid(it->first, *npid); + return true; } else { @@ -1637,7 +1646,7 @@ namespace np return SCE_NP_BASIC_ERROR_NOT_CONNECTED; } - auto friend_infos = rpcn->get_friend_presence_by_npid(std::string(npid.handle.data)); + auto friend_infos = rpcn->get_friend_presence_by_npid(np::npid_to_string(npid)); if (!friend_infos) { return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT; @@ -1672,6 +1681,11 @@ namespace np return np_cache.get_memberids(room_id, sort_method); } + std::pair> np_handler::local_get_signaling_opt_param(SceNpMatching2RoomId room_id) + { + return np_cache.get_opt_param(room_id); + } + error_code np_handler::local_get_room_member_data(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, u32 ctx_id) { auto [include_onlinename, include_avatarurl] = get_match2_context_options(ctx_id); @@ -1759,4 +1773,16 @@ namespace np } } + SceNpMatching2MemoryInfo np_handler::get_memory_info() const + { + auto [m_size, m_usage, m_max_usage] = np_memory.get_stats(); + + SceNpMatching2MemoryInfo mem_info{}; + mem_info.totalMemSize = m_size; + mem_info.curMemUsage = m_usage; + mem_info.maxMemUsage = m_max_usage; + + return mem_info; + } + } // namespace np diff --git a/rpcs3/Emu/NP/np_handler.h b/rpcs3/Emu/NP/np_handler.h index d3c1213cc6..7e43bbf3cd 100644 --- a/rpcs3/Emu/NP/np_handler.h +++ b/rpcs3/Emu/NP/np_handler.h @@ -177,6 +177,7 @@ namespace np u32 leave_room(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2LeaveRoomRequest* req); u32 search_room(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2SearchRoomRequest* req); u32 get_roomdata_external_list(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2GetRoomDataExternalListRequest* req); + u32 get_room_member_data_external_list(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2GetRoomMemberDataExternalListRequest* req); u32 set_roomdata_external(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2SetRoomDataExternalRequest* req); u32 get_roomdata_internal(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2GetRoomDataInternalRequest* req); u32 set_roomdata_internal(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2SetRoomDataInternalRequest* req); @@ -235,6 +236,7 @@ namespace np std::pair> local_get_room_slots(SceNpMatching2RoomId room_id); std::pair> local_get_room_password(SceNpMatching2RoomId room_id); std::pair> local_get_room_memberids(SceNpMatching2RoomId room_id, s32 sort_method); + std::pair> local_get_signaling_opt_param(SceNpMatching2RoomId room_id); error_code local_get_room_member_data(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, u32 ctx_id); // Local GUI functions @@ -255,12 +257,13 @@ namespace np // Misc stuff void req_ticket(u32 version, const SceNpId* npid, const char* service_id, const u8* cookie, u32 cookie_size, const char* entitlement_id, u32 consumed_count); const ticket& get_ticket() const; - u32 get_clan_ticket_ready(); - ticket get_clan_ticket(); + u32 get_clan_ticket_ready() const; + ticket get_clan_ticket() const; void add_player_to_history(const SceNpId* npid, const char* description); u32 add_players_to_history(const SceNpId* npids, const char* description, u32 count); - u32 get_players_history_count(u32 options); - bool get_player_history_entry(u32 options, u32 index, SceNpId* npid); + u32 get_players_history_count(u32 options) const; + bool get_player_history_entry(u32 options, u32 index, SceNpId* npid) const; + SceNpMatching2MemoryInfo get_memory_info() const; error_code abort_request(u32 req_id); // For signaling @@ -321,6 +324,7 @@ namespace np void reply_leave_room(u32 req_id, rpcn::ErrorType error, vec_stream& reply); void reply_search_room(u32 req_id, rpcn::ErrorType error, vec_stream& reply); void reply_get_roomdata_external_list(u32 req_id, rpcn::ErrorType error, vec_stream& reply); + void reply_get_room_member_data_external_list(u32 req_id, rpcn::ErrorType error, vec_stream& reply); void reply_set_roomdata_external(u32 req_id, rpcn::ErrorType error); void reply_get_roomdata_internal(u32 req_id, rpcn::ErrorType error, vec_stream& reply); void reply_set_roomdata_internal(u32 req_id, rpcn::ErrorType error); @@ -514,7 +518,7 @@ namespace np player_history& get_player_and_set_timestamp(const SceNpId& npid, u64 timestamp); void save_players_history(); - shared_mutex mutex_history; + mutable shared_mutex mutex_history; std::map players_history; // npid / history struct diff --git a/rpcs3/Emu/NP/np_helpers.cpp b/rpcs3/Emu/NP/np_helpers.cpp index b6e49b97b2..9d651693d9 100644 --- a/rpcs3/Emu/NP/np_helpers.cpp +++ b/rpcs3/Emu/NP/np_helpers.cpp @@ -8,6 +8,8 @@ #include #endif +LOG_CHANNEL(rpcn_log, "rpcn"); + namespace np { std::string ip_to_string(u32 ip_addr) @@ -18,7 +20,7 @@ namespace np return std::string(ip_str); } - std::string ether_to_string(std::array& ether) + std::string ether_to_string(const std::array& ether) { return fmt::format("%02X:%02X:%02X:%02X:%02X:%02X", ether[0], ether[1], ether[2], ether[3], ether[4], ether[5]); } @@ -34,6 +36,24 @@ namespace np return fmt::format("%s_%02d", com_id_data, communicationId.num); } + std::optional string_to_communication_id(std::string_view str) + { + SceNpCommunicationId id{}; + + const auto split_id = fmt::split_sv(str, {"_"}); + + if (split_id.size() != 2 || split_id[0].length() != 9 || split_id[1].length() != 2 || !std::isdigit(split_id[1][0]) || !std::isdigit(split_id[1][1])) + { + rpcn_log.error("Tried to parse an invalid communication_id!"); + return std::nullopt; + } + + strcpy_trunc(id.data, split_id[0]); + id.num = std::stoi(std::string(split_id[1])); + + return id; + } + void strings_to_userinfo(std::string_view npid, std::string_view online_name, std::string_view avatar_url, SceNpUserInfo& user_info) { memset(&user_info, 0, sizeof(user_info)); @@ -69,6 +89,13 @@ namespace np // npid->reserved[0] = 1; } + std::string npid_to_string(const SceNpId& npid) + { + char npid_str[17]{}; + std::memcpy(npid_str, npid.handle.data, 16); + return std::string(npid_str); + } + void string_to_online_name(std::string_view str, SceNpOnlineName& online_name) { memset(&online_name, 0, sizeof(online_name)); @@ -81,15 +108,9 @@ namespace np strcpy_trunc(avatar_url.data, str); } - void string_to_communication_id(std::string_view str, SceNpCommunicationId& comm_id) - { - memset(&comm_id, 0, sizeof(comm_id)); - strcpy_trunc(comm_id.data, str); - } - bool is_valid_npid(const SceNpId& npid) { - if (!std::all_of(npid.handle.data, npid.handle.data + 16, [](char c) { return std::isalnum(c) || c == '-' || c == '_' || c == 0; } ) + if (!std::all_of(npid.handle.data, npid.handle.data + 16, [](char c) { return std::isalnum(static_cast(c)) || c == '-' || c == '_' || c == 0; } ) || npid.handle.data[16] != 0 || !std::all_of(npid.handle.dummy, npid.handle.dummy + 3, [](char val) { return val == 0; }) ) { diff --git a/rpcs3/Emu/NP/np_helpers.h b/rpcs3/Emu/NP/np_helpers.h index 054e45388d..d9e2a9d076 100644 --- a/rpcs3/Emu/NP/np_helpers.h +++ b/rpcs3/Emu/NP/np_helpers.h @@ -7,14 +7,15 @@ namespace np { std::string ip_to_string(u32 addr); - std::string ether_to_string(std::array& ether); + std::string ether_to_string(const std::array& ether); bool validate_communication_id(const SceNpCommunicationId& com_id); std::string communication_id_to_string(const SceNpCommunicationId& communicationId); + std::optional string_to_communication_id(std::string_view str); void string_to_npid(std::string_view str, SceNpId& npid); + std::string npid_to_string(const SceNpId& npid); void string_to_online_name(std::string_view str, SceNpOnlineName& online_name); void string_to_avatar_url(std::string_view str, SceNpAvatarUrl& avatar_url); - void string_to_communication_id(std::string_view str, SceNpCommunicationId& comm_id); void strings_to_userinfo(std::string_view npid, std::string_view online_name, std::string_view avatar_url, SceNpUserInfo& user_info); template diff --git a/rpcs3/Emu/NP/np_notifications.cpp b/rpcs3/Emu/NP/np_notifications.cpp index 55b74ec761..9b64882f0f 100644 --- a/rpcs3/Emu/NP/np_notifications.cpp +++ b/rpcs3/Emu/NP/np_notifications.cpp @@ -5,7 +5,7 @@ #include "Emu/NP/np_handler.h" #include "Emu/NP/np_helpers.h" #include "Emu/NP/np_structs_extra.h" -#include "Emu/NP/fb_helpers.h" +#include "Emu/NP/pb_helpers.h" #include "Emu/NP/signaling_handler.h" #include "Emu/NP/ip_address.h" @@ -15,7 +15,7 @@ namespace np { void np_handler::notif_user_joined_room(vec_stream& noti) { - const auto* notification = noti.get_flatbuffer(); + auto notification = noti.get_protobuf(); if (noti.is_error()) { @@ -23,7 +23,7 @@ namespace np return; } - ensure(notification->update_info()); + ensure(notification->has_update_info()); const u32 event_key = get_event_key(); const auto [include_onlinename, include_avatarurl] = get_match2_context_options(room_event_cb_ctx); @@ -41,19 +41,20 @@ namespace np return; } - rpcn_log.notice("Received notification that user %s(%d) joined the room(%d)", notif_data->roomMemberDataInternal->userInfo.npId.handle.data, notif_data->roomMemberDataInternal->memberId, room_id); + rpcn_log.notice("Received notification that user %s(%d) joined the room(%d)", np::npid_to_string(notif_data->roomMemberDataInternal->userInfo.npId), notif_data->roomMemberDataInternal->memberId, room_id); extra_nps::print_SceNpMatching2RoomMemberDataInternal(notif_data->roomMemberDataInternal.get_ptr()); // We initiate signaling if necessary - if (const auto* signaling_info = notification->signaling()) + if (notification->has_signaling()) { - const u32 addr_p2p = register_ip(signaling_info->ip()); - const u16 port_p2p = signaling_info->port(); + const auto& signaling_info = notification->signaling(); + const u32 addr_p2p = register_ip(signaling_info.ip()); + const u16 port_p2p = signaling_info.port().value(); const u16 member_id = notif_data->roomMemberDataInternal->memberId; const SceNpId& npid = notif_data->roomMemberDataInternal->userInfo.npId; - rpcn_log.notice("Join notification told to connect to member(%d=%s) of room(%d): %s:%d", member_id, reinterpret_cast(npid.handle.data), room_id, ip_to_string(addr_p2p), port_p2p); + rpcn_log.notice("Join notification told to connect to member(%d=%s) of room(%d): %s:%d", member_id, np::npid_to_string(npid), room_id, ip_to_string(addr_p2p), port_p2p); // Attempt Signaling auto& sigh = g_fxo->get>(); @@ -74,7 +75,7 @@ namespace np void np_handler::notif_user_left_room(vec_stream& noti) { u64 room_id = noti.get(); - const auto* update_info = noti.get_flatbuffer(); + auto update_info = noti.get_protobuf(); if (noti.is_error()) { @@ -87,7 +88,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_RoomMemberUpdateInfo, sizeof(SceNpMatching2RoomMemberUpdateInfo)); auto* notif_data = reinterpret_cast(edata.data()); - RoomMemberUpdateInfo_to_SceNpMatching2RoomMemberUpdateInfo(edata, update_info, notif_data, include_onlinename, include_avatarurl); + RoomMemberUpdateInfo_to_SceNpMatching2RoomMemberUpdateInfo(edata, *update_info, notif_data, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); // Ensures we do not call the callback if the room is not in the cache(ie we left the room already) @@ -97,7 +98,7 @@ namespace np return; } - rpcn_log.notice("Received notification that user %s(%d) left the room(%d)", notif_data->roomMemberDataInternal->userInfo.npId.handle.data, notif_data->roomMemberDataInternal->memberId, room_id); + rpcn_log.notice("Received notification that user %s(%d) left the room(%d)", np::npid_to_string(notif_data->roomMemberDataInternal->userInfo.npId), notif_data->roomMemberDataInternal->memberId, room_id); extra_nps::print_SceNpMatching2RoomMemberDataInternal(notif_data->roomMemberDataInternal.get_ptr()); if (room_event_cb) @@ -113,7 +114,7 @@ namespace np void np_handler::notif_room_destroyed(vec_stream& noti) { u64 room_id = noti.get(); - const auto* update_info = noti.get_flatbuffer(); + auto update_info = noti.get_protobuf(); if (noti.is_error()) { @@ -125,7 +126,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_RoomUpdateInfo, sizeof(SceNpMatching2RoomUpdateInfo)); auto* notif_data = reinterpret_cast(edata.data()); - RoomUpdateInfo_to_SceNpMatching2RoomUpdateInfo(update_info, notif_data); + RoomUpdateInfo_to_SceNpMatching2RoomUpdateInfo(*update_info, notif_data); np_memory.shrink_allocation(edata.addr(), edata.size()); rpcn_log.notice("Received notification that room(%d) was destroyed", room_id); @@ -146,7 +147,7 @@ namespace np void np_handler::notif_updated_room_data_internal(vec_stream& noti) { SceNpMatching2RoomId room_id = noti.get(); - const auto* update_info = noti.get_flatbuffer(); + auto update_info = noti.get_protobuf(); if (noti.is_error()) { @@ -159,7 +160,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_RoomDataInternalUpdateInfo, sizeof(SceNpMatching2RoomDataInternalUpdateInfo)); auto* notif_data = reinterpret_cast(edata.data()); - RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo(edata, update_info, notif_data, npid, include_onlinename, include_avatarurl); + RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo(edata, *update_info, notif_data, npid, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); np_cache.insert_room(notif_data->newRoomDataInternal.get_ptr()); @@ -181,7 +182,7 @@ namespace np void np_handler::notif_updated_room_member_data_internal(vec_stream& noti) { SceNpMatching2RoomId room_id = noti.get(); - const auto* update_info = noti.get_flatbuffer(); + auto update_info = noti.get_protobuf(); if (noti.is_error()) { @@ -194,7 +195,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_RoomMemberDataInternalUpdateInfo, sizeof(SceNpMatching2RoomMemberDataInternalUpdateInfo)); auto* notif_data = reinterpret_cast(edata.data()); - RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo(edata, update_info, notif_data, include_onlinename, include_avatarurl); + RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo(edata, *update_info, notif_data, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); if (!np_cache.add_member(room_id, notif_data->newRoomMemberDataInternal.get_ptr())) @@ -203,7 +204,7 @@ namespace np return; } - rpcn_log.notice("Received notification that user's %s(%d) room (%d) data was updated", notif_data->newRoomMemberDataInternal->userInfo.npId.handle.data, notif_data->newRoomMemberDataInternal->memberId, room_id); + rpcn_log.notice("Received notification that user's %s(%d) room (%d) data was updated", np::npid_to_string(notif_data->newRoomMemberDataInternal->userInfo.npId), notif_data->newRoomMemberDataInternal->memberId, room_id); extra_nps::print_SceNpMatching2RoomMemberDataInternal(notif_data->newRoomMemberDataInternal.get_ptr()); if (room_event_cb) @@ -220,7 +221,7 @@ namespace np { u64 room_id = noti.get(); u16 member_id = noti.get(); - const auto* message_info = noti.get_flatbuffer(); + auto message_info = noti.get_protobuf(); if (noti.is_error()) { @@ -233,7 +234,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_RoomMessageInfo, sizeof(SceNpMatching2RoomMessageInfo)); auto* notif_data = reinterpret_cast(edata.data()); - RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(edata, message_info, notif_data, include_onlinename, include_avatarurl); + RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(edata, *message_info, notif_data, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); rpcn_log.notice("Received notification of a room message from member(%d) in room(%d)", member_id, room_id); @@ -250,19 +251,19 @@ namespace np void np_handler::notif_signaling_helper(vec_stream& noti) { - const auto* matching_info = noti.get_flatbuffer(); + auto matching_info = noti.get_protobuf(); - if (noti.is_error() || !matching_info->addr() || !matching_info->npid() || !matching_info->addr()->ip()) + if (noti.is_error() || !matching_info->has_addr() || matching_info->npid().empty() || matching_info->addr().ip().empty()) { rpcn_log.error("Received faulty SignalingHelper notification"); return; } SceNpId npid_p2p; - string_to_npid(matching_info->npid()->string_view(), npid_p2p); + string_to_npid(matching_info->npid(), npid_p2p); - const u32 addr_p2p = register_ip(matching_info->addr()->ip()); - const u16 port_p2p = matching_info->addr()->port(); + const u32 addr_p2p = register_ip(matching_info->addr().ip()); + const u16 port_p2p = matching_info->addr().port().value(); auto& sigh = g_fxo->get>(); sigh.send_information_packets(addr_p2p, port_p2p, npid_p2p); @@ -270,7 +271,7 @@ namespace np void np_handler::generic_gui_notification_handler(vec_stream& noti, std::string_view name, s32 notification_type) { - const auto* update_info = noti.get_flatbuffer(); + auto update_info = noti.get_protobuf(); if (noti.is_error()) { @@ -290,7 +291,7 @@ namespace np event_data edata(np_memory.allocate(MAX_SceNpMatchingRoomStatus_SIZE), sizeof(SceNpMatchingRoomStatus), MAX_SceNpMatchingRoomStatus_SIZE); auto* room_status = reinterpret_cast(edata.data()); - MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, update_info, room_status); + MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, *update_info, room_status); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingRoomStatus(room_status); @@ -351,7 +352,7 @@ namespace np void np_handler::notif_quickmatch_complete_gui(vec_stream& noti) { - const auto* update_info = noti.get_flatbuffer(); + auto update_info = noti.get_protobuf(); if (noti.is_error()) { @@ -363,7 +364,7 @@ namespace np event_data edata(np_memory.allocate(MAX_SceNpMatchingJoinedRoomInfo_SIZE), sizeof(SceNpMatchingJoinedRoomInfo), MAX_SceNpMatchingJoinedRoomInfo_SIZE); auto* room_info = reinterpret_cast(edata.data()); - MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(edata, update_info, room_info); + MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(edata, *update_info, room_info); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingJoinedRoomInfo(room_info); @@ -380,7 +381,10 @@ namespace np auto ctx = get_matching_context(ctx_id); if (!ctx) + { + np_memory.free(edata.addr()); return; + } gui_cache.add_room(room_info->room_status.id); diff --git a/rpcs3/Emu/NP/np_requests.cpp b/rpcs3/Emu/NP/np_requests.cpp index 23e3d7ca75..d9dd6dc337 100644 --- a/rpcs3/Emu/NP/np_requests.cpp +++ b/rpcs3/Emu/NP/np_requests.cpp @@ -14,7 +14,7 @@ #include "np_contexts.h" #include "np_helpers.h" #include "np_structs_extra.h" -#include "fb_helpers.h" +#include "pb_helpers.h" #include "Emu/NP/signaling_handler.h" #include "Emu/NP/ip_address.h" @@ -191,7 +191,7 @@ namespace np case rpcn::ErrorType::RoomGroupMaxSlotMismatch: error_code = SCE_NP_MATCHING2_SERVER_ERROR_MAX_OVER_SLOT_GROUP; break; case rpcn::ErrorType::RoomPasswordMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_PASSWORD; break; case rpcn::ErrorType::RoomGroupNoJoinLabel: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_JOIN_GROUP_LABEL; break; - default: fmt::throw_exception("Unexpected error in reply to CreateRoom: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to CreateRoom: %s", error); } if (error_code != CELL_OK) @@ -200,8 +200,11 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to CreateRoom command"); + ensure(resp->has_internal()); + + const auto& resp_internal = resp->internal(); const u32 event_key = get_event_key(); auto [include_onlinename, include_avatarurl] = get_match2_context_options(cb_info_opt->ctx_id); @@ -209,13 +212,19 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_CreateJoinRoom, sizeof(SceNpMatching2CreateJoinRoomResponse)); auto* room_resp = reinterpret_cast(edata.data()); auto* room_info = edata.allocate(sizeof(SceNpMatching2RoomDataInternal), room_resp->roomDataInternal); - RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, resp, room_info, npid, include_onlinename, include_avatarurl); + RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, resp_internal, room_info, npid, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); + const auto resp_opt_param = resp->opt_param(); + SceNpMatching2SignalingOptParam opt_param{}; + OptParam_to_SceNpMatching2SignalingOptParam(resp_opt_param, &opt_param); + np_cache.insert_room(room_info); - np_cache.update_password(room_resp->roomDataInternal->roomId, cached_cj_password); + np_cache.update_password(room_info->roomId, cached_cj_password); + np_cache.update_opt_param(room_info->roomId, &opt_param); extra_nps::print_SceNpMatching2CreateJoinRoomResponse(room_resp); + extra_nps::print_SceNpMatching2SignalingOptParam(&opt_param); cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); } @@ -253,7 +262,7 @@ namespace np case rpcn::ErrorType::RoomPasswordMismatch: error_code = SCE_NP_MATCHING2_SERVER_ERROR_PASSWORD_MISMATCH; break; case rpcn::ErrorType::RoomGroupFull: error_code = SCE_NP_MATCHING2_SERVER_ERROR_GROUP_FULL; break; case rpcn::ErrorType::RoomGroupJoinLabelNotFound: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_GROUP; break; - default: fmt::throw_exception("Unexpected error in reply to JoinRoom: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to JoinRoom: %s", error); } if (error_code != 0) @@ -262,9 +271,9 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to JoinRoom command"); - ensure(resp->room_data()); + ensure(resp->has_room_data()); const u32 event_key = get_event_key(); const auto [include_onlinename, include_avatarurl] = get_match2_context_options(cb_info_opt->ctx_id); @@ -275,36 +284,38 @@ namespace np RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, resp->room_data(), room_info, npid, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); + const u64 room_id = resp->room_data().roomid(); + + const auto resp_opt_param = resp->opt_param(); + SceNpMatching2SignalingOptParam opt_param{}; + OptParam_to_SceNpMatching2SignalingOptParam(resp_opt_param, &opt_param); np_cache.insert_room(room_info); + np_cache.update_opt_param(room_id, &opt_param); extra_nps::print_SceNpMatching2RoomDataInternal(room_info); + extra_nps::print_SceNpMatching2SignalingOptParam(&opt_param); // We initiate signaling if necessary - if (const auto* signaling_data = resp->signaling_data()) + for (int i = 0; i < resp->signaling_data_size(); i++) { - const u64 room_id = resp->room_data()->roomId(); + const auto& signaling_info = resp->signaling_data(i); + ensure(signaling_info.has_addr()); - for (unsigned int i = 0; i < signaling_data->size(); i++) - { - const auto* signaling_info = signaling_data->Get(i); - ensure(signaling_info->addr()); + const u32 addr_p2p = register_ip(signaling_info.addr().ip()); + const u16 port_p2p = signaling_info.addr().port().value(); - const u32 addr_p2p = register_ip(signaling_info->addr()->ip()); - const u16 port_p2p = signaling_info->addr()->port(); + const u16 member_id = signaling_info.member_id().value(); + const auto [npid_res, npid_p2p] = np_cache.get_npid(room_id, member_id); - const u16 member_id = signaling_info->member_id(); - const auto [npid_res, npid_p2p] = np_cache.get_npid(room_id, member_id); + if (npid_res != CELL_OK) + continue; - if (npid_res != CELL_OK) - continue; + rpcn_log.notice("JoinRoomResult told to connect to member(%d=%s) of room(%d): %s:%d", member_id, np::npid_to_string(*npid_p2p), room_id, ip_to_string(addr_p2p), port_p2p); - rpcn_log.notice("JoinRoomResult told to connect to member(%d=%s) of room(%d): %s:%d", member_id, reinterpret_cast(npid_p2p->handle.data), room_id, ip_to_string(addr_p2p), port_p2p); - - // Attempt Signaling - auto& sigh = g_fxo->get>(); - const u32 conn_id = sigh.init_sig2(*npid_p2p, room_id, member_id); - sigh.start_sig(conn_id, addr_p2p, port_p2p); - } + // Attempt Signaling + auto& sigh = g_fxo->get>(); + const u32 conn_id = sigh.init_sig2(*npid_p2p, room_id, member_id); + sigh.start_sig(conn_id, addr_p2p, port_p2p); } cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); @@ -337,7 +348,7 @@ namespace np case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::NotFound: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; // Unsure if this should return another error(missing user in room has no appropriate error code) case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; - default: fmt::throw_exception("Unexpected error in reply to LeaveRoom: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to LeaveRoom: %s", error); } if (error_code != CELL_OK) @@ -379,7 +390,7 @@ namespace np ensure(error == rpcn::ErrorType::NoError, "Unexpected error in SearchRoom reply"); - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to SearchRoom command"); const u32 event_key = get_event_key(); @@ -387,7 +398,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_SearchRoom, sizeof(SceNpMatching2SearchRoomResponse)); auto* search_resp = reinterpret_cast(edata.data()); // The online_name and avatar_url are naturally filtered by the reply from the server - SearchRoomResponse_to_SceNpMatching2SearchRoomResponse(edata, resp, search_resp); + SearchRoomResponse_to_SceNpMatching2SearchRoomResponse(edata, *resp, search_resp); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatching2SearchRoomResponse(search_resp); @@ -418,7 +429,7 @@ namespace np ensure(error == rpcn::ErrorType::NoError, "Unexpected error in GetRoomDataExternalList reply"); - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetRoomDataExternalList command"); const u32 event_key = get_event_key(); @@ -426,7 +437,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_GetRoomDataExternalList, sizeof(SceNpMatching2GetRoomDataExternalListResponse)); auto* sce_get_room_ext_resp = reinterpret_cast(edata.data()); - GetRoomDataExternalListResponse_to_SceNpMatching2GetRoomDataExternalListResponse(edata, resp, sce_get_room_ext_resp, include_onlinename, include_avatarurl); + GetRoomDataExternalListResponse_to_SceNpMatching2GetRoomDataExternalListResponse(edata, *resp, sce_get_room_ext_resp, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatching2GetRoomDataExternalListResponse(sce_get_room_ext_resp); @@ -434,6 +445,55 @@ namespace np cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); } + u32 np_handler::get_room_member_data_external_list(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2GetRoomMemberDataExternalListRequest* req) + { + const u32 req_id = generate_callback_info(ctx_id, optParam, SCE_NP_MATCHING2_REQUEST_EVENT_GetRoomMemberDataExternalList, true); + + if (!get_rpcn()->get_room_member_data_external_list(req_id, get_match2_context(ctx_id)->communicationId, req->roomId)) + { + rpcn_log.error("Disconnecting from RPCN!"); + is_psn_active = false; + } + + return req_id; + } + + void np_handler::reply_get_room_member_data_external_list(u32 req_id, rpcn::ErrorType error, vec_stream& reply) + { + auto cb_info_opt = take_pending_request(req_id); + + if (!cb_info_opt) + return; + + switch (error) + { + case rpcn::ErrorType::NoError: + break; + case rpcn::ErrorType::RoomMissing: + { + cb_info_opt->queue_callback(req_id, 0, SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM, 0); + return; + } + default: + fmt::throw_exception("Unexpected error in GetRoomMemberDataExternalList reply: %s", error); + } + + const auto resp = reply.get_protobuf(); + ensure(!reply.is_error(), "Malformed reply to GetRoomMemberDataExternalList command"); + + const u32 event_key = get_event_key(); + auto [include_onlinename, include_avatarurl] = get_match2_context_options(cb_info_opt->ctx_id); + + auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_GetRoomMemberDataExternalList, sizeof(SceNpMatching2GetRoomMemberDataExternalListResponse)); + auto* sce_get_room_member_ext_resp = reinterpret_cast(edata.data()); + GetRoomMemberDataExternalListResponse_to_SceNpMatching2GetRoomMemberDataExternalListResponse(edata, *resp, sce_get_room_member_ext_resp, include_onlinename, include_avatarurl); + np_memory.shrink_allocation(edata.addr(), edata.size()); + + extra_nps::print_SceNpMatching2GetRoomMemberDataExternalListResponse(sce_get_room_member_ext_resp); + + cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); + } + u32 np_handler::set_roomdata_external(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2SetRoomDataExternalRequest* req) { const u32 req_id = generate_callback_info(ctx_id, optParam, SCE_NP_MATCHING2_REQUEST_EVENT_SetRoomDataExternal, false); @@ -463,7 +523,7 @@ namespace np case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; case rpcn::ErrorType::Unauthorized: error_code = SCE_NP_MATCHING2_SERVER_ERROR_FORBIDDEN; break; - default: fmt::throw_exception("Unexpected error in reply to SetRoomDataExternal: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to SetRoomDataExternal: %s", error); } cb_info_opt->queue_callback(req_id, 0, error_code, 0); @@ -495,7 +555,7 @@ namespace np { case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; - default: fmt::throw_exception("Unexpected error in reply to GetRoomDataInternal: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to GetRoomDataInternal: %s", error); } if (error_code != CELL_OK) @@ -504,7 +564,7 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetRoomDataInternal command"); const u32 event_key = get_event_key(); @@ -513,7 +573,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_GetRoomDataInternal, sizeof(SceNpMatching2GetRoomDataInternalResponse)); auto* room_resp = reinterpret_cast(edata.data()); auto* room_info = edata.allocate(sizeof(SceNpMatching2RoomDataInternal), room_resp->roomDataInternal); - RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, resp, room_info, npid, include_onlinename, include_avatarurl); + RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, *resp, room_info, npid, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); np_cache.insert_room(room_info); @@ -551,7 +611,7 @@ namespace np { case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; - default: fmt::throw_exception("Unexpected error in reply to GetRoomDataInternal: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to SetRoomDataInternal: %s", error); } cb_info_opt->queue_callback(req_id, 0, error_code, 0); @@ -585,7 +645,7 @@ namespace np case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; case rpcn::ErrorType::NotFound: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_USER; break; - default: fmt::throw_exception("Unexpected error in reply to GetRoomMemberDataInternal: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to GetRoomMemberDataInternal: %s", error); } if (error_code != CELL_OK) @@ -594,7 +654,7 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetRoomMemberDataInternal command"); const u32 event_key = get_event_key(); @@ -603,7 +663,7 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_GetRoomMemberDataInternal, sizeof(SceNpMatching2GetRoomMemberDataInternalResponse)); auto* mdata_resp = reinterpret_cast(edata.data()); auto* mdata_info = edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal), mdata_resp->roomMemberDataInternal); - RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, resp, nullptr, mdata_info, include_onlinename, include_avatarurl); + RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, *resp, nullptr, mdata_info, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); @@ -639,7 +699,7 @@ namespace np case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; case rpcn::ErrorType::NotFound: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_USER; break; case rpcn::ErrorType::Unauthorized: error_code = SCE_NP_MATCHING2_SERVER_ERROR_FORBIDDEN; break; - default: fmt::throw_exception("Unexpected error in reply to SetRoomMemberDataInternal: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to SetRoomMemberDataInternal: %s", error); } cb_info_opt->queue_callback(req_id, 0, error_code, 0); @@ -668,7 +728,7 @@ namespace np switch (error) { case rpcn::ErrorType::NoError: break; - default: fmt::throw_exception("Unexpected error in reply to SetUserInfo: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to SetUserInfo: %s", error); } cb_info_opt->queue_callback(req_id, 0, 0, 0); @@ -700,7 +760,7 @@ namespace np { case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; - default: fmt::throw_exception("Unexpected error in reply to PingRoomOwner: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to PingRoomOwner: %s", error); } if (error_code != CELL_OK) @@ -709,14 +769,14 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to PingRoomOwner command"); const u32 event_key = get_event_key(); auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_SignalingGetPingInfo, sizeof(SceNpMatching2SignalingGetPingInfoResponse)); auto* final_ping_resp = reinterpret_cast(edata.data()); - GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(resp, final_ping_resp); + GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(*resp, final_ping_resp); np_memory.shrink_allocation(edata.addr(), edata.size()); cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); } @@ -748,7 +808,7 @@ namespace np case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::RoomMissing: error_code = SCE_NP_MATCHING2_SERVER_ERROR_NO_SUCH_ROOM; break; case rpcn::ErrorType::Unauthorized: error_code = SCE_NP_MATCHING2_SERVER_ERROR_FORBIDDEN; break; - default: fmt::throw_exception("Unexpected error in reply to SendRoomMessage: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to SendRoomMessage: %s", error); } cb_info_opt->queue_callback(req_id, 0, error_code, 0); @@ -786,15 +846,15 @@ namespace np rpcn_log.error("Signaling information was requested for a user that doesn't exist or is not online"); return; } - default: fmt::throw_exception("Unexpected error in reply to RequestSignalingInfos: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to RequestSignalingInfos: %s", error); } - const auto* resp = reply.get_flatbuffer(); - ensure(!reply.is_error() && resp->ip(), "Malformed reply to RequestSignalingInfos command"); + const auto resp = reply.get_protobuf(); + ensure(!reply.is_error() && !resp->ip().empty(), "Malformed reply to RequestSignalingInfos command"); u32 addr = register_ip(resp->ip()); auto& sigh = g_fxo->get>(); - sigh.start_sig(conn_id, addr, resp->port()); + sigh.start_sig(conn_id, addr, resp->port().value()); } u32 np_handler::get_lobby_info_list(SceNpMatching2ContextId ctx_id, vm::cptr optParam, const SceNpMatching2GetLobbyInfoListRequest* req) @@ -806,9 +866,7 @@ namespace np const u32 req_id = generate_callback_info(ctx_id, optParam, SCE_NP_MATCHING2_REQUEST_EVENT_GetLobbyInfoList, false); auto cb_info_opt = take_pending_request(req_id); - - if (!cb_info_opt) - return true; + ensure (cb_info_opt); const u32 event_key = get_event_key(); @@ -865,19 +923,19 @@ namespace np ensure(!reply.is_error(), "Malformed reply to RequestTicket command"); auto incoming_ticket = ticket(std::move(ticket_raw)); - + // Clans: check if ticket belongs to the clan service. // If so, hijack the ticket and cache it for future use. if (incoming_ticket.get_service_id() == CLANS_SERVICE_ID) { - clan_ticket = incoming_ticket; + clan_ticket = std::move(incoming_ticket); clan_ticket_ready.store(1); clan_ticket_ready.notify_all(); - + return; } - current_ticket = incoming_ticket; + current_ticket = std::move(incoming_ticket); auto ticket_size = static_cast(current_ticket.size()); if (manager_cb) @@ -896,13 +954,16 @@ namespace np { thread_base::set_name("NP Trans Worker"); - auto res = trans_ctx->wake_cond.wait_for(lock, std::chrono::microseconds(trans_ctx->timeout)); + bool has_value = trans_ctx->wake_cond.wait_for(lock, std::chrono::microseconds(trans_ctx->timeout), [&] + { + return trans_ctx->result.has_value(); + }); { std::lock_guard lock_threads(this->mutex_async_transactions); this->async_transactions.erase(req_id); } - if (res == std::cv_status::timeout) + if (!has_value) { trans_ctx->result = SCE_NP_COMMUNITY_ERROR_TIMEOUT; return; @@ -959,7 +1020,7 @@ namespace np { case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::NotFound: error_code = SCE_NP_COMMUNITY_SERVER_ERROR_RANKING_BOARD_MASTER_NOT_FOUND; break; - default: fmt::throw_exception("Unexpected error in reply to GetBoardInfos: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to GetBoardInfos: %s", error); } if (error_code != CELL_OK) @@ -970,15 +1031,15 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetBoardInfos command"); const SceNpScoreBoardInfo board_info{ - .rankLimit = resp->rankLimit(), - .updateMode = resp->updateMode(), - .sortMode = resp->sortMode(), - .uploadNumLimit = resp->uploadNumLimit(), - .uploadSizeLimit = resp->uploadSizeLimit() + .rankLimit = resp->ranklimit(), + .updateMode = resp->updatemode(), + .sortMode = resp->sortmode(), + .uploadNumLimit = resp->uploadnumlimit(), + .uploadSizeLimit = resp->uploadsizelimit() }; std::lock_guard lock(score_trans->mutex); @@ -1033,7 +1094,7 @@ namespace np score_trans->wake_cond.notify_one(); return; } - default: fmt::throw_exception("Unexpected error in reply_record_score: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply_record_score: %s", error); } auto tmp_rank = reply.get(); @@ -1096,7 +1157,7 @@ namespace np case rpcn::ErrorType::NotFound: trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_RANKING_STORE_NOT_FOUND); break; case rpcn::ErrorType::ScoreInvalid: trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_INVALID_SCORE); break; case rpcn::ErrorType::ScoreHasData: trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_GAME_DATA_ALREADY_EXISTS); break; - default: fmt::throw_exception("Unexpected error in reply to RecordScoreData: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to RecordScoreData: %s", error); } } @@ -1149,7 +1210,7 @@ namespace np { case rpcn::ErrorType::NoError: break; case rpcn::ErrorType::NotFound: score_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_RANKING_GAME_DATA_MASTER_NOT_FOUND); return; - default: fmt::throw_exception("Unexpected error in reply to GetScoreData: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to GetScoreData: %s", error); } auto* tdata = std::get_if(&score_trans->tdata); @@ -1195,22 +1256,22 @@ namespace np } template - void set_rankdata_values(T& cur_rank, const ScoreRankData* fb_rankdata) + void set_rankdata_values(T& cur_rank, const np2_structs::ScoreRankData& pb_rankdata) { - string_to_npid(fb_rankdata->npId()->string_view(), cur_rank.npId); - string_to_online_name(fb_rankdata->onlineName()->string_view(), cur_rank.onlineName); + string_to_npid(pb_rankdata.npid(), cur_rank.npId); + string_to_online_name(pb_rankdata.onlinename(), cur_rank.onlineName); static_assert(std::is_same_v || std::is_same_v); if constexpr (std::is_same_v) - cur_rank.pcId = fb_rankdata->pcId(); + cur_rank.pcId = pb_rankdata.pcid(); - cur_rank.serialRank = fb_rankdata->rank(); - cur_rank.rank = fb_rankdata->rank(); - cur_rank.highestRank = fb_rankdata->rank(); - cur_rank.scoreValue = fb_rankdata->score(); - cur_rank.hasGameData = fb_rankdata->hasGameData(); - cur_rank.recordDate.tick = fb_rankdata->recordDate(); + cur_rank.serialRank = pb_rankdata.rank(); + cur_rank.rank = pb_rankdata.rank(); + cur_rank.highestRank = pb_rankdata.rank(); + cur_rank.scoreValue = pb_rankdata.score(); + cur_rank.hasGameData = pb_rankdata.hasgamedata(); + cur_rank.recordDate.tick = pb_rankdata.recorddate(); } void np_handler::handle_GetScoreResponse(u32 req_id, rpcn::ErrorType error, vec_stream& reply, bool simple_result) @@ -1229,18 +1290,17 @@ namespace np switch (error) { case rpcn::ErrorType::NoError: break; - default: fmt::throw_exception("Unexpected error in GetScoreResponse: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in GetScoreResponse: %s", error); } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Error parsing response in handle_GetScoreResponse"); const auto* tdata = std::get_if(&score_trans->tdata); ensure(tdata); - ensure(resp->rankArray() && resp->rankArray()->size() <= tdata->arrayNum); + ensure(static_cast(resp->rankarray_size()) <= tdata->arrayNum); memset(tdata->rankArray.get_ptr(), 0, tdata->rankArraySize); - auto* fb_rankarray = resp->rankArray(); vm::ptr rankPlayerArray = vm::static_ptr_cast(tdata->rankArray); vm::ptr rankPlayerArray_deprecated = vm::static_ptr_cast(tdata->rankArray); @@ -1249,14 +1309,15 @@ namespace np u32 num_scores_registered = 0; - for (flatbuffers::uoffset_t i = 0; i < fb_rankarray->size(); i++) + for (int i = 0; i < resp->rankarray_size(); i++) { - const auto* fb_rankdata = fb_rankarray->Get(i); - ensure(fb_rankdata->npId() && fb_rankdata->onlineName()); + const auto& pb_rankdata = resp->rankarray(i); - if (fb_rankdata->recordDate() == 0) + if (pb_rankdata.recorddate() == 0) continue; + ensure(!pb_rankdata.npid().empty() && !pb_rankdata.onlinename().empty()); + num_scores_registered++; if (tdata->player_rank_data) @@ -1264,75 +1325,73 @@ namespace np if (tdata->deprecated) { rankPlayerArray_deprecated[i].hasData = 1; - set_rankdata_values(rankPlayerArray_deprecated[i].rankData, fb_rankdata); + set_rankdata_values(rankPlayerArray_deprecated[i].rankData, pb_rankdata); } else { rankPlayerArray[i].hasData = 1; - set_rankdata_values(rankPlayerArray[i].rankData, fb_rankdata); + set_rankdata_values(rankPlayerArray[i].rankData, pb_rankdata); } } else { if (tdata->deprecated) { - set_rankdata_values(rankArray_deprecated[i], fb_rankdata); + set_rankdata_values(rankArray_deprecated[i], pb_rankdata); } else { - set_rankdata_values(rankArray[i], fb_rankdata); + set_rankdata_values(rankArray[i], pb_rankdata); } } } if (tdata->commentArray) { - ensure(resp->commentArray() && resp->commentArray()->size() <= tdata->arrayNum); + ensure(static_cast(resp->commentarray_size()) <= tdata->arrayNum); memset(tdata->commentArray.get_ptr(), 0, sizeof(SceNpScoreComment) * tdata->arrayNum); - auto* fb_commentarray = resp->commentArray(); - for (flatbuffers::uoffset_t i = 0; i < fb_commentarray->size(); i++) + for (int i = 0; i < resp->commentarray_size(); i++) { - const auto* fb_comment = fb_commentarray->Get(i); - strcpy_trunc(tdata->commentArray[i].data, fb_comment->string_view()); + const auto& pb_comment = resp->commentarray(i); + strcpy_trunc(tdata->commentArray[i].data, pb_comment); } } if (tdata->infoArray) { - ensure(resp->infoArray() && resp->infoArray()->size() <= tdata->arrayNum); - auto* fb_infoarray = resp->infoArray(); + ensure(static_cast(resp->infoarray_size()) <= tdata->arrayNum); if ((tdata->arrayNum * sizeof(SceNpScoreGameInfo)) == tdata->infoArraySize) { vm::ptr ptr_gameinfo = vm::static_ptr_cast(tdata->infoArray); memset(ptr_gameinfo.get_ptr(), 0, sizeof(SceNpScoreGameInfo) * tdata->arrayNum); - for (flatbuffers::uoffset_t i = 0; i < fb_infoarray->size(); i++) + for (int i = 0; i < resp->infoarray_size(); i++) { - const auto* fb_info = fb_infoarray->Get(i); - ensure(fb_info->data()->size() <= SCE_NP_SCORE_GAMEINFO_SIZE); - memcpy(ptr_gameinfo[i].nativeData, fb_info->data()->data(), fb_info->data()->size()); + const auto& pb_info = resp->infoarray(i); + ensure(pb_info.data().size() <= SCE_NP_SCORE_GAMEINFO_SIZE); + memcpy(ptr_gameinfo[i].nativeData, pb_info.data().data(), pb_info.data().size()); } } else { vm::ptr ptr_vargameinfo = vm::static_ptr_cast(tdata->infoArray); memset(ptr_vargameinfo.get_ptr(), 0, sizeof(SceNpScoreVariableSizeGameInfo) * tdata->arrayNum); - for (flatbuffers::uoffset_t i = 0; i < fb_infoarray->size(); i++) + for (int i = 0; i < resp->infoarray_size(); i++) { - const auto* fb_info = fb_infoarray->Get(i); - ensure(fb_info->data()->size() <= SCE_NP_SCORE_VARIABLE_SIZE_GAMEINFO_MAXSIZE); - ptr_vargameinfo[i].infoSize = fb_info->data()->size(); - memcpy(ptr_vargameinfo[i].data, fb_info->data(), fb_info->data()->size()); + const auto& pb_info = resp->infoarray(i); + ensure(pb_info.data().size() <= SCE_NP_SCORE_VARIABLE_SIZE_GAMEINFO_MAXSIZE); + ptr_vargameinfo[i].infoSize = ::narrow(pb_info.data().size()); + memcpy(ptr_vargameinfo[i].data, pb_info.data().data(), pb_info.data().size()); } } } - tdata->lastSortDate->tick = resp->lastSortDate(); - *tdata->totalRecord = resp->totalRecord(); + tdata->lastSortDate->tick = resp->lastsortdate(); + *tdata->totalRecord = resp->totalrecord(); if (num_scores_registered) - score_trans->result = simple_result ? CELL_OK : not_an_error(fb_rankarray->size()); + score_trans->result = simple_result ? CELL_OK : not_an_error(resp->rankarray_size()); else score_trans->result = SCE_NP_COMMUNITY_SERVER_ERROR_GAME_RANKING_NOT_FOUND; @@ -1420,7 +1479,7 @@ namespace np case rpcn::ErrorType::NotFound: trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_USER_NOT_ASSIGNED); break; case rpcn::ErrorType::Unauthorized: trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_FORBIDDEN); break; case rpcn::ErrorType::CondFail: trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_CONDITIONS_NOT_SATISFIED); break; - default: fmt::throw_exception("Unexpected error in handle_tus_no_data: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in handle_tus_no_data: %s", error); } } @@ -1443,42 +1502,40 @@ namespace np case rpcn::ErrorType::NotFound: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_USER_NOT_ASSIGNED); case rpcn::ErrorType::Unauthorized: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_FORBIDDEN); case rpcn::ErrorType::CondFail: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_CONDITIONS_NOT_SATISFIED); - default: fmt::throw_exception("Unexpected error in handle_TusVarResponse: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in handle_TusVarResponse: %s", error); } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Error parsing response in handle_TusVarResponse"); const auto* tdata = std::get_if(&tus_trans->tdata); ensure(tdata); - ensure(resp->vars() && resp->vars()->size() <= static_cast(tdata->arrayNum)); - - const auto* fb_vars = resp->vars(); + ensure(static_cast(resp->vars_size()) <= static_cast(tdata->arrayNum)); memset(tdata->variableArray.get_ptr(), 0, sizeof(SceNpTusVariable) * tdata->arrayNum); - for (flatbuffers::uoffset_t i = 0; i < fb_vars->size(); i++) + for (int i = 0; i < resp->vars_size(); i++) { auto* cur_var = &tdata->variableArray[i]; - const auto* cur_fb_var = fb_vars->Get(i); + const auto& cur_pb_var = resp->vars(i); - ensure(cur_fb_var->ownerId()); - string_to_npid(cur_fb_var->ownerId()->string_view(), cur_var->ownerId); + ensure(!cur_pb_var.ownerid().empty()); + string_to_npid(cur_pb_var.ownerid(), cur_var->ownerId); - if (!cur_fb_var->hasData()) + if (!cur_pb_var.hasdata()) { continue; } - ensure(cur_fb_var->lastChangedAuthorId()); + ensure(!cur_pb_var.lastchangedauthorid().empty()); cur_var->hasData = 1; - cur_var->lastChangedDate.tick = cur_fb_var->lastChangedDate(); - string_to_npid(cur_fb_var->lastChangedAuthorId()->string_view(), cur_var->lastChangedAuthorId); - cur_var->variable = cur_fb_var->variable(); - cur_var->oldVariable = cur_fb_var->oldVariable(); + cur_var->lastChangedDate.tick = cur_pb_var.lastchangeddate(); + string_to_npid(cur_pb_var.lastchangedauthorid(), cur_var->lastChangedAuthorId); + cur_var->variable = cur_pb_var.variable(); + cur_var->oldVariable = cur_pb_var.oldvariable(); } - tus_trans->result = not_an_error(fb_vars->size()); + tus_trans->result = not_an_error(resp->vars_size()); tus_trans->wake_cond.notify_one(); } @@ -1501,10 +1558,10 @@ namespace np case rpcn::ErrorType::NotFound: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_USER_NOT_ASSIGNED); case rpcn::ErrorType::Unauthorized: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_FORBIDDEN); case rpcn::ErrorType::CondFail: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_CONDITIONS_NOT_SATISFIED); - default: fmt::throw_exception("Unexpected error in handle_TusVariable: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in handle_TusVariable: %s", error); } - const auto* fb_var = reply.get_flatbuffer(); + auto pb_var = reply.get_protobuf(); ensure(!reply.is_error(), "Error parsing response in handle_TusVariable"); const auto* tdata = std::get_if(&tus_trans->tdata); @@ -1513,17 +1570,17 @@ namespace np auto* var = tdata->outVariable.get_ptr(); memset(var, 0, sizeof(SceNpTusVariable)); - ensure(fb_var->ownerId()); - string_to_npid(fb_var->ownerId()->string_view(), var->ownerId); + ensure(!pb_var->ownerid().empty()); + string_to_npid(pb_var->ownerid(), var->ownerId); - if (fb_var->hasData()) + if (pb_var->hasdata()) { - ensure(fb_var->lastChangedAuthorId()); + ensure(!pb_var->lastchangedauthorid().empty()); var->hasData = 1; - var->lastChangedDate.tick = fb_var->lastChangedDate(); - string_to_npid(fb_var->lastChangedAuthorId()->string_view(), var->lastChangedAuthorId); - var->variable = fb_var->variable(); - var->oldVariable = fb_var->oldVariable(); + var->lastChangedDate.tick = pb_var->lastchangeddate(); + string_to_npid(pb_var->lastchangedauthorid(), var->lastChangedAuthorId); + var->variable = pb_var->variable(); + var->oldVariable = pb_var->oldvariable(); } tus_trans->result = CELL_OK; @@ -1549,45 +1606,40 @@ namespace np case rpcn::ErrorType::NotFound: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_USER_NOT_ASSIGNED); case rpcn::ErrorType::Unauthorized: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_FORBIDDEN); case rpcn::ErrorType::CondFail: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_CONDITIONS_NOT_SATISFIED); - default: fmt::throw_exception("Unexpected error in handle_TusDataStatusResponse: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in handle_TusDataStatusResponse: %s", error); } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Error parsing response in handle_TusDataStatusReponse"); const auto* tdata = std::get_if(&tus_trans->tdata); ensure(tdata); - ensure(resp->status() && resp->status()->size() <= static_cast(tdata->arrayNum)); - - const auto* fb_status = resp->status(); + ensure(static_cast(resp->status_size()) <= static_cast(tdata->arrayNum)); memset(tdata->statusArray.get_ptr(), 0, sizeof(SceNpTusDataStatus) * tdata->arrayNum); - for (flatbuffers::uoffset_t i = 0; i < fb_status->size(); i++) + for (int i = 0; i < resp->status_size(); i++) { auto* cur_status = &tdata->statusArray[i]; - const auto* cur_fb_status = fb_status->Get(i); + const auto& cur_pb_status = resp->status(i); - ensure(cur_fb_status->ownerId()); - string_to_npid(cur_fb_status->ownerId()->string_view(), cur_status->ownerId); + ensure(!cur_pb_status.ownerid().empty()); + string_to_npid(cur_pb_status.ownerid(), cur_status->ownerId); - if (!cur_fb_status->hasData()) + if (!cur_pb_status.hasdata()) { continue; } - ensure(cur_fb_status->lastChangedAuthorId()); + ensure(!cur_pb_status.lastchangedauthorid().empty()); cur_status->hasData = 1; - cur_status->lastChangedDate.tick = cur_fb_status->lastChangedDate(); - string_to_npid(cur_fb_status->lastChangedAuthorId()->string_view(), cur_status->lastChangedAuthorId); - cur_status->info.infoSize = cur_fb_status->info() ? cur_fb_status->info()->size() : 0; - for (flatbuffers::uoffset_t i = 0; i < cur_status->info.infoSize; i++) - { - cur_status->info.data[i] = cur_fb_status->info()->Get(i); - } + cur_status->lastChangedDate.tick = cur_pb_status.lastchangeddate(); + string_to_npid(cur_pb_status.lastchangedauthorid(), cur_status->lastChangedAuthorId); + cur_status->info.infoSize = ::narrow(cur_pb_status.info().size()); + memcpy(cur_status->info.data, cur_pb_status.info().data(), cur_pb_status.info().size()); } - tus_trans->result = not_an_error(fb_status->size()); + tus_trans->result = not_an_error(resp->status_size()); tus_trans->wake_cond.notify_one(); } @@ -1754,7 +1806,7 @@ namespace np if (!tdata) { trans_ctx->tdata = tdata_tus_get_data{.recvSize = recvSize, .dataStatus = dataStatus, .data = data}; - const u32 req_id = get_req_id(REQUEST_ID_HIGH::SCORE); + const u32 req_id = get_req_id(REQUEST_ID_HIGH::TUS); get_rpcn()->tus_get_data(req_id, trans_ctx->communicationId, targetNpId, slotId, vuser); transaction_async_handler(std::move(lock), trans_ctx, req_id, async); return; @@ -1795,51 +1847,43 @@ namespace np case rpcn::ErrorType::NotFound: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_USER_NOT_ASSIGNED); case rpcn::ErrorType::Unauthorized: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_FORBIDDEN); case rpcn::ErrorType::CondFail: return tus_trans->set_result_and_wake(SCE_NP_COMMUNITY_SERVER_ERROR_CONDITIONS_NOT_SATISFIED); - default: fmt::throw_exception("Unexpected error in reply to TusGetData: %d", static_cast(error)); + default: fmt::throw_exception("Unexpected error in reply to TusGetData: %s", error); } - const auto* fb_data = reply.get_flatbuffer(); + auto pb_data = reply.get_protobuf(); ensure(!reply.is_error(), "Error parsing response in reply_tus_get_data"); auto* tdata = std::get_if(&tus_trans->tdata); ensure(tdata); - const auto* fb_status = fb_data->status(); - ensure(fb_status && fb_status->ownerId()); - if (!fb_status) - return; // Sanity check to make compiler happy + ensure(pb_data->has_status() && !pb_data->status().ownerid().empty()); + const auto& pb_status = pb_data->status(); auto* data_status = tdata->dataStatus.get_ptr(); auto* data = static_cast(tdata->data.get_ptr()); memset(data_status, 0, sizeof(SceNpTusDataStatus)); - string_to_npid(fb_status->ownerId()->string_view(), data_status->ownerId); + string_to_npid(pb_status.ownerid(), data_status->ownerId); - if (fb_status->hasData()) + if (pb_status.hasdata()) { data_status->hasData = 1; - data_status->lastChangedDate.tick = fb_status->lastChangedDate(); - string_to_npid(fb_status->lastChangedAuthorId()->string_view(), data_status->lastChangedAuthorId); + data_status->lastChangedDate.tick = pb_status.lastchangeddate(); + string_to_npid(pb_status.lastchangedauthorid(), data_status->lastChangedAuthorId); data_status->data = tdata->data; - data_status->dataSize = fb_data->data() ? fb_data->data()->size() : 0; - data_status->info.infoSize = fb_status->info() ? fb_status->info()->size() : 0; - + data_status->dataSize = ::narrow(pb_data->data().size()); + data_status->info.infoSize = ::narrow(pb_status.info().size()); + memcpy(data_status->info.data, pb_data->status().info().data(), std::min(pb_data->status().info().size(), sizeof(data_status->info.data))); + const u32 to_copy = std::min(data_status->dataSize, tdata->recvSize); - for (flatbuffers::uoffset_t i = 0; i < to_copy; i++) - { - data[i] = fb_data->data()->Get(i); - } + memcpy(data, pb_data->data().data(), to_copy); + const u32 bytes_left = data_status->dataSize - to_copy; - tdata->tus_data.reserve(bytes_left); - for (flatbuffers::uoffset_t i = to_copy; i < bytes_left; i++) + if (bytes_left > 0) { - tdata->tus_data.push_back(fb_data->data()->Get(i)); + tdata->tus_data.assign(pb_data->data().begin() + to_copy, pb_data->data().end()); } - for (flatbuffers::uoffset_t i = 0; i < data_status->info.infoSize; i++) - { - fb_status->info()->Get(i); - } tus_trans->result = not_an_error(to_copy); } else diff --git a/rpcs3/Emu/NP/np_requests_gui.cpp b/rpcs3/Emu/NP/np_requests_gui.cpp index 7782287053..5e38a57e77 100644 --- a/rpcs3/Emu/NP/np_requests_gui.cpp +++ b/rpcs3/Emu/NP/np_requests_gui.cpp @@ -6,7 +6,7 @@ #include "np_handler.h" #include "np_contexts.h" #include "np_structs_extra.h" -#include "fb_helpers.h" +#include "pb_helpers.h" LOG_CHANNEL(rpcn_log, "rpcn"); @@ -165,12 +165,12 @@ namespace np return; ensure(error == rpcn::ErrorType::NoError, "Unexpected error in CreateRoomGUI reply"); - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to CreateRoomGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingJoinedRoomInfo_SIZE), sizeof(SceNpMatchingJoinedRoomInfo), MAX_SceNpMatchingJoinedRoomInfo_SIZE); auto* room_info = reinterpret_cast(edata.data()); - MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(edata, resp, room_info); + MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(edata, *resp, room_info); np_memory.shrink_allocation(edata.addr(), edata.size()); gui_cache.add_room(room_info->room_status.id); @@ -230,12 +230,12 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to JoinRoomGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingJoinedRoomInfo_SIZE), sizeof(SceNpMatchingJoinedRoomInfo), MAX_SceNpMatchingJoinedRoomInfo_SIZE); auto* room_info = reinterpret_cast(edata.data()); - MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(edata, resp, room_info); + MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(edata, *resp, room_info); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingJoinedRoomInfo(room_info); @@ -291,19 +291,23 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to LeaveRoomGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingRoomStatus_SIZE), sizeof(SceNpMatchingRoomStatus), MAX_SceNpMatchingRoomStatus_SIZE); auto* room_status = reinterpret_cast(edata.data()); - MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, resp, room_status); + MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, *resp, room_status); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingRoomStatus(room_status); gui_cache.del_room(room_status->id); - gui_notifications.list.emplace(std::make_pair(gui_notifications.current_gui_ctx_id, req_id), gui_notification{.event = SCE_NP_MATCHING_EVENT_LEAVE_ROOM_DONE, .edata = std::move(edata)}); + { + std::lock_guard lock(gui_notifications.mutex); + gui_notifications.list.emplace(std::make_pair(gui_notifications.current_gui_ctx_id, req_id), gui_notification{.event = SCE_NP_MATCHING_EVENT_LEAVE_ROOM_DONE, .edata = std::move(edata)}); + } + ctx->queue_callback(req_id, SCE_NP_MATCHING_EVENT_LEAVE_ROOM_DONE, 0); } @@ -343,12 +347,12 @@ namespace np return; ensure(error == rpcn::ErrorType::NoError, "Unexpected error in GetRoomListGUI reply"); - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetRoomListGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingRoomList_SIZE), sizeof(SceNpMatchingRoomList), MAX_SceNpMatchingRoomList_SIZE); auto* room_list = reinterpret_cast(edata.data()); - MatchingRoomList_to_SceNpMatchingRoomList(edata, resp, room_list); + MatchingRoomList_to_SceNpMatchingRoomList(edata, *resp, room_list); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingRoomList(room_list); @@ -443,17 +447,21 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetRoomSearchFlagGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingRoom_SIZE), sizeof(SceNpMatchingRoom), MAX_SceNpMatchingRoom_SIZE); auto* room_info = reinterpret_cast(edata.data()); - MatchingRoom_to_SceNpMatchingRoom(edata, resp, room_info); + MatchingRoom_to_SceNpMatchingRoom(edata, *resp, room_info); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingRoom(room_info); - gui_notifications.list.emplace(std::make_pair(gui_notifications.current_gui_ctx_id, req_id), gui_notification{.event = SCE_NP_MATCHING_EVENT_GET_ROOM_SEARCH_FLAG_DONE, .edata = std::move(edata)}); + { + std::lock_guard lock(gui_notifications.mutex); + gui_notifications.list.emplace(std::make_pair(gui_notifications.current_gui_ctx_id, req_id), gui_notification{.event = SCE_NP_MATCHING_EVENT_GET_ROOM_SEARCH_FLAG_DONE, .edata = std::move(edata)}); + } + ctx->queue_callback(req_id, SCE_NP_MATCHING_EVENT_GET_ROOM_SEARCH_FLAG_DONE, 0); } @@ -538,17 +546,21 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to GetRoomInfoGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingRoom_SIZE), sizeof(SceNpMatchingRoom), MAX_SceNpMatchingRoom_SIZE); auto* room_info = reinterpret_cast(edata.data()); - MatchingRoom_to_SceNpMatchingRoom(edata, resp, room_info); + MatchingRoom_to_SceNpMatchingRoom(edata, *resp, room_info); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingRoom(room_info); - gui_notifications.list.emplace(std::make_pair(gui_notifications.current_gui_ctx_id, req_id), gui_notification{.event = SCE_NP_MATCHING_EVENT_GET_ROOM_INFO_DONE, .edata = std::move(edata)}); + { + std::lock_guard lock(gui_notifications.mutex); + gui_notifications.list.emplace(std::make_pair(gui_notifications.current_gui_ctx_id, req_id), gui_notification{.event = SCE_NP_MATCHING_EVENT_GET_ROOM_INFO_DONE, .edata = std::move(edata)}); + } + ctx->queue_callback(req_id, SCE_NP_MATCHING_EVENT_GET_ROOM_INFO_DONE, 0); } @@ -576,14 +588,18 @@ namespace np return; ensure(error == rpcn::ErrorType::NoError, "Unexpected error in QuickMatchGUI reply"); - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to QuickMatchGUI command"); SceNpRoomId room_id{}; - ensure(resp->id() && resp->id()->size() == sizeof(SceNpRoomId::opt)); - std::memcpy(room_id.opt, resp->id()->data(), sizeof(SceNpRoomId::opt)); - const auto [_, inserted] = pending_quickmatching.insert_or_assign(room_id, ctx->ctx_id); - ensure(inserted); + ensure(!resp->id().empty() && resp->id().size() == sizeof(SceNpRoomId::opt)); + ctx->wakey = 0; + std::memcpy(room_id.opt, resp->id().data(), sizeof(SceNpRoomId::opt)); + { + std::lock_guard lock(this->mutex_quickmatching); + const auto [_, inserted] = pending_quickmatching.insert_or_assign(room_id, ctx->ctx_id); + ensure(inserted); + } // Now that the reply has been received, we start the wait for the notification ctx->thread = std::make_unique>>("NP GUI Timeout Worker", [ctx, req_id, this](SceNpRoomId room_id) @@ -615,7 +631,6 @@ namespace np } }); - ctx->wakey = 0; auto& thread = *ctx->thread; thread(room_id); } @@ -657,12 +672,12 @@ namespace np return; } - const auto* resp = reply.get_flatbuffer(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to SearchJoinRoomGUI command"); event_data edata(np_memory.allocate(MAX_SceNpMatchingSearchJoinRoomInfo_SIZE), sizeof(SceNpMatchingSearchJoinRoomInfo), MAX_SceNpMatchingSearchJoinRoomInfo_SIZE); auto* room_info = reinterpret_cast(edata.data()); - MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(edata, resp, room_info); + MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(edata, *resp, room_info); np_memory.shrink_allocation(edata.addr(), edata.size()); extra_nps::print_SceNpMatchingSearchJoinRoomInfo(room_info); diff --git a/rpcs3/Emu/NP/np_structs_extra.cpp b/rpcs3/Emu/NP/np_structs_extra.cpp index 52f394ff2e..6774b20bc4 100644 --- a/rpcs3/Emu/NP/np_structs_extra.cpp +++ b/rpcs3/Emu/NP/np_structs_extra.cpp @@ -2,6 +2,7 @@ #include "stdafx.h" #include #include "np_structs_extra.h" +#include "np_helpers.h" LOG_CHANNEL(sceNp); LOG_CHANNEL(sceNp2); @@ -13,7 +14,7 @@ namespace extra_nps void print_SceNpUserInfo2(const SceNpUserInfo2* user) { sceNp2.warning("SceNpUserInfo2:"); - sceNp2.warning("npid: %s", static_cast(user->npId.handle.data)); + sceNp2.warning("npid: %s", np::npid_to_string(user->npId)); sceNp2.warning("onlineName: *0x%x(%s)", user->onlineName, user->onlineName ? static_cast(user->onlineName->data) : ""); sceNp2.warning("avatarUrl: *0x%x(%s)", user->avatarUrl, user->avatarUrl ? static_cast(user->avatarUrl->data) : ""); } @@ -195,11 +196,20 @@ namespace extra_nps } } + void print_SceNpMatching2RoomMemberDataExternal(const SceNpMatching2RoomMemberDataExternal* member) + { + sceNp2.warning("SceNpMatching2RoomMemberDataExternal:"); + sceNp2.warning("next: *0x%x", member->next); + print_SceNpUserInfo2(&member->userInfo); + sceNp2.warning("joinDate: %lld", member->joinDate.tick); + sceNp2.warning("role: %d", member->role); + } + void print_SceNpMatching2RoomMemberDataInternal(const SceNpMatching2RoomMemberDataInternal* member) { sceNp2.warning("SceNpMatching2RoomMemberDataInternal:"); sceNp2.warning("next: *0x%x", member->next); - sceNp2.warning("npId: %s", member->userInfo.npId.handle.data); + sceNp2.warning("npId: %s", np::npid_to_string(member->userInfo.npId)); sceNp2.warning("onlineName: %s", member->userInfo.onlineName ? member->userInfo.onlineName->data : ""); sceNp2.warning("avatarUrl: %s", member->userInfo.avatarUrl ? member->userInfo.avatarUrl->data : ""); sceNp2.warning("joinDate: %lld", member->joinDate.tick); @@ -397,6 +407,21 @@ namespace extra_nps } } + void print_SceNpMatching2GetRoomMemberDataExternalListResponse(const SceNpMatching2GetRoomMemberDataExternalListResponse* resp) + { + sceNp2.warning("SceNpMatching2GetRoomMemberDataExternalListResponse:"); + sceNp2.warning("roomMemberDataExternalNum: %d", resp->roomMemberDataExternalNum); + + vm::bptr cur_member = resp->roomMemberDataExternal; + + for (u32 i = 0; i < resp->roomMemberDataExternalNum && cur_member; i++) + { + sceNp2.warning("roomMemberDataExternal[%d]:", i); + print_SceNpMatching2RoomMemberDataExternal(cur_member.get_ptr()); + cur_member = cur_member->next; + } + } + void print_SceNpMatching2GetLobbyInfoListRequest(const SceNpMatching2GetLobbyInfoListRequest* resp) { sceNp2.warning("SceNpMatching2GetLobbyInfoListRequest:"); @@ -436,7 +461,7 @@ namespace extra_nps void print_SceNpScoreRankData(const SceNpScoreRankData* data) { sceNp.warning("sceNpScoreRankData:"); - sceNp.warning("npId: %s", static_cast(data->npId.handle.data)); + sceNp.warning("npId: %s", np::npid_to_string(data->npId)); sceNp.warning("onlineName: %s", static_cast(data->onlineName.data)); sceNp.warning("pcId: %d", data->pcId); sceNp.warning("serialRank: %d", data->serialRank); @@ -450,7 +475,7 @@ namespace extra_nps void print_SceNpScoreRankData_deprecated(const SceNpScoreRankData_deprecated* data) { sceNp.warning("sceNpScoreRankData_deprecated:"); - sceNp.warning("npId: %s", static_cast(data->npId.handle.data)); + sceNp.warning("npId: %s", np::npid_to_string(data->npId)); sceNp.warning("onlineName: %s", static_cast(data->onlineName.data)); sceNp.warning("serialRank: %d", data->serialRank); sceNp.warning("rank: %d", data->rank); @@ -518,7 +543,7 @@ namespace extra_nps void print_SceNpUserInfo(const SceNpUserInfo* data) { - sceNp.warning("userId: %s", data->userId.handle.data); + sceNp.warning("userId: %s", np::npid_to_string(data->userId)); sceNp.warning("name: %s", data->name.data); sceNp.warning("icon: %s", data->icon.data); } @@ -552,7 +577,7 @@ namespace extra_nps if (data->kick_actor) { - sceNp.warning("kick_actor: %s", data->kick_actor->handle.data); + sceNp.warning("kick_actor: %s", np::npid_to_string(*data->kick_actor)); } sceNp.warning("opt: 0x%x", data->kick_actor); diff --git a/rpcs3/Emu/NP/np_structs_extra.h b/rpcs3/Emu/NP/np_structs_extra.h index 1c722a0cf2..45f4cffc4a 100644 --- a/rpcs3/Emu/NP/np_structs_extra.h +++ b/rpcs3/Emu/NP/np_structs_extra.h @@ -11,6 +11,7 @@ namespace extra_nps void print_SceNpMatching2RangeFilter(const SceNpMatching2RangeFilter* filt); void print_SceNpMatching2RoomDataInternal(const SceNpMatching2RoomDataInternal* room); void print_SceNpMatching2RoomDataExternal(const SceNpMatching2RoomDataExternal* room); + void print_SceNpMatching2RoomMemberDataExternal(const SceNpMatching2RoomMemberDataExternal* room); void print_SceNpMatching2RoomMemberDataInternal(const SceNpMatching2RoomMemberDataInternal* member); void print_SceNpMatching2CreateJoinRoomRequest(const SceNpMatching2CreateJoinRoomRequest* req); @@ -24,6 +25,7 @@ namespace extra_nps void print_SceNpMatching2SetRoomMemberDataInternalRequest(const SceNpMatching2SetRoomMemberDataInternalRequest* req); void print_SceNpMatching2GetRoomDataExternalListRequest(const SceNpMatching2GetRoomDataExternalListRequest* req); void print_SceNpMatching2GetRoomDataExternalListResponse(const SceNpMatching2GetRoomDataExternalListResponse* resp); + void print_SceNpMatching2GetRoomMemberDataExternalListResponse(const SceNpMatching2GetRoomMemberDataExternalListResponse* resp); void print_SceNpMatching2GetLobbyInfoListRequest(const SceNpMatching2GetLobbyInfoListRequest* resp); diff --git a/rpcs3/Emu/NP/pb_helpers.cpp b/rpcs3/Emu/NP/pb_helpers.cpp new file mode 100644 index 0000000000..3debd0ba20 --- /dev/null +++ b/rpcs3/Emu/NP/pb_helpers.cpp @@ -0,0 +1,663 @@ +#include "stdafx.h" +#include "Emu/Cell/lv2/sys_process.h" +#include "pb_helpers.h" + +LOG_CHANNEL(rpcn_log, "rpcn"); + +namespace np +{ + void BinAttr_to_SceNpMatching2BinAttr(event_data& edata, const np2_structs::BinAttr& bin_attr, SceNpMatching2BinAttr* binattr_info) + { + binattr_info->id = bin_attr.id().value(); + binattr_info->size = ::narrow(bin_attr.data().size()); + auto* ptr = edata.allocate(binattr_info->size, binattr_info->ptr); + memcpy(ptr, bin_attr.data().data(), bin_attr.data().size()); + } + + void BinAttrs_to_SceNpMatching2BinAttrs(event_data& edata, const google::protobuf::RepeatedPtrField& pb_attrs, SceNpMatching2BinAttr* binattr_info) + { + for (int i = 0; i < pb_attrs.size(); i++) + { + const auto& cur_pb_attr = pb_attrs.Get(i); + auto* cur_binattr = binattr_info + i; + + BinAttr_to_SceNpMatching2BinAttr(edata, cur_pb_attr, cur_binattr); + } + } + + void RoomMemberBinAttrInternal_to_SceNpMatching2RoomMemberBinAttrInternal(event_data& edata, const np2_structs::RoomMemberBinAttrInternal& pb_attr, SceNpMatching2RoomMemberBinAttrInternal* binattr_info) + { + binattr_info->updateDate.tick = pb_attr.updatedate(); + BinAttr_to_SceNpMatching2BinAttr(edata, pb_attr.data(), &binattr_info->data); + } + + void RoomBinAttrInternal_to_SceNpMatching2RoomBinAttrInternal(event_data& edata, const np2_structs::BinAttrInternal& pb_attr, SceNpMatching2RoomBinAttrInternal* binattr_info) + { + binattr_info->updateDate.tick = pb_attr.updatedate(); + binattr_info->updateMemberId = pb_attr.updatememberid().value(); + BinAttr_to_SceNpMatching2BinAttr(edata, pb_attr.data(), &binattr_info->data); + } + + void RoomGroup_to_SceNpMatching2RoomGroup(const np2_structs::RoomGroup& pb_group, SceNpMatching2RoomGroup* sce_group) + { + sce_group->groupId = pb_group.groupid().value(); + sce_group->withPassword = pb_group.withpassword(); + sce_group->withLabel = !pb_group.label().empty(); + if (!pb_group.label().empty()) + { + const auto& label = pb_group.label(); + for (usz l_index = 0; l_index < label.size() && l_index < sizeof(sce_group->label.data); l_index++) + { + sce_group->label.data[l_index] = static_cast(label[l_index]); + } + } + sce_group->slotNum = pb_group.slotnum(); + sce_group->curGroupMemberNum = pb_group.curgroupmembernum(); + } + + void RoomGroups_to_SceNpMatching2RoomGroups(const google::protobuf::RepeatedPtrField& pb_groups, SceNpMatching2RoomGroup* sce_groups) + { + for (int i = 0; i < pb_groups.size(); i++) + { + const auto& pb_group = pb_groups.Get(i); + SceNpMatching2RoomGroup* sce_group = &sce_groups[i]; + RoomGroup_to_SceNpMatching2RoomGroup(pb_group, sce_group); + } + } + + void UserInfo_to_SceNpUserInfo(const np2_structs::UserInfo& user, SceNpUserInfo* user_info) + { + if (!user.npid().empty()) + { + std::memcpy(user_info->userId.handle.data, user.npid().c_str(), std::min(16, user.npid().size())); + } + + if (!user.onlinename().empty()) + { + std::memcpy(user_info->name.data, user.onlinename().c_str(), std::min(48, user.onlinename().size())); + } + + if (!user.avatarurl().empty()) + { + std::memcpy(user_info->icon.data, user.avatarurl().c_str(), std::min(127, user.avatarurl().size())); + } + } + + void UserInfo_to_SceNpUserInfo2(event_data& edata, const np2_structs::UserInfo& user, SceNpUserInfo2* user_info, bool include_onlinename, bool include_avatarurl) + { + if (!user.npid().empty()) + std::memcpy(user_info->npId.handle.data, user.npid().c_str(), std::min(16, user.npid().size())); + + if (include_onlinename && !user.onlinename().empty()) + { + auto* ptr = edata.allocate(sizeof(SceNpOnlineName), user_info->onlineName); + std::memcpy(ptr->data, user.onlinename().c_str(), std::min(48, user.onlinename().size())); + } + if (include_avatarurl && !user.avatarurl().empty()) + { + auto* ptr = edata.allocate(sizeof(SceNpAvatarUrl), user_info->avatarUrl); + std::memcpy(ptr->data, user.avatarurl().c_str(), std::min(127, user.avatarurl().size())); + } + } + + void RoomDataExternal_to_SceNpMatching2RoomDataExternal(event_data& edata, const np2_structs::RoomDataExternal& room, SceNpMatching2RoomDataExternal* room_info, bool include_onlinename, bool include_avatarurl) + { + room_info->serverId = room.serverid().value(); + room_info->worldId = room.worldid(); + room_info->lobbyId = room.lobbyid(); + room_info->roomId = room.roomid(); + room_info->maxSlot = room.maxslot().value(); + room_info->curMemberNum = room.curmembernum().value(); + room_info->passwordSlotMask = room.passwordslotmask(); + + s32 sdk_ver; + process_get_sdk_version(process_getpid(), sdk_ver); + + // Structure changed in sdk 3.3.0 + if (sdk_ver >= 0x330000) + { + room_info->publicSlotNum = room.publicslotnum().value(); + room_info->privateSlotNum = room.privateslotnum().value(); + room_info->openPublicSlotNum = room.openpublicslotnum().value(); + room_info->openPrivateSlotNum = room.openprivateslotnum().value(); + } + else + { + room_info->publicSlotNum = 0; + room_info->privateSlotNum = 0; + room_info->openPublicSlotNum = 0; + room_info->openPrivateSlotNum = 0; + } + + if (room.has_owner()) + { + auto* ptr_owner = edata.allocate(sizeof(SceNpUserInfo2), room_info->owner); + UserInfo_to_SceNpUserInfo2(edata, room.owner(), ptr_owner, include_onlinename, include_avatarurl); + } + + if (room.roomgroup_size() != 0) + { + room_info->roomGroupNum = room.roomgroup_size(); + auto* ptr_groups = edata.allocate(sizeof(SceNpMatching2RoomGroup) * room_info->roomGroupNum, room_info->roomGroup); + RoomGroups_to_SceNpMatching2RoomGroups(room.roomgroup(), ptr_groups); + } + + room_info->flagAttr = room.flagattr(); + + if (room.roomsearchableintattrexternal_size() != 0) + { + room_info->roomSearchableIntAttrExternalNum = room.roomsearchableintattrexternal_size(); + auto* ptr_int_attr = edata.allocate(sizeof(SceNpMatching2IntAttr) * room_info->roomSearchableIntAttrExternalNum, room_info->roomSearchableIntAttrExternal); + for (int a_index = 0; a_index < room.roomsearchableintattrexternal_size(); a_index++) + { + const auto& pb_int_attr = room.roomsearchableintattrexternal(a_index); + ptr_int_attr[a_index].id = pb_int_attr.id().value(); + ptr_int_attr[a_index].num = pb_int_attr.num(); + } + } + + if (room.roomsearchablebinattrexternal_size() != 0) + { + room_info->roomSearchableBinAttrExternalNum = room.roomsearchablebinattrexternal_size(); + auto* ptr_bin_attr = edata.allocate(sizeof(SceNpMatching2BinAttr) * room_info->roomSearchableBinAttrExternalNum, room_info->roomSearchableBinAttrExternal); + BinAttrs_to_SceNpMatching2BinAttrs(edata, room.roomsearchablebinattrexternal(), ptr_bin_attr); + } + + if (room.roombinattrexternal_size() != 0) + { + room_info->roomBinAttrExternalNum = room.roombinattrexternal_size(); + auto* ptr_bin_attr = edata.allocate(sizeof(SceNpMatching2BinAttr) * room_info->roomBinAttrExternalNum, room_info->roomBinAttrExternal); + BinAttrs_to_SceNpMatching2BinAttrs(edata, room.roombinattrexternal(), ptr_bin_attr); + } + } + + void RoomMemberDataExternal_to_SceNpMatching2RoomMemberDataExternal(event_data& edata, const np2_structs::RoomMemberDataExternal& member, SceNpMatching2RoomMemberDataExternal* member_info, bool include_onlinename, bool include_avatarurl) + { + ensure(member.has_userinfo()); + + UserInfo_to_SceNpUserInfo2(edata, member.userinfo(), &member_info->userInfo, include_onlinename, include_avatarurl); + member_info->joinDate.tick = member.joindate(); + member_info->role = member.role().value(); + } + + void SearchRoomResponse_to_SceNpMatching2SearchRoomResponse(event_data& edata, const np2_structs::SearchRoomResponse& resp, SceNpMatching2SearchRoomResponse* search_resp) + { + search_resp->range.size = resp.rooms_size(); + search_resp->range.startIndex = resp.startindex(); + search_resp->range.total = resp.total(); + + SceNpMatching2RoomDataExternal* prev_room = nullptr; + for (int i = 0; i < resp.rooms_size(); i++) + { + const auto& pb_room = resp.rooms(i); + SceNpMatching2RoomDataExternal* cur_room = edata.allocate(sizeof(SceNpMatching2RoomDataExternal), (i > 0) ? prev_room->next : search_resp->roomDataExternal); + RoomDataExternal_to_SceNpMatching2RoomDataExternal(edata, pb_room, cur_room, true, true); + prev_room = cur_room; + } + } + + void GetRoomDataExternalListResponse_to_SceNpMatching2GetRoomDataExternalListResponse(event_data& edata, const np2_structs::GetRoomDataExternalListResponse& resp, SceNpMatching2GetRoomDataExternalListResponse* get_resp, bool include_onlinename, bool include_avatarurl) + { + get_resp->roomDataExternalNum = resp.rooms_size(); + + SceNpMatching2RoomDataExternal* prev_room = nullptr; + for (int i = 0; i < resp.rooms_size(); i++) + { + const auto& pb_room = resp.rooms(i); + SceNpMatching2RoomDataExternal* cur_room = edata.allocate(sizeof(SceNpMatching2RoomDataExternal), (i > 0) ? prev_room->next : get_resp->roomDataExternal); + + RoomDataExternal_to_SceNpMatching2RoomDataExternal(edata, pb_room, cur_room, include_onlinename, include_avatarurl); + prev_room = cur_room; + } + } + + void GetRoomMemberDataExternalListResponse_to_SceNpMatching2GetRoomMemberDataExternalListResponse(event_data& edata, const np2_structs::GetRoomMemberDataExternalListResponse& resp, SceNpMatching2GetRoomMemberDataExternalListResponse* get_resp, bool include_onlinename, bool include_avatarurl) + { + get_resp->roomMemberDataExternalNum = resp.members_size(); + + SceNpMatching2RoomMemberDataExternal* prev_member = nullptr; + for (int i = 0; i < resp.members_size(); i++) + { + const auto& pb_member = resp.members(i); + SceNpMatching2RoomMemberDataExternal* cur_member = edata.allocate(sizeof(SceNpMatching2RoomMemberDataExternal), (i > 0) ? prev_member->next : get_resp->roomMemberDataExternal); + + RoomMemberDataExternal_to_SceNpMatching2RoomMemberDataExternal(edata, pb_member, cur_member, include_onlinename, include_avatarurl); + prev_member = cur_member; + } + } + + u16 RoomDataInternal_to_SceNpMatching2RoomDataInternal(event_data& edata, const np2_structs::RoomDataInternal& resp, SceNpMatching2RoomDataInternal* room_info, const SceNpId& npid, bool include_onlinename, bool include_avatarurl) + { + u16 member_id = 0; + room_info->serverId = resp.serverid().value(); + room_info->worldId = resp.worldid(); + room_info->lobbyId = resp.lobbyid(); + room_info->roomId = resp.roomid(); + room_info->passwordSlotMask = resp.passwordslotmask(); + room_info->maxSlot = resp.maxslot(); + + if (resp.roomgroup_size() != 0) + { + room_info->roomGroupNum = resp.roomgroup_size(); + auto* ptr_groups = edata.allocate(sizeof(SceNpMatching2RoomGroup) * room_info->roomGroupNum, room_info->roomGroup); + RoomGroups_to_SceNpMatching2RoomGroups(resp.roomgroup(), ptr_groups); + } + + room_info->memberList.membersNum = static_cast(resp.memberlist_size()); + edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal) * room_info->memberList.membersNum, room_info->memberList.members); + + for (int i = 0; i < resp.memberlist_size(); i++) + { + const auto& pb_member = resp.memberlist(i); + SceNpMatching2RoomMemberDataInternal* sce_member = &room_info->memberList.members[i]; + + if (i < (resp.memberlist_size() - 1)) + { + sce_member->next = room_info->memberList.members + i + 1; + edata.add_relocation(sce_member->next); + } + + RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, pb_member, room_info, sce_member, include_onlinename, include_avatarurl); + } + + for (u32 i = 0; i < room_info->memberList.membersNum; i++) + { + SceNpMatching2RoomMemberDataInternal* sce_member = &room_info->memberList.members[i]; + if (strncmp(sce_member->userInfo.npId.handle.data, npid.handle.data, 16) == 0) + { + room_info->memberList.me = room_info->memberList.members + i; + edata.add_relocation(room_info->memberList.me); + member_id = sce_member->memberId; + break; + } + } + + for (u32 i = 0; i < room_info->memberList.membersNum; i++) + { + SceNpMatching2RoomMemberDataInternal* sce_member = &room_info->memberList.members[i]; + if (sce_member->memberId == resp.ownerid().value()) + { + room_info->memberList.owner = room_info->memberList.members + i; + edata.add_relocation(room_info->memberList.owner); + break; + } + } + + room_info->flagAttr = resp.flagattr(); + + if (resp.roombinattrinternal_size() != 0) + { + room_info->roomBinAttrInternalNum = resp.roombinattrinternal_size(); + auto* ptr_bin_attr = edata.allocate(sizeof(SceNpMatching2RoomBinAttrInternal) * room_info->roomBinAttrInternalNum, room_info->roomBinAttrInternal); + + for (u32 b_index = 0; b_index < room_info->roomBinAttrInternalNum; b_index++) + { + const auto& pb_bin_attr = resp.roombinattrinternal(b_index); + ptr_bin_attr[b_index].updateDate.tick = pb_bin_attr.updatedate(); + ptr_bin_attr[b_index].updateMemberId = pb_bin_attr.updatememberid().value(); + + ptr_bin_attr[b_index].data.id = pb_bin_attr.data().id().value(); + ptr_bin_attr[b_index].data.size = ::narrow(pb_bin_attr.data().data().size()); + auto* ptr_bin_attr_data = edata.allocate(ptr_bin_attr[b_index].data.size, ptr_bin_attr[b_index].data.ptr); + memcpy(ptr_bin_attr_data, pb_bin_attr.data().data().data(), pb_bin_attr.data().data().size()); + } + } + + return member_id; + } + + void RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(event_data& edata, const np2_structs::RoomMemberDataInternal& member_data, const SceNpMatching2RoomDataInternal* room_info, SceNpMatching2RoomMemberDataInternal* sce_member_data, bool include_onlinename, bool include_avatarurl) + { + UserInfo_to_SceNpUserInfo2(edata, member_data.userinfo(), &sce_member_data->userInfo, include_onlinename, include_avatarurl); + sce_member_data->joinDate.tick = member_data.joindate(); + sce_member_data->memberId = member_data.memberid(); + sce_member_data->teamId = member_data.teamid().value(); + + if (member_data.has_roomgroup()) + { + const auto& pb_roomgroup = member_data.roomgroup(); + if (room_info) + { + // If we have SceNpMatching2RoomDataInternal available we point the pointers to the group there + sce_member_data->roomGroup = room_info->roomGroup + (pb_roomgroup.groupid().value() - 1); + edata.add_relocation(sce_member_data->roomGroup); + } + else + { + // Otherwise we allocate for it + auto* ptr_group = edata.allocate(sizeof(SceNpMatching2RoomGroup), sce_member_data->roomGroup); + RoomGroup_to_SceNpMatching2RoomGroup(pb_roomgroup, ptr_group); + } + } + + sce_member_data->natType = member_data.nattype().value(); + sce_member_data->flagAttr = member_data.flagattr(); + + if (member_data.roommemberbinattrinternal_size() != 0) + { + sce_member_data->roomMemberBinAttrInternalNum = member_data.roommemberbinattrinternal_size(); + auto* sce_binattrs = edata.allocate(sizeof(SceNpMatching2RoomMemberBinAttrInternal) * sce_member_data->roomMemberBinAttrInternalNum, sce_member_data->roomMemberBinAttrInternal); + for (u32 b_index = 0; b_index < sce_member_data->roomMemberBinAttrInternalNum; b_index++) + { + const auto& pb_battr = member_data.roommemberbinattrinternal(b_index); + sce_binattrs[b_index].updateDate.tick = pb_battr.updatedate(); + + sce_binattrs[b_index].data.id = pb_battr.data().id().value(); + sce_binattrs[b_index].data.size = ::narrow(pb_battr.data().data().size()); + auto* sce_binattr_data = edata.allocate(sce_binattrs[b_index].data.size, sce_binattrs[b_index].data.ptr); + memcpy(sce_binattr_data, pb_battr.data().data().data(), pb_battr.data().data().size()); + } + } + } + + void RoomMemberUpdateInfo_to_SceNpMatching2RoomMemberUpdateInfo(event_data& edata, const np2_structs::RoomMemberUpdateInfo& update_info, SceNpMatching2RoomMemberUpdateInfo* sce_update_info, bool include_onlinename, bool include_avatarurl) + { + sce_update_info->eventCause = 0; + if (update_info.has_optdata()) + { + const auto& opt_data = update_info.optdata(); + sce_update_info->optData.length = ::narrow(opt_data.data().size()); + for (usz i = 0; i < 16 && i < opt_data.data().size(); i++) + { + sce_update_info->optData.data[i] = static_cast(opt_data.data()[i]); + } + } + + if (update_info.has_roommemberdatainternal()) + { + const auto& pb_member = update_info.roommemberdatainternal(); + auto* ptr_roomemberinternal = edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal), sce_update_info->roomMemberDataInternal); + + // TODO: Pass room_info + RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, pb_member, nullptr, ptr_roomemberinternal, include_onlinename, include_avatarurl); + } + } + + void RoomUpdateInfo_to_SceNpMatching2RoomUpdateInfo(const np2_structs::RoomUpdateInfo& update_info, SceNpMatching2RoomUpdateInfo* sce_update_info) + { + sce_update_info->errorCode = 0; + sce_update_info->eventCause = 0; + if (update_info.has_optdata()) + { + const auto& opt_data = update_info.optdata(); + sce_update_info->optData.length = ::narrow(opt_data.data().size()); + for (usz i = 0; i < 16 && i < opt_data.data().size(); i++) + { + sce_update_info->optData.data[i] = static_cast(opt_data.data()[i]); + } + } + } + + void RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo(event_data& edata, const np2_structs::RoomDataInternalUpdateInfo& update_info, SceNpMatching2RoomDataInternalUpdateInfo* sce_update_info, const SceNpId& npid, bool include_onlinename, bool include_avatarurl) + { + auto* sce_room_data = edata.allocate(sizeof(SceNpMatching2RoomDataInternal), sce_update_info->newRoomDataInternal); + RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, update_info.newroomdatainternal(), sce_room_data, npid, include_onlinename, include_avatarurl); + + if (sce_room_data->flagAttr != update_info.prevflagattr()) + { + sce_update_info->newFlagAttr = sce_update_info->newRoomDataInternal.ptr(&SceNpMatching2RoomDataInternal::flagAttr); + edata.add_relocation(sce_update_info->newFlagAttr); + auto* ptr_sce_prevflag = edata.allocate(sizeof(SceNpMatching2FlagAttr), sce_update_info->prevFlagAttr); + *ptr_sce_prevflag = update_info.prevflagattr(); + } + + if (sce_room_data->passwordSlotMask != update_info.prevroompasswordslotmask()) + { + sce_update_info->newRoomPasswordSlotMask = sce_update_info->newRoomDataInternal.ptr(&SceNpMatching2RoomDataInternal::passwordSlotMask); + edata.add_relocation(sce_update_info->newRoomPasswordSlotMask); + auto* ptr_sce_prevpass = edata.allocate(sizeof(SceNpMatching2RoomPasswordSlotMask), sce_update_info->prevRoomPasswordSlotMask); + *ptr_sce_prevpass = update_info.prevroompasswordslotmask(); + } + + if (!update_info.newroomgroup().empty()) + { + rpcn_log.todo("RoomDataInternalUpdateInfo::newRoomGroup"); + // TODO + // sce_update_info->newRoomGroupNum = update_info.newroomgroup().size(); + // vm::ptr group_info(allocate(sizeof(SceNpMatching2RoomGroup) * sce_update_info->newRoomGroupNum)); + // RoomGroups_to_SceNpMatching2RoomGroup(update_info.newroomgroup(), group_info); + // sce_update_info->newRoomGroup = group_info; + } + + if (update_info.newroombinattrinternal_size() != 0) + { + const auto get_ptr_for_binattr = [&](u16 binattr_id) -> vm::bptr + { + vm::bptr ret_ptr = sce_room_data->roomBinAttrInternal; + for (u32 i = 0; i < sce_room_data->roomBinAttrInternalNum; i++) + { + if (ret_ptr->data.id == binattr_id) + return ret_ptr; + + ret_ptr++; + } + rpcn_log.fatal("RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo: Couldn't find matching roomBinAttrInternal!"); + return vm::null; + }; + + sce_update_info->newRoomBinAttrInternalNum = update_info.newroombinattrinternal_size(); + edata.allocate_ptr_array(sce_update_info->newRoomBinAttrInternalNum, sce_update_info->newRoomBinAttrInternal); + for (u32 i = 0; i < sce_update_info->newRoomBinAttrInternalNum; i++) + { + sce_update_info->newRoomBinAttrInternal[i] = get_ptr_for_binattr(update_info.newroombinattrinternal(i).value()); + } + } + } + + void RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo(event_data& edata, const np2_structs::RoomMemberDataInternalUpdateInfo& update_info, SceNpMatching2RoomMemberDataInternalUpdateInfo* sce_update_info, bool include_onlinename, bool include_avatarurl) + { + auto* sce_room_member_data = edata.allocate(sizeof(SceNpMatching2RoomMemberDataInternal), sce_update_info->newRoomMemberDataInternal); + RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(edata, update_info.newroommemberdatainternal(), nullptr, sce_room_member_data, include_onlinename, include_avatarurl); + + if (sce_update_info->newRoomMemberDataInternal->flagAttr != update_info.prevflagattr()) + { + sce_update_info->newFlagAttr = sce_update_info->newRoomMemberDataInternal.ptr(&SceNpMatching2RoomMemberDataInternal::flagAttr); + edata.add_relocation(sce_update_info->newFlagAttr); + auto* ptr_sce_prevflag = edata.allocate(sizeof(SceNpMatching2FlagAttr), sce_update_info->prevFlagAttr); + *ptr_sce_prevflag = update_info.prevflagattr(); + } + + if (sce_update_info->newRoomMemberDataInternal->teamId != update_info.prevteamid().value()) + { + sce_update_info->newTeamId = sce_update_info->newRoomMemberDataInternal.ptr(&SceNpMatching2RoomMemberDataInternal::teamId); + edata.add_relocation(sce_update_info->newTeamId); + } + + if (update_info.newroommemberbinattrinternal_size() != 0) + { + const auto get_ptr_for_binattr = [&](u16 binattr_id) -> vm::bptr + { + vm::bptr ret_ptr = sce_room_member_data->roomMemberBinAttrInternal; + for (u32 i = 0; i < sce_room_member_data->roomMemberBinAttrInternalNum; i++) + { + if (ret_ptr->data.id == binattr_id) + return ret_ptr; + + ret_ptr++; + } + rpcn_log.fatal("RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo: Couldn't find matching roomMemberBinAttrInternal!"); + return vm::null; + }; + + sce_update_info->newRoomMemberBinAttrInternalNum = update_info.newroommemberbinattrinternal_size(); + edata.allocate_ptr_array(sce_update_info->newRoomMemberBinAttrInternalNum, sce_update_info->newRoomMemberBinAttrInternal); + for (u32 i = 0; i < sce_update_info->newRoomMemberBinAttrInternalNum; i++) + { + sce_update_info->newRoomMemberBinAttrInternal[i] = get_ptr_for_binattr(update_info.newroommemberbinattrinternal(i).value()); + } + } + } + + void GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(const np2_structs::GetPingInfoResponse& resp, SceNpMatching2SignalingGetPingInfoResponse* sce_resp) + { + sce_resp->serverId = resp.serverid().value(); + sce_resp->worldId = resp.worldid(); + sce_resp->roomId = resp.roomid(); + sce_resp->rtt = resp.rtt(); + } + + void RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(event_data& edata, const np2_structs::RoomMessageInfo& mi, SceNpMatching2RoomMessageInfo* sce_mi, bool include_onlinename, bool include_avatarurl) + { + sce_mi->filtered = mi.filtered(); + sce_mi->castType = mi.casttype().value(); + + if (sce_mi->castType != SCE_NP_MATCHING2_CASTTYPE_BROADCAST) + { + edata.allocate(sizeof(SceNpMatching2RoomMessageDestination), sce_mi->dst); + } + + switch (sce_mi->castType) + { + case SCE_NP_MATCHING2_CASTTYPE_BROADCAST: break; + case SCE_NP_MATCHING2_CASTTYPE_UNICAST: sce_mi->dst->unicastTarget = mi.dst(0).value(); break; + case SCE_NP_MATCHING2_CASTTYPE_MULTICAST: + { + sce_mi->dst->multicastTarget.memberIdNum = mi.dst_size(); + edata.allocate(sizeof(u16) * mi.dst_size(), sce_mi->dst->multicastTarget.memberId); + for (int i = 0; i < mi.dst_size(); i++) + { + sce_mi->dst->multicastTarget.memberId[i] = mi.dst(i).value(); + } + break; + } + case SCE_NP_MATCHING2_CASTTYPE_MULTICAST_TEAM: sce_mi->dst->multicastTargetTeamId = ::narrow(mi.dst(0).value()); break; + default: ensure(false); + } + + if (mi.has_srcmember()) + { + auto* ptr_sce_userinfo = edata.allocate(sizeof(SceNpUserInfo2), sce_mi->srcMember); + UserInfo_to_SceNpUserInfo2(edata, mi.srcmember(), ptr_sce_userinfo, include_onlinename, include_avatarurl); + } + + if (!mi.msg().empty()) + { + sce_mi->msgLen = ::size32(mi.msg()); + auto* ptr_msg_data = static_cast(edata.allocate(::size32(mi.msg()), sce_mi->msg)); + memcpy(ptr_msg_data, mi.msg().data(), mi.msg().size()); + } + } + + void MatchingRoomStatus_to_SceNpMatchingRoomStatus(event_data& edata, const np2_structs::MatchingRoomStatus& resp, SceNpMatchingRoomStatus* room_status) + { + const auto& vec_id = resp.id(); + ensure(vec_id.size() == 28, "Invalid room id in MatchingRoomStatus"); + + for (usz i = 0; i < 28; i++) + { + room_status->id.opt[i] = static_cast(vec_id[i]); + } + + // In some events the member list can be empty + if (resp.members_size() > 0) + { + room_status->num = resp.members_size(); + SceNpMatchingRoomMember* prev_member{}; + + for (int i = 0; i < resp.members_size(); i++) + { + auto* cur_member = edata.allocate(sizeof(SceNpMatchingRoomMember), (i > 0) ? prev_member->next : room_status->members); + const auto& member = resp.members(i); + ensure(member.has_info(), "Invalid member in MatchingRoomStatus list"); + + cur_member->owner = member.owner() ? 1 : 0; + UserInfo_to_SceNpUserInfo(member.info(), &cur_member->user_info); + + prev_member = cur_member; + } + } + + if (!resp.kick_actor().empty()) + { + auto* npid = edata.allocate(sizeof(SceNpId), room_status->kick_actor); + std::memcpy(npid->handle.data, resp.kick_actor().c_str(), std::min(16, resp.kick_actor().size())); + } + + if (!resp.opt().empty()) + { + room_status->opt_len = ::size32(resp.opt()); + u8* opt_data = static_cast(edata.allocate(::size32(resp.opt()), room_status->opt)); + + memcpy(opt_data, resp.opt().data(), resp.opt().size()); + } + } + + void MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(event_data& edata, const np2_structs::MatchingRoomStatus& resp, SceNpMatchingJoinedRoomInfo* room_info) + { + // The use of SceNpLobbyId is unclear as it is never specified by the client except in further operations, so we always set it to a series of 0 and a 1 + room_info->lobbyid.opt[27] = 1; + MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, resp, &room_info->room_status); + } + + void MatchingAttr_to_SceNpMatchingAttr(event_data& edata, const google::protobuf::RepeatedPtrField& attr_list, vm::bptr& first_attr) + { + if (attr_list.size() > 0) + { + SceNpMatchingAttr* cur_attr = nullptr; + + for (int i_attr = 0; i_attr < attr_list.size(); i_attr++) + { + const auto& attr = attr_list.Get(i_attr); + cur_attr = edata.allocate(sizeof(SceNpMatchingAttr), cur_attr ? cur_attr->next : first_attr); + + cur_attr->type = attr.attr_type(); + cur_attr->id = attr.attr_id(); + if (!attr.data().empty()) + { + cur_attr->value.data.size = ::size32(attr.data()); + u8* data_ptr = static_cast(edata.allocate(::size32(attr.data()), cur_attr->value.data.ptr)); + memcpy(data_ptr, attr.data().data(), attr.data().size()); + } + else + { + cur_attr->value.num = attr.num(); + } + } + } + } + + void MatchingRoom_to_SceNpMatchingRoom(event_data& edata, const np2_structs::MatchingRoom& resp, SceNpMatchingRoom* room) + { + ensure(room && resp.id().size() == sizeof(SceNpRoomId::opt)); + memcpy(room->id.opt, resp.id().data(), sizeof(SceNpRoomId::opt)); + MatchingAttr_to_SceNpMatchingAttr(edata, resp.attr(), room->attr); + } + + void MatchingRoomList_to_SceNpMatchingRoomList(event_data& edata, const np2_structs::MatchingRoomList& resp, SceNpMatchingRoomList* room_list) + { + // The use of SceNpLobbyId is unclear as it is never specified by the client except in further operations, so we always set it to a series of 0 and a 1 + room_list->lobbyid.opt[27] = 1; + room_list->range.start = resp.start(); + room_list->range.total = resp.total(); + + if (resp.rooms_size() > 0) + { + room_list->range.results = resp.rooms_size(); + + SceNpMatchingRoom* cur_room = nullptr; + + for (int i = 0; i < resp.rooms_size(); i++) + { + const auto& room = resp.rooms(i); + cur_room = edata.allocate(sizeof(SceNpMatchingRoom), cur_room ? cur_room->next : room_list->head); + MatchingRoom_to_SceNpMatchingRoom(edata, room, cur_room); + } + } + } + + void MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(event_data& edata, const np2_structs::MatchingSearchJoinRoomInfo& resp, SceNpMatchingSearchJoinRoomInfo* room_info) + { + ensure(resp.has_room()); + room_info->lobbyid.opt[27] = 1; + MatchingRoomStatus_to_SceNpMatchingRoomStatus(edata, resp.room(), &room_info->room_status); + MatchingAttr_to_SceNpMatchingAttr(edata, resp.attr(), room_info->attr); + } + + void OptParam_to_SceNpMatching2SignalingOptParam(const np2_structs::OptParam& resp, SceNpMatching2SignalingOptParam* opt_param) + { + opt_param->type = resp.type().value(); + opt_param->flag = resp.flag().value(); + opt_param->hubMemberId = resp.hubmemberid().value(); + } + +} // namespace np diff --git a/rpcs3/Emu/NP/pb_helpers.h b/rpcs3/Emu/NP/pb_helpers.h new file mode 100644 index 0000000000..dc869210e7 --- /dev/null +++ b/rpcs3/Emu/NP/pb_helpers.h @@ -0,0 +1,38 @@ +#pragma once + +#include "Emu/Cell/Modules/sceNp.h" +#include "Emu/Cell/Modules/sceNp2.h" +#include "np_event_data.h" +#include "generated/np2_structs.pb.h" + +namespace np +{ + void BinAttr_to_SceNpMatching2BinAttr(event_data& edata, const np2_structs::BinAttr& bin_attr, SceNpMatching2BinAttr* binattr_info); + void BinAttrs_to_SceNpMatching2BinAttrs(event_data& edata, const google::protobuf::RepeatedPtrField& pb_attrs, SceNpMatching2BinAttr* binattr_info); + void RoomMemberBinAttrInternal_to_SceNpMatching2RoomMemberBinAttrInternal(event_data& edata, const np2_structs::RoomMemberBinAttrInternal& pb_attr, SceNpMatching2RoomMemberBinAttrInternal* binattr_info); + void RoomBinAttrInternal_to_SceNpMatching2RoomBinAttrInternal(event_data& edata, const np2_structs::BinAttrInternal& pb_attr, SceNpMatching2RoomBinAttrInternal* binattr_info); + void RoomGroup_to_SceNpMatching2RoomGroup(const np2_structs::RoomGroup& pb_group, SceNpMatching2RoomGroup* sce_group); + void RoomGroups_to_SceNpMatching2RoomGroups(const google::protobuf::RepeatedPtrField& pb_groups, SceNpMatching2RoomGroup* sce_groups); + void UserInfo_to_SceNpUserInfo(const np2_structs::UserInfo& user, SceNpUserInfo* user_info); + void UserInfo_to_SceNpUserInfo2(event_data& edata, const np2_structs::UserInfo& user, SceNpUserInfo2* user_info, bool include_onlinename, bool include_avatarurl); + void RoomDataExternal_to_SceNpMatching2RoomDataExternal(event_data& edata, const np2_structs::RoomDataExternal& room, SceNpMatching2RoomDataExternal* room_info, bool include_onlinename, bool include_avatarurl); + void RoomMemberDataExternal_to_SceNpMatching2RoomMemberDataExternal(event_data& edata, const np2_structs::RoomMemberDataExternal& member, SceNpMatching2RoomMemberDataExternal* member_info, bool include_onlinename, bool include_avatarurl); + void SearchRoomResponse_to_SceNpMatching2SearchRoomResponse(event_data& edata, const np2_structs::SearchRoomResponse& resp, SceNpMatching2SearchRoomResponse* search_resp); + void GetRoomDataExternalListResponse_to_SceNpMatching2GetRoomDataExternalListResponse(event_data& edata, const np2_structs::GetRoomDataExternalListResponse& resp, SceNpMatching2GetRoomDataExternalListResponse* get_resp, bool include_onlinename, bool include_avatarurl); + void GetRoomMemberDataExternalListResponse_to_SceNpMatching2GetRoomMemberDataExternalListResponse(event_data& edata, const np2_structs::GetRoomMemberDataExternalListResponse& resp, SceNpMatching2GetRoomMemberDataExternalListResponse* get_resp, bool include_onlinename, bool include_avatarurl); + u16 RoomDataInternal_to_SceNpMatching2RoomDataInternal(event_data& edata, const np2_structs::RoomDataInternal& resp, SceNpMatching2RoomDataInternal* room_resp, const SceNpId& npid, bool include_onlinename, bool include_avatarurl); + void RoomMemberDataInternal_to_SceNpMatching2RoomMemberDataInternal(event_data& edata, const np2_structs::RoomMemberDataInternal& member_data, const SceNpMatching2RoomDataInternal* room_info, SceNpMatching2RoomMemberDataInternal* sce_member_data, bool include_onlinename, bool include_avatarurl); + void RoomMemberUpdateInfo_to_SceNpMatching2RoomMemberUpdateInfo(event_data& edata, const np2_structs::RoomMemberUpdateInfo& resp, SceNpMatching2RoomMemberUpdateInfo* room_info, bool include_onlinename, bool include_avatarurl); + void RoomUpdateInfo_to_SceNpMatching2RoomUpdateInfo(const np2_structs::RoomUpdateInfo& update_info, SceNpMatching2RoomUpdateInfo* sce_update_info); + void GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(const np2_structs::GetPingInfoResponse& resp, SceNpMatching2SignalingGetPingInfoResponse* sce_resp); + void RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(event_data& edata, const np2_structs::RoomMessageInfo& mi, SceNpMatching2RoomMessageInfo* sce_mi, bool include_onlinename, bool include_avatarurl); + void RoomDataInternalUpdateInfo_to_SceNpMatching2RoomDataInternalUpdateInfo(event_data& edata, const np2_structs::RoomDataInternalUpdateInfo& update_info, SceNpMatching2RoomDataInternalUpdateInfo* sce_update_info, const SceNpId& npid, bool include_onlinename, bool include_avatarurl); + void RoomMemberDataInternalUpdateInfo_to_SceNpMatching2RoomMemberDataInternalUpdateInfo(event_data& edata, const np2_structs::RoomMemberDataInternalUpdateInfo& update_info, SceNpMatching2RoomMemberDataInternalUpdateInfo* sce_update_info, bool include_onlinename, bool include_avatarurl); + void MatchingRoomStatus_to_SceNpMatchingRoomStatus(event_data& edata, const np2_structs::MatchingRoomStatus& resp, SceNpMatchingRoomStatus* room_status); + void MatchingRoomStatus_to_SceNpMatchingJoinedRoomInfo(event_data& edata, const np2_structs::MatchingRoomStatus& resp, SceNpMatchingJoinedRoomInfo* room_info); + void MatchingRoom_to_SceNpMatchingRoom(event_data& edata, const np2_structs::MatchingRoom& resp, SceNpMatchingRoom* room); + void MatchingRoomList_to_SceNpMatchingRoomList(event_data& edata, const np2_structs::MatchingRoomList& resp, SceNpMatchingRoomList* room_list); + void MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(event_data& edata, const np2_structs::MatchingSearchJoinRoomInfo& resp, SceNpMatchingSearchJoinRoomInfo* room_info); + void MatchingAttr_to_SceNpMatchingAttr(event_data& edata, const google::protobuf::RepeatedPtrField& attr_list, vm::bptr& first_attr); + void OptParam_to_SceNpMatching2SignalingOptParam(const np2_structs::OptParam& resp, SceNpMatching2SignalingOptParam* opt_param); +} // namespace np diff --git a/rpcs3/Emu/NP/rpcn_client.cpp b/rpcs3/Emu/NP/rpcn_client.cpp index 1ebbfdd14e..96ab505abf 100644 --- a/rpcs3/Emu/NP/rpcn_client.cpp +++ b/rpcs3/Emu/NP/rpcn_client.cpp @@ -16,7 +16,7 @@ #include "Emu/system_config.h" #include "Emu/RSX/Overlays/overlay_message.h" -#include "generated/np2_structs_generated.h" +#include "generated/np2_structs.pb.h" #ifdef _WIN32 #include @@ -101,6 +101,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case rpcn::CommandType::Login: return "Login"; case rpcn::CommandType::Terminate: return "Terminate"; case rpcn::CommandType::Create: return "Create"; + case rpcn::CommandType::Delete: return "Delete"; case rpcn::CommandType::SendToken: return "SendToken"; case rpcn::CommandType::SendResetToken: return "SendResetToken"; case rpcn::CommandType::ResetPassword: return "ResetPassword"; @@ -116,6 +117,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case rpcn::CommandType::LeaveRoom: return "LeaveRoom"; case rpcn::CommandType::SearchRoom: return "SearchRoom"; case rpcn::CommandType::GetRoomDataExternalList: return "GetRoomDataExternalList"; + case rpcn::CommandType::GetRoomMemberDataExternalList: return "GetRoomMemberDataExternalList"; case rpcn::CommandType::SetRoomDataExternal: return "SetRoomDataExternal"; case rpcn::CommandType::GetRoomDataInternal: return "GetRoomDataInternal"; case rpcn::CommandType::SetRoomDataInternal: return "SetRoomDataInternal"; @@ -255,7 +257,7 @@ namespace rpcn rpcn_log.notice("online: %s, pr_com_id: %s, pr_title: %s, pr_status: %s, pr_comment: %s, pr_data: %s", online ? "true" : "false", pr_com_id.data, pr_title, pr_status, pr_comment, fmt::buf_to_hexstring(pr_data.data(), pr_data.size())); } - constexpr u32 RPCN_PROTOCOL_VERSION = 27; + constexpr u32 RPCN_PROTOCOL_VERSION = 30; constexpr usz RPCN_HEADER_SIZE = 15; const char* error_to_explanation(rpcn::ErrorType error) @@ -656,7 +658,7 @@ namespace rpcn } // Those commands are handled synchronously and won't be forwarded to NP Handler - if (command == CommandType::Login || command == CommandType::GetServerList || command == CommandType::Create || + if (command == CommandType::Login || command == CommandType::GetServerList || command == CommandType::Create || command == CommandType::Delete || command == CommandType::AddFriend || command == CommandType::RemoveFriend || command == CommandType::AddBlock || command == CommandType::RemoveBlock || command == CommandType::SendMessage || command == CommandType::SendToken || @@ -894,7 +896,7 @@ namespace rpcn return error_and_disconnect("Failed to send all the bytes"); } - res = 0; + continue; } n_sent += res; } @@ -1053,6 +1055,8 @@ namespace rpcn found = found->ai_next; } + freeaddrinfo(addr_info); + if (!found_ipv4) { rpcn_log.error("connect: Failed to find IPv4 for %s", host); @@ -1154,7 +1158,7 @@ namespace rpcn if (!connected || terminate) { state = rpcn_state::failure_other; - return true; + return false; } if (received_version != RPCN_PROTOCOL_VERSION) @@ -1192,7 +1196,7 @@ namespace rpcn std::copy(token.begin(), token.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; @@ -1278,7 +1282,7 @@ namespace rpcn bool rpcn_client::terminate_connection() { - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; std::vector data; @@ -1314,7 +1318,7 @@ namespace rpcn std::copy(email.begin(), email.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; if (!forge_send_reply(CommandType::Create, req_id, data, packet_data)) @@ -1348,7 +1352,7 @@ namespace rpcn std::copy(password.begin(), password.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; if (!forge_send_reply(CommandType::SendToken, req_id, data, packet_data)) @@ -1381,7 +1385,7 @@ namespace rpcn std::copy(email.begin(), email.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; if (!forge_send_reply(CommandType::SendResetToken, req_id, data, packet_data)) @@ -1416,7 +1420,7 @@ namespace rpcn std::copy(password.begin(), password.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; if (!forge_send_reply(CommandType::ResetPassword, req_id, data, packet_data)) @@ -1435,30 +1439,59 @@ namespace rpcn return error; } - bool rpcn_client::add_friend(const std::string& friend_username) + ErrorType rpcn_client::delete_account() { + const auto npid = g_cfg_rpcn.get_npid(); + const auto password = g_cfg_rpcn.get_password(); + std::vector data; - std::copy(friend_username.begin(), friend_username.end(), std::back_inserter(data)); + std::copy(npid.begin(), npid.end(), std::back_inserter(data)); + data.push_back(0); + std::copy(password.begin(), password.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; - if (!forge_send_reply(CommandType::AddFriend, req_id, data, packet_data)) + if (!forge_send_reply(CommandType::Delete, req_id, data, packet_data)) { - return false; + return ErrorType::Malformed; } vec_stream reply(packet_data); auto error = static_cast(reply.get()); - if (error != rpcn::ErrorType::NoError) + if (error == rpcn::ErrorType::NoError) { - return false; + rpcn_log.success("Account was successfully deleted!"); } - rpcn_log.success("You have successfully added \"%s\" as a friend", friend_username); - return true; + return error; + } + + std::optional rpcn_client::add_friend(const std::string& friend_username) + { + std::vector data; + std::copy(friend_username.begin(), friend_username.end(), std::back_inserter(data)); + data.push_back(0); + + const u64 req_id = rpcn_request_counter.fetch_add(1); + + std::vector packet_data; + if (!forge_send_reply(CommandType::AddFriend, req_id, data, packet_data)) + { + return std::nullopt; + } + + vec_stream reply(packet_data); + const auto error = static_cast(reply.get()); + + if (error == ErrorType::NoError) + rpcn_log.success("add_friend(\"%s\") succeeded", friend_username); + else + rpcn_log.error("add_friend(\"%s\") failed with error: %s", friend_username, error); + + return error; } bool rpcn_client::remove_friend(const std::string& friend_username) @@ -1467,7 +1500,7 @@ namespace rpcn std::copy(friend_username.begin(), friend_username.end(), std::back_inserter(data)); data.push_back(0); - u64 req_id = rpcn_request_counter.fetch_add(1); + const u64 req_id = rpcn_request_counter.fetch_add(1); std::vector packet_data; if (!forge_send_reply(CommandType::RemoveFriend, req_id, data, packet_data)) @@ -1627,57 +1660,55 @@ namespace rpcn bool rpcn_client::createjoin_room(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2CreateJoinRoomRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::CreateJoinRoomRequest pb_req; + + pb_req.set_worldid(req->worldId); + pb_req.set_lobbyid(req->lobbyId); + pb_req.set_maxslot(req->maxSlot); + pb_req.set_flagattr(req->flagAttr); + pb_req.mutable_teamid()->set_value(req->teamId); - flatbuffers::Offset>> final_searchintattrexternal_vec; if (req->roomSearchableIntAttrExternalNum && req->roomSearchableIntAttrExternal) { - std::vector> davec; for (u32 i = 0; i < req->roomSearchableIntAttrExternalNum; i++) { - auto bin = CreateIntAttr(builder, req->roomSearchableIntAttrExternal[i].id, req->roomSearchableIntAttrExternal[i].num); - davec.push_back(bin); + auto* attr = pb_req.add_roomsearchableintattrexternal(); + attr->mutable_id()->set_value(req->roomSearchableIntAttrExternal[i].id); + attr->set_num(req->roomSearchableIntAttrExternal[i].num); } - final_searchintattrexternal_vec = builder.CreateVector(davec); } // WWE SmackDown vs. RAW 2009 passes roomBinAttrExternal in roomSearchableBinAttrExternal so we parse based on attribute ids - flatbuffers::Offset>> final_binattrinternal_vec; - flatbuffers::Offset>> final_searchbinattrexternal_vec; - flatbuffers::Offset>> final_binattrexternal_vec; - - std::vector> davec_binattrinternal; - std::vector> davec_searchable_binattrexternal; - std::vector> davec_binattrexternal; - - auto put_binattr = [&](SceNpMatching2AttributeId id, flatbuffers::Offset bin) + auto put_binattr = [&](const SceNpMatching2BinAttr& binattr) { - switch (id) + np2_structs::BinAttr* attr = nullptr; + switch (binattr.id) { case SCE_NP_MATCHING2_ROOM_BIN_ATTR_INTERNAL_1_ID: case SCE_NP_MATCHING2_ROOM_BIN_ATTR_INTERNAL_2_ID: - davec_binattrinternal.push_back(bin); + attr = pb_req.add_roombinattrinternal(); break; case SCE_NP_MATCHING2_ROOM_BIN_ATTR_EXTERNAL_1_ID: case SCE_NP_MATCHING2_ROOM_BIN_ATTR_EXTERNAL_2_ID: - davec_binattrexternal.push_back(bin); + attr = pb_req.add_roombinattrexternal(); break; case SCE_NP_MATCHING2_ROOM_SEARCHABLE_BIN_ATTR_EXTERNAL_1_ID: - davec_searchable_binattrexternal.push_back(bin); + attr = pb_req.add_roomsearchablebinattrexternal(); break; default: - rpcn_log.error("Unexpected bin attribute id in createjoin_room request: 0x%x", id); - break; + rpcn_log.error("Unexpected bin attribute id in createjoin_room request: 0x%x", binattr.id); + return; } + attr->mutable_id()->set_value(binattr.id); + attr->set_data(binattr.ptr.get_ptr(), binattr.size); }; if (req->roomBinAttrInternalNum && req->roomBinAttrInternal) { for (u32 i = 0; i < req->roomBinAttrInternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomBinAttrInternal[i].id, builder.CreateVector(req->roomBinAttrInternal[i].ptr.get_ptr(), req->roomBinAttrInternal[i].size)); - put_binattr(req->roomBinAttrInternal[i].id, bin); + put_binattr(req->roomBinAttrInternal[i]); } } @@ -1685,8 +1716,7 @@ namespace rpcn { for (u32 i = 0; i < req->roomSearchableBinAttrExternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomSearchableBinAttrExternal[i].id, builder.CreateVector(req->roomSearchableBinAttrExternal[i].ptr.get_ptr(), req->roomSearchableBinAttrExternal[i].size)); - put_binattr(req->roomSearchableBinAttrExternal[i].id, bin); + put_binattr(req->roomSearchableBinAttrExternal[i]); } } @@ -1694,38 +1724,30 @@ namespace rpcn { for (u32 i = 0; i < req->roomBinAttrExternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomBinAttrExternal[i].id, builder.CreateVector(req->roomBinAttrExternal[i].ptr.get_ptr(), req->roomBinAttrExternal[i].size)); - put_binattr(req->roomBinAttrExternal[i].id, bin); + put_binattr(req->roomBinAttrExternal[i]); } } - if (!davec_binattrinternal.empty()) - final_binattrinternal_vec = builder.CreateVector(davec_binattrinternal); - - if (!davec_searchable_binattrexternal.empty()) - final_searchbinattrexternal_vec = builder.CreateVector(davec_searchable_binattrexternal); - - if (!davec_binattrexternal.empty()) - final_binattrexternal_vec = builder.CreateVector(davec_binattrexternal); - - flatbuffers::Offset> final_roompassword; if (req->roomPassword) - final_roompassword = builder.CreateVector(req->roomPassword->data, 8); - flatbuffers::Offset>> final_groupconfigs_vec; + pb_req.set_roompassword(req->roomPassword->data, 8); + if (req->groupConfigNum && req->groupConfig) { - std::vector> davec; for (u32 i = 0; i < req->groupConfigNum; i++) { - auto bin = CreateGroupConfig(builder, req->groupConfig[i].slotNum, req->groupConfig[i].withLabel ? builder.CreateVector(req->groupConfig[i].label.data, 8) : 0, req->groupConfig[i].withPassword); - davec.push_back(bin); + auto* gc = pb_req.add_groupconfig(); + gc->set_slotnum(req->groupConfig[i].slotNum); + gc->set_withpassword(req->groupConfig[i].withPassword); + if (req->groupConfig[i].withLabel) + gc->set_label(req->groupConfig[i].label.data, 8); } - final_groupconfigs_vec = builder.CreateVector(davec); } - flatbuffers::Offset>> final_allowedusers_vec; + + if (req->passwordSlotMask) + pb_req.set_passwordslotmask(*req->passwordSlotMask); + if (req->allowedUserNum && req->allowedUser) { - std::vector> davec; for (u32 i = 0; i < req->allowedUserNum; i++) { // Some games just give us garbage, make sure npid is valid before passing @@ -1734,221 +1756,217 @@ namespace rpcn { continue; } - - auto bin = builder.CreateString(req->allowedUser[i].handle.data); - davec.push_back(bin); + pb_req.add_alloweduser(np::npid_to_string(req->allowedUser[i])); } - final_allowedusers_vec = builder.CreateVector(davec); } - flatbuffers::Offset>> final_blockedusers_vec; + if (req->blockedUserNum && req->blockedUser) { - std::vector> davec; for (u32 i = 0; i < req->blockedUserNum; i++) { if (!np::is_valid_npid(req->blockedUser[i])) { continue; } - - auto bin = builder.CreateString(req->blockedUser[i].handle.data); - davec.push_back(bin); + pb_req.add_blockeduser(np::npid_to_string(req->blockedUser[i])); } - final_blockedusers_vec = builder.CreateVector(davec); } - flatbuffers::Offset> final_grouplabel; + if (req->joinRoomGroupLabel) - final_grouplabel = builder.CreateVector(req->joinRoomGroupLabel->data, 8); - flatbuffers::Offset>> final_memberbinattrinternal_vec; + pb_req.set_joinroomgrouplabel(req->joinRoomGroupLabel->data, 8); + if (req->roomMemberBinAttrInternalNum && req->roomMemberBinAttrInternal) { - std::vector> davec; for (u32 i = 0; i < req->roomMemberBinAttrInternalNum; i++) { - auto bin = CreateBinAttr( - builder, req->roomMemberBinAttrInternal[i].id, builder.CreateVector(reinterpret_cast(req->roomMemberBinAttrInternal[i].ptr.get_ptr()), req->roomMemberBinAttrInternal[i].size)); - davec.push_back(bin); + auto* attr = pb_req.add_roommemberbinattrinternal(); + attr->mutable_id()->set_value(req->roomMemberBinAttrInternal[i].id); + attr->set_data(req->roomMemberBinAttrInternal[i].ptr.get_ptr(), req->roomMemberBinAttrInternal[i].size); } - final_memberbinattrinternal_vec = builder.CreateVector(davec); } - flatbuffers::Offset final_optparam; + if (req->sigOptParam) - final_optparam = CreateOptParam(builder, req->sigOptParam->type, req->sigOptParam->flag, req->sigOptParam->hubMemberId); - u64 final_passwordSlotMask = 0; - if (req->passwordSlotMask) - final_passwordSlotMask = *req->passwordSlotMask; + { + auto* opt = pb_req.mutable_sigoptparam(); + opt->mutable_type()->set_value(req->sigOptParam->type); + opt->mutable_flag()->set_value(req->sigOptParam->flag); + opt->mutable_hubmemberid()->set_value(req->sigOptParam->hubMemberId); + } - auto req_finished = CreateCreateJoinRoomRequest(builder, req->worldId, req->lobbyId, req->maxSlot, req->flagAttr, final_binattrinternal_vec, final_searchintattrexternal_vec, - final_searchbinattrexternal_vec, final_binattrexternal_vec, final_roompassword, final_groupconfigs_vec, final_passwordSlotMask, final_allowedusers_vec, final_blockedusers_vec, final_grouplabel, - final_memberbinattrinternal_vec, req->teamId, final_optparam); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::CreateRoom, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::CreateRoom, req_id); } bool rpcn_client::join_room(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2JoinRoomRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::JoinRoomRequest pb_req; + + pb_req.set_roomid(req->roomId); + pb_req.mutable_teamid()->set_value(req->teamId); - flatbuffers::Offset> final_roompassword; if (req->roomPassword) - final_roompassword = builder.CreateVector(req->roomPassword->data, 8); - flatbuffers::Offset> final_grouplabel; + pb_req.set_roompassword(req->roomPassword->data, 8); + if (req->joinRoomGroupLabel) - final_grouplabel = builder.CreateVector(req->joinRoomGroupLabel->data, 8); - flatbuffers::Offset>> final_memberbinattrinternal_vec; + pb_req.set_joinroomgrouplabel(req->joinRoomGroupLabel->data, 8); + if (req->roomMemberBinAttrInternalNum && req->roomMemberBinAttrInternal) { - std::vector> davec; for (u32 i = 0; i < req->roomMemberBinAttrInternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomMemberBinAttrInternal[i].id, builder.CreateVector(req->roomMemberBinAttrInternal[i].ptr.get_ptr(), req->roomMemberBinAttrInternal[i].size)); - davec.push_back(bin); + auto* attr = pb_req.add_roommemberbinattrinternal(); + attr->mutable_id()->set_value(req->roomMemberBinAttrInternal[i].id); + attr->set_data(req->roomMemberBinAttrInternal[i].ptr.get_ptr(), req->roomMemberBinAttrInternal[i].size); } - final_memberbinattrinternal_vec = builder.CreateVector(davec); } - flatbuffers::Offset final_optdata = CreatePresenceOptionData(builder, builder.CreateVector(req->optData.data, 16), req->optData.length); - auto req_finished = CreateJoinRoomRequest(builder, req->roomId, final_roompassword, final_grouplabel, final_memberbinattrinternal_vec, final_optdata, req->teamId); - builder.Finish(req_finished); + auto* optdata = pb_req.mutable_optdata(); + optdata->set_data(req->optData.data, 16); + optdata->set_len(req->optData.length); - return forge_request_with_com_id(builder, communication_id, CommandType::JoinRoom, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::JoinRoom, req_id); } bool rpcn_client::leave_room(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2LeaveRoomRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset final_optdata = CreatePresenceOptionData(builder, builder.CreateVector(req->optData.data, 16), req->optData.length); - auto req_finished = CreateLeaveRoomRequest(builder, req->roomId, final_optdata); - builder.Finish(req_finished); + np2_structs::LeaveRoomRequest pb_req; + pb_req.set_roomid(req->roomId); - return forge_request_with_com_id(builder, communication_id, CommandType::LeaveRoom, req_id); + auto* optdata = pb_req.mutable_optdata(); + optdata->set_data(req->optData.data, 16); + optdata->set_len(req->optData.length); + + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::LeaveRoom, req_id); } bool rpcn_client::search_room(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SearchRoomRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset>> final_intfilter_vec; + np2_structs::SearchRoomRequest pb_req; + + pb_req.set_option(req->option); + pb_req.set_worldid(req->worldId); + pb_req.set_lobbyid(req->lobbyId); + pb_req.set_rangefilter_startindex(req->rangeFilter.startIndex); + pb_req.set_rangefilter_max(req->rangeFilter.max); + pb_req.set_flagfilter(req->flagFilter); + pb_req.set_flagattr(req->flagAttr); + if (req->intFilterNum && req->intFilter) { - std::vector> davec{}; for (u32 i = 0; i < req->intFilterNum; i++) { - auto int_attr = CreateIntAttr(builder, req->intFilter[i].attr.id, req->intFilter[i].attr.num); - auto bin = CreateIntSearchFilter(builder, req->intFilter[i].searchOperator, int_attr); - davec.push_back(bin); + auto* filter = pb_req.add_intfilter(); + filter->mutable_searchoperator()->set_value(req->intFilter[i].searchOperator); + auto* attr = filter->mutable_attr(); + attr->mutable_id()->set_value(req->intFilter[i].attr.id); + attr->set_num(req->intFilter[i].attr.num); } - final_intfilter_vec = builder.CreateVector(davec); } - flatbuffers::Offset>> final_binfilter_vec; + if (req->binFilterNum && req->binFilter) { - std::vector> davec; for (u32 i = 0; i < req->binFilterNum; i++) { - auto bin_attr = CreateBinAttr(builder, req->binFilter[i].attr.id, builder.CreateVector(req->binFilter[i].attr.ptr.get_ptr(), req->binFilter[i].attr.size)); - auto bin = CreateBinSearchFilter(builder, req->binFilter[i].searchOperator, bin_attr); - davec.push_back(bin); + auto* filter = pb_req.add_binfilter(); + filter->mutable_searchoperator()->set_value(req->binFilter[i].searchOperator); + auto* attr = filter->mutable_attr(); + attr->mutable_id()->set_value(req->binFilter[i].attr.id); + attr->set_data(req->binFilter[i].attr.ptr.get_ptr(), req->binFilter[i].attr.size); } - final_binfilter_vec = builder.CreateVector(davec); } - flatbuffers::Offset> attrid_vec; if (req->attrIdNum && req->attrId) { - std::vector attr_ids; for (u32 i = 0; i < req->attrIdNum; i++) { - attr_ids.push_back(req->attrId[i]); + pb_req.add_attrid()->set_value(req->attrId[i]); } - attrid_vec = builder.CreateVector(attr_ids); } - SearchRoomRequestBuilder s_req(builder); - s_req.add_option(req->option); - s_req.add_worldId(req->worldId); - s_req.add_lobbyId(req->lobbyId); - s_req.add_rangeFilter_startIndex(req->rangeFilter.startIndex); - s_req.add_rangeFilter_max(req->rangeFilter.max); - s_req.add_flagFilter(req->flagFilter); - s_req.add_flagAttr(req->flagAttr); - if (req->intFilterNum) - s_req.add_intFilter(final_intfilter_vec); - if (req->binFilterNum) - s_req.add_binFilter(final_binfilter_vec); - if (req->attrIdNum) - s_req.add_attrId(attrid_vec); + std::string serialized; + pb_req.SerializeToString(&serialized); - auto req_finished = s_req.Finish(); - builder.Finish(req_finished); - - return forge_request_with_com_id(builder, communication_id, CommandType::SearchRoom, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::SearchRoom, req_id); } bool rpcn_client::get_roomdata_external_list(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2GetRoomDataExternalListRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - std::vector roomIds; + np2_structs::GetRoomDataExternalListRequest pb_req; + for (u32 i = 0; i < req->roomIdNum && req->roomId; i++) { - roomIds.push_back(req->roomId[i]); + pb_req.add_roomids(req->roomId[i]); } - std::vector attrIds; + for (u32 i = 0; i < req->attrIdNum && req->attrId; i++) { - attrIds.push_back(req->attrId[i]); + pb_req.add_attrids()->set_value(req->attrId[i]); } - auto req_finished = CreateGetRoomDataExternalListRequestDirect(builder, &roomIds, &attrIds); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::GetRoomDataExternalList, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::GetRoomDataExternalList, req_id); + } + + bool rpcn_client::get_room_member_data_external_list(u32 req_id, const SceNpCommunicationId& communication_id, u64 room_id) + { + std::vector data(COMMUNICATION_ID_SIZE + sizeof(u64)); + + rpcn_client::write_communication_id(communication_id, data); + write_to_ptr>(data, COMMUNICATION_ID_SIZE, room_id); + + return forge_send(CommandType::GetRoomMemberDataExternalList, req_id, data); } bool rpcn_client::set_roomdata_external(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SetRoomDataExternalRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset>> final_searchintattrexternal_vec; + np2_structs::SetRoomDataExternalRequest pb_req; + pb_req.set_roomid(req->roomId); + if (req->roomSearchableIntAttrExternalNum && req->roomSearchableIntAttrExternal) { - std::vector> davec; for (u32 i = 0; i < req->roomSearchableIntAttrExternalNum; i++) { - auto bin = CreateIntAttr(builder, req->roomSearchableIntAttrExternal[i].id, req->roomSearchableIntAttrExternal[i].num); - davec.push_back(bin); + auto* attr = pb_req.add_roomsearchableintattrexternal(); + attr->mutable_id()->set_value(req->roomSearchableIntAttrExternal[i].id); + attr->set_num(req->roomSearchableIntAttrExternal[i].num); } - final_searchintattrexternal_vec = builder.CreateVector(davec); } - flatbuffers::Offset>> final_searchbinattrexternal_vec; - flatbuffers::Offset>> final_binattrexternal_vec; - - std::vector> davec_searchable_binattrexternal; - std::vector> davec_binattrexternal; - - auto put_binattr = [&](SceNpMatching2AttributeId id, flatbuffers::Offset bin) + auto put_binattr = [&](const SceNpMatching2BinAttr& binattr) { - switch (id) + np2_structs::BinAttr* attr = nullptr; + switch (binattr.id) { case SCE_NP_MATCHING2_ROOM_BIN_ATTR_EXTERNAL_1_ID: case SCE_NP_MATCHING2_ROOM_BIN_ATTR_EXTERNAL_2_ID: - davec_binattrexternal.push_back(bin); + attr = pb_req.add_roombinattrexternal(); break; case SCE_NP_MATCHING2_ROOM_SEARCHABLE_BIN_ATTR_EXTERNAL_1_ID: - davec_searchable_binattrexternal.push_back(bin); + attr = pb_req.add_roomsearchablebinattrexternal(); break; default: - rpcn_log.error("Unexpected bin attribute id in set_roomdata_external request: 0x%x", id); - break; + rpcn_log.error("Unexpected bin attribute id in set_roomdata_external request: 0x%x", binattr.id); + return; } + attr->mutable_id()->set_value(binattr.id); + attr->set_data(binattr.ptr.get_ptr(), binattr.size); }; if (req->roomSearchableBinAttrExternalNum && req->roomSearchableBinAttrExternal) { for (u32 i = 0; i < req->roomSearchableBinAttrExternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomSearchableBinAttrExternal[i].id, builder.CreateVector(req->roomSearchableBinAttrExternal[i].ptr.get_ptr(), req->roomSearchableBinAttrExternal[i].size)); - put_binattr(req->roomSearchableBinAttrExternal[i].id, bin); + put_binattr(req->roomSearchableBinAttrExternal[i]); } } @@ -1956,155 +1974,143 @@ namespace rpcn { for (u32 i = 0; i < req->roomBinAttrExternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomBinAttrExternal[i].id, builder.CreateVector(req->roomBinAttrExternal[i].ptr.get_ptr(), req->roomBinAttrExternal[i].size)); - put_binattr(req->roomBinAttrExternal[i].id, bin); + put_binattr(req->roomBinAttrExternal[i]); } } - if (!davec_searchable_binattrexternal.empty()) - final_searchbinattrexternal_vec = builder.CreateVector(davec_searchable_binattrexternal); + std::string serialized; + pb_req.SerializeToString(&serialized); - if (!davec_binattrexternal.empty()) - final_binattrexternal_vec = builder.CreateVector(davec_binattrexternal); - - auto req_finished = CreateSetRoomDataExternalRequest(builder, req->roomId, final_searchintattrexternal_vec, final_searchbinattrexternal_vec, final_binattrexternal_vec); - builder.Finish(req_finished); - - return forge_request_with_com_id(builder, communication_id, CommandType::SetRoomDataExternal, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::SetRoomDataExternal, req_id); } bool rpcn_client::get_roomdata_internal(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2GetRoomDataInternalRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::GetRoomDataInternalRequest pb_req; + pb_req.set_roomid(req->roomId); - flatbuffers::Offset> final_attr_ids_vec; if (req->attrIdNum && req->attrId) { - std::vector attr_ids; for (u32 i = 0; i < req->attrIdNum; i++) { - attr_ids.push_back(req->attrId[i]); + pb_req.add_attrid()->set_value(req->attrId[i]); } - final_attr_ids_vec = builder.CreateVector(attr_ids); } - auto req_finished = CreateGetRoomDataInternalRequest(builder, req->roomId, final_attr_ids_vec); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::GetRoomDataInternal, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::GetRoomDataInternal, req_id); } bool rpcn_client::set_roomdata_internal(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SetRoomDataInternalRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset>> final_binattrinternal_vec; + np2_structs::SetRoomDataInternalRequest pb_req; + pb_req.set_roomid(req->roomId); + pb_req.set_flagfilter(req->flagFilter); + pb_req.set_flagattr(req->flagAttr); + if (req->roomBinAttrInternalNum && req->roomBinAttrInternal) { - std::vector> davec; for (u32 i = 0; i < req->roomBinAttrInternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomBinAttrInternal[i].id, builder.CreateVector(req->roomBinAttrInternal[i].ptr.get_ptr(), req->roomBinAttrInternal[i].size)); - davec.push_back(bin); + auto* attr = pb_req.add_roombinattrinternal(); + attr->mutable_id()->set_value(req->roomBinAttrInternal[i].id); + attr->set_data(req->roomBinAttrInternal[i].ptr.get_ptr(), req->roomBinAttrInternal[i].size); } - final_binattrinternal_vec = builder.CreateVector(davec); } - flatbuffers::Offset>> final_grouppasswordconfig_vec; + if (req->passwordConfigNum && req->passwordConfig) { - std::vector> davec; for (u32 i = 0; i < req->passwordConfigNum; i++) { - auto rg = CreateRoomGroupPasswordConfig(builder, req->passwordConfig[i].groupId, req->passwordConfig[i].withPassword); - davec.push_back(rg); + auto* cfg = pb_req.add_passwordconfig(); + cfg->mutable_groupid()->set_value(req->passwordConfig[i].groupId); + cfg->set_withpassword(req->passwordConfig[i].withPassword); } - final_grouppasswordconfig_vec = builder.CreateVector(davec); } - flatbuffers::Offset> final_passwordSlotMask; if (req->passwordSlotMask) { - const u64 value = *req->passwordSlotMask; - final_passwordSlotMask = builder.CreateVector(&value, 1); + pb_req.add_passwordslotmask(*req->passwordSlotMask); } - flatbuffers::Offset> final_ownerprivilege_vec; if (req->ownerPrivilegeRankNum && req->ownerPrivilegeRank) { - std::vector priv_ranks; for (u32 i = 0; i < req->ownerPrivilegeRankNum; i++) { - priv_ranks.push_back(req->ownerPrivilegeRank[i]); + pb_req.add_ownerprivilegerank()->set_value(req->ownerPrivilegeRank[i]); } - final_ownerprivilege_vec = builder.CreateVector(priv_ranks); } - auto req_finished = - CreateSetRoomDataInternalRequest(builder, req->roomId, req->flagFilter, req->flagAttr, final_binattrinternal_vec, final_grouppasswordconfig_vec, final_passwordSlotMask, final_ownerprivilege_vec); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::SetRoomDataInternal, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::SetRoomDataInternal, req_id); } bool rpcn_client::get_roommemberdata_internal(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2GetRoomMemberDataInternalRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset> final_attrid_vec; + np2_structs::GetRoomMemberDataInternalRequest pb_req; + pb_req.set_roomid(req->roomId); + pb_req.mutable_memberid()->set_value(req->memberId); + if (req->attrIdNum && req->attrId) { - std::vector attrid_vec; for (u32 i = 0; i < req->attrIdNum; i++) { - attrid_vec.push_back(req->attrId[i]); + pb_req.add_attrid()->set_value(req->attrId[i]); } - final_attrid_vec = builder.CreateVector(attrid_vec); } - auto req_finished = CreateGetRoomMemberDataInternalRequest(builder, req->roomId, req->memberId, final_attrid_vec); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::GetRoomMemberDataInternal, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::GetRoomMemberDataInternal, req_id); } bool rpcn_client::set_roommemberdata_internal(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SetRoomMemberDataInternalRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset>> final_binattrinternal_vec; + np2_structs::SetRoomMemberDataInternalRequest pb_req; + pb_req.set_roomid(req->roomId); + pb_req.mutable_memberid()->set_value(req->memberId); + pb_req.mutable_teamid()->set_value(req->teamId); + if (req->roomMemberBinAttrInternalNum && req->roomMemberBinAttrInternal) { - std::vector> davec; for (u32 i = 0; i < req->roomMemberBinAttrInternalNum; i++) { - auto bin = CreateBinAttr(builder, req->roomMemberBinAttrInternal[i].id, builder.CreateVector(req->roomMemberBinAttrInternal[i].ptr.get_ptr(), req->roomMemberBinAttrInternal[i].size)); - davec.push_back(bin); + auto* attr = pb_req.add_roommemberbinattrinternal(); + attr->mutable_id()->set_value(req->roomMemberBinAttrInternal[i].id); + attr->set_data(req->roomMemberBinAttrInternal[i].ptr.get_ptr(), req->roomMemberBinAttrInternal[i].size); } - final_binattrinternal_vec = builder.CreateVector(davec); } - auto req_finished = CreateSetRoomMemberDataInternalRequest(builder, req->roomId, req->memberId, req->teamId, final_binattrinternal_vec); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::SetRoomMemberDataInternal, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::SetRoomMemberDataInternal, req_id); } bool rpcn_client::set_userinfo(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SetUserInfoRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); - flatbuffers::Offset>> final_memberbinattr_vec; + np2_structs::SetUserInfo pb_req; + pb_req.mutable_serverid()->set_value(req->serverId); + if (req->userBinAttrNum && req->userBinAttr) { - std::vector> davec; for (u32 i = 0; i < req->userBinAttrNum; i++) { - auto bin = CreateBinAttr(builder, req->userBinAttr[i].id, builder.CreateVector(req->userBinAttr[i].ptr.get_ptr(), req->userBinAttr[i].size)); - davec.push_back(bin); + auto* attr = pb_req.add_userbinattr(); + attr->mutable_id()->set_value(req->userBinAttr[i].id); + attr->set_data(req->userBinAttr[i].ptr.get_ptr(), req->userBinAttr[i].size); } - final_memberbinattr_vec = builder.CreateVector(davec); } - auto req_finished = CreateSetUserInfo(builder, req->serverId, final_memberbinattr_vec); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::SetUserInfo, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::SetUserInfo, req_id); } bool rpcn_client::ping_room_owner(u32 req_id, const SceNpCommunicationId& communication_id, u64 room_id) @@ -2119,34 +2125,38 @@ namespace rpcn bool rpcn_client::send_room_message(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SendRoomMessageRequest* req) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::SendRoomMessageRequest pb_req; + pb_req.set_roomid(req->roomId); + pb_req.mutable_casttype()->set_value(req->castType); + pb_req.mutable_option()->set_value(req->option); - std::vector dst; switch (req->castType) { case SCE_NP_MATCHING2_CASTTYPE_BROADCAST: break; case SCE_NP_MATCHING2_CASTTYPE_UNICAST: - dst.push_back(req->dst.unicastTarget); + pb_req.add_dst()->set_value(req->dst.unicastTarget); break; case SCE_NP_MATCHING2_CASTTYPE_MULTICAST: for (u32 i = 0; i < req->dst.multicastTarget.memberIdNum && req->dst.multicastTarget.memberId; i++) { - dst.push_back(req->dst.multicastTarget.memberId[i]); + pb_req.add_dst()->set_value(req->dst.multicastTarget.memberId[i]); } break; case SCE_NP_MATCHING2_CASTTYPE_MULTICAST_TEAM: - dst.push_back(req->dst.multicastTargetTeamId); + pb_req.add_dst()->set_value(req->dst.multicastTargetTeamId); break; default: ensure(false); break; } - auto req_finished = CreateSendRoomMessageRequest(builder, req->roomId, req->castType, builder.CreateVector(dst.data(), dst.size()), builder.CreateVector(reinterpret_cast(req->msg.get_ptr()), req->msgLen), req->option); - builder.Finish(req_finished); + pb_req.set_msg(req->msg.get_ptr(), req->msgLen); - return forge_request_with_com_id(builder, communication_id, CommandType::SendRoomMessage, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::SendRoomMessage, req_id); } bool rpcn_client::req_sign_infos(u32 req_id, const std::string& npid) @@ -2172,32 +2182,32 @@ namespace rpcn bool rpcn_client::send_message(const message_data& msg_data, const std::set& npids) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::MessageDetails pb_message; + pb_message.set_communicationid(np::communication_id_to_string(msg_data.commId)); + pb_message.set_msgid(msg_data.msgId); + pb_message.mutable_maintype()->set_value(msg_data.mainType); + pb_message.mutable_subtype()->set_value(msg_data.subType); + pb_message.set_msgfeatures(msg_data.msgFeatures); + pb_message.set_subject(msg_data.subject); + pb_message.set_body(msg_data.body); + pb_message.set_data(msg_data.data.data(), msg_data.data.size()); - flatbuffers::FlatBufferBuilder nested_builder(1024); - auto fb_message = CreateMessageDetailsDirect(nested_builder, static_cast(msg_data.commId.data), msg_data.msgId, msg_data.mainType, msg_data.subType, msg_data.msgFeatures, msg_data.subject.c_str(), msg_data.body.c_str(), &msg_data.data); - nested_builder.Finish(fb_message); - builder.ForceVectorAlignment(nested_builder.GetSize(), sizeof(uint8_t), nested_builder.GetBufferMinAlignment()); - auto nested_flatbuffer_vector = builder.CreateVector(nested_builder.GetBufferPointer(), nested_builder.GetSize()); + std::string serialized_message; + pb_message.SerializeToString(&serialized_message); - std::vector> davec; + np2_structs::SendMessageRequest pb_req; + pb_req.set_message(serialized_message); for (const auto& npid : npids) { - auto s_npid = builder.CreateString(npid); - davec.push_back(s_npid); + pb_req.add_npids(npid); } - auto npids_vector = builder.CreateVector(davec); - // auto npids = builder.Create - auto fb_sendmessage = CreateSendMessageRequest(builder, nested_flatbuffer_vector, npids_vector); + std::string serialized; + pb_req.SerializeToString(&serialized); - builder.Finish(fb_sendmessage); - const u8* buf = builder.GetBufferPointer(); - const usz bufsize = builder.GetSize(); - std::vector data(bufsize + sizeof(u32)); - - reinterpret_cast&>(data[0]) = static_cast(bufsize); - memcpy(data.data() + sizeof(u32), buf, bufsize); + std::vector data(serialized.size() + sizeof(u32)); + reinterpret_cast&>(data[0]) = static_cast(serialized.size()); + memcpy(data.data() + sizeof(u32), serialized.data(), serialized.size()); return forge_send(CommandType::SendMessage, rpcn_request_counter.fetch_add(1), data); } @@ -2213,63 +2223,91 @@ namespace rpcn bool rpcn_client::record_score(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, SceNpScorePcId char_id, SceNpScoreValue score, const std::optional comment, const std::optional> score_data) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::RecordScoreRequest pb_req; + pb_req.set_boardid(board_id); + pb_req.set_pcid(char_id); + pb_req.set_score(score); + if (comment) + { + pb_req.set_comment(*comment); + } + if (score_data) + { + pb_req.set_data(score_data->data(), score_data->size()); + } - auto req_finished = CreateRecordScoreRequestDirect(builder, board_id, char_id, score, comment ? (*comment).c_str() : nullptr, score_data ? &*score_data : nullptr); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::RecordScore, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::RecordScore, req_id); } bool rpcn_client::get_score_range(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, u32 start_rank, u32 num_rank, bool with_comment, bool with_gameinfo) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateGetScoreRangeRequest(builder, board_id, start_rank, num_rank, with_comment, with_gameinfo); - builder.Finish(req_finished); + np2_structs::GetScoreRangeRequest pb_req; + pb_req.set_boardid(board_id); + pb_req.set_startrank(start_rank); + pb_req.set_numranks(num_rank); + pb_req.set_withcomment(with_comment); + pb_req.set_withgameinfo(with_gameinfo); - return forge_request_with_com_id(builder, communication_id, CommandType::GetScoreRange, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::GetScoreRange, req_id); } bool rpcn_client::get_score_npid(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, const std::vector>& npids, bool with_comment, bool with_gameinfo) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::GetScoreNpIdRequest pb_req; + pb_req.set_boardid(board_id); + pb_req.set_withcomment(with_comment); + pb_req.set_withgameinfo(with_gameinfo); - std::vector> davec; for (usz i = 0; i < npids.size(); i++) { - auto npid = CreateScoreNpIdPcId(builder, builder.CreateString(static_cast(npids[i].first.handle.data)), npids[i].second); - davec.push_back(npid); + auto* npid_entry = pb_req.add_npids(); + npid_entry->set_npid(np::npid_to_string(npids[i].first)); + npid_entry->set_pcid(npids[i].second); } - auto req_finished = CreateGetScoreNpIdRequest(builder, board_id, builder.CreateVector(davec), with_comment, with_gameinfo); + std::string serialized; + pb_req.SerializeToString(&serialized); - builder.Finish(req_finished); - - return forge_request_with_com_id(builder, communication_id, CommandType::GetScoreNpid, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::GetScoreNpid, req_id); } bool rpcn_client::get_score_friend(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, bool include_self, bool with_comment, bool with_gameinfo, u32 max_entries) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateGetScoreFriendsRequest(builder, board_id, include_self, max_entries, with_comment, with_gameinfo); - builder.Finish(req_finished); + np2_structs::GetScoreFriendsRequest pb_req; + pb_req.set_boardid(board_id); + pb_req.set_include_self(include_self); + pb_req.set_max(max_entries); + pb_req.set_withcomment(with_comment); + pb_req.set_withgameinfo(with_gameinfo); - return forge_request_with_com_id(builder, communication_id, CommandType::GetScoreFriends, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::GetScoreFriends, req_id); } bool rpcn_client::record_score_data(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScorePcId pc_id, SceNpScoreBoardId board_id, s64 score, const std::vector& score_data) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateRecordScoreGameDataRequest(builder, board_id, pc_id, score); - builder.Finish(req_finished); + np2_structs::RecordScoreGameDataRequest pb_req; + pb_req.set_boardid(board_id); + pb_req.set_pcid(pc_id); + pb_req.set_score(score); - const u8* buf = builder.GetBufferPointer(); - const usz bufsize = builder.GetSize(); + std::string serialized; + pb_req.SerializeToString(&serialized); + + const usz bufsize = serialized.size(); std::vector data(COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize + sizeof(u32) + score_data.size()); rpcn_client::write_communication_id(communication_id, data); reinterpret_cast&>(data[COMMUNICATION_ID_SIZE]) = static_cast(bufsize); - memcpy(data.data() + COMMUNICATION_ID_SIZE + sizeof(u32), buf, bufsize); + memcpy(data.data() + COMMUNICATION_ID_SIZE + sizeof(u32), serialized.data(), bufsize); reinterpret_cast&>(data[COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize]) = static_cast(score_data.size()); memcpy(data.data() + COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize + sizeof(u32), score_data.data(), score_data.size()); @@ -2278,247 +2316,304 @@ namespace rpcn bool rpcn_client::get_score_data(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScorePcId pc_id, SceNpScoreBoardId board_id, const SceNpId& npid) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateGetScoreGameDataRequest(builder, board_id, builder.CreateString(reinterpret_cast(npid.handle.data)), pc_id); - builder.Finish(req_finished); + np2_structs::GetScoreGameDataRequest pb_req; + pb_req.set_boardid(board_id); + pb_req.set_npid(np::npid_to_string(npid)); + pb_req.set_pcid(pc_id); - return forge_request_with_com_id(builder, communication_id, CommandType::GetScoreData, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::GetScoreData, req_id); } bool rpcn_client::tus_set_multislot_variable(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, vm::cptr slotIdArray, vm::cptr variableArray, s32 arrayNum, bool vuser) { - const std::vector slotid_array(slotIdArray.get_ptr(), slotIdArray.get_ptr() + arrayNum); - const std::vector variable_array(variableArray.get_ptr(), variableArray.get_ptr() + arrayNum); + np2_structs::TusSetMultiSlotVariableRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusSetMultiSlotVariableRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), builder.CreateVector(slotid_array), builder.CreateVector(variable_array)); - builder.Finish(req_finished); + for (s32 i = 0; i < arrayNum; i++) + { + pb_req.add_slotidarray(slotIdArray[i]); + pb_req.add_variablearray(variableArray[i]); + } - return forge_request_with_com_id(builder, communication_id, CommandType::TusSetMultiSlotVariable, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusSetMultiSlotVariable, req_id); } bool rpcn_client::tus_get_multislot_variable(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, vm::cptr slotIdArray, s32 arrayNum, bool vuser) { - const std::vector slotid_array(slotIdArray.get_ptr(), slotIdArray.get_ptr() + arrayNum); + np2_structs::TusGetMultiSlotVariableRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusGetMultiSlotVariableRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), builder.CreateVector(slotid_array)); - builder.Finish(req_finished); + for (s32 i = 0; i < arrayNum; i++) + { + pb_req.add_slotidarray(slotIdArray[i]); + } - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetMultiSlotVariable, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetMultiSlotVariable, req_id); } bool rpcn_client::tus_get_multiuser_variable(u32 req_id, const SceNpCommunicationId& communication_id, const std::vector& targetNpIdArray, SceNpTusSlotId slotId, s32 arrayNum, bool vuser) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::TusGetMultiUserVariableRequest pb_req; + pb_req.set_slotid(slotId); - std::vector> davec; for (s32 i = 0; i < std::min(arrayNum, ::narrow(targetNpIdArray.size())); i++) { - davec.push_back(CreateTusUser(builder, vuser, builder.CreateString(targetNpIdArray[i].data))); + auto* user = pb_req.add_users(); + user->set_vuser(vuser); + user->set_npid(targetNpIdArray[i].data); } - auto req_finished = CreateTusGetMultiUserVariableRequest(builder, builder.CreateVector(davec), slotId); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetMultiUserVariable, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetMultiUserVariable, req_id); } bool rpcn_client::tus_get_friends_variable(u32 req_id, const SceNpCommunicationId& communication_id, SceNpTusSlotId slotId, bool includeSelf, s32 sortType, s32 arrayNum) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusGetFriendsVariableRequest(builder, slotId, includeSelf, sortType, arrayNum); - builder.Finish(req_finished); + np2_structs::TusGetFriendsVariableRequest pb_req; + pb_req.set_slotid(slotId); + pb_req.set_includeself(includeSelf); + pb_req.set_sorttype(sortType); + pb_req.set_arraynum(arrayNum); - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetFriendsVariable, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetFriendsVariable, req_id); } bool rpcn_client::tus_add_and_get_variable(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, SceNpTusSlotId slotId, s64 inVariable, vm::ptr option, bool vuser) { - flatbuffers::FlatBufferBuilder builder(1024); - - flatbuffers::Offset> isLastChangedDate; - flatbuffers::Offset isLastChangedAuthorId; + np2_structs::TusAddAndGetVariableRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); + pb_req.set_slotid(slotId); + pb_req.set_invariable(inVariable); if (option) { if (option->isLastChangedDate) { - std::vector is_last_changed_date_vec; - is_last_changed_date_vec.push_back(option->isLastChangedDate->tick); - isLastChangedDate = builder.CreateVector(is_last_changed_date_vec); + pb_req.add_islastchangeddate(option->isLastChangedDate->tick); } if (option->isLastChangedAuthorId) { - isLastChangedAuthorId = builder.CreateString(option->isLastChangedAuthorId->handle.data); + pb_req.set_islastchangedauthorid(np::npid_to_string(*option->isLastChangedAuthorId)); } } - auto req_finished = CreateTusAddAndGetVariableRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), slotId, inVariable, isLastChangedDate, isLastChangedAuthorId); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::TusAddAndGetVariable, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::TusAddAndGetVariable, req_id); } bool rpcn_client::tus_try_and_set_variable(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, SceNpTusSlotId slotId, s32 opeType, s64 variable, vm::ptr option, bool vuser) { - flatbuffers::FlatBufferBuilder builder(1024); - - flatbuffers::Offset> isLastChangedDate; - flatbuffers::Offset isLastChangedAuthorId; - flatbuffers::Offset> compareValue; + np2_structs::TusTryAndSetVariableRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); + pb_req.set_slotid(slotId); + pb_req.set_opetype(opeType); + pb_req.set_variable(variable); if (option) { if (option->isLastChangedDate) { - std::vector is_last_changed_date_vec; - is_last_changed_date_vec.push_back(option->isLastChangedDate->tick); - isLastChangedDate = builder.CreateVector(is_last_changed_date_vec); + pb_req.add_islastchangeddate(option->isLastChangedDate->tick); } if (option->isLastChangedAuthorId) { - isLastChangedAuthorId = builder.CreateString(option->isLastChangedAuthorId->handle.data); + pb_req.set_islastchangedauthorid(np::npid_to_string(*option->isLastChangedAuthorId)); } if (option->compareValue) { - std::vector compare_value_vec; - compare_value_vec.push_back(*(option->compareValue)); - compareValue = builder.CreateVector(compare_value_vec); + pb_req.add_comparevalue(*(option->compareValue)); } } - auto req_finished = CreateTusTryAndSetVariableRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), slotId, opeType, variable, isLastChangedDate, isLastChangedAuthorId, compareValue); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::TusTryAndSetVariable, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::TusTryAndSetVariable, req_id); } bool rpcn_client::tus_delete_multislot_variable(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, vm::cptr slotIdArray, s32 arrayNum, bool vuser) { - const std::vector slotid_array(slotIdArray.get_ptr(), slotIdArray.get_ptr() + arrayNum); + np2_structs::TusDeleteMultiSlotVariableRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusDeleteMultiSlotVariableRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), builder.CreateVector(slotid_array)); - builder.Finish(req_finished); + for (s32 i = 0; i < arrayNum; i++) + { + pb_req.add_slotidarray(slotIdArray[i]); + } - return forge_request_with_com_id(builder, communication_id, CommandType::TusDeleteMultiSlotVariable, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusDeleteMultiSlotVariable, req_id); } bool rpcn_client::tus_set_data(u32 req_id, SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, SceNpTusSlotId slotId, const std::vector& tus_data, vm::cptr info, vm::ptr option, bool vuser) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::TusSetDataRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); + pb_req.set_slotid(slotId); + pb_req.set_data(tus_data.data(), tus_data.size()); - flatbuffers::Offset> isLastChangedDate; - flatbuffers::Offset isLastChangedAuthorId; + if (info) + { + pb_req.set_info(info->data, static_cast(info->infoSize)); + } if (option) { if (option->isLastChangedDate) { - std::vector is_last_changed_date_vec; - is_last_changed_date_vec.push_back(option->isLastChangedDate->tick); - isLastChangedDate = builder.CreateVector(is_last_changed_date_vec); + pb_req.add_islastchangeddate(option->isLastChangedDate->tick); } if (option->isLastChangedAuthorId) { - isLastChangedAuthorId = builder.CreateString(option->isLastChangedAuthorId->handle.data); + pb_req.set_islastchangedauthorid(np::npid_to_string(*option->isLastChangedAuthorId)); } } - flatbuffers::Offset> fb_info; + std::string serialized; + pb_req.SerializeToString(&serialized); - if (info) - { - fb_info = builder.CreateVector(info->data, static_cast(info->infoSize)); - } - - auto req_finished = CreateTusSetDataRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), slotId, builder.CreateVector(tus_data), fb_info, isLastChangedDate, isLastChangedAuthorId); - builder.Finish(req_finished); - - return forge_request_with_com_id(builder, communication_id, CommandType::TusSetData, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::TusSetData, req_id); } bool rpcn_client::tus_get_data(u32 req_id, SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, SceNpTusSlotId slotId, bool vuser) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusGetDataRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), slotId); - builder.Finish(req_finished); + np2_structs::TusGetDataRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); + pb_req.set_slotid(slotId); - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetData, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetData, req_id); } bool rpcn_client::tus_get_multislot_data_status(u32 req_id, SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, vm::cptr slotIdArray, s32 arrayNum, bool vuser) { - const std::vector slotid_array(slotIdArray.get_ptr(), slotIdArray.get_ptr() + arrayNum); + np2_structs::TusGetMultiSlotDataStatusRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusGetMultiSlotDataStatusRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), builder.CreateVector(slotid_array)); - builder.Finish(req_finished); + for (s32 i = 0; i < arrayNum; i++) + { + pb_req.add_slotidarray(slotIdArray[i]); + } - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetMultiSlotDataStatus, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetMultiSlotDataStatus, req_id); } bool rpcn_client::tus_get_multiuser_data_status(u32 req_id, SceNpCommunicationId& communication_id, const std::vector& targetNpIdArray, SceNpTusSlotId slotId, s32 arrayNum, bool vuser) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::TusGetMultiUserDataStatusRequest pb_req; + pb_req.set_slotid(slotId); - std::vector> davec; for (s32 i = 0; i < std::min(arrayNum, ::narrow(targetNpIdArray.size())); i++) { - davec.push_back(CreateTusUser(builder, vuser, builder.CreateString(targetNpIdArray[i].data))); + auto* user = pb_req.add_users(); + user->set_vuser(vuser); + user->set_npid(targetNpIdArray[i].data); } - auto req_finished = CreateTusGetMultiUserDataStatusRequest(builder, builder.CreateVector(davec), slotId); - builder.Finish(req_finished); + std::string serialized; + pb_req.SerializeToString(&serialized); - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetMultiUserDataStatus, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetMultiUserDataStatus, req_id); } bool rpcn_client::tus_get_friends_data_status(u32 req_id, SceNpCommunicationId& communication_id, SceNpTusSlotId slotId, bool includeSelf, s32 sortType, s32 arrayNum) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusGetFriendsDataStatusRequest(builder, slotId, includeSelf, sortType, arrayNum); - builder.Finish(req_finished); + np2_structs::TusGetFriendsDataStatusRequest pb_req; + pb_req.set_slotid(slotId); + pb_req.set_includeself(includeSelf); + pb_req.set_sorttype(sortType); + pb_req.set_arraynum(arrayNum); - return forge_request_with_com_id(builder, communication_id, CommandType::TusGetFriendsDataStatus, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusGetFriendsDataStatus, req_id); } bool rpcn_client::tus_delete_multislot_data(u32 req_id, SceNpCommunicationId& communication_id, const SceNpOnlineId& targetNpId, vm::cptr slotIdArray, s32 arrayNum, bool vuser) { - const std::vector slotid_array(slotIdArray.get_ptr(), slotIdArray.get_ptr() + arrayNum); + np2_structs::TusDeleteMultiSlotDataRequest pb_req; + auto* user = pb_req.mutable_user(); + user->set_vuser(vuser); + user->set_npid(targetNpId.data); - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateTusDeleteMultiSlotDataRequest(builder, CreateTusUser(builder, vuser, builder.CreateString(targetNpId.data)), builder.CreateVector(slotid_array)); - builder.Finish(req_finished); + for (s32 i = 0; i < arrayNum; i++) + { + pb_req.add_slotidarray(slotIdArray[i]); + } - return forge_request_with_com_id(builder, communication_id, CommandType::TusDeleteMultiSlotData, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, communication_id, CommandType::TusDeleteMultiSlotData, req_id); } bool rpcn_client::send_presence(const SceNpCommunicationId& pr_com_id, const std::string& pr_title, const std::string& pr_status, const std::string& pr_comment, const std::vector& pr_data) { - flatbuffers::FlatBufferBuilder builder(1024); - auto req_finished = CreateSetPresenceRequest(builder, builder.CreateString(pr_title), builder.CreateString(pr_status), builder.CreateString(pr_comment), builder.CreateVector(pr_data)); - builder.Finish(req_finished); + np2_structs::SetPresenceRequest pb_req; + pb_req.set_title(pr_title); + pb_req.set_status(pr_status); + pb_req.set_comment(pr_comment); + pb_req.set_data(pr_data.data(), pr_data.size()); - return forge_request_with_com_id(builder, pr_com_id, CommandType::SetPresence, rpcn_request_counter.fetch_add(1)); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, pr_com_id, CommandType::SetPresence, rpcn_request_counter.fetch_add(1)); } bool rpcn_client::createjoin_room_gui(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatchingAttr* attr_list) { - flatbuffers::FlatBufferBuilder builder(1024); + np2_structs::CreateRoomGUIRequest pb_req; u32 total_slots = 0; u32 private_slots = 0; bool privilege_grant = false; bool stealth = false; - std::vector> vec_attrs; - for (const SceNpMatchingAttr* cur_attr = attr_list; cur_attr != nullptr; cur_attr = cur_attr->next ? cur_attr->next.get_ptr() : nullptr) { switch (cur_attr->type) @@ -2553,17 +2648,21 @@ namespace rpcn ensure(cur_attr->id >= 1u && cur_attr->id <= 16u, "Invalid game bin attribute id"); ensure(cur_attr->value.data.size <= 64u || ((cur_attr->id == 1u || cur_attr->id == 2u) && cur_attr->value.data.size <= 256u), "Invalid game bin size"); - const std::vector vec_data(static_cast(cur_attr->value.data.ptr.get_ptr()), static_cast(cur_attr->value.data.ptr.get_ptr()) + cur_attr->value.data.size); - auto attr = CreateMatchingAttrDirect(builder, cur_attr->type, cur_attr->id, 0, &vec_data); - vec_attrs.push_back(attr); + auto* attr = pb_req.add_game_attrs(); + attr->set_attr_type(cur_attr->type); + attr->set_attr_id(cur_attr->id); + attr->set_num(0); + attr->set_data(cur_attr->value.data.ptr.get_ptr(), cur_attr->value.data.size); break; } case SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM: { ensure(cur_attr->id >= 1u && cur_attr->id <= 16u, "Invalid game num attribute id"); - auto attr = CreateMatchingAttrDirect(builder, cur_attr->type, cur_attr->id, cur_attr->value.num, nullptr); - vec_attrs.push_back(attr); + auto* attr = pb_req.add_game_attrs(); + attr->set_attr_type(cur_attr->type); + attr->set_attr_id(cur_attr->id); + attr->set_num(cur_attr->value.num); break; } default: @@ -2571,187 +2670,185 @@ namespace rpcn } } - flatbuffers::Offset>> final_attrs_vec; + pb_req.set_total_slots(total_slots); + pb_req.set_private_slots(private_slots); + pb_req.set_privilege_grant(privilege_grant); + pb_req.set_stealth(stealth); - if (!vec_attrs.empty()) - { - final_attrs_vec = builder.CreateVector(vec_attrs); - } + std::string serialized; + pb_req.SerializeToString(&serialized); - auto req_finished = CreateCreateRoomGUIRequest(builder, total_slots, private_slots, privilege_grant, stealth, final_attrs_vec); - builder.Finish(req_finished); - - return forge_request_with_com_id(builder, communication_id, CommandType::CreateRoomGUI, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::CreateRoomGUI, req_id); } bool rpcn_client::join_room_gui(u32 req_id, const SceNpRoomId& room_id) { - flatbuffers::FlatBufferBuilder builder(1024); - const std::vector vec_room_id(room_id.opt, room_id.opt + sizeof(room_id.opt)); - auto req_finished = CreateMatchingGuiRoomIdDirect(builder, &vec_room_id); - builder.Finish(req_finished); - return forge_request_with_data(builder, CommandType::JoinRoomGUI, req_id); + np2_structs::MatchingGuiRoomId pb_req; + pb_req.set_id(room_id.opt, sizeof(room_id.opt)); + + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_data(serialized, CommandType::JoinRoomGUI, req_id); } bool rpcn_client::leave_room_gui(u32 req_id, const SceNpRoomId& room_id) { - flatbuffers::FlatBufferBuilder builder(1024); - const std::vector vec_room_id(room_id.opt, room_id.opt + sizeof(room_id.opt)); - auto req_finished = CreateMatchingGuiRoomIdDirect(builder, &vec_room_id); - builder.Finish(req_finished); - return forge_request_with_data(builder, CommandType::LeaveRoomGUI, req_id); + np2_structs::MatchingGuiRoomId pb_req; + pb_req.set_id(room_id.opt, sizeof(room_id.opt)); + + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_data(serialized, CommandType::LeaveRoomGUI, req_id); } bool rpcn_client::get_room_list_gui(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatchingReqRange* range, vm::ptr cond, vm::ptr attr) { - flatbuffers::FlatBufferBuilder builder(1024); - - const s32 range_start = range->start; - const u32 range_max = range->max; - - std::vector> vec_conds; - std::vector> vec_attrs; + np2_structs::GetRoomListGUIRequest pb_req; + pb_req.set_range_start(range->start); + pb_req.set_range_max(range->max); for (auto cur_cond = cond; cur_cond; cur_cond = cur_cond->next) { - auto fb_cond = CreateMatchingSearchCondition(builder, cur_cond->target_attr_type, cur_cond->target_attr_id, cur_cond->comp_op, cur_cond->compared.value.num); - vec_conds.push_back(fb_cond); + auto* pb_cond = pb_req.add_conds(); + pb_cond->set_attr_type(cur_cond->target_attr_type); + pb_cond->set_attr_id(cur_cond->target_attr_id); + pb_cond->set_comp_op(cur_cond->comp_op); + pb_cond->set_comp_value(cur_cond->compared.value.num); } for (auto cur_attr = attr; cur_attr; cur_attr = cur_attr->next) { - auto fb_attr = CreateMatchingAttr(builder, cur_attr->type, cur_attr->id); - vec_attrs.push_back(fb_attr); + auto* pb_attr = pb_req.add_attrs(); + pb_attr->set_attr_type(cur_attr->type); + pb_attr->set_attr_id(cur_attr->id); } - flatbuffers::Offset>> final_conds_vec; - flatbuffers::Offset>> final_attrs_vec; + std::string serialized; + pb_req.SerializeToString(&serialized); - if (!vec_conds.empty()) - { - final_conds_vec = builder.CreateVector(vec_conds); - } - - if (!vec_attrs.empty()) - { - final_attrs_vec = builder.CreateVector(vec_attrs); - } - - auto req_finished = CreateGetRoomListGUIRequest(builder, range_start, range_max, final_conds_vec, final_attrs_vec); - builder.Finish(req_finished); - - return forge_request_with_com_id(builder, communication_id, CommandType::GetRoomListGUI, req_id); + return forge_request_with_com_id(serialized, communication_id, CommandType::GetRoomListGUI, req_id); } bool rpcn_client::set_room_search_flag_gui(u32 req_id, const SceNpRoomId& room_id, bool stealth) { - flatbuffers::FlatBufferBuilder builder(1024); - const std::vector vec_room_id(room_id.opt, room_id.opt + sizeof(room_id.opt)); - auto req_finished = CreateSetRoomSearchFlagGUIDirect(builder, &vec_room_id, stealth); - builder.Finish(req_finished); - return forge_request_with_data(builder, CommandType::SetRoomSearchFlagGUI, req_id); + np2_structs::SetRoomSearchFlagGUI pb_req; + pb_req.set_roomid(room_id.opt, sizeof(room_id.opt)); + pb_req.set_stealth(stealth); + + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_data(serialized, CommandType::SetRoomSearchFlagGUI, req_id); } bool rpcn_client::get_room_search_flag_gui(u32 req_id, const SceNpRoomId& room_id) { - flatbuffers::FlatBufferBuilder builder(1024); - const std::vector vec_room_id(room_id.opt, room_id.opt + sizeof(room_id.opt)); - auto req_finished = CreateMatchingGuiRoomIdDirect(builder, &vec_room_id); - builder.Finish(req_finished); - return forge_request_with_data(builder, CommandType::GetRoomSearchFlagGUI, req_id); + np2_structs::MatchingGuiRoomId pb_req; + pb_req.set_id(room_id.opt, sizeof(room_id.opt)); + + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_data(serialized, CommandType::GetRoomSearchFlagGUI, req_id); } bool rpcn_client::set_room_info_gui(u32 req_id, const SceNpRoomId& room_id, vm::ptr attrs) { - flatbuffers::FlatBufferBuilder builder(1024); - const std::vector vec_room_id(room_id.opt, room_id.opt + sizeof(room_id.opt)); - std::vector> vec_attrs; + np2_structs::MatchingRoom pb_req; + pb_req.set_id(room_id.opt, sizeof(room_id.opt)); for (auto cur_attr = attrs; cur_attr; cur_attr = cur_attr->next) { - u32 num = 0; - flatbuffers::Offset> fb_vec_data = 0; + auto* pb_attr = pb_req.add_attr(); + pb_attr->set_attr_type(cur_attr->type); + pb_attr->set_attr_id(cur_attr->id); switch (cur_attr->type) { case SCE_NP_MATCHING_ATTR_TYPE_GAME_BIN: { - const std::vector vec_data(static_cast(cur_attr->value.data.ptr.get_ptr()), static_cast(cur_attr->value.data.ptr.get_ptr()) + cur_attr->value.data.size); - fb_vec_data = builder.CreateVector(vec_data); + pb_attr->set_data(cur_attr->value.data.ptr.get_ptr(), cur_attr->value.data.size); break; } case SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM: { - num = cur_attr->value.num; + pb_attr->set_num(cur_attr->value.num); break; } default: fmt::throw_exception("Invalid attr type reached set_room_info_gui"); } - - auto fb_attr = CreateMatchingAttr(builder, cur_attr->type, cur_attr->id, num, fb_vec_data); - vec_attrs.push_back(fb_attr); } - auto req_finished = CreateMatchingRoomDirect(builder, &vec_room_id, &vec_attrs); - builder.Finish(req_finished); - return forge_request_with_data(builder, CommandType::SetRoomInfoGUI, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_data(serialized, CommandType::SetRoomInfoGUI, req_id); } bool rpcn_client::get_room_info_gui(u32 req_id, const SceNpRoomId& room_id, vm::ptr attrs) { - flatbuffers::FlatBufferBuilder builder(1024); - const std::vector vec_room_id(room_id.opt, room_id.opt + sizeof(room_id.opt)); - std::vector> vec_attrs; + np2_structs::MatchingRoom pb_req; + pb_req.set_id(room_id.opt, sizeof(room_id.opt)); for (auto cur_attr = attrs; cur_attr; cur_attr = cur_attr->next) { - auto fb_attr = CreateMatchingAttr(builder, cur_attr->type, cur_attr->id); - vec_attrs.push_back(fb_attr); + auto* pb_attr = pb_req.add_attr(); + pb_attr->set_attr_type(cur_attr->type); + pb_attr->set_attr_id(cur_attr->id); } - auto req_finished = CreateMatchingRoomDirect(builder, &vec_room_id, &vec_attrs); - builder.Finish(req_finished); - return forge_request_with_data(builder, CommandType::GetRoomInfoGUI, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_data(serialized, CommandType::GetRoomInfoGUI, req_id); } bool rpcn_client::quickmatch_gui(u32 req_id, const SceNpCommunicationId& com_id, vm::cptr cond, s32 available_num) { - flatbuffers::FlatBufferBuilder builder(1024); - std::vector> vec_conds; + np2_structs::QuickMatchGUIRequest pb_req; + pb_req.set_available_num(available_num); for (auto cur_cond = cond; cur_cond; cur_cond = cur_cond->next) { - auto fb_cond = CreateMatchingSearchCondition(builder, cur_cond->target_attr_type, cur_cond->target_attr_id, cur_cond->comp_op, cur_cond->compared.value.num); - vec_conds.push_back(fb_cond); + auto* pb_cond = pb_req.add_conds(); + pb_cond->set_attr_type(cur_cond->target_attr_type); + pb_cond->set_attr_id(cur_cond->target_attr_id); + pb_cond->set_comp_op(cur_cond->comp_op); + pb_cond->set_comp_value(cur_cond->compared.value.num); } - auto req_finished = CreateQuickMatchGUIRequestDirect(builder, &vec_conds, available_num); - builder.Finish(req_finished); - return forge_request_with_com_id(builder, com_id, CommandType::QuickMatchGUI, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, com_id, CommandType::QuickMatchGUI, req_id); } bool rpcn_client::searchjoin_gui(u32 req_id, const SceNpCommunicationId& com_id, vm::cptr cond, vm::cptr attr) { - flatbuffers::FlatBufferBuilder builder(1024); - - std::vector> vec_conds; - std::vector> vec_attrs; + np2_structs::SearchJoinRoomGUIRequest pb_req; for (auto cur_cond = cond; cur_cond; cur_cond = cur_cond->next) { - auto fb_cond = CreateMatchingSearchCondition(builder, cur_cond->target_attr_type, cur_cond->target_attr_id, cur_cond->comp_op, cur_cond->compared.value.num); - vec_conds.push_back(fb_cond); + auto* pb_cond = pb_req.add_conds(); + pb_cond->set_attr_type(cur_cond->target_attr_type); + pb_cond->set_attr_id(cur_cond->target_attr_id); + pb_cond->set_comp_op(cur_cond->comp_op); + pb_cond->set_comp_value(cur_cond->compared.value.num); } for (auto cur_attr = attr; cur_attr; cur_attr = cur_attr->next) { - auto fb_attr = CreateMatchingAttr(builder, cur_attr->type, cur_attr->id); - vec_attrs.push_back(fb_attr); + auto* pb_attr = pb_req.add_attrs(); + pb_attr->set_attr_type(cur_attr->type); + pb_attr->set_attr_id(cur_attr->id); } - auto req_finished = CreateSearchJoinRoomGUIRequestDirect(builder, vec_conds.empty() ? nullptr : &vec_conds, vec_attrs.empty() ? nullptr : &vec_attrs); - builder.Finish(req_finished); - return forge_request_with_com_id(builder, com_id, CommandType::SearchJoinRoomGUI, req_id); + std::string serialized; + pb_req.SerializeToString(&serialized); + + return forge_request_with_com_id(serialized, com_id, CommandType::SearchJoinRoomGUI, req_id); } void rpcn_client::write_communication_id(const SceNpCommunicationId& com_id, std::vector& data) @@ -2762,28 +2859,26 @@ namespace rpcn memcpy(data.data(), com_id_str.data(), COMMUNICATION_ID_SIZE); } - bool rpcn_client::forge_request_with_com_id(const flatbuffers::FlatBufferBuilder& builder, const SceNpCommunicationId& com_id, CommandType command, u64 packet_id) + bool rpcn_client::forge_request_with_com_id(const std::string& serialized_data, const SceNpCommunicationId& com_id, CommandType command, u64 packet_id) { - const u8* buf = builder.GetBufferPointer(); - const usz bufsize = builder.GetSize(); + const usz bufsize = serialized_data.size(); std::vector data(COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize); rpcn_client::write_communication_id(com_id, data); reinterpret_cast&>(data[COMMUNICATION_ID_SIZE]) = static_cast(bufsize); - memcpy(data.data() + COMMUNICATION_ID_SIZE + sizeof(u32), buf, bufsize); + memcpy(data.data() + COMMUNICATION_ID_SIZE + sizeof(u32), serialized_data.data(), bufsize); return forge_send(command, packet_id, data); } - bool rpcn_client::forge_request_with_data(const flatbuffers::FlatBufferBuilder& builder, CommandType command, u64 packet_id) + bool rpcn_client::forge_request_with_data(const std::string& serialized_data, CommandType command, u64 packet_id) { - const u8* buf = builder.GetBufferPointer(); - const usz bufsize = builder.GetSize(); + const usz bufsize = serialized_data.size(); std::vector data(sizeof(u32) + bufsize); reinterpret_cast&>(data[0]) = static_cast(bufsize); - memcpy(data.data() + sizeof(u32), buf, bufsize); + memcpy(data.data() + sizeof(u32), serialized_data.data(), bufsize); return forge_send(command, packet_id, data); } @@ -2990,7 +3085,7 @@ namespace rpcn } case NotificationType::FriendPresenceChanged: { - const std::string username = vdata.get_string(true); + const std::string username = vdata.get_string(false); SceNpCommunicationId pr_com_id = vdata.get_com_id(); std::string pr_title = fmt::truncate(vdata.get_string(true), SCE_NP_BASIC_PRESENCE_TITLE_SIZE_MAX - 1); std::string pr_status = fmt::truncate(vdata.get_string(true), SCE_NP_BASIC_PRESENCE_EXTENDED_STATUS_SIZE_MAX - 1); @@ -3035,15 +3130,17 @@ namespace rpcn // Unserialize the message vec_stream sdata(data); std::string sender = sdata.get_string(false); - auto* fb_mdata = sdata.get_flatbuffer(); + auto pb_mdata = sdata.get_protobuf(); if (sdata.is_error()) { + rpcn_log.error("Error parsing MessageReceived notification"); return; } - if (!fb_mdata->communicationId() || fb_mdata->communicationId()->size() == 0 || fb_mdata->communicationId()->size() > 9 || - !fb_mdata->subject() || !fb_mdata->body() || !fb_mdata->data()) + const auto communication_id = np::string_to_communication_id(pb_mdata->communicationid()); + + if (!communication_id) { rpcn_log.warning("Discarded invalid message!"); return; @@ -3051,14 +3148,17 @@ namespace rpcn message_data mdata = { .msgId = message_counter, - .mainType = fb_mdata->mainType(), - .subType = fb_mdata->subType(), - .msgFeatures = fb_mdata->msgFeatures(), - .subject = fb_mdata->subject()->str(), - .body = fb_mdata->body()->str()}; + .mainType = ::narrow(pb_mdata->maintype().value()), + .subType = ::narrow(pb_mdata->subtype().value()), + .msgFeatures = pb_mdata->msgfeatures(), + .subject = pb_mdata->subject(), + .body = pb_mdata->body()}; - strcpy_trunc(mdata.commId.data, fb_mdata->communicationId()->str()); - mdata.data.assign(fb_mdata->data()->Data(), fb_mdata->data()->Data() + fb_mdata->data()->size()); + mdata.commId = *communication_id; + mdata.data.assign(pb_mdata->data().begin(), pb_mdata->data().end()); + + rpcn_log.notice("Received message from %s:", sender); + mdata.print(); // Save the message and call callbacks { @@ -3080,7 +3180,7 @@ namespace rpcn } } - std::optional>> rpcn_client::get_message(u64 id) + std::optional>> rpcn_client::get_message(u64 id) const { { std::lock_guard lock(mutex_messages); @@ -3138,21 +3238,21 @@ namespace rpcn active_messages.erase(id); } - u32 rpcn_client::get_num_friends() + u32 rpcn_client::get_num_friends() const { std::lock_guard lock(mutex_friends); return ::size32(friend_infos.friends); } - u32 rpcn_client::get_num_blocks() + u32 rpcn_client::get_num_blocks() const { std::lock_guard lock(mutex_friends); return ::size32(friend_infos.blocked); } - std::optional rpcn_client::get_friend_by_index(u32 index) + std::optional rpcn_client::get_friend_by_index(u32 index) const { std::lock_guard lock(mutex_friends); @@ -3170,7 +3270,7 @@ namespace rpcn return it->first; } - std::optional> rpcn_client::get_friend_presence_by_index(u32 index) + std::optional> rpcn_client::get_friend_presence_by_index(u32 index) const { std::lock_guard lock(mutex_friends); @@ -3184,7 +3284,7 @@ namespace rpcn return std::optional(*it); } - std::optional> rpcn_client::get_friend_presence_by_npid(const std::string& npid) + std::optional> rpcn_client::get_friend_presence_by_npid(const std::string& npid) const { std::lock_guard lock(mutex_friends); const auto it = friend_infos.friends.find(npid); diff --git a/rpcs3/Emu/NP/rpcn_client.h b/rpcs3/Emu/NP/rpcn_client.h index 6d7126ffa6..daa60d90e7 100644 --- a/rpcs3/Emu/NP/rpcn_client.h +++ b/rpcs3/Emu/NP/rpcn_client.h @@ -26,7 +26,6 @@ #include "Emu/Cell/Modules/sceNp.h" #include "Emu/Cell/Modules/sceNp2.h" #include "Emu/Cell/Modules/sceNpTus.h" -#include #ifdef __clang__ #pragma clang diagnostic push @@ -80,6 +79,14 @@ public: res.push_back(vec[i]); i++; } + + // Make sure we hit terminating 0 + if (i >= vec.size()) + { + error = true; + return {}; + } + i++; if (!empty && res.empty()) @@ -130,31 +137,21 @@ public: } template - const T* get_flatbuffer() + std::unique_ptr get_protobuf() { auto rawdata_vec = get_rawdata(); if (error) return nullptr; - if (vec.empty()) + auto msg = std::make_unique(); + if (!msg->ParseFromArray(rawdata_vec.data(), static_cast(rawdata_vec.size()))) { error = true; return nullptr; } - const T* ret = flatbuffers::GetRoot(rawdata_vec.data()); - flatbuffers::Verifier verifier(rawdata_vec.data(), rawdata_vec.size()); - - if (!ret->Verify(verifier)) - { - error = true; - return nullptr; - } - - aligned_bufs.push_back(std::move(rawdata_vec)); - - return ret; + return msg; } // Setters @@ -177,7 +174,6 @@ public: protected: std::vector& vec; - std::vector> aligned_bufs; usz i = 0; bool error = false; }; @@ -246,7 +242,7 @@ namespace rpcn std::mutex mutex_packets_to_send; // Friends related - shared_mutex mutex_friends; + mutable shared_mutex mutex_friends; std::set> friend_cbs; friend_data friend_infos; @@ -304,14 +300,15 @@ namespace rpcn ErrorType resend_token(const std::string& npid, const std::string& password); ErrorType send_reset_token(std::string_view npid, std::string_view email); ErrorType reset_password(std::string_view npid, std::string_view token, std::string_view password); - bool add_friend(const std::string& friend_username); + ErrorType delete_account(); + std::optional add_friend(const std::string& friend_username); bool remove_friend(const std::string& friend_username); - u32 get_num_friends(); - u32 get_num_blocks(); - std::optional get_friend_by_index(u32 index); - std::optional> get_friend_presence_by_index(u32 index); - std::optional> get_friend_presence_by_npid(const std::string& npid); + u32 get_num_friends() const; + u32 get_num_blocks() const; + std::optional get_friend_by_index(u32 index) const; + std::optional> get_friend_presence_by_index(u32 index) const; + std::optional> get_friend_presence_by_npid(const std::string& npid) const; std::vector>> get_notifications(); std::map>> get_replies(); @@ -319,7 +316,7 @@ namespace rpcn std::map get_presence_states(); std::vector get_new_messages(); - std::optional>> get_message(u64 id); + std::optional>> get_message(u64 id) const; std::vector>>> get_messages_and_register_cb(SceNpBasicMessageMainType type, bool include_bootable, message_cb_func cb_func, void* cb_param); void remove_message_cb(message_cb_func cb_func, void* cb_param); void mark_message_used(u64 id); @@ -340,6 +337,7 @@ namespace rpcn bool leave_room(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2LeaveRoomRequest* req); bool search_room(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SearchRoomRequest* req); bool get_roomdata_external_list(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2GetRoomDataExternalListRequest* req); + bool get_room_member_data_external_list(u32 req_id, const SceNpCommunicationId& communication_id, u64 room_id); bool set_roomdata_external(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SetRoomDataExternalRequest* req); bool get_roomdata_internal(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2GetRoomDataInternalRequest* req); bool set_roomdata_internal(u32 req_id, const SceNpCommunicationId& communication_id, const SceNpMatching2SetRoomDataInternalRequest* req); @@ -398,8 +396,8 @@ namespace rpcn std::vector forge_request(rpcn::CommandType command, u64 packet_id, const std::vector& data) const; bool forge_send(rpcn::CommandType command, u64 packet_id, const std::vector& data); - bool forge_request_with_com_id(const flatbuffers::FlatBufferBuilder& builder, const SceNpCommunicationId& com_id, CommandType command, u64 packet_id); - bool forge_request_with_data(const flatbuffers::FlatBufferBuilder& builder, CommandType command, u64 packet_id); + bool forge_request_with_com_id(const std::string& serialized_data, const SceNpCommunicationId& com_id, CommandType command, u64 packet_id); + bool forge_request_with_data(const std::string& serialized_data, CommandType command, u64 packet_id); bool forge_send_reply(rpcn::CommandType command, u64 packet_id, const std::vector& data, std::vector& reply_data); bool error_and_disconnect(const std::string& error_mgs); @@ -447,7 +445,7 @@ namespace rpcn return (void_cb_func < void_other_cb_func) || ((!(void_other_cb_func < void_cb_func)) && (cb_param < other.cb_param)); } }; - shared_mutex mutex_messages; + mutable shared_mutex mutex_messages; std::set message_cbs; std::unordered_map>> messages; // msg id / (sender / message) std::set active_messages; // msg id of messages that have not been discarded diff --git a/rpcs3/Emu/NP/rpcn_config.cpp b/rpcs3/Emu/NP/rpcn_config.cpp index 0b5cabe768..6665adbf7d 100644 --- a/rpcs3/Emu/NP/rpcn_config.cpp +++ b/rpcs3/Emu/NP/rpcn_config.cpp @@ -10,8 +10,7 @@ void cfg_rpcn::load() { const std::string path = cfg_rpcn::get_path(); - fs::file cfg_file(path, fs::read); - if (cfg_file) + if (fs::file cfg_file(path, fs::read); cfg_file) { rpcn_log.notice("Loading RPCN config. Path: %s", path); from_string(cfg_file.to_string()); diff --git a/rpcs3/Emu/NP/rpcn_config.h b/rpcs3/Emu/NP/rpcn_config.h index 0a8c7c9cc5..113d83e408 100644 --- a/rpcs3/Emu/NP/rpcn_config.h +++ b/rpcs3/Emu/NP/rpcn_config.h @@ -4,13 +4,13 @@ struct cfg_rpcn : cfg::node { - cfg::uint32 version{this, "Version", 1}; + cfg::uint32 version{this, "Version", 2}; cfg::string host{this, "Host", "np.rpcs3.net"}; cfg::string npid{this, "NPID", ""}; cfg::string password{this, "Password", ""}; cfg::string token{this, "Token", ""}; cfg::string hosts{this, "Hosts", "Official RPCN Server|np.rpcs3.net"}; - cfg::_bool ipv6_support{this, "IPv6 support", true}; + cfg::_bool ipv6_support{this, "Experimental IPv6 support", false}; void load(); void save() const; diff --git a/rpcs3/Emu/NP/rpcn_types.h b/rpcs3/Emu/NP/rpcn_types.h index 684f0e65e9..28500462e6 100644 --- a/rpcs3/Emu/NP/rpcn_types.h +++ b/rpcs3/Emu/NP/rpcn_types.h @@ -9,6 +9,7 @@ namespace rpcn Login, Terminate, Create, + Delete, SendToken, SendResetToken, ResetPassword, @@ -67,6 +68,7 @@ namespace rpcn GetRoomInfoGUI, QuickMatchGUI, SearchJoinRoomGUI, + GetRoomMemberDataExternalList, }; enum class NotificationType : u16 diff --git a/rpcs3/Emu/NP/signaling_handler.cpp b/rpcs3/Emu/NP/signaling_handler.cpp index 2e4ac5df56..a4c59763cb 100644 --- a/rpcs3/Emu/NP/signaling_handler.cpp +++ b/rpcs3/Emu/NP/signaling_handler.cpp @@ -256,9 +256,7 @@ void signaling_handler::process_incoming_messages() addr.s_addr = op_addr; char ip_str[16]; inet_ntop(AF_INET, &addr, ip_str, sizeof(ip_str)); - std::string_view npid(sp->npid.handle.data); - - sign_log.trace("SP %s from %s:%d(npid: %s)", sp->command, ip_str, op_port, npid); + sign_log.trace("SP %s from %s:%d(npid: %s)", sp->command, ip_str, op_port, np::npid_to_string(sp->npid)); } bool reply = false, schedule_repeat = false; @@ -426,9 +424,10 @@ void signaling_handler::operator()() if (sig.sig_info->time_last_msg_recvd < now - 60s && cmd != signal_info) { // We had no connection to opponent for 60 seconds, consider the connection dead + auto retire_info = sig.sig_info; sign_log.notice("Timeout disconnection"); - update_si_status(sig.sig_info, SCE_NP_SIGNALING_CONN_STATUS_INACTIVE, SCE_NP_SIGNALING_ERROR_TIMEOUT); - retire_packet(sig.sig_info, signal_ping); // Retire ping packet if necessary + update_si_status(retire_info, SCE_NP_SIGNALING_CONN_STATUS_INACTIVE, SCE_NP_SIGNALING_ERROR_TIMEOUT); + retire_packet(retire_info, signal_ping); // Retire ping packet if necessary break; // qpackets has been emptied of all packets for this user so we're requeuing } @@ -674,9 +673,7 @@ std::shared_ptr signaling_handler::get_signaling_ptr(const signa { u32 conn_id; - char npid_buf[17]{}; - memcpy(npid_buf, sp->npid.handle.data, 16); - std::string npid(npid_buf); + std::string npid = np::npid_to_string(sp->npid); if (!npid_to_conn_id.contains(npid)) return nullptr; @@ -777,6 +774,7 @@ void signaling_handler::send_information_packets(u32 addr, u16 port, const SceNp auto& sent_packet = sig_packet; sent_packet.command = signal_info; + retire_packet(si, signal_info); send_signaling_packet(sent_packet, addr, port); queue_signaling_packet(sent_packet, si, steady_clock::now() + REPEAT_INFO_DELAY); wake_up(); @@ -784,7 +782,7 @@ void signaling_handler::send_information_packets(u32 addr, u16 port, const SceNp u32 signaling_handler::get_always_conn_id(const SceNpId& npid) { - std::string npid_str(reinterpret_cast(npid.handle.data)); + std::string npid_str = np::npid_to_string(npid); if (npid_to_conn_id.contains(npid_str)) return ::at32(npid_to_conn_id, npid_str); @@ -810,9 +808,8 @@ u32 signaling_handler::init_sig1(const SceNpId& npid) sig_peers[conn_id]->conn_status = SCE_NP_SIGNALING_CONN_STATUS_PENDING; // Request peer infos from RPCN - std::string npid_str(reinterpret_cast(npid.handle.data)); auto& nph = g_fxo->get>(); - nph.req_sign_infos(npid_str, conn_id); + nph.req_sign_infos(np::npid_to_string(npid), conn_id); } return conn_id; @@ -835,18 +832,18 @@ u32 signaling_handler::init_sig2(const SceNpId& npid, u64 room_id, u16 member_id return conn_id; } -std::optional signaling_handler::get_conn_id_from_npid(const SceNpId& npid) +std::optional signaling_handler::get_conn_id_from_npid(const SceNpId& npid) const { std::lock_guard lock(data_mutex); - std::string npid_str(reinterpret_cast(npid.handle.data)); + std::string npid_str = np::npid_to_string(npid); if (npid_to_conn_id.contains(npid_str)) return ::at32(npid_to_conn_id, npid_str); return std::nullopt; } -std::optional signaling_handler::get_sig_infos(u32 conn_id) +std::optional signaling_handler::get_sig_infos(u32 conn_id) const { std::lock_guard lock(data_mutex); if (sig_peers.contains(conn_id)) @@ -855,7 +852,7 @@ std::optional signaling_handler::get_sig_infos(u32 conn_id) return std::nullopt; } -std::optional signaling_handler::get_conn_id_from_addr(u32 addr, u16 port) +std::optional signaling_handler::get_conn_id_from_addr(u32 addr, u16 port) const { std::lock_guard lock(data_mutex); diff --git a/rpcs3/Emu/NP/signaling_handler.h b/rpcs3/Emu/NP/signaling_handler.h index b4ec8229b8..c97c049d36 100644 --- a/rpcs3/Emu/NP/signaling_handler.h +++ b/rpcs3/Emu/NP/signaling_handler.h @@ -63,9 +63,9 @@ public: u32 init_sig1(const SceNpId& npid); u32 init_sig2(const SceNpId& npid, u64 room_id, u16 member_id); - std::optional get_sig_infos(u32 conn_id); - std::optional get_conn_id_from_npid(const SceNpId& npid); - std::optional get_conn_id_from_addr(u32 addr, u16 port); + std::optional get_sig_infos(u32 conn_id) const; + std::optional get_conn_id_from_npid(const SceNpId& npid) const; + std::optional get_conn_id_from_addr(u32 addr, u16 port) const; void add_sig_ctx(u32 ctx_id); void remove_sig_ctx(u32 ctx_id); @@ -128,12 +128,12 @@ private: void retire_all_packets(std::shared_ptr& si); void stop_sig_nl(u32 conn_id, bool forceful); - shared_mutex data_mutex; + mutable shared_mutex data_mutex; atomic_t wakey = 0; signaling_packet sig_packet{}; - std::map qpackets; // (wakeup time, packet) + std::multimap qpackets; // (wakeup time, packet) u32 cur_conn_id = 1; std::unordered_map npid_to_conn_id; // (npid, conn_id) diff --git a/rpcs3/Emu/NP/upnp_handler.cpp b/rpcs3/Emu/NP/upnp_handler.cpp index dca00de986..c19e30d441 100644 --- a/rpcs3/Emu/NP/upnp_handler.cpp +++ b/rpcs3/Emu/NP/upnp_handler.cpp @@ -89,12 +89,10 @@ void upnp_handler::upnp_enable() if (desc_xml) { - IGDdatas igd_data{}; - UPNPUrls igd_urls{}; - parserootdesc(desc_xml, desc_xml_size, &igd_data); + parserootdesc(desc_xml, desc_xml_size, &m_igd_data); free(desc_xml); desc_xml = nullptr; - GetUPNPUrls(&igd_urls, &igd_data, dev->descURL, 1); + GetUPNPUrls(&m_igd_urls, &m_igd_data, dev->descURL, 1); upnp_log.notice("Found UPnP device type:%s at %s", dev->st, dev->descURL); @@ -116,24 +114,28 @@ void upnp_handler::upnp_enable() freeUPNPDevlist(devlist); } -void upnp_handler::add_port_redir(std::string_view addr, u16 internal_port, std::string_view protocol) +void upnp_handler::add_port_redir(const std::string& addr, u16 internal_port, std::string_view protocol) { if (!m_active) return; std::lock_guard lock(m_mutex); - u16 external_port = internal_port; - std::string internal_port_str = fmt::format("%d", internal_port); + if (m_bindings[std::string(protocol)].contains(internal_port)) + return; + + const std::string internal_port_str = fmt::format("%d", internal_port); + const std::string protocol_str(protocol); + const u32 max_port = std::min(static_cast(internal_port) + 100, 0xFFFFu); int res = 0; - for (u16 external_port = internal_port; external_port < internal_port + 100; external_port++) + for (u32 external_port = internal_port; external_port <= max_port; external_port++) { std::string external_port_str = fmt::format("%d", external_port); - res = UPNP_AddPortMapping(m_igd_urls.controlURL, m_igd_data.first.servicetype, external_port_str.c_str(), internal_port_str.c_str(), addr.data(), "RPCS3", protocol.data(), nullptr, nullptr); + res = UPNP_AddPortMapping(m_igd_urls.controlURL, m_igd_data.first.servicetype, external_port_str.c_str(), internal_port_str.c_str(), addr.c_str(), "RPCS3", protocol_str.c_str(), nullptr, nullptr); if (res == UPNPCOMMAND_SUCCESS) { - m_bindings[std::string(protocol)][internal_port] = external_port; + m_bindings[protocol_str][static_cast(internal_port)] = external_port; upnp_log.notice("Successfully bound %s:%d(%s) to IGD:%d", addr, internal_port, protocol, external_port); return; } @@ -146,7 +148,7 @@ void upnp_handler::add_port_redir(std::string_view addr, u16 internal_port, std: // } } - upnp_log.error("Failed to bind %s:%d(%s) to IGD:(%d=>%d): %d", addr, internal_port, protocol, internal_port, external_port, res); + upnp_log.error("Failed to bind %s:%d(%s) to IGD:(%d=>%d): %d", addr, internal_port, protocol, internal_port, internal_port, res); } void upnp_handler::remove_port_redir(u16 internal_port, std::string_view protocol) @@ -156,27 +158,28 @@ void upnp_handler::remove_port_redir(u16 internal_port, std::string_view protoco std::lock_guard lock(m_mutex); - const std::string str_protocol(protocol); + const std::string protocol_str(protocol); - if (!m_bindings.contains(str_protocol) || !::at32(m_bindings, str_protocol).contains(internal_port)) + if (!m_bindings.contains(protocol_str) || !::at32(m_bindings, protocol_str).contains(internal_port)) { upnp_log.error("tried to unbind port mapping %d to IGD(%s) but it isn't bound", internal_port, protocol); return; } - const u16 external_port = ::at32(::at32(m_bindings, str_protocol), internal_port); + const u16 external_port = ::at32(::at32(m_bindings, protocol_str), internal_port); remove_port_redir_external(external_port, protocol); - ensure(::at32(m_bindings, str_protocol).erase(internal_port)); + ensure(::at32(m_bindings, protocol_str).erase(internal_port)); upnp_log.notice("Successfully deleted port mapping %d to IGD:%d(%s)", internal_port, external_port, protocol); } void upnp_handler::remove_port_redir_external(u16 external_port, std::string_view protocol, bool verbose) { const std::string str_ext_port = fmt::format("%d", external_port); + const std::string protocol_str(protocol); - if (int res = UPNP_DeletePortMapping(m_igd_urls.controlURL, m_igd_data.first.servicetype, str_ext_port.c_str(), protocol.data(), nullptr); res != 0 && verbose) + if (int res = UPNP_DeletePortMapping(m_igd_urls.controlURL, m_igd_data.first.servicetype, str_ext_port.c_str(), protocol_str.c_str(), nullptr); res != 0 && verbose) upnp_log.error("Failed to delete port mapping IGD:%s(%s): %d", str_ext_port, protocol, res); } diff --git a/rpcs3/Emu/NP/upnp_handler.h b/rpcs3/Emu/NP/upnp_handler.h index 40892f7443..1486702cbb 100644 --- a/rpcs3/Emu/NP/upnp_handler.h +++ b/rpcs3/Emu/NP/upnp_handler.h @@ -13,7 +13,7 @@ public: ~upnp_handler(); void upnp_enable(); - void add_port_redir(std::string_view addr, u16 internal_port, std::string_view protocol); + void add_port_redir(const std::string& addr, u16 internal_port, std::string_view protocol); void remove_port_redir(u16 internal_port, std::string_view protocol); bool is_active() const; diff --git a/rpcs3/Emu/RSX/Common/TextureUtils.cpp b/rpcs3/Emu/RSX/Common/TextureUtils.cpp index 96f87111ff..8cf3466bb9 100644 --- a/rpcs3/Emu/RSX/Common/TextureUtils.cpp +++ b/rpcs3/Emu/RSX/Common/TextureUtils.cpp @@ -244,7 +244,7 @@ struct copy_unmodified_block_swizzled } const u32 size_in_block = padded_width * padded_height * depth * 2; - rsx::simple_array tmp(size_in_block * words_per_block); + rsx::simple_array tmp(size_in_block * words_per_block); if (words_per_block == 1) [[likely]] { @@ -847,6 +847,17 @@ namespace rsx } } + bool texture_format_ex::hw_SNORM_possible() const + { + return (texel_remap_control & SEXT_MASK) == (get_host_format_snorm_mask(format()) << SEXT_OFFSET); + } + + bool texture_format_ex::hw_SRGB_possible() const + { + return encoded_remap == RSX_TEXTURE_REMAP_IDENTITY && + (texel_remap_control & GAMMA_CTRL_MASK) == GAMMA_RGB_MASK; + } + std::vector get_subresources_layout(const rsx::fragment_texture& texture) { return get_subresources_layout_impl(texture); @@ -1200,26 +1211,84 @@ namespace rsx fmt::throw_exception("Unknown format 0x%x", texture_format); } - bool is_int8_remapped_format(u32 format) + rsx::flags32_t get_format_features(u32 texture_format) { - switch (format) + switch (texture_format) { + case CELL_GCM_TEXTURE_B8: + case CELL_GCM_TEXTURE_A1R5G5B5: + case CELL_GCM_TEXTURE_A4R4G4B4: + case CELL_GCM_TEXTURE_R5G6B5: + case CELL_GCM_TEXTURE_A8R8G8B8: + case CELL_GCM_TEXTURE_COMPRESSED_DXT1: + case CELL_GCM_TEXTURE_COMPRESSED_DXT23: + case CELL_GCM_TEXTURE_COMPRESSED_DXT45: + case CELL_GCM_TEXTURE_G8B8: + case CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: + case CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8: + case CELL_GCM_TEXTURE_R6G5B5: + case CELL_GCM_TEXTURE_R5G5B5A1: + case CELL_GCM_TEXTURE_D1R5G5B5: + case CELL_GCM_TEXTURE_D8R8G8B8: + // Base texture formats - everything is supported + return RSX_FORMAT_FEATURE_SIGNED_COMPONENTS | RSX_FORMAT_FEATURE_GAMMA_CORRECTION | RSX_FORMAT_FEATURE_BIASED_NORMALIZATION; + case CELL_GCM_TEXTURE_DEPTH24_D8: case CELL_GCM_TEXTURE_DEPTH24_D8_FLOAT: case CELL_GCM_TEXTURE_DEPTH16: case CELL_GCM_TEXTURE_DEPTH16_FLOAT: + // Depth textures will hang the hardware if BX2 or GAMMA is active. ARGB8_SIGNED has no impact. + // UNSIGNED_REMAP=BIASED works on all formats including the float variants. + return RSX_FORMAT_FEATURE_BIASED_NORMALIZATION; + case CELL_GCM_TEXTURE_X16: + // X16 - GAMMA causes hangs. ARGB8_SIGNED is ignored. UNSIGNED_REMAP=BIASED works. + return RSX_FORMAT_FEATURE_BIASED_NORMALIZATION | RSX_FORMAT_FEATURE_16BIT_CHANNELS; case CELL_GCM_TEXTURE_Y16_X16: + // X16 | Y16 - GAMMA causes hangs. ARGB8_SIGNED works. UNSIGNED_REMAP=BIASED also works. + return RSX_FORMAT_FEATURE_SIGNED_COMPONENTS | RSX_FORMAT_FEATURE_BIASED_NORMALIZATION | RSX_FORMAT_FEATURE_16BIT_CHANNELS; + case CELL_GCM_TEXTURE_COMPRESSED_HILO8: + // GAMMA causes GPU hangs. ARGB8_SIGNED is ignored. UNSIGNED_REMAP=BIASED works. + return RSX_FORMAT_FEATURE_BIASED_NORMALIZATION; + case CELL_GCM_TEXTURE_COMPRESSED_HILO_S8: + // GAMMA causes hangs. Other flags ignored. + return 0; + case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT: case CELL_GCM_TEXTURE_W32_Z32_Y32_X32_FLOAT: case CELL_GCM_TEXTURE_X32_FLOAT: case CELL_GCM_TEXTURE_Y16_X16_FLOAT: - // NOTE: Special data formats (XY, HILO, DEPTH) are not RGB formats - return false; + // Floating point textures. Nothing works. + return 0; + } + fmt::throw_exception("Unknown format 0x%x", texture_format); + } + + /** + * Returns a channel mask in ARGB that can be SNORM-converted + * Some formats have a hardcoded constant in one lane which we cannot SNORM-interpret in hardware. + */ + u32 get_host_format_snorm_mask(u32 format) + { + switch (format) + { + case CELL_GCM_TEXTURE_B8: + case CELL_GCM_TEXTURE_R5G6B5: + case CELL_GCM_TEXTURE_R6G5B5: + case CELL_GCM_TEXTURE_D1R5G5B5: + case CELL_GCM_TEXTURE_D8R8G8B8: + case CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: + case CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8: + // Hardcoded alpha formats + return 0b1110; + + case CELL_GCM_TEXTURE_X16: + // This one is a mess. X and Z are hardcoded. Not supported. + // Fall through instead of throw default: - return true; + return 0b1111; } } diff --git a/rpcs3/Emu/RSX/Common/TextureUtils.h b/rpcs3/Emu/RSX/Common/TextureUtils.h index cc40305721..31f43432dc 100644 --- a/rpcs3/Emu/RSX/Common/TextureUtils.h +++ b/rpcs3/Emu/RSX/Common/TextureUtils.h @@ -9,6 +9,8 @@ namespace rsx { + using flags32_t = u32; + enum texture_upload_context : u32 { shader_read = 1, @@ -125,6 +127,56 @@ namespace rsx using namespace format_class_; + enum format_features : u8 + { + RSX_FORMAT_FEATURE_SIGNED_COMPONENTS = (1 << 0), + RSX_FORMAT_FEATURE_BIASED_NORMALIZATION = (1 << 1), + RSX_FORMAT_FEATURE_GAMMA_CORRECTION = (1 << 2), + RSX_FORMAT_FEATURE_16BIT_CHANNELS = (1 << 3), // Complements RSX_FORMAT_FEATURE_SIGNED_COMPONENTS + }; + + enum host_format_features : u8 + { + RSX_HOST_FORMAT_FEATURE_SNORM = (1 << 0), + RSX_HOST_FORMAT_FEATURE_SRGB = (1 << 1), + }; + + using enum format_features; + + struct texture_format_ex + { + texture_format_ex() = default; + texture_format_ex(u32 bits) + : format_bits(bits) + {} + + bool valid() const { return format_bits != 0; } + u32 format() const { return format_bits & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN); } + + bool hw_SNORM_possible() const; + bool hw_SRGB_possible() const; + + bool host_snorm_format_active() const { return host_features & RSX_HOST_FORMAT_FEATURE_SNORM; } + bool host_srgb_format_active() const { return host_features & RSX_HOST_FORMAT_FEATURE_SRGB; } + + operator bool() const { return valid(); } + + bool operator == (const texture_format_ex& that) const + { + return this->format_bits == that.format_bits && + this->features == that.features && + this->host_features == that.host_features && + this->encoded_remap == that.encoded_remap; + } + + //private: + u32 format_bits = 0; + u32 features = 0; + u32 encoded_remap = 0; + u32 texel_remap_control = 0; + u32 host_features = 0; + }; + // Sampled image descriptor class sampled_image_descriptor_base { @@ -167,6 +219,7 @@ namespace rsx u64 surface_cache_tag = 0; texcoord_xform_t texcoord_xform; + texture_format_ex format_ex; }; struct typeless_xfer @@ -257,7 +310,18 @@ namespace rsx u8 get_format_sample_count(rsx::surface_antialiasing antialias); u32 get_max_depth_value(rsx::surface_depth_format2 format); bool is_depth_stencil_format(rsx::surface_depth_format2 format); - bool is_int8_remapped_format(u32 format); // Returns true if the format is treated as INT8 by the RSX remapper. + + /** + * Format feature support. There is not simple format to determine what is supported here, results are from hw tests + * Returns a bitmask of supported features. + */ + rsx::flags32_t get_format_features(u32 texture_format); + + /** + * Returns a channel mask in ARGB that can be SNORM-converted + * Some formats have a hardcoded constant in one lane which we cannot SNORM-interpret in hardware. + */ + u32 get_host_format_snorm_mask(u32 format); /** * Returns number of texel rows encoded in one pitch-length line of bytes diff --git a/rpcs3/Emu/RSX/Common/io_buffer.h b/rpcs3/Emu/RSX/Common/io_buffer.h index 64f95a5e61..59e8e6a32e 100644 --- a/rpcs3/Emu/RSX/Common/io_buffer.h +++ b/rpcs3/Emu/RSX/Common/io_buffer.h @@ -9,7 +9,7 @@ namespace rsx template concept SpanLike = requires(T t) { - { t.data() } -> std::convertible_to; + { t.data() } -> std::convertible_to; { t.size_bytes() } -> std::convertible_to; }; @@ -71,9 +71,10 @@ namespace rsx return static_cast(m_ptr); } - usz size() const + template + T size() const { - return m_size; + return static_cast(m_size); } template diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 4476930607..4b3aaa0605 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -132,7 +132,7 @@ namespace rsx free_rsx_memory(Traits::get(sink)); } - Traits::clone_surface(cmd, sink, region.source, new_address, region); + Traits::clone_surface(cmd, sink, region.source, new_address, region, region.source->resolution_scaling_config); allocate_rsx_memory(Traits::get(sink)); if (invalidated) [[unlikely]] @@ -398,6 +398,7 @@ namespace rsx surface_antialiasing antialias, usz width, usz height, usz pitch, u8 bpp, + const rsx::surface_scaling_config_t& scaling_config, Args&&... extra_params) { surface_storage_type old_surface_storage; @@ -448,7 +449,7 @@ namespace rsx } } - if (Traits::surface_matches_properties(surface, format, width, height, antialias)) + if (Traits::surface_matches_properties(surface, format, width, height, antialias, scaling_config)) { if (!pitch_compatible) { @@ -495,7 +496,7 @@ namespace rsx for (auto It = invalidated_resources.begin(); It != invalidated_resources.end(); It++) { auto &surface = *It; - if (Traits::surface_matches_properties(surface, format, width, height, antialias, true)) + if (Traits::surface_matches_properties(surface, format, width, height, antialias, scaling_config, true)) { new_surface_storage = std::move(surface); Traits::notify_surface_reused(new_surface_storage); @@ -531,7 +532,7 @@ namespace rsx if (!new_surface) { ensure(store); - new_surface_storage = Traits::create_new_surface(address, format, width, height, pitch, antialias, std::forward(extra_params)...); + new_surface_storage = Traits::create_new_surface(address, format, width, height, pitch, antialias, scaling_config, std::forward(extra_params)...); new_surface = Traits::get(new_surface_storage); Traits::prepare_surface_for_drawing(command_list, new_surface); allocate_rsx_memory(new_surface); @@ -842,11 +843,13 @@ namespace rsx surface_color_format color_format, surface_antialiasing antialias, usz width, usz height, usz pitch, + const rsx::surface_scaling_config_t& scaling_config, Args&&... extra_params) { return bind_surface_address( command_list, address, color_format, antialias, width, height, pitch, get_format_block_size_in_bytes(color_format), + scaling_config, std::forward(extra_params)...); } @@ -857,12 +860,14 @@ namespace rsx surface_depth_format2 depth_format, surface_antialiasing antialias, usz width, usz height, usz pitch, + const rsx::surface_scaling_config_t& scaling_config, Args&&... extra_params) { return bind_surface_address( command_list, address, depth_format, antialias, width, height, pitch, get_format_block_size_in_bytes(depth_format), + scaling_config, std::forward(extra_params)...); } @@ -969,6 +974,7 @@ namespace rsx surface_raster_type raster_type, const std::array &surface_addresses, u32 address_z, const std::array &surface_pitch, u32 zeta_pitch, + const rsx::surface_scaling_config_t& scaling_config, Args&&... extra_params) { u32 clip_width = clip_horizontal_reg; @@ -998,7 +1004,7 @@ namespace rsx m_bound_render_targets[surface_index] = std::make_pair(surface_addresses[surface_index], bind_address_as_render_targets(command_list, surface_addresses[surface_index], color_format, antialias, - clip_width, clip_height, surface_pitch[surface_index], std::forward(extra_params)...)); + clip_width, clip_height, surface_pitch[surface_index], scaling_config, std::forward(extra_params)...)); m_bound_render_target_ids.push_back(surface_index); } @@ -1014,7 +1020,7 @@ namespace rsx { m_bound_depth_stencil = std::make_pair(address_z, bind_address_as_depth_stencil(command_list, address_z, depth_format, antialias, - clip_width, clip_height, zeta_pitch, std::forward(extra_params)...)); + clip_width, clip_height, zeta_pitch, scaling_config, std::forward(extra_params)...)); } else { @@ -1463,5 +1469,113 @@ namespace rsx } } } + + void sync_scaling_config(command_list_type cmd, const rsx::surface_scaling_config_t& active_config) + { + auto process_list_function = [&](surface_ranged_map& data, const utils::address_range32& range) + { + std::vector surfaces_to_clone; + + for (auto It = data.begin_range(range); It != data.end();) + { + auto surface = Traits::get(It->second); + if (surface->get_resolution_scaling_config() == active_config) + { + ++It; + continue; + } + + // Perform a test scaling and check if anything is different after scaling + // There are many cases where this will avoid creating new surfaces + const auto [new_w, new_h] = rsx::apply_resolution_scale( + active_config, + surface->template get_surface_width<>(), + surface->template get_surface_height<>()); + + if (new_w == surface->width() && new_h == surface->height()) + { + // Not affected by resolution scale. Just update the details and move on. + surface->resolution_scaling_config = active_config; + ++It; + continue; + } + + surfaces_to_clone.push_back(surface); + + // Invalidate the previous surface + invalidate(It->second); + It = data.erase(It); + } + + for (auto& surface : surfaces_to_clone) + { + // Enqueue the memory transfer + surface_storage_type sink{}; + deferred_clipped_region copy{}; + copy.width = surface->template get_surface_width<>(); + copy.height = surface->template get_surface_height<>(); + copy.transfer_scale_x = 1.f; + copy.transfer_scale_y = 1.f; + copy.target = nullptr; + copy.source = surface; + + Traits::clone_surface(cmd, sink, surface, surface->base_addr, copy, active_config); + allocate_rsx_memory(Traits::get(sink)); + + // Replace with the new one + auto new_surface = Traits::get(sink); + ensure(copy.target == new_surface); + data.emplace(surface->get_memory_range(), std::move(sink)); + + // Force barrier to reduce VRAM pressure + new_surface->memory_barrier(cmd, rsx::surface_access::memory_read); + } + }; + + const auto rtt_bind_backup = m_bound_render_targets; + const auto dsv_bind_backup = m_bound_depth_stencil; + + // Unbind everything. We'll restore it later + for (auto& rtt_bind : m_bound_render_targets) + { + rtt_bind = {}; + } + + m_bound_depth_stencil = {}; + + process_list_function(m_render_targets_storage, m_render_targets_memory_range); + process_list_function(m_depth_stencil_storage, m_depth_stencil_memory_range); + + // Restore bindings. + for (int i = 0; i < 4; ++i) + { + const auto address = rtt_bind_backup[i].first; + if (!address) + { + continue; + } + + auto rtt = m_render_targets_storage.find(address); + ensure(rtt != m_render_targets_storage.end()); + + m_bound_render_targets[i] = + { + address, + Traits::get(rtt->second) + }; + } + + if (const auto ds_address = dsv_bind_backup.first) + { + auto ds = m_depth_stencil_storage.find(ds_address); + ensure(ds != m_depth_stencil_storage.end()); + + m_bound_depth_stencil = + { + ds_address, + Traits::get(ds->second) + }; + } + } }; } diff --git a/rpcs3/Emu/RSX/Common/surface_utils.h b/rpcs3/Emu/RSX/Common/surface_utils.h index bf7dee2db3..8ec97600bc 100644 --- a/rpcs3/Emu/RSX/Common/surface_utils.h +++ b/rpcs3/Emu/RSX/Common/surface_utils.h @@ -88,18 +88,18 @@ namespace rsx auto dst_h = std::get<3>(region); // Apply resolution scale if needed - if (g_cfg.video.resolution_scale_percent != 100) - { - auto src = static_cast(source); + auto src = static_cast(source); + std::tie(src_w, src_h) = rsx::apply_resolution_scale( + src->resolution_scaling_config, + src_w, src_h, + src->template get_surface_width(), + src->template get_surface_height()); - std::tie(src_w, src_h) = rsx::apply_resolution_scale(src_w, src_h, - src->template get_surface_width(), - src->template get_surface_height()); - - std::tie(dst_w, dst_h) = rsx::apply_resolution_scale(dst_w, dst_h, - target_surface->template get_surface_width(), - target_surface->template get_surface_height()); - } + std::tie(dst_w, dst_h) = rsx::apply_resolution_scale( + target_surface->resolution_scaling_config, + dst_w, dst_h, + target_surface->template get_surface_width(), + target_surface->template get_surface_height()); width = src_w; height = src_h; @@ -146,6 +146,9 @@ namespace rsx u8 samples_x = 1; u8 samples_y = 1; + // Scaling configuration + surface_scaling_config_t resolution_scaling_config; + rsx::address_range32 memory_range; std::unique_ptr> resolve_surface; @@ -303,6 +306,11 @@ namespace rsx format_info.gcm_depth_format = format; } + void set_resolution_scaling_config(const surface_scaling_config_t& config) + { + resolution_scaling_config = config; + } + inline rsx::surface_color_format get_surface_color_format() const { return format_info.gcm_color_format; @@ -323,6 +331,11 @@ namespace rsx ); } + inline const rsx::surface_scaling_config_t& get_resolution_scaling_config() const + { + return resolution_scaling_config; + } + inline bool dirty() const { return (state_flags != rsx::surface_state_flags::ready) || !old_contents.empty(); @@ -541,10 +554,16 @@ namespace rsx } // Apply resolution scale if needed - if (g_cfg.video.resolution_scale_percent != 100) + if (resolution_scaling_config.scale_percent != 100 || + region.source->resolution_scaling_config.scale_percent != 100) { - auto [src_width, src_height] = rsx::apply_resolution_scale(slice.width, slice.height, slice.source->width(), slice.source->height()); - auto [dst_width, dst_height] = rsx::apply_resolution_scale(slice.width, slice.height, slice.target->width(), slice.target->height()); + const auto& src_res_scale = region.source->resolution_scaling_config; + const auto& dst_res_scale = resolution_scaling_config; + const auto src_surface = ensure(dynamic_cast(slice.source)); + const auto dst_surface = ensure(dynamic_cast(slice.target)); + + auto [src_width, src_height] = rsx::apply_resolution_scale(src_res_scale, slice.width, slice.height, src_surface->get_surface_width(), src_surface->get_surface_height()); + auto [dst_width, dst_height] = rsx::apply_resolution_scale(dst_res_scale, slice.width, slice.height, dst_surface->get_surface_width(), dst_surface->get_surface_height()); slice.transfer_scale_x *= f32(dst_width) / src_width; slice.transfer_scale_y *= f32(dst_height) / src_height; @@ -552,8 +571,8 @@ namespace rsx slice.width = src_width; slice.height = src_height; - std::tie(slice.src_x, slice.src_y) = rsx::apply_resolution_scale(slice.src_x, slice.src_y, slice.source->width(), slice.source->height()); - std::tie(slice.dst_x, slice.dst_y) = rsx::apply_resolution_scale(slice.dst_x, slice.dst_y, slice.target->width(), slice.target->height()); + std::tie(slice.src_x, slice.src_y) = rsx::apply_resolution_scale(src_res_scale, slice.src_x, slice.src_y, src_surface->get_surface_width(), src_surface->get_surface_height()); + std::tie(slice.dst_x, slice.dst_y) = rsx::apply_resolution_scale(dst_res_scale, slice.dst_x, slice.dst_y, dst_surface->get_surface_width(), dst_surface->get_surface_height()); } } diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index dfe8043bd3..295090a5bc 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -1731,24 +1731,34 @@ namespace rsx } case deferred_request_command::cubemap_unwrap: { - rsx::simple_array sections(6); - for (u16 n = 0; n < 6; ++n) + rsx::simple_array sections(6 * desc.mipmaps); + for (u16 n = 0, section_id = 0; n < 6; ++n) { - sections[n] = + u16 mip_w = desc.width, mip_h = desc.height; + u16 y_offset = static_cast(desc.slice_h * n); + + for (u8 mip = 0; mip < desc.mipmaps; ++mip) { - .src = desc.external_handle, - .xform = surface_transform::coordinate_transform, - .level = 0, - .src_x = 0, - .src_y = static_cast(desc.slice_h * n), - .dst_x = 0, - .dst_y = 0, - .dst_z = n, - .src_w = desc.width, - .src_h = desc.height, - .dst_w = desc.width, - .dst_h = desc.height - }; + sections[section_id++] = + { + .src = desc.external_handle, + .xform = surface_transform::coordinate_transform, + .level = mip, + .src_x = 0, + .src_y = y_offset, + .dst_x = 0, + .dst_y = 0, + .dst_z = n, + .src_w = mip_w, + .src_h = mip_h, + .dst_w = mip_w, + .dst_h = mip_h + }; + + y_offset += mip_h; + mip_w = std::max(mip_w / 2, 1); + mip_h = std::max(mip_h / 2, 1); + } } result = generate_cubemap_from_images(cmd, desc.gcm_format, desc.width, sections, desc.remap); @@ -2413,9 +2423,13 @@ namespace rsx // 2. The image has to have been generated on the GPU (fbo or blit target only) rsx::simple_array sections; - const bool use_upscaling = (result.upload_context == rsx::texture_upload_context::framebuffer_storage && g_cfg.video.resolution_scale_percent != 100); + const bool use_upscaling = (result.upload_context == rsx::texture_upload_context::framebuffer_storage); + auto to_surface_type = [](const copy_region_descriptor& rgn) -> typename surface_store_type::surface_type + { + return static_cast(rgn.src); + }; - if (!helpers::append_mipmap_level(sections, result, attributes, 0, use_upscaling, attributes)) [[unlikely]] + if (!helpers::append_mipmap_level(to_surface_type, sections, result, attributes, 0, use_upscaling, attributes)) [[unlikely]] { // Abort if mip0 is not compatible return result; @@ -2445,7 +2459,7 @@ namespace rsx options, range, extended_dimension, m_rtts, std::forward(extras)...); if (!ret.validate() || - !helpers::append_mipmap_level(sections, ret, attr2, subsurface, use_upscaling, attributes)) + !helpers::append_mipmap_level(to_surface_type, sections, ret, attr2, subsurface, use_upscaling, attributes)) { // Abort break; @@ -2778,7 +2792,7 @@ namespace rsx surf->template get_surface_height() != surf->height()) { // Must go through a scaling operation due to resolution scaling being present - ensure(g_cfg.video.resolution_scale_percent != 100); + ensure(src_subres.surface->resolution_scaling_config.scale_percent != 100); use_null_region = false; } } @@ -3389,8 +3403,8 @@ namespace rsx { const auto surface_width = src_subres.surface->template get_surface_width(); const auto surface_height = src_subres.surface->template get_surface_height(); - std::tie(src_area.x1, src_area.y1) = rsx::apply_resolution_scale(src_area.x1, src_area.y1, surface_width, surface_height); - std::tie(src_area.x2, src_area.y2) = rsx::apply_resolution_scale(src_area.x2, src_area.y2, surface_width, surface_height); + std::tie(src_area.x1, src_area.y1) = rsx::apply_resolution_scale(src_subres.surface->resolution_scaling_config, src_area.x1, src_area.y1, surface_width, surface_height); + std::tie(src_area.x2, src_area.y2) = rsx::apply_resolution_scale(src_subres.surface->resolution_scaling_config, src_area.x2, src_area.y2, surface_width, surface_height); // The resource is of surface type; possibly disabled AA emulation src_subres.surface->transform_blit_coordinates(rsx::surface_access::transfer_read, src_area); @@ -3400,8 +3414,8 @@ namespace rsx { const auto surface_width = dst_subres.surface->template get_surface_width(); const auto surface_height = dst_subres.surface->template get_surface_height(); - std::tie(dst_area.x1, dst_area.y1) = rsx::apply_resolution_scale(dst_area.x1, dst_area.y1, surface_width, surface_height); - std::tie(dst_area.x2, dst_area.y2) = rsx::apply_resolution_scale(dst_area.x2, dst_area.y2, surface_width, surface_height); + std::tie(dst_area.x1, dst_area.y1) = rsx::apply_resolution_scale(dst_subres.surface->resolution_scaling_config, dst_area.x1, dst_area.y1, surface_width, surface_height); + std::tie(dst_area.x2, dst_area.y2) = rsx::apply_resolution_scale(dst_subres.surface->resolution_scaling_config, dst_area.x2, dst_area.y2, surface_width, surface_height); // The resource is of surface type; possibly disabled AA emulation dst_subres.surface->transform_blit_coordinates(rsx::surface_access::transfer_write, dst_area); diff --git a/rpcs3/Emu/RSX/Common/texture_cache_helpers.h b/rpcs3/Emu/RSX/Common/texture_cache_helpers.h index 1560f40ad4..8898830034 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_helpers.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_helpers.h @@ -357,11 +357,11 @@ namespace rsx const auto surface_width = section.surface->template get_surface_width(); const auto surface_height = section.surface->template get_surface_height(); - const auto [src_width, src_height] = rsx::apply_resolution_scale(section.src_area.width, h, surface_width, surface_height); - const auto [dst_width, dst_height] = rsx::apply_resolution_scale(section.dst_area.width, h, attr.width, attr.height); + const auto [src_width, src_height] = rsx::apply_resolution_scale(section.surface->resolution_scaling_config, section.src_area.width, h, surface_width, surface_height); + const auto [dst_width, dst_height] = rsx::apply_resolution_scale(section.surface->resolution_scaling_config, section.dst_area.width, h, attr.width, attr.height); - std::tie(src_x, src_y) = rsx::apply_resolution_scale(src_x, src_y, surface_width, surface_height); - std::tie(dst_x, dst_y) = rsx::apply_resolution_scale(dst_x, dst_y, attr.width, attr.height); + std::tie(src_x, src_y) = rsx::apply_resolution_scale(section.surface->resolution_scaling_config, src_x, src_y, surface_width, surface_height); + std::tie(dst_x, dst_y) = rsx::apply_resolution_scale(section.surface->resolution_scaling_config, dst_x, dst_y, attr.width, attr.height); section.surface->memory_barrier(cmd, rsx::surface_access::transfer_read); @@ -430,8 +430,10 @@ namespace rsx if (scaling) { // Since output is upscaled, also upscale on dst - const auto [_dst_x, _dst_y] = rsx::apply_resolution_scale(static_cast(dst_offset.x), static_cast(dst_y - dst_slice_begin), attr.width, attr.height); - const auto [_dst_w, _dst_h] = rsx::apply_resolution_scale(dst_w, height, attr.width, attr.height); + + const auto& scaling_config = rsx::get_current_renderer()->resolution_scaling_config; + const auto [_dst_x, _dst_y] = rsx::apply_resolution_scale(scaling_config, static_cast(dst_offset.x), static_cast(dst_y - dst_slice_begin), attr.width, attr.height); + const auto [_dst_w, _dst_h] = rsx::apply_resolution_scale(scaling_config, dst_w, height, attr.width, attr.height); out.push_back ({ @@ -660,10 +662,10 @@ namespace rsx bool is_depth = texptr->is_depth_surface(); auto attr2 = attr; - if (rsx::get_resolution_scale_percent() != 100) + if (texptr->resolution_scaling_config.scale_percent != 100) { - const auto [scaled_w, scaled_h] = rsx::apply_resolution_scale(attr.width, attr.height, surface_width, surface_height); - const auto [unused, scaled_slice_h] = rsx::apply_resolution_scale(RSX_SURFACE_DIMENSION_IGNORED, attr.slice_h, surface_width, surface_height); + const auto [scaled_w, scaled_h] = rsx::apply_resolution_scale(texptr->resolution_scaling_config, attr.width, attr.height, surface_width, surface_height); + const auto [unused, scaled_slice_h] = rsx::apply_resolution_scale(texptr->resolution_scaling_config, RSX_SURFACE_DIMENSION_IGNORED, attr.slice_h, surface_width, surface_height); attr2.width = scaled_w; attr2.height = scaled_h; attr2.slice_h = scaled_slice_h; @@ -841,7 +843,8 @@ namespace rsx } // If this method was called, there is no easy solution, likely means atlas gather is needed - const auto [scaled_w, scaled_h] = rsx::apply_resolution_scale(attr2.width, attr2.height); + const auto& scaling_config = rsx::get_current_renderer()->resolution_scaling_config; + const auto [scaled_w, scaled_h] = rsx::apply_resolution_scale(scaling_config, attr2.width, attr2.height); const auto format_class = classify_format(attr2.gcm_format); const auto upload_context = (fbos.empty()) ? texture_upload_context::shader_read : texture_upload_context::framebuffer_storage; @@ -892,14 +895,15 @@ namespace rsx return result; } - template + template bool append_mipmap_level( + to_surface_type_converter&& as_surface_type, // Cast function to surface type rsx::simple_array& sections, // Destination list - const sampled_image_descriptor& level, // Descriptor for the image level being checked - const image_section_attributes_t& attr, // Attributes of image level - u8 mipmap_level, // Level index - bool apply_upscaling, // Whether to upscale the results or not - const image_section_attributes_t& level0_attr) // Attributes of the first mipmap level + const sampled_image_descriptor& level, // Descriptor for the image level being checked + const image_section_attributes_t& attr, // Attributes of image level + u8 mipmap_level, // Level index + bool apply_upscaling, // Whether to upscale the results or not + const image_section_attributes_t& level0_attr) // Attributes of the first mipmap level { if (level.image_handle) { @@ -916,7 +920,8 @@ namespace rsx // Calculate transfer dimensions from attr if (level.upload_context == rsx::texture_upload_context::framebuffer_storage) [[likely]] { - std::tie(mip.src_w, mip.src_h) = rsx::apply_resolution_scale(attr.width, attr.height); + auto rtv = as_surface_type(mip); + std::tie(mip.src_w, mip.src_h) = rsx::apply_resolution_scale(rtv->resolution_scaling_config, attr.width, attr.height); } else { @@ -964,7 +969,9 @@ namespace rsx if (apply_upscaling) { auto& mip = sections.back(); - std::tie(mip.dst_w, mip.dst_h) = rsx::apply_resolution_scale(mip.dst_w, mip.dst_h, level0_attr.width, level0_attr.height); + std::tie(mip.dst_w, mip.dst_h) = rsx::apply_resolution_scale( + as_surface_type(mip)->resolution_scaling_config, + mip.dst_w, mip.dst_h, level0_attr.width, level0_attr.height); } return true; diff --git a/rpcs3/Emu/RSX/Common/texture_cache_utils.h b/rpcs3/Emu/RSX/Common/texture_cache_utils.h index c34b73f7ba..82c52d8653 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_utils.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_utils.h @@ -79,7 +79,7 @@ namespace rsx private: // Members - block_list *block; + block_list* block = nullptr; list_iterator list_it = {}; size_type idx = u32{umax}; size_type array_idx = 0; @@ -705,9 +705,9 @@ namespace rsx private: // Members address_range32 range; - section_bounds bounds; + section_bounds bounds {}; - block_type *block = nullptr; + block_type* block = nullptr; bool needs_overlap_check = true; bool unowned_remaining = false; unowned_iterator unowned_it = {}; @@ -1373,7 +1373,7 @@ namespace rsx set_dirty(false); } - if (context == rsx::texture_upload_context::framebuffer_storage && !Emu.IsStopped()) + if (context == rsx::texture_upload_context::framebuffer_storage) { // Lock, unlock auto surface = derived()->get_render_target(); diff --git a/rpcs3/Emu/RSX/Core/RSXDisplay.cpp b/rpcs3/Emu/RSX/Core/RSXDisplay.cpp index e263a945ef..f86c6dea04 100644 --- a/rpcs3/Emu/RSX/Core/RSXDisplay.cpp +++ b/rpcs3/Emu/RSX/Core/RSXDisplay.cpp @@ -49,7 +49,7 @@ namespace rsx } } - std::string framebuffer_statistics_t::to_string(bool squash) const + std::string framebuffer_statistics_t::to_string(const surface_scaling_config_t& scaling_config, bool squash) const { // Format is sorted by sample count struct sorted_message_t @@ -70,7 +70,7 @@ namespace rsx for (const auto& [aa_mode, stat] : data) { auto real_stat = stat; - std::tie(real_stat.width, real_stat.height) = apply_resolution_scale(stat.width, stat.height); + std::tie(real_stat.width, real_stat.height) = apply_resolution_scale(scaling_config, stat.width, stat.height); real_stats.push_back(real_stat); sorted_message_t msg; diff --git a/rpcs3/Emu/RSX/Core/RSXDisplay.h b/rpcs3/Emu/RSX/Core/RSXDisplay.h index 77407f2f19..6a04374e1b 100644 --- a/rpcs3/Emu/RSX/Core/RSXDisplay.h +++ b/rpcs3/Emu/RSX/Core/RSXDisplay.h @@ -12,6 +12,8 @@ namespace rsx { enum class surface_antialiasing : u8; + struct surface_scaling_config_t; + struct framebuffer_dimensions_t { u16 width; @@ -42,7 +44,7 @@ namespace rsx void add(u16 width, u16 height, rsx::surface_antialiasing aa); // Returns a formatted string representing the statistics collected over the frame. - std::string to_string(bool squash) const; + std::string to_string(const surface_scaling_config_t& scaling_config, bool squash) const; }; struct frame_statistics_t diff --git a/rpcs3/Emu/RSX/Core/RSXDrawCommands.cpp b/rpcs3/Emu/RSX/Core/RSXDrawCommands.cpp index 449900cef1..8ef45e1f06 100644 --- a/rpcs3/Emu/RSX/Core/RSXDrawCommands.cpp +++ b/rpcs3/Emu/RSX/Core/RSXDrawCommands.cpp @@ -680,79 +680,9 @@ namespace rsx ROP_control_t rop_control{}; alignas(16) fragment_context_t payload{}; - if (REGS(m_ctx)->alpha_test_enabled()) - { - const u32 alpha_func = static_cast(REGS(m_ctx)->alpha_func()); - rop_control.set_alpha_test_func(alpha_func); - rop_control.enable_alpha_test(); - } - - if (REGS(m_ctx)->polygon_stipple_enabled()) - { - rop_control.enable_polygon_stipple(); - } - - auto can_use_hw_a2c = [&]() -> bool - { - const auto& config = RSX(m_ctx)->get_backend_config(); - if (!config.supports_hw_a2c) - { - return false; - } - - if (config.supports_hw_a2c_1spp) - { - return true; - } - - return REGS(m_ctx)->surface_antialias() != rsx::surface_antialiasing::center_1_sample; - }; - - if (REGS(m_ctx)->msaa_alpha_to_coverage_enabled() && !can_use_hw_a2c()) - { - // TODO: Properly support alpha-to-coverage and alpha-to-one behavior in shaders - // Alpha values generate a coverage mask for order independent blending - // Requires hardware AA to work properly (or just fragment sample stage in fragment shaders) - // Simulated using combined alpha blend and alpha test - rop_control.enable_alpha_to_coverage(); - if (REGS(m_ctx)->msaa_sample_mask()) - { - rop_control.enable_MSAA_writes(); - } - - // Sample configuration bits - switch (REGS(m_ctx)->surface_antialias()) - { - case rsx::surface_antialiasing::center_1_sample: - break; - case rsx::surface_antialiasing::diagonal_centered_2_samples: - rop_control.set_msaa_control(1u); - break; - default: - rop_control.set_msaa_control(3u); - break; - } - } - - // Check if framebuffer is actually an XRGB format and not a WZYX format - switch (REGS(m_ctx)->surface_color()) - { - case rsx::surface_color_format::w16z16y16x16: - case rsx::surface_color_format::w32z32y32x32: - case rsx::surface_color_format::x32: - // These behave very differently from "normal" formats. - break; - default: - // Integer framebuffer formats. - rop_control.enable_framebuffer_INT(); - - // Check if we want sRGB conversion. - if (REGS(m_ctx)->framebuffer_srgb_enabled()) - { - rop_control.enable_framebuffer_sRGB(); - } - break; - } + // Always encode the alpha function. Toggling alpha-test is not guaranteed to trigger context param reload anymore. + const u32 alpha_func = static_cast(REGS(m_ctx)->alpha_func()); + rop_control.set_alpha_test_func(alpha_func); // Generate wpos coefficients // wpos equation is now as follows (ignoring pixel center offset): @@ -766,11 +696,12 @@ namespace rsx payload.rop_control = rop_control.value; payload.alpha_ref = REGS(m_ctx)->alpha_ref(); - const auto window_origin = REGS(m_ctx)->shader_window_origin(); const u32 window_height = REGS(m_ctx)->shader_window_height(); const auto pixel_center = REGS(m_ctx)->pixel_center(); - const f32 resolution_scale = (window_height <= static_cast(g_cfg.video.min_scalable_dimension)) ? 1.f : rsx::get_resolution_scale(); + const f32 resolution_scale = (window_height <= RSX(m_ctx)->resolution_scaling_config.min_scalable_dimension) + ? 1.f + : RSX(m_ctx)->resolution_scaling_config.scale_factor(); payload.wpos_scale = (window_origin == rsx::window_origin::top) ? (1.f / resolution_scale) : (-1.f / resolution_scale); payload.wpos_bias[0] = 0.f; diff --git a/rpcs3/Emu/RSX/Core/RSXDriverState.h b/rpcs3/Emu/RSX/Core/RSXDriverState.h index 16dd08c78d..9e7bc2cd68 100644 --- a/rpcs3/Emu/RSX/Core/RSXDriverState.h +++ b/rpcs3/Emu/RSX/Core/RSXDriverState.h @@ -40,6 +40,9 @@ namespace rsx xform_instancing_state_dirty = (1 << 25), // Transform instancing state has changed + zeta_address_is_cyclic = (1 << 26), // The currently bound Z buffer is active for R/W in a cyclic manner + zeta_address_cyclic_barrier = (1 << 27), // A memory barrier is required to "end" the Z buffer cyclic state + // TODO - Should signal that we simply need to do a FP compare before the next draw call and invalidate the ucode if the content has changed. // Marking as dirty to invalidate hot cache also works, it's not like there's tons of barriers per frame anyway. fragment_program_needs_rehash = fragment_program_ucode_dirty, diff --git a/rpcs3/Emu/RSX/GL/GLCompute.cpp b/rpcs3/Emu/RSX/GL/GLCompute.cpp index 5607c149ed..12d10d2368 100644 --- a/rpcs3/Emu/RSX/GL/GLCompute.cpp +++ b/rpcs3/Emu/RSX/GL/GLCompute.cpp @@ -340,7 +340,8 @@ namespace gl void cs_d24x8_to_ssbo::run(gl::command_context& cmd, gl::viewable_image* src, const gl::buffer* dst, u32 out_offset, const coordu& region, const gl::pixel_buffer_layout& layout) { - const auto row_pitch = region.width; + const auto row_pitch = layout.row_length ? layout.row_length : region.width; + ensure(row_pitch >= region.width); m_program.uniforms["swap_bytes"] = layout.swap_bytes; m_program.uniforms["output_pitch"] = row_pitch; @@ -390,14 +391,15 @@ namespace gl void cs_rgba8_to_ssbo::run(gl::command_context& cmd, gl::viewable_image* src, const gl::buffer* dst, u32 out_offset, const coordu& region, const gl::pixel_buffer_layout& layout) { - const auto row_pitch = region.width; + const auto row_pitch = layout.row_length ? layout.row_length : region.width; + ensure(row_pitch >= region.width); m_program.uniforms["swap_bytes"] = layout.swap_bytes; m_program.uniforms["output_pitch"] = row_pitch; m_program.uniforms["region_offset"] = color2i(region.x, region.y); m_program.uniforms["region_size"] = color2i(region.width, region.height); m_program.uniforms["is_bgra"] = (layout.format == static_cast(gl::texture::format::bgra)); - m_program.uniforms["block_width"] = static_cast(layout.size); + m_program.uniforms["block_width"] = static_cast(layout.block_size); auto data_view = src->get_view(rsx::default_remap_vector.with_encoding(GL_REMAP_IDENTITY), gl::image_aspect::color); @@ -441,6 +443,7 @@ namespace gl { const u32 bpp = dst->image()->pitch() / dst->image()->width(); const u32 row_length = utils::align(dst_region.width * bpp, std::max(layout.alignment, 1)) / bpp; + ensure(row_length >= dst_region.width); m_program.uniforms["swap_bytes"] = layout.swap_bytes; m_program.uniforms["src_pitch"] = row_length; diff --git a/rpcs3/Emu/RSX/GL/GLDMA.cpp b/rpcs3/Emu/RSX/GL/GLDMA.cpp index 3c12009f67..5e60525a5c 100644 --- a/rpcs3/Emu/RSX/GL/GLDMA.cpp +++ b/rpcs3/Emu/RSX/GL/GLDMA.cpp @@ -22,7 +22,7 @@ namespace gl void* userptr = vm::get_super_ptr(base_address); m_data = std::make_unique(); - m_data->create(buffer::target::array, block_size, userptr, buffer::memory_type::userptr, 0); + m_data->create(buffer::target::copy_dst, block_size, userptr, buffer::memory_type::userptr, 0); m_base_address = base_address; // Some drivers may reject userptr input for whatever reason. Check that the state is still valid. @@ -77,7 +77,7 @@ namespace gl { const auto start_block_address = start & s_dma_block_mask; const auto end_block_address = (start + length + s_dma_block_size - 1) & s_dma_block_mask; - return utils::address_range32::start_end(start_block_address, end_block_address); + return utils::address_range32::start_length(start_block_address, end_block_address - start_block_address); } const dma_block& get_block(u32 start, u32 length) diff --git a/rpcs3/Emu/RSX/GL/GLDraw.cpp b/rpcs3/Emu/RSX/GL/GLDraw.cpp index 51bf257aef..0abf0111e6 100644 --- a/rpcs3/Emu/RSX/GL/GLDraw.cpp +++ b/rpcs3/Emu/RSX/GL/GLDraw.cpp @@ -2,6 +2,7 @@ #include "GLGSRender.h" #include "../rsx_methods.h" #include "../Common/BufferUtils.h" +#include "../Program/GLSLCommon.h" #include "Emu/RSX/NV47/HW/context_accessors.define.h" @@ -226,7 +227,7 @@ void GLGSRender::update_draw_state() case rsx::primitive_type::lines: case rsx::primitive_type::line_loop: case rsx::primitive_type::line_strip: - gl_state.line_width(rsx::method_registers.line_width() * rsx::get_resolution_scale()); + gl_state.line_width(rsx::method_registers.line_width() * resolution_scaling_config.scale_factor()); gl_state.enable(rsx::method_registers.line_smooth_enabled(), GL_LINE_SMOOTH); break; default: @@ -298,88 +299,169 @@ void GLGSRender::load_texture_env() for (u32 textures_ref = current_fp_metadata.referenced_textures_mask, i = 0; textures_ref; textures_ref >>= 1, ++i) { if (!(textures_ref & 1)) + { continue; + } if (!fs_sampler_state[i]) + { fs_sampler_state[i] = std::make_unique(); + } auto sampler_state = static_cast(fs_sampler_state[i].get()); const auto& tex = rsx::method_registers.fragment_textures[i]; const auto previous_format_class = sampler_state->format_class; - if (m_samplers_dirty || m_textures_dirty[i] || m_gl_texture_cache.test_if_descriptor_expired(cmd, m_rtts, sampler_state, tex)) + if (!m_samplers_dirty && + !m_textures_dirty[i] && + !m_gl_texture_cache.test_if_descriptor_expired(cmd, m_rtts, sampler_state, tex)) { - if (tex.enabled()) - { - *sampler_state = m_gl_texture_cache.upload_texture(cmd, tex, m_rtts); + continue; + } - if (sampler_state->validate()) - { - if (m_textures_dirty[i]) - { - m_fs_sampler_states[i].apply(tex, fs_sampler_state[i].get()); - } - else if (sampler_state->format_class != previous_format_class) - { - m_graphics_state |= rsx::fragment_program_state_dirty; - } + const bool is_sampler_dirty = m_textures_dirty[i]; + m_textures_dirty[i] = false; - if (const auto texture_format = tex.format() & ~(CELL_GCM_TEXTURE_UN | CELL_GCM_TEXTURE_LN); - sampler_state->format_class != rsx::classify_format(texture_format) && - (texture_format == CELL_GCM_TEXTURE_A8R8G8B8 || texture_format == CELL_GCM_TEXTURE_D8R8G8B8)) - { - // Depth format redirected to BGRA8 resample stage. Do not filter to avoid bits leaking. - // If accurate graphics are desired, force a bitcast to COLOR as a workaround. - m_fs_sampler_states[i].set_parameteri(GL_TEXTURE_MIN_FILTER, GL_NEAREST); - m_fs_sampler_states[i].set_parameteri(GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } - } - } - else + if (!tex.enabled()) + { + *sampler_state = {}; + continue; + } + + *sampler_state = m_gl_texture_cache.upload_texture(cmd, tex, m_rtts); + if (!sampler_state->validate()) + { + continue; + } + + if (!is_sampler_dirty) + { + if (sampler_state->format_class != previous_format_class) { - *sampler_state = {}; + // Host details changed but RSX is not aware + m_graphics_state |= rsx::fragment_program_state_dirty; } - m_textures_dirty[i] = false; + if (sampler_state->format_ex) + { + // Nothing to change, use cached sampler + continue; + } + } + + sampler_state->format_ex = tex.format_ex(); + + if (sampler_state->format_ex.texel_remap_control && + sampler_state->image_handle && + sampler_state->upload_context == rsx::texture_upload_context::shader_read && + (current_fp_metadata.bx2_texture_reads_mask & (1u << i)) == 0 && + !g_cfg.video.disable_hardware_texel_remapping) [[ unlikely ]] + { + // Check if we need to override the view format + const auto gl_format = sampler_state->image_handle->view_format(); + GLenum format_override = gl_format; + rsx::flags32_t flags_to_erase = 0u; + rsx::flags32_t host_flags_to_set = 0u; + + if (sampler_state->format_ex.hw_SNORM_possible()) + { + format_override = gl::get_compatible_snorm_format(gl_format); + flags_to_erase = rsx::texture_control_bits::SEXT_MASK; + host_flags_to_set = rsx::RSX_HOST_FORMAT_FEATURE_SNORM; + } + else if (sampler_state->format_ex.hw_SRGB_possible()) + { + format_override = gl::get_compatible_srgb_format(gl_format); + flags_to_erase = rsx::texture_control_bits::GAMMA_CTRL_MASK; + host_flags_to_set = rsx::RSX_HOST_FORMAT_FEATURE_SRGB; + } + + if (format_override != GL_NONE && format_override != gl_format) + { + sampler_state->image_handle = sampler_state->image_handle->as(format_override); + sampler_state->format_ex.texel_remap_control &= (~flags_to_erase); + sampler_state->format_ex.host_features |= host_flags_to_set; + } + } + + u32 actual_mipcount = 1; + if (sampler_state->upload_context == rsx::texture_upload_context::shader_read) + { + actual_mipcount = tex.get_exact_mipmap_count(); + } + else if (sampler_state->external_subresource_desc.op == rsx::deferred_request_command::mipmap_gather) + { + actual_mipcount = sampler_state->external_subresource_desc.sections_to_copy.size(); + } + else if (sampler_state->external_subresource_desc.op == rsx::deferred_request_command::cubemap_unwrap) + { + actual_mipcount = sampler_state->external_subresource_desc.mipmaps; + } + + m_fs_sampler_states[i].apply(tex, fs_sampler_state[i].get(), actual_mipcount > 1); + + const auto texture_format = sampler_state->format_ex.format(); + // Depth format redirected to BGRA8 resample stage. Do not filter to avoid bits leaking. + // If accurate graphics are desired, force a bitcast to COLOR as a workaround. + const bool is_depth_reconstructed = sampler_state->format_class != rsx::classify_format(texture_format) && + (texture_format == CELL_GCM_TEXTURE_A8R8G8B8 || texture_format == CELL_GCM_TEXTURE_D8R8G8B8); + // SNORM conversion required in shader. Do not interpolate to avoid introducing discontinuities due to how negative numbers work + const bool is_snorm = (sampler_state->format_ex.texel_remap_control & rsx::texture_control_bits::SEXT_MASK) != 0; + + if (is_depth_reconstructed || is_snorm) + { + // Depth format redirected to BGRA8 resample stage. Do not filter to avoid bits leaking. + m_fs_sampler_states[i].set_parameteri(GL_TEXTURE_MIN_FILTER, GL_NEAREST); + m_fs_sampler_states[i].set_parameteri(GL_TEXTURE_MAG_FILTER, GL_NEAREST); } } for (u32 textures_ref = current_vp_metadata.referenced_textures_mask, i = 0; textures_ref; textures_ref >>= 1, ++i) { if (!(textures_ref & 1)) + { continue; + } if (!vs_sampler_state[i]) + { vs_sampler_state[i] = std::make_unique(); + } auto sampler_state = static_cast(vs_sampler_state[i].get()); const auto& tex = rsx::method_registers.vertex_textures[i]; const auto previous_format_class = sampler_state->format_class; - if (m_samplers_dirty || m_vertex_textures_dirty[i] || m_gl_texture_cache.test_if_descriptor_expired(cmd, m_rtts, sampler_state, tex)) + if (!m_samplers_dirty && + !m_vertex_textures_dirty[i] && + !m_gl_texture_cache.test_if_descriptor_expired(cmd, m_rtts, sampler_state, tex)) { - if (rsx::method_registers.vertex_textures[i].enabled()) - { - *sampler_state = m_gl_texture_cache.upload_texture(cmd, rsx::method_registers.vertex_textures[i], m_rtts); + continue; + } - if (sampler_state->validate()) - { - if (m_vertex_textures_dirty[i]) - { - m_vs_sampler_states[i].apply(tex, vs_sampler_state[i].get()); - } - else if (sampler_state->format_class != previous_format_class) - { - m_graphics_state |= rsx::vertex_program_state_dirty; - } - } - } - else - { - *sampler_state = {}; - } + const bool is_sampler_dirty = m_vertex_textures_dirty[i]; + m_vertex_textures_dirty[i] = false; - m_vertex_textures_dirty[i] = false; + if (!tex.enabled()) + { + *sampler_state = {}; + continue; + } + + *sampler_state = m_gl_texture_cache.upload_texture(cmd, rsx::method_registers.vertex_textures[i], m_rtts); + + if (!sampler_state->validate()) + { + continue; + } + + if (is_sampler_dirty) + { + m_vs_sampler_states[i].apply(tex, vs_sampler_state[i].get()); + } + else if (sampler_state->format_class != previous_format_class) + { + m_graphics_state |= rsx::vertex_program_state_dirty; } } @@ -394,7 +476,9 @@ void GLGSRender::bind_texture_env() for (u32 textures_ref = current_fp_metadata.referenced_textures_mask, i = 0; textures_ref; textures_ref >>= 1, ++i) { if (!(textures_ref & 1)) + { continue; + } gl::texture_view* view = nullptr; auto sampler_state = static_cast(fs_sampler_state[i].get()); @@ -434,22 +518,26 @@ void GLGSRender::bind_texture_env() for (u32 textures_ref = current_vp_metadata.referenced_textures_mask, i = 0; textures_ref; textures_ref >>= 1, ++i) { if (!(textures_ref & 1)) + { continue; + } auto sampler_state = static_cast(vs_sampler_state[i].get()); + gl::texture_view* view = nullptr; if (rsx::method_registers.vertex_textures[i].enabled() && sampler_state->validate()) { - if (sampler_state->image_handle) [[likely]] + if (view = sampler_state->image_handle; !view) { - sampler_state->image_handle->bind(cmd, GL_VERTEX_TEXTURES_START + i); - } - else - { - m_gl_texture_cache.create_temporary_subresource(cmd, sampler_state->external_subresource_desc)->bind(cmd, GL_VERTEX_TEXTURES_START + i); + view = m_gl_texture_cache.create_temporary_subresource(cmd, sampler_state->external_subresource_desc); } } + + if (view) [[likely]] + { + view->bind(cmd, GL_VERTEX_TEXTURES_START + i); + } else { cmd->bind_texture(GL_VERTEX_TEXTURES_START + i, GL_TEXTURE_2D, GL_NONE); @@ -715,7 +803,10 @@ void GLGSRender::end() m_frame_stats.textures_upload_time += m_profiler.duration(); gl::command_context cmd{ gl_state }; - if (auto ds = std::get<1>(m_rtts.m_bound_depth_stencil)) ds->write_barrier(cmd); + if (auto ds = std::get<1>(m_rtts.m_bound_depth_stencil)) + { + ds->write_barrier(cmd); + } for (auto &rtt : m_rtts.m_bound_render_targets) { @@ -725,6 +816,8 @@ void GLGSRender::end() } } + m_graphics_state.clear(rsx::zeta_address_cyclic_barrier); + update_draw_state(); if (g_cfg.video.debug_output) diff --git a/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp index 4cbd92eecd..5271390af9 100644 --- a/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp @@ -93,18 +93,29 @@ void GLFragmentDecompilerThread::insertOutputs(std::stringstream & OS) { const std::pair table[] = { - { "ocol0", m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r0" : "h0" }, - { "ocol1", m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r2" : "h4" }, - { "ocol2", m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r3" : "h6" }, - { "ocol3", m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r4" : "h8" }, + { "ocol0", m_prog.ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r0" : "h0" }, + { "ocol1", m_prog.ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r2" : "h4" }, + { "ocol2", m_prog.ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r3" : "h6" }, + { "ocol3", m_prog.ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? "r4" : "h8" }, }; - const bool float_type = (m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) || !device_props.has_native_half_support; + const bool float_type = (m_prog.ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) || !device_props.has_native_half_support; const auto reg_type = float_type ? "vec4" : getHalfTypeName(4); for (uint i = 0; i < std::size(table); ++i) { - if (m_parr.HasParam(PF_PARAM_NONE, reg_type, table[i].second)) - OS << "layout(location=" << i << ") out vec4 " << table[i].first << ";\n"; + if (!m_parr.HasParam(PF_PARAM_NONE, reg_type, table[i].second)) + { + continue; + } + + if (i >= m_prog.mrt_buffers_count) + { + // Dead writes. Declare as temp variables for DCE to clean up. + OS << "vec4 " << table[i].first << "; // Unused\n"; + continue; + } + + OS << "layout(location=" << i << ") out vec4 " << table[i].first << ";\n"; } } @@ -190,7 +201,8 @@ void GLFragmentDecompilerThread::insertConstants(std::stringstream & OS) " uvec4 stipple_pattern[8];\n" "};\n\n" - "#define texture_base_index 0\n\n"; + "#define texture_base_index 0\n" + "#define TEX_PARAM(index) texture_parameters[index]\n\n"; } void GLFragmentDecompilerThread::insertGlobalFunctions(std::stringstream &OS) @@ -207,16 +219,25 @@ void GLFragmentDecompilerThread::insertGlobalFunctions(std::stringstream &OS) m_shader_props.require_srgb_to_linear = properties.has_upg; m_shader_props.require_linear_to_srgb = properties.has_pkg; m_shader_props.require_fog_read = properties.in_register_mask & in_fogc; - m_shader_props.emulate_coverage_tests = !rsx::get_renderer_backend_config().supports_hw_a2c_1spp; m_shader_props.emulate_shadow_compare = device_props.emulate_depth_compare; + m_shader_props.low_precision_tests = ::gl::get_driver_caps().vendor_NVIDIA && !(m_prog.ctrl & RSX_SHADER_CONTROL_ATTRIBUTE_INTERPOLATION); m_shader_props.disable_early_discard = !::gl::get_driver_caps().vendor_NVIDIA; m_shader_props.supports_native_fp16 = device_props.has_native_half_support; - m_shader_props.ROP_output_rounding = g_cfg.video.shader_precision != gpu_preset_level::low; + + m_shader_props.ROP_output_rounding = (g_cfg.video.shader_precision != gpu_preset_level::low) && !!(m_prog.ctrl & RSX_SHADER_CONTROL_8BIT_FRAMEBUFFER); + m_shader_props.ROP_sRGB_packing = !!(m_prog.ctrl & RSX_SHADER_CONTROL_SRGB_FRAMEBUFFER); + m_shader_props.ROP_alpha_test = !!(m_prog.ctrl & RSX_SHADER_CONTROL_ALPHA_TEST); + m_shader_props.ROP_alpha_to_coverage_test = !!(m_prog.ctrl & RSX_SHADER_CONTROL_ALPHA_TO_COVERAGE); + m_shader_props.ROP_polygon_stipple_test = !!(m_prog.ctrl & RSX_SHADER_CONTROL_POLYGON_STIPPLE); + m_shader_props.ROP_discard = !!(m_prog.ctrl & RSX_SHADER_CONTROL_USES_KIL); + m_shader_props.require_tex1D_ops = properties.has_tex1D; m_shader_props.require_tex2D_ops = properties.has_tex2D; m_shader_props.require_tex3D_ops = properties.has_tex3D; m_shader_props.require_shadowProj_ops = properties.shadow_sampler_mask != 0 && properties.has_texShadowProj; + m_shader_props.require_alpha_kill = !!(m_prog.ctrl & RSX_SHADER_CONTROL_TEXTURE_ALPHA_KILL); + m_shader_props.require_color_format_convert = !!(m_prog.ctrl & RSX_SHADER_CONTROL_TEXTURE_FORMAT_CONVERT); glsl::insert_glsl_legacy_function(OS, m_shader_props); } @@ -224,7 +245,7 @@ void GLFragmentDecompilerThread::insertGlobalFunctions(std::stringstream &OS) void GLFragmentDecompilerThread::insertMainStart(std::stringstream & OS) { std::set output_registers; - if (m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) + if (m_prog.ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) { output_registers = { "r0", "r2", "r3", "r4" }; } @@ -233,7 +254,7 @@ void GLFragmentDecompilerThread::insertMainStart(std::stringstream & OS) output_registers = { "h0", "h4", "h6", "h8" }; } - if (m_ctrl & CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT) + if (m_prog.ctrl & CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT) { output_registers.insert("r1"); } @@ -315,20 +336,28 @@ void GLFragmentDecompilerThread::insertMainEnd(std::stringstream & OS) OS << "\n" << " fs_main();\n\n"; + if (m_prog.ctrl & RSX_SHADER_CONTROL_DISABLE_EARLY_Z) + { + // This is effectively pointless code, but good enough to trick the GPU to skip early Z + OS << + " // Insert pseudo-barrier sequence to disable early-Z\n" + " gl_FragDepth = gl_FragCoord.z;\n\n"; + } + glsl::insert_rop(OS, m_shader_props); - if (m_ctrl & CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT) + if (m_prog.ctrl & CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT) { if (m_parr.HasParam(PF_PARAM_NONE, "vec4", "r1")) { - //Depth writes are always from a fp32 register. See issues section on nvidia's NV_fragment_program spec - //https://www.khronos.org/registry/OpenGL/extensions/NV/NV_fragment_program.txt + // Depth writes are always from a fp32 register. See issues section on nvidia's NV_fragment_program spec + // https://www.khronos.org/registry/OpenGL/extensions/NV/NV_fragment_program.txt OS << " gl_FragDepth = r1.z;\n"; } else { - //Input not declared. Leave commented to assist in debugging the shader - OS << " //gl_FragDepth = r1.z;\n"; + // Input not declared. Leave commented to assist in debugging the shader + OS << " // gl_FragDepth = r1.z;\n"; } } diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index acf258cc56..c1acabd601 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -73,6 +73,7 @@ void GLGSRender::set_viewport() { // NOTE: scale offset matrix already contains the viewport transformation const auto [clip_width, clip_height] = rsx::apply_resolution_scale( + resolution_scaling_config, rsx::method_registers.surface_clip_width(), rsx::method_registers.surface_clip_height()); glViewport(0, 0, clip_width, clip_height); @@ -138,8 +139,7 @@ void GLGSRender::on_init_thread() gl::init(); gl::set_command_context(gl_state); - // Enable adaptive vsync if vsync is requested - gl::set_swapinterval(g_cfg.video.vsync ? -1 : 0); + update_swap_interval(); if (g_cfg.video.debug_output) gl::enable_debugging(); @@ -249,22 +249,23 @@ void GLGSRender::on_init_thread() // Fallback null texture instead of relying on texture0 { std::array pixeldata = { 0, 0, 0, 0, 0, 0, 0, 0 }; + const rsx::io_buffer src_buf = std::span(pixeldata); // 1D auto tex1D = std::make_unique(GL_TEXTURE_1D, 1, 1, 1, 1, 1, GL_RGBA8, RSX_FORMAT_CLASS_COLOR); - tex1D->copy_from(pixeldata.data(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); + tex1D->copy_from(src_buf, gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); // 2D auto tex2D = std::make_unique(GL_TEXTURE_2D, 1, 1, 1, 1, 1, GL_RGBA8, RSX_FORMAT_CLASS_COLOR); - tex2D->copy_from(pixeldata.data(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); + tex2D->copy_from(src_buf, gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); // 3D auto tex3D = std::make_unique(GL_TEXTURE_3D, 1, 1, 1, 1, 1, GL_RGBA8, RSX_FORMAT_CLASS_COLOR); - tex3D->copy_from(pixeldata.data(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); + tex3D->copy_from(src_buf, gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); // CUBE auto texCUBE = std::make_unique(GL_TEXTURE_CUBE_MAP, 1, 1, 1, 1, 1, GL_RGBA8, RSX_FORMAT_CLASS_COLOR); - texCUBE->copy_from(pixeldata.data(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); + texCUBE->copy_from(src_buf, gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); m_null_textures[GL_TEXTURE_1D] = std::move(tex1D); m_null_textures[GL_TEXTURE_2D] = std::move(tex2D); @@ -397,6 +398,7 @@ void GLGSRender::on_init_thread() m_ui_renderer.create(); m_video_output_pass.create(); + gl::init_global_texture_resources(); m_gl_texture_cache.initialize(); m_prog_buffer.initialize @@ -578,6 +580,33 @@ void GLGSRender::on_exit() gl::set_primary_context_thread(false); } +void GLGSRender::update_swap_interval() +{ + const vsync_mode current_mode = g_cfg.video.vsync; + if (current_mode == m_vsync_mode) + { + return; + } + + // Enable adaptive vsync if vsync is requested + int swap_interval = 0; + switch (current_mode) + { + default: + case vsync_mode::off: + break; + case vsync_mode::adaptive: + swap_interval = -1; + break; + case vsync_mode::full: + swap_interval = 1; + break; + } + + gl::set_swapinterval(swap_interval); + m_vsync_mode = current_mode; +} + void GLGSRender::clear_surface(u32 arg) { if (skip_current_frame) return; @@ -908,7 +937,7 @@ void GLGSRender::load_program_env() m_draw_processor.fill_scale_offset_data(buf, false); m_draw_processor.fill_user_clip_data(buf + 64); *(reinterpret_cast(buf + 68)) = rsx::method_registers.transform_branch_bits(); - *(reinterpret_cast(buf + 72)) = rsx::method_registers.point_size() * rsx::get_resolution_scale(); + *(reinterpret_cast(buf + 72)) = rsx::method_registers.point_size() * resolution_scaling_config.scale_factor(); *(reinterpret_cast(buf + 76)) = rsx::method_registers.clip_min(); *(reinterpret_cast(buf + 80)) = rsx::method_registers.clip_max(); @@ -1351,7 +1380,7 @@ void GLGSRender::notify_tile_unbound(u32 tile) } } -bool GLGSRender::release_GCM_label(u32 address, u32 args) +bool GLGSRender::release_GCM_label(u32 type, u32 address, u32 args) { if (!backend_config.supports_host_gpu_labels) { @@ -1360,7 +1389,7 @@ bool GLGSRender::release_GCM_label(u32 address, u32 args) auto host_ctx = ensure(m_host_dma_ctrl->host_ctx()); - if (host_ctx->texture_loads_completed()) + if (type == NV4097_TEXTURE_READ_SEMAPHORE_RELEASE && host_ctx->texture_loads_completed()) { // We're about to poll waiting for GPU state, ensure the context is still valid. gl::check_state(); diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.h b/rpcs3/Emu/RSX/GL/GLGSRender.h index 5627216055..779519fee7 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.h +++ b/rpcs3/Emu/RSX/GL/GLGSRender.h @@ -186,6 +186,8 @@ private: gl::texture* get_present_source(gl::present_surface_info* info, const rsx::avconf& avconfig); + void update_swap_interval(); + public: void set_viewport(); void set_scissor(bool clip_viewport); @@ -206,7 +208,7 @@ public: void discard_occlusion_query(rsx::reports::occlusion_query_info* query) override; // DMA - bool release_GCM_label(u32 address, u32 data) override; + bool release_GCM_label(u32 type, u32 address, u32 data) override; void enqueue_host_context_write(u32 offset, u32 size, const void* data); void on_guest_texture_read(); diff --git a/rpcs3/Emu/RSX/GL/GLOverlays.cpp b/rpcs3/Emu/RSX/GL/GLOverlays.cpp index 7d36e5598b..a758804e4f 100644 --- a/rpcs3/Emu/RSX/GL/GLOverlays.cpp +++ b/rpcs3/Emu/RSX/GL/GLOverlays.cpp @@ -220,10 +220,10 @@ namespace gl m_input_filter = gl::filter::linear; } - gl::texture_view* ui_overlay_renderer::load_simple_image(rsx::overlays::image_info_base* desc, bool temp_resource, u32 owner_uid) + gl::texture_view* ui_overlay_renderer::load_simple_image(const rsx::overlays::image_info_base* desc, bool temp_resource, u32 owner_uid) { auto tex = std::make_unique(GL_TEXTURE_2D, desc->w, desc->h, 1, 1, 1, GL_RGBA8, RSX_FORMAT_CLASS_COLOR); - tex->copy_from(desc->get_data(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); + tex->copy_from(desc->as_span(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); const GLenum remap[] = { GL_RED, GL_ALPHA, GL_BLUE, GL_GREEN }; auto view = std::make_unique(tex.get(), remap); @@ -236,7 +236,7 @@ namespace gl } else { - const u64 key = reinterpret_cast(desc); + const u64 key = reinterpret_cast(desc); temp_image_cache[key] = std::make_pair(owner_uid, std::move(tex)); temp_view_cache[key] = std::move(view); } @@ -287,7 +287,7 @@ namespace gl } } - gl::texture_view* ui_overlay_renderer::find_font(rsx::overlays::font* font) + gl::texture_view* ui_overlay_renderer::find_font(const rsx::overlays::font* font) { const auto font_size = font->get_glyph_data_dimensions(); @@ -308,7 +308,7 @@ namespace gl const std::vector& glyph_data = font->get_glyph_data(); auto tex = std::make_unique(GL_TEXTURE_2D_ARRAY, font_size.width, font_size.height, font_size.depth, 1, 1, GL_R8, RSX_FORMAT_CLASS_COLOR); - tex->copy_from(glyph_data.data(), gl::texture::format::r, gl::texture::type::ubyte, {}); + tex->copy_from(std::span(glyph_data), gl::texture::format::r, gl::texture::type::ubyte, {}); GLenum remap[] = { GL_RED, GL_RED, GL_RED, GL_RED }; auto view = std::make_unique(tex.get(), remap); @@ -320,7 +320,7 @@ namespace gl return result; } - gl::texture_view* ui_overlay_renderer::find_temp_image(rsx::overlays::image_info_base* desc, u32 owner_uid) + gl::texture_view* ui_overlay_renderer::find_temp_image(const rsx::overlays::image_info_base* desc, u32 owner_uid) { const bool dirty = std::exchange(desc->dirty, false); const u64 key = reinterpret_cast(desc); @@ -332,7 +332,7 @@ namespace gl if (dirty) { - view->image()->copy_from(desc->get_data(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); + view->image()->copy_from(desc->as_span(), gl::texture::format::rgba, gl::texture::type::uint_8_8_8_8, {}); } return view; @@ -399,8 +399,15 @@ namespace gl void ui_overlay_renderer::run(gl::command_context& cmd_, const areau& viewport, GLuint target, rsx::overlays::overlay& ui, bool flip_vertically) { - program_handle.uniforms["viewport"] = color4f(static_cast(viewport.width()), static_cast(viewport.height()), static_cast(viewport.x1), static_cast(viewport.y1)); - program_handle.uniforms["ui_scale"] = color4f(static_cast(ui.virtual_width), static_cast(ui.virtual_height), 1.f, 1.f); + ui.set_render_viewport( + static_cast(std::min(viewport.width(), std::numeric_limits::max())), + static_cast(std::min(viewport.height(), std::numeric_limits::max())) + ); + const auto ui_scale = color4f(static_cast(ui.virtual_width), static_cast(ui.virtual_height), 1.f, 1.f); + const auto ui_viewport = color4f(static_cast(viewport.width()), static_cast(viewport.height()), static_cast(viewport.x1), static_cast(viewport.y1)); + + program_handle.uniforms["viewport"] = ui_viewport; + program_handle.uniforms["ui_scale"] = ui_scale; saved_sampler_state save_30(30, m_sampler); saved_sampler_state save_31(31, m_sampler); @@ -431,7 +438,7 @@ namespace gl } case rsx::overlays::image_resource_id::raw_image: { - cmd_->bind_texture(31, GL_TEXTURE_2D, find_temp_image(static_cast(cmd.config.external_data_ref), ui.uid)->id()); + cmd_->bind_texture(31, GL_TEXTURE_2D, find_temp_image(static_cast(cmd.config.external_data_ref), ui.uid)->id()); break; } case rsx::overlays::image_resource_id::font_file: @@ -458,12 +465,24 @@ namespace gl .texture_mode(texture_mode) .clip_fragments(cmd.config.clip_region) .pulse_glow(cmd.config.pulse_glow) + .set_sdf(cmd.config.sdf_config.func) .get(); program_handle.uniforms["timestamp"] = cmd.config.get_sinus_value(); program_handle.uniforms["albedo"] = cmd.config.color; program_handle.uniforms["clip_bounds"] = cmd.config.clip_rect; program_handle.uniforms["blur_intensity"] = static_cast(cmd.config.blur_strength); + + if (cmd.config.sdf_config.func != rsx::overlays::sdf_function::none) + { + auto sdf_config = cmd.config.sdf_config; + sdf_config.transform(static_cast(viewport).flipped_vertical(), {ui_scale.x, ui_scale.y}); + + program_handle.uniforms["sdf_params"] = color4f(sdf_config.hx, sdf_config.hy, sdf_config.br, sdf_config.bw); + program_handle.uniforms["sdf_origin"] = color2f(sdf_config.cx, sdf_config.cy); + program_handle.uniforms["sdf_border_color"] = sdf_config.border_color; + } + overlay_pass::run(cmd_, viewport, target, gl::image_aspect::color, true); } @@ -551,7 +570,8 @@ namespace gl const pixel_buffer_layout& layout) { const u32 bpp = dst->image()->pitch() / dst->image()->width(); - const u32 row_length = utils::align(dst_region.width * bpp, std::max(layout.alignment, 1)) / bpp; + const u32 aligned_width = utils::align(dst_region.width * bpp, std::max(layout.alignment, 1)) / bpp; + const u32 row_length = layout.row_length ? layout.row_length : aligned_width; program_handle.uniforms["src_pitch"] = row_length; program_handle.uniforms["swap_bytes"] = layout.swap_bytes; diff --git a/rpcs3/Emu/RSX/GL/GLOverlays.h b/rpcs3/Emu/RSX/GL/GLOverlays.h index 96478a161e..8ccfd67305 100644 --- a/rpcs3/Emu/RSX/GL/GLOverlays.h +++ b/rpcs3/Emu/RSX/GL/GLOverlays.h @@ -75,16 +75,16 @@ namespace gl ui_overlay_renderer(); - gl::texture_view* load_simple_image(rsx::overlays::image_info_base* desc, bool temp_resource, u32 owner_uid); + gl::texture_view* load_simple_image(const rsx::overlays::image_info_base* desc, bool temp_resource, u32 owner_uid); void create(); void destroy(); void remove_temp_resources(u64 key); - gl::texture_view* find_font(rsx::overlays::font* font); + gl::texture_view* find_font(const rsx::overlays::font* font); - gl::texture_view* find_temp_image(rsx::overlays::image_info_base* desc, u32 owner_uid); + gl::texture_view* find_temp_image(const rsx::overlays::image_info_base* desc, u32 owner_uid); void set_primitive_type(rsx::overlays::primitive_type type); diff --git a/rpcs3/Emu/RSX/GL/GLPresent.cpp b/rpcs3/Emu/RSX/GL/GLPresent.cpp index e7c03dfcf5..2aa11868ee 100644 --- a/rpcs3/Emu/RSX/GL/GLPresent.cpp +++ b/rpcs3/Emu/RSX/GL/GLPresent.cpp @@ -95,6 +95,7 @@ gl::texture* GLGSRender::get_present_source(gl::present_surface_info* info, cons image = section.surface->get_surface(rsx::surface_access::transfer_read); std::tie(info->width, info->height) = rsx::apply_resolution_scale( + resolution_scaling_config, std::min(surface_width, info->width), std::min(surface_height, info->height)); } @@ -132,7 +133,8 @@ gl::texture* GLGSRender::get_present_source(gl::present_surface_info* info, cons const auto range = utils::address_range32::start_length(info->address, info->pitch * info->height); m_gl_texture_cache.invalidate_range(cmd, range, rsx::invalidation_cause::read); - flip_image->copy_from(vm::base(info->address), static_cast(expected_format), gl::texture::type::uint_8_8_8_8, unpack_settings); + const rsx::io_buffer read_buf = { vm::base(info->address), range.length() }; + flip_image->copy_from(read_buf, static_cast(expected_format), gl::texture::type::uint_8_8_8_8, unpack_settings); image = flip_image.get(); } else if (image->get_internal_format() != static_cast(expected_format)) @@ -224,7 +226,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) if (avconfig.stereo_enabled) [[unlikely]] { - const auto [unused, min_expected_height] = rsx::apply_resolution_scale(RSX_SURFACE_DIMENSION_IGNORED, buffer_height + 30); + const auto [unused, min_expected_height] = rsx::apply_resolution_scale(resolution_scaling_config, RSX_SURFACE_DIMENSION_IGNORED, buffer_height + 30); if (image_to_flip->height() < min_expected_height) { // Get image for second eye @@ -239,7 +241,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) else { // Account for possible insets - const auto [unused2, scaled_buffer_height] = rsx::apply_resolution_scale(RSX_SURFACE_DIMENSION_IGNORED, buffer_height); + const auto [unused2, scaled_buffer_height] = rsx::apply_resolution_scale(resolution_scaling_config, RSX_SURFACE_DIMENSION_IGNORED, buffer_height); buffer_height = std::min(image_to_flip->height() - min_expected_height, scaled_buffer_height); } } @@ -251,6 +253,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) if (info.emu_flip) { evaluate_cpu_usage_reduction_limits(); + update_swap_interval(); } // Get window state @@ -314,9 +317,11 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) // Lock to avoid modification during run-update chain std::lock_guard lock(*m_overlay_manager); + const areau display_area = {0, 0, static_cast(m_frame->client_width()), static_cast(m_frame->client_height())}; for (const auto& view : m_overlay_manager->get_views()) { - m_ui_renderer.run(cmd, aspect_ratio, target, *view.get(), flip_vertically); + const areau render_area = view->use_window_space ? display_area : aspect_ratio; + m_ui_renderer.run(cmd, render_area, target, *view.get(), flip_vertically); } } }; @@ -368,7 +373,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) std::vector sshot_frame(buffer_height * buffer_width * 4); glGetError(); - tex->copy_to(sshot_frame.data(), gl::texture::format::rgba, gl::texture::type::ubyte, pack_settings); + tex->copy_to(std::span(sshot_frame), gl::texture::format::rgba, gl::texture::type::ubyte, pack_settings); m_sshot_tex.reset(); @@ -475,7 +480,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) "Texture uploads: %11u (%u from CPU - %02u%%, %u copies avoided)\n" "Vertex cache hits: %9u/%u (%u%%)\n" "Program cache lookup ellision: %u/%u (%u%%)", - info.stats.framebuffer_stats.to_string(!backend_config.supports_hw_msaa), + info.stats.framebuffer_stats.to_string(resolution_scaling_config, !backend_config.supports_hw_msaa), get_load(), info.stats.draw_calls, info.stats.setup_time, info.stats.vertex_upload_time, info.stats.textures_upload_time, info.stats.draw_exec_time, num_dirty_textures, texture_memory_size, num_flushes, num_misses, cache_miss_ratio, num_unavoidable, num_mispredict, num_speculate, @@ -512,6 +517,19 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) m_frame->flip(m_context); rsx::thread::flip(info); + // Data sync + const rsx::surface_scaling_config_t active_res_scaling_config = + { + .scale_percent = static_cast(g_cfg.video.resolution_scale_percent), + .min_scalable_dimension = static_cast(g_cfg.video.min_scalable_dimension), + }; + + if (active_res_scaling_config != this->resolution_scaling_config) + { + m_rtts.sync_scaling_config(cmd, active_res_scaling_config); + this->resolution_scaling_config = active_res_scaling_config; + } + // Cleanup m_gl_texture_cache.on_frame_end(); m_vertex_cache->purge(); diff --git a/rpcs3/Emu/RSX/GL/GLProcTable.h b/rpcs3/Emu/RSX/GL/GLProcTable.h index 8f42995a9d..ad8943bd4f 100644 --- a/rpcs3/Emu/RSX/GL/GLProcTable.h +++ b/rpcs3/Emu/RSX/GL/GLProcTable.h @@ -218,6 +218,9 @@ OPENGL_PROC(PFNGLNAMEDBUFFERDATAEXTPROC, NamedBufferDataEXT); OPENGL_PROC(PFNGLNAMEDBUFFERSUBDATAPROC, NamedBufferSubData); OPENGL_PROC(PFNGLNAMEDBUFFERSUBDATAEXTPROC, NamedBufferSubDataEXT); +OPENGL_PROC(PFNGLCLEARNAMEDBUFFERSUBDATAPROC, ClearNamedBufferSubData); +OPENGL_PROC(PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC, ClearNamedBufferSubDataEXT); + // ARB_shader_image_load_store OPENGL_PROC(PFNGLBINDIMAGETEXTUREPROC, BindImageTexture); @@ -256,6 +259,7 @@ OPENGL_PROC(PFNGLDELETESYNCPROC, DeleteSync); // KHR_debug OPENGL_PROC(PFNGLDEBUGMESSAGECALLBACKPROC, DebugMessageCallback); +OPENGL_PROC(PFNGLOBJECTLABELPROC, ObjectLabel); // Immutable textures OPENGL_PROC(PFNGLTEXSTORAGE1DPROC, TexStorage1D); diff --git a/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp b/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp index c222262699..34c2ca72d3 100644 --- a/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp +++ b/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp @@ -141,7 +141,8 @@ void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /* m_framebuffer_layout.width, m_framebuffer_layout.height, m_framebuffer_layout.target, m_framebuffer_layout.aa_mode, m_framebuffer_layout.raster_type, m_framebuffer_layout.color_addresses, m_framebuffer_layout.zeta_address, - m_framebuffer_layout.actual_color_pitch, m_framebuffer_layout.actual_zeta_pitch); + m_framebuffer_layout.actual_color_pitch, m_framebuffer_layout.actual_zeta_pitch, + resolution_scaling_config); std::array color_targets; GLuint depth_stencil_target; @@ -218,7 +219,7 @@ void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /* static_cast(m_draw_fbo)->release(); } - for (auto &fbo : m_framebuffer_cache) + for (auto& fbo : m_framebuffer_cache) { if (fbo.matches(color_targets, depth_stencil_target)) { @@ -264,6 +265,8 @@ void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /* } } + ensure(m_draw_fbo); + switch (rsx::method_registers.surface_color_target()) { case rsx::surface_target::none: break; @@ -301,6 +304,7 @@ void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /* } m_graphics_state.set(rsx::rtt_config_valid); + on_framebuffer_layout_updated(); check_zcull_status(true); set_viewport(); @@ -445,7 +449,7 @@ void gl::render_target::load_memory(gl::command_context& cmd) subres.data = { vm::get_super_ptr(base_addr), static_cast::size_type>(rsx_pitch * surface_height * samples_y) }; // TODO: MSAA support - if (g_cfg.video.resolution_scale_percent == 100 && spp == 1) [[likely]] + if (resolution_scaling_config.scale_percent == 100 && spp == 1) [[likely]] { gl::upload_texture(cmd, this, get_gcm_format(), is_swizzled, { subres }); } @@ -686,6 +690,8 @@ gl::viewable_image* gl::render_target::get_resolve_target_safe(gl::command_conte static_cast(get_internal_format()), format_class() )); + + resolve_surface->set_name(fmt::format("MSAA_Resolve_%u@0x%x", resolve_surface->id(), base_addr)); } return static_cast(resolve_surface.get()); diff --git a/rpcs3/Emu/RSX/GL/GLRenderTargets.h b/rpcs3/Emu/RSX/GL/GLRenderTargets.h index 9b01746a87..f5e2252b92 100644 --- a/rpcs3/Emu/RSX/GL/GLRenderTargets.h +++ b/rpcs3/Emu/RSX/GL/GLRenderTargets.h @@ -98,7 +98,7 @@ namespace gl bool matches_dimensions(u16 _width, u16 _height) const { //Use forward scaling to account for rounding and clamping errors - const auto [scaled_w, scaled_h] = rsx::apply_resolution_scale(_width, _height); + const auto [scaled_w, scaled_h] = rsx::apply_resolution_scale(resolution_scaling_config, _width, _height); return (scaled_w == width()) && (scaled_h == height()); } @@ -138,11 +138,12 @@ struct gl_render_target_traits u32 address, rsx::surface_color_format surface_color_format, usz width, usz height, usz pitch, - rsx::surface_antialiasing antialias + rsx::surface_antialiasing antialias, + const rsx::surface_scaling_config_t& resolution_scaling_config ) { auto format = rsx::internals::surface_color_format_to_gl(surface_color_format); - const auto [width_, height_] = rsx::apply_resolution_scale(static_cast(width), static_cast(height)); + const auto [width_, height_] = rsx::apply_resolution_scale(resolution_scaling_config, static_cast(width), static_cast(height)); u8 samples; rsx::surface_sample_layout sample_layout; @@ -160,7 +161,9 @@ struct gl_render_target_traits std::unique_ptr result(new gl::render_target(width_, height_, samples, static_cast(format.internal_format), RSX_FORMAT_CLASS_COLOR)); + result->set_name(fmt::format("RTV_%u@0x%x", result->id(), address)); result->set_aa_mode(antialias); + result->set_resolution_scaling_config(resolution_scaling_config); result->set_native_pitch(static_cast(width) * get_format_block_size_in_bytes(surface_color_format) * result->samples_x); result->set_surface_dimensions(static_cast(width), static_cast(height), static_cast(pitch)); result->set_format(surface_color_format); @@ -181,11 +184,12 @@ struct gl_render_target_traits u32 address, rsx::surface_depth_format2 surface_depth_format, usz width, usz height, usz pitch, - rsx::surface_antialiasing antialias + rsx::surface_antialiasing antialias, + const rsx::surface_scaling_config_t& resolution_scaling_config ) { auto format = rsx::internals::surface_depth_format_to_gl(surface_depth_format); - const auto [width_, height_] = rsx::apply_resolution_scale(static_cast(width), static_cast(height)); + const auto [width_, height_] = rsx::apply_resolution_scale(resolution_scaling_config, static_cast(width), static_cast(height)); u8 samples; rsx::surface_sample_layout sample_layout; @@ -203,7 +207,9 @@ struct gl_render_target_traits std::unique_ptr result(new gl::render_target(width_, height_, samples, static_cast(format.internal_format), rsx::classify_format(surface_depth_format))); + result->set_name(fmt::format("DSV_%u@0x%x", result->id(), address)); result->set_aa_mode(antialias); + result->set_resolution_scaling_config(resolution_scaling_config); result->set_surface_dimensions(static_cast(width), static_cast(height), static_cast(pitch)); result->set_format(surface_depth_format); result->set_native_pitch(static_cast(width) * get_format_block_size_in_bytes(surface_depth_format) * result->samples_x); @@ -223,13 +229,17 @@ struct gl_render_target_traits void clone_surface( gl::command_context& cmd, std::unique_ptr& sink, gl::render_target* ref, - u32 address, barrier_descriptor_t& prev) + u32 address, barrier_descriptor_t& prev, + const rsx::surface_scaling_config_t& scaling_config) { if (!sink) { auto internal_format = static_cast(ref->get_internal_format()); - const auto [new_w, new_h] = rsx::apply_resolution_scale(prev.width, prev.height, - ref->get_surface_width(), ref->get_surface_height()); + const auto [new_w, new_h] = rsx::apply_resolution_scale( + scaling_config, + prev.width, prev.height, + ref->get_surface_width(), + ref->get_surface_height()); sink = std::make_unique(new_w, new_h, ref->samples(), internal_format, ref->format_class()); sink->add_ref(); @@ -238,6 +248,10 @@ struct gl_render_target_traits sink->state_flags = rsx::surface_state_flags::erase_bkgnd; sink->format_info = ref->format_info; + sink->sample_layout = ref->sample_layout; + sink->resolution_scaling_config = scaling_config; + + sink->set_name(fmt::format("SINK_%u@0x%x", sink->id(), address)); sink->set_spp(ref->get_spp()); sink->set_native_pitch(static_cast(prev.width) * ref->get_bpp() * ref->samples_x); sink->set_rsx_pitch(ref->get_rsx_pitch()); @@ -325,6 +339,7 @@ struct gl_render_target_traits std::array native_layout = { static_cast(fmt.swizzle.a), static_cast(fmt.swizzle.r), static_cast(fmt.swizzle.g), static_cast(fmt.swizzle.b) }; surface->set_native_component_layout(native_layout); surface->set_format(format); + surface->set_name(fmt::format("RTV_%u@0x%x", surface->id(), address)); int_invalidate_surface_contents(cmd, surface, address, pitch); } @@ -338,6 +353,7 @@ struct gl_render_target_traits usz pitch) { surface->set_format(format); + surface->set_name(fmt::format("DSV_%u@0x%x", surface->id(), address)); int_invalidate_surface_contents(cmd, surface, address, pitch); } @@ -370,6 +386,7 @@ struct gl_render_target_traits gl::texture::internal_format format, usz width, usz height, rsx::surface_antialiasing antialias, + const rsx::surface_scaling_config_t& scaling_config, bool check_refs = false) { if (check_refs && surface->has_refs()) @@ -377,7 +394,8 @@ struct gl_render_target_traits return surface->get_internal_format() == format && surface->get_spp() == get_format_sample_count(antialias) && - surface->matches_dimensions(static_cast(width), static_cast(height)); + surface->matches_dimensions(static_cast(width), static_cast(height)) && + surface->resolution_scaling_config == scaling_config; } static @@ -386,10 +404,11 @@ struct gl_render_target_traits rsx::surface_color_format format, usz width, usz height, rsx::surface_antialiasing antialias, + const rsx::surface_scaling_config_t& scaling_config, bool check_refs=false) { const auto internal_fmt = rsx::internals::surface_color_format_to_gl(format).internal_format; - return int_surface_matches_properties(surface, internal_fmt, width, height, antialias, check_refs); + return int_surface_matches_properties(surface, internal_fmt, width, height, antialias, scaling_config, check_refs); } static @@ -398,10 +417,11 @@ struct gl_render_target_traits rsx::surface_depth_format2 format, usz width, usz height, rsx::surface_antialiasing antialias, + const rsx::surface_scaling_config_t& scaling_config, bool check_refs = false) { const auto internal_fmt = rsx::internals::surface_depth_format_to_gl(format).internal_format; - return int_surface_matches_properties(surface, internal_fmt, width, height, antialias, check_refs); + return int_surface_matches_properties(surface, internal_fmt, width, height, antialias, scaling_config, check_refs); } static diff --git a/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp b/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp index 9606ca7b16..fa5b3627c4 100644 --- a/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp +++ b/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp @@ -300,6 +300,8 @@ namespace gl } builder << "\n" + "#undef TEX_PARAM\n" + "#define TEX_PARAM(index) texture_parameters[index + texture_base_index]\n" "#define IS_TEXTURE_RESIDENT(index) (texture_handles[index] < 0xFF)\n" "#define SAMPLER1D(index) sampler1D_array[texture_handles[index]]\n" "#define SAMPLER2D(index) sampler2D_array[texture_handles[index]]\n" diff --git a/rpcs3/Emu/RSX/GL/GLTexture.cpp b/rpcs3/Emu/RSX/GL/GLTexture.cpp index 7b43cfc0a7..6f566b9a82 100644 --- a/rpcs3/Emu/RSX/GL/GLTexture.cpp +++ b/rpcs3/Emu/RSX/GL/GLTexture.cpp @@ -22,6 +22,13 @@ namespace gl legacy_ring_buffer g_upload_transfer_buffer; scratch_ring_buffer g_compute_decode_buffer; scratch_ring_buffer g_deswizzle_scratch_buffer; + blitter g_blitter; + + void init_global_texture_resources() + { + g_blitter.init(); + g_hw_blitter = &g_blitter; + } void destroy_global_texture_resources() { @@ -29,6 +36,8 @@ namespace gl g_upload_transfer_buffer.remove(); g_compute_decode_buffer.remove(); g_deswizzle_scratch_buffer.remove(); + g_blitter.destroy(); + g_hw_blitter = nullptr; } template @@ -157,42 +166,42 @@ namespace gl case texture::internal_format::compressed_rgba_s3tc_dxt1: case texture::internal_format::compressed_rgba_s3tc_dxt3: case texture::internal_format::compressed_rgba_s3tc_dxt5: - return { GL_RGBA, GL_UNSIGNED_BYTE, 1, false }; + return { .format = GL_RGBA, .type = GL_UNSIGNED_BYTE, .block_size = 1, .swap_bytes = false }; case texture::internal_format::r8: - return { GL_RED, GL_UNSIGNED_BYTE, 1, false }; + return { .format = GL_RED, .type = GL_UNSIGNED_BYTE, .block_size = 1, .swap_bytes = false }; case texture::internal_format::r16: - return { GL_RED, GL_UNSIGNED_SHORT, 2, true }; + return { .format = GL_RED, .type = GL_UNSIGNED_SHORT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::r32f: - return { GL_RED, GL_FLOAT, 4, true }; + return { .format = GL_RED, .type = GL_FLOAT, .block_size = 4, .swap_bytes = true }; case texture::internal_format::rg8: - return { GL_RG, GL_UNSIGNED_SHORT, 2, true }; + return { .format = GL_RG, .type = GL_UNSIGNED_SHORT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::rg16: - return { GL_RG, GL_UNSIGNED_SHORT, 2, true }; + return { .format = GL_RG, .type = GL_UNSIGNED_SHORT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::rg16f: - return { GL_RG, GL_HALF_FLOAT, 2, true }; + return { .format = GL_RG, .type = GL_HALF_FLOAT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::rgb565: - return { GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 2, true }; + return { .format = GL_RGB, .type = GL_UNSIGNED_SHORT_5_6_5, .block_size = 2, .swap_bytes = true }; case texture::internal_format::rgb5a1: - return { GL_RGB, GL_UNSIGNED_SHORT_5_5_5_1, 2, true }; + return { .format = GL_RGB, .type = GL_UNSIGNED_SHORT_5_5_5_1, .block_size = 2, .swap_bytes = true }; case texture::internal_format::bgr5a1: - return { GL_RGB, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, true }; + return { .format = GL_RGB, .type = GL_UNSIGNED_SHORT_1_5_5_5_REV, .block_size = 2, .swap_bytes = true }; case texture::internal_format::rgba4: - return { GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4, 2, false }; + return { .format = GL_BGRA, .type = GL_UNSIGNED_SHORT_4_4_4_4, .block_size = 2, .swap_bytes = false }; case texture::internal_format::rgba8: - return { GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, true }; + return { .format = GL_RGBA, .type = GL_UNSIGNED_INT_8_8_8_8_REV, .block_size = 4, .swap_bytes = true }; case texture::internal_format::bgra8: - return { GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, true }; + return { .format = GL_BGRA, .type = GL_UNSIGNED_INT_8_8_8_8_REV, .block_size = 4, .swap_bytes = true }; case texture::internal_format::rgba16f: - return { GL_RGBA, GL_HALF_FLOAT, 2, true }; + return { .format = GL_RGBA, .type = GL_HALF_FLOAT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::rgba32f: - return { GL_RGBA, GL_FLOAT, 4, true }; + return { .format = GL_RGBA, .type = GL_FLOAT, .block_size = 4, .swap_bytes = true }; case texture::internal_format::depth16: - return { GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 2, true }; + return { .format = GL_DEPTH_COMPONENT, .type = GL_UNSIGNED_SHORT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::depth32f: - return { GL_DEPTH_COMPONENT, GL_FLOAT, 2, true }; + return { .format = GL_DEPTH_COMPONENT, .type = GL_FLOAT, .block_size = 2, .swap_bytes = true }; case texture::internal_format::depth24_stencil8: case texture::internal_format::depth32f_stencil8: - return { GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 4, true }; + return { .format = GL_DEPTH_STENCIL, .type = GL_UNSIGNED_INT_24_8, .block_size = 4, .swap_bytes = true }; default: fmt::throw_exception("Unexpected internal format 0x%X", static_cast(format)); } @@ -266,6 +275,44 @@ namespace gl fmt::throw_exception("Unknown format 0x%x", texture_format); } + GLenum get_compatible_snorm_format(GLenum base_format) + { + switch (base_format) + { + case GL_R8: + return GL_R8_SNORM; + case GL_RG8: + return GL_RG8_SNORM; + case GL_RGBA8: + return GL_RGBA8_SNORM; + case GL_R16: + return GL_R16_SNORM; + case GL_RG16: + return GL_RG16_SNORM; + case GL_RGBA16: + return GL_RGBA16_SNORM; + default: + return GL_NONE; + } + } + + GLenum get_compatible_srgb_format(GLenum base_format) + { + switch (base_format) + { + case GL_RGBA8: + return GL_SRGB8_ALPHA8_EXT; + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT; + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT; + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; + default: + return GL_NONE; + } + } + cs_shuffle_base* get_trivial_transform_job(const pixel_buffer_layout& pack_info) { if (!pack_info.swap_bytes) @@ -273,7 +320,7 @@ namespace gl return nullptr; } - switch (pack_info.size) + switch (pack_info.block_size) { case 1: return nullptr; @@ -289,6 +336,8 @@ namespace gl void* copy_image_to_buffer(gl::command_context& cmd, const pixel_buffer_layout& pack_info, const gl::texture* src, gl::buffer* dst, u32 dst_offset, const int src_level, const coord3u& src_region, image_memory_requirements* mem_info) { + ensure(src && dst); + auto initialize_scratch_mem = [&]() -> bool // skip_transform { const u64 max_mem = (mem_info->memory_required) ? mem_info->memory_required : mem_info->image_size_in_bytes; @@ -323,8 +372,10 @@ namespace gl } } - dst->bind(buffer::target::pixel_pack); - src->copy_to(reinterpret_cast(static_cast(dst_offset)), static_cast(pack_info.format), static_cast(pack_info.type), src_level, src_region, {}); + pixel_pack_settings pack_settings{}; + if (pack_info.alignment) pack_settings.alignment(pack_info.alignment); + if (pack_info.row_length) pack_settings.row_length(pack_info.row_length); + src->copy_to(*dst, dst_offset, static_cast(pack_info.format), static_cast(pack_info.type), src_level, src_region, pack_settings); return false; }; @@ -571,10 +622,12 @@ namespace gl } glBindBuffer(GL_SHADER_STORAGE_BUFFER, GL_NONE); - transfer_buf->bind(buffer::target::pixel_unpack); - dst->copy_from(reinterpret_cast(u64(out_offset)), static_cast(unpack_info.format), - static_cast(unpack_info.type), dst_level, dst_region, {}); + pixel_unpack_settings unpack_settings{}; + if (unpack_info.alignment) unpack_settings.alignment(unpack_info.alignment); + if (unpack_info.format) unpack_settings.row_length(unpack_info.row_length); + dst->copy_from(*transfer_buf, out_offset, static_cast(unpack_info.format), + static_cast(unpack_info.type), dst_level, dst_region, unpack_settings); } } @@ -664,172 +717,168 @@ namespace gl } } } + + return; } - else + + std::pair upload_scratch_mem = {}, compute_scratch_mem = {}; + image_memory_requirements mem_info; + pixel_buffer_layout mem_layout; + + std::span dst_buffer = staging_buffer; + u8 block_size_in_bytes = rsx::get_format_block_size_in_bytes(format); + u64 image_linear_size = staging_buffer.size(); + + const auto min_required_buffer_size = std::max(utils::align(image_linear_size * 4, 0x100000), 16 * 0x100000); + + if (driver_caps.ARB_compute_shader_supported) { - std::pair upload_scratch_mem = {}, compute_scratch_mem = {}; - image_memory_requirements mem_info; - pixel_buffer_layout mem_layout; - - std::span dst_buffer = staging_buffer; - void* out_pointer = staging_buffer.data(); - u8 block_size_in_bytes = rsx::get_format_block_size_in_bytes(format); - u64 image_linear_size = staging_buffer.size(); - - const auto min_required_buffer_size = std::max(utils::align(image_linear_size * 4, 0x100000), 16 * 0x100000); - - if (driver_caps.ARB_compute_shader_supported) + if (g_upload_transfer_buffer.size() < static_cast(min_required_buffer_size)) { - if (g_upload_transfer_buffer.size() < static_cast(min_required_buffer_size)) - { - g_upload_transfer_buffer.remove(); - g_upload_transfer_buffer.create(gl::buffer::target::pixel_unpack, min_required_buffer_size); - } - - if (g_compute_decode_buffer.size() < min_required_buffer_size) - { - g_compute_decode_buffer.remove(); - g_compute_decode_buffer.create(gl::buffer::target::ssbo, min_required_buffer_size); - } - - out_pointer = nullptr; + g_upload_transfer_buffer.remove(); + g_upload_transfer_buffer.create(gl::buffer::target::pixel_unpack, min_required_buffer_size); } - for (const rsx::subresource_layout& layout : input_layouts) + if (g_compute_decode_buffer.size() < min_required_buffer_size) { - if (driver_caps.ARB_compute_shader_supported) + g_compute_decode_buffer.remove(); + g_compute_decode_buffer.create(gl::buffer::target::ssbo, min_required_buffer_size); + } + } + + for (const rsx::subresource_layout& layout : input_layouts) + { + if (driver_caps.ARB_compute_shader_supported) + { + u64 row_pitch = rsx::align2(layout.width_in_block * block_size_in_bytes, caps.alignment); + + // We're in the "else" branch, so "is_compressed_host_format()" is always false. + // Handle emulated compressed formats with host unpack (R8G8 compressed) + row_pitch = std::max(row_pitch, dst->pitch()); + + // FIXME: Double-check this logic; it seems like we should always use texels both here and for row_pitch. + image_linear_size = row_pitch * layout.height_in_texel * layout.depth; + + compute_scratch_mem = { nullptr, g_compute_decode_buffer.alloc(static_cast(image_linear_size), 256) }; + compute_scratch_mem.first = reinterpret_cast(static_cast(compute_scratch_mem.second)); + + g_upload_transfer_buffer.reserve_storage_on_heap(static_cast(image_linear_size)); + upload_scratch_mem = g_upload_transfer_buffer.alloc_from_heap(static_cast(image_linear_size), 256); + dst_buffer = { reinterpret_cast(upload_scratch_mem.first), image_linear_size }; + } + + rsx::io_buffer io_buf = dst_buffer; + caps.supports_hw_deswizzle = (is_swizzled && driver_caps.ARB_compute_shader_supported && image_linear_size > 1024); + auto op = upload_texture_subresource(io_buf, layout, format, is_swizzled, caps); + + // Define upload region + coord3u region; + region.x = 0; + region.y = 0; + region.z = layout.layer; + region.width = layout.width_in_texel; + region.height = layout.height_in_texel; + region.depth = layout.depth; + + if (!driver_caps.ARB_compute_shader_supported) + { + unpack_settings.swap_bytes(op.require_swap); + dst->copy_from(staging_buffer, static_cast(gl_format), static_cast(gl_type), layout.level, region, unpack_settings); + continue; + } + + // 0. Preconf + mem_layout.alignment = static_cast(caps.alignment); + mem_layout.swap_bytes = op.require_swap; + mem_layout.format = gl_format; + mem_layout.type = gl_type; + mem_layout.block_size = block_size_in_bytes; + + // 2. Upload memory to GPU + if (!op.require_deswizzle) + { + g_upload_transfer_buffer.unmap(); + g_upload_transfer_buffer.copy_to(&g_compute_decode_buffer.get(), upload_scratch_mem.second, compute_scratch_mem.second, image_linear_size); + } + else + { + // 2.1 Copy data to deswizzle buf + if (g_deswizzle_scratch_buffer.size() < min_required_buffer_size) { - u64 row_pitch = rsx::align2(layout.width_in_block * block_size_in_bytes, caps.alignment); - - // We're in the "else" branch, so "is_compressed_host_format()" is always false. - // Handle emulated compressed formats with host unpack (R8G8 compressed) - row_pitch = std::max(row_pitch, dst->pitch()); - - // FIXME: Double-check this logic; it seems like we should always use texels both here and for row_pitch. - image_linear_size = row_pitch * layout.height_in_texel * layout.depth; - - compute_scratch_mem = { nullptr, g_compute_decode_buffer.alloc(static_cast(image_linear_size), 256) }; - compute_scratch_mem.first = reinterpret_cast(static_cast(compute_scratch_mem.second)); - - g_upload_transfer_buffer.reserve_storage_on_heap(static_cast(image_linear_size)); - upload_scratch_mem = g_upload_transfer_buffer.alloc_from_heap(static_cast(image_linear_size), 256); - dst_buffer = { reinterpret_cast(upload_scratch_mem.first), image_linear_size }; + g_deswizzle_scratch_buffer.remove(); + g_deswizzle_scratch_buffer.create(gl::buffer::target::ssbo, min_required_buffer_size); } - rsx::io_buffer io_buf = dst_buffer; - caps.supports_hw_deswizzle = (is_swizzled && driver_caps.ARB_compute_shader_supported && image_linear_size > 1024); - auto op = upload_texture_subresource(io_buf, layout, format, is_swizzled, caps); + u32 deswizzle_data_offset = g_deswizzle_scratch_buffer.alloc(static_cast(image_linear_size), 256); + g_upload_transfer_buffer.unmap(); + g_upload_transfer_buffer.copy_to(&g_deswizzle_scratch_buffer.get(), upload_scratch_mem.second, deswizzle_data_offset, static_cast(image_linear_size)); - // Define upload region - coord3u region; - region.x = 0; - region.y = 0; - region.z = layout.layer; - region.width = layout.width_in_texel; - region.height = layout.height_in_texel; - region.depth = layout.depth; + // 2.2 Apply compute transform to deswizzle input and dump it in compute_scratch_mem + const auto block_size = op.element_size * op.block_length; - if (driver_caps.ARB_compute_shader_supported) + if (op.require_swap) { - // 0. Preconf - mem_layout.alignment = static_cast(caps.alignment); - mem_layout.swap_bytes = op.require_swap; - mem_layout.format = gl_format; - mem_layout.type = gl_type; - mem_layout.size = block_size_in_bytes; + mem_layout.swap_bytes = false; - // 2. Upload memory to GPU - if (!op.require_deswizzle) + switch (op.element_size) { - g_upload_transfer_buffer.unmap(); - g_upload_transfer_buffer.copy_to(&g_compute_decode_buffer.get(), upload_scratch_mem.second, compute_scratch_mem.second, image_linear_size); + case 1: + do_deswizzle_transformation(cmd, block_size, + &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, + static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); + break; + case 2: + do_deswizzle_transformation(cmd, block_size, + &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, + static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); + break; + case 4: + do_deswizzle_transformation(cmd, block_size, + &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, + static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); + break; + default: + fmt::throw_exception("Unimplemented element size deswizzle"); } - else - { - // 2.1 Copy data to deswizzle buf - if (g_deswizzle_scratch_buffer.size() < min_required_buffer_size) - { - g_deswizzle_scratch_buffer.remove(); - g_deswizzle_scratch_buffer.create(gl::buffer::target::ssbo, min_required_buffer_size); - } - - u32 deswizzle_data_offset = g_deswizzle_scratch_buffer.alloc(static_cast(image_linear_size), 256); - g_upload_transfer_buffer.unmap(); - g_upload_transfer_buffer.copy_to(&g_deswizzle_scratch_buffer.get(), upload_scratch_mem.second, deswizzle_data_offset, static_cast(image_linear_size)); - - // 2.2 Apply compute transform to deswizzle input and dump it in compute_scratch_mem - const auto block_size = op.element_size * op.block_length; - - if (op.require_swap) - { - mem_layout.swap_bytes = false; - - switch (op.element_size) - { - case 1: - do_deswizzle_transformation(cmd, block_size, - &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, - static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); - break; - case 2: - do_deswizzle_transformation(cmd, block_size, - &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, - static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); - break; - case 4: - do_deswizzle_transformation(cmd, block_size, - &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, - static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); - break; - default: - fmt::throw_exception("Unimplemented element size deswizzle"); - } - } - else - { - switch (op.element_size) - { - case 1: - do_deswizzle_transformation(cmd, block_size, - &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, - static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); - break; - case 2: - do_deswizzle_transformation(cmd, block_size, - &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, - static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); - break; - case 4: - do_deswizzle_transformation(cmd, block_size, - &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, - static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); - break; - default: - fmt::throw_exception("Unimplemented element size deswizzle"); - } - } - - // Barrier - g_deswizzle_scratch_buffer.push_barrier(deswizzle_data_offset, static_cast(image_linear_size)); - } - - // 3. Update configuration - mem_info.image_size_in_texels = image_linear_size / block_size_in_bytes; - mem_info.image_size_in_bytes = image_linear_size; - mem_info.memory_required = 0; - - // 4. Dispatch compute routines - copy_buffer_to_image(cmd, mem_layout, &g_compute_decode_buffer.get(), dst, compute_scratch_mem.first, layout.level, region, &mem_info); - - // Barrier - g_compute_decode_buffer.push_barrier(compute_scratch_mem.second, static_cast(image_linear_size)); } else { - unpack_settings.swap_bytes(op.require_swap); - dst->copy_from(out_pointer, static_cast(gl_format), static_cast(gl_type), layout.level, region, unpack_settings); + switch (op.element_size) + { + case 1: + do_deswizzle_transformation(cmd, block_size, + &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, + static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); + break; + case 2: + do_deswizzle_transformation(cmd, block_size, + &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, + static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); + break; + case 4: + do_deswizzle_transformation(cmd, block_size, + &g_compute_decode_buffer.get(), compute_scratch_mem.second, &g_deswizzle_scratch_buffer.get(), deswizzle_data_offset, + static_cast(image_linear_size), layout.width_in_texel, layout.height_in_texel, layout.depth); + break; + default: + fmt::throw_exception("Unimplemented element size deswizzle"); + } } + + // Barrier + g_deswizzle_scratch_buffer.push_barrier(deswizzle_data_offset, static_cast(image_linear_size)); } + + // 3. Update configuration + mem_info.image_size_in_texels = image_linear_size / block_size_in_bytes; + mem_info.image_size_in_bytes = image_linear_size; + mem_info.memory_required = 0; + + // 4. Dispatch compute routines + copy_buffer_to_image(cmd, mem_layout, &g_compute_decode_buffer.get(), dst, compute_scratch_mem.first, layout.level, region, &mem_info); + + // Barrier + g_compute_decode_buffer.push_barrier(compute_scratch_mem.second, static_cast(image_linear_size)); } } @@ -1017,7 +1066,7 @@ namespace gl skip_transform = (pack_info.format == unpack_info.format && pack_info.type == unpack_info.type && pack_info.swap_bytes == unpack_info.swap_bytes && - pack_info.size == unpack_info.size); + pack_info.block_size == unpack_info.block_size); } if (skip_transform) [[likely]] @@ -1098,7 +1147,7 @@ namespace gl if (src->aspect() & image_aspect::depth) { // Source is depth, modify unpack rule - if (pack_info.size == 4 && unpack_info.size == 4) + if (pack_info.block_size == 4 && unpack_info.block_size == 4) { unpack_info.swap_bytes = !unpack_info.swap_bytes; } @@ -1106,7 +1155,7 @@ namespace gl else { // Dest is depth, modify pack rule - if (pack_info.size == 4 && unpack_info.size == 4) + if (pack_info.block_size == 4 && unpack_info.block_size == 4) { pack_info.swap_bytes = !pack_info.swap_bytes; } @@ -1116,9 +1165,7 @@ namespace gl // Start pack operation pixel_pack_settings pack_settings{}; pack_settings.swap_bytes(pack_info.swap_bytes); - - g_typeless_transfer_buffer.get().bind(buffer::target::pixel_pack); - src->copy_to(nullptr, static_cast(pack_info.format), static_cast(pack_info.type), 0, src_region, pack_settings); + src->copy_to(g_typeless_transfer_buffer.get(), 0, static_cast(pack_info.format), static_cast(pack_info.type), 0, src_region, pack_settings); glBindBuffer(GL_PIXEL_PACK_BUFFER, GL_NONE); @@ -1126,8 +1173,7 @@ namespace gl pixel_unpack_settings unpack_settings{}; unpack_settings.swap_bytes(unpack_info.swap_bytes); - g_typeless_transfer_buffer.get().bind(buffer::target::pixel_unpack); - dst->copy_from(nullptr, static_cast(unpack_info.format), static_cast(unpack_info.type), 0, dst_region, unpack_settings); + dst->copy_from(g_typeless_transfer_buffer.get(), 0, static_cast(unpack_info.format), static_cast(unpack_info.type), 0, dst_region, unpack_settings); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, GL_NONE); } } diff --git a/rpcs3/Emu/RSX/GL/GLTexture.h b/rpcs3/Emu/RSX/GL/GLTexture.h index dc6d90098a..6d0bbb18a3 100644 --- a/rpcs3/Emu/RSX/GL/GLTexture.h +++ b/rpcs3/Emu/RSX/GL/GLTexture.h @@ -14,18 +14,20 @@ namespace gl { struct pixel_buffer_layout { - GLenum format; - GLenum type; - u8 size; - bool swap_bytes; - u8 alignment; + GLenum format = GL_RGBA; + GLenum type = GL_UNSIGNED_BYTE; + u32 row_length = 0; + u8 block_size = 0; + bool swap_bytes = false; + u8 alignment = 0; + u8 reserved; }; struct image_memory_requirements { - u64 image_size_in_texels; - u64 image_size_in_bytes; - u64 memory_required; + u64 image_size_in_texels = 0; + u64 image_size_in_bytes = 0; + u64 memory_required = 0; }; struct clear_cmd_info @@ -62,6 +64,8 @@ namespace gl std::tuple get_format_type(u32 texture_format); pixel_buffer_layout get_format_type(texture::internal_format format); std::array get_swizzle_remap(u32 texture_format); + GLenum get_compatible_snorm_format(GLenum base_format); + GLenum get_compatible_srgb_format(GLenum base_format); viewable_image* create_texture(u32 gcm_format, u16 width, u16 height, u16 depth, u16 mipmaps, rsx::texture_dimension_extended type); @@ -84,5 +88,6 @@ namespace gl extern std::unique_ptr g_vis_texture; } + void init_global_texture_resources(); void destroy_global_texture_resources(); } diff --git a/rpcs3/Emu/RSX/GL/GLTextureCache.cpp b/rpcs3/Emu/RSX/GL/GLTextureCache.cpp index c2b0e3c252..f8aa9d95df 100644 --- a/rpcs3/Emu/RSX/GL/GLTextureCache.cpp +++ b/rpcs3/Emu/RSX/GL/GLTextureCache.cpp @@ -152,6 +152,8 @@ namespace gl dst = data.get(); dst->properties_encoding = match_key; m_temporary_surfaces.emplace_back(std::move(data)); + + dst->set_name(fmt::format("[Temp View] id=%u, fmt=0x%x", dst->id(), gcm_format)); } dst->add_ref(); @@ -179,6 +181,10 @@ namespace gl auto components = get_component_mapping(gcm_format, rsx::component_order::default_); dst->set_native_component_layout(components); } + else + { + dst->set_native_component_layout(src->get_native_component_layout()); + } return dst->get_view(remap); } diff --git a/rpcs3/Emu/RSX/GL/GLTextureCache.h b/rpcs3/Emu/RSX/GL/GLTextureCache.h index 486087d56a..93c0ba2f5c 100644 --- a/rpcs3/Emu/RSX/GL/GLTextureCache.h +++ b/rpcs3/Emu/RSX/GL/GLTextureCache.h @@ -48,7 +48,7 @@ namespace gl void init_buffer(const gl::texture* src) { - const u32 vram_size = src->pitch() * src->height(); + const u32 vram_size = std::max(src->pitch() * src->height(), get_section_size()); const u32 buffer_size = utils::align(vram_size, 4096); if (pbo) @@ -148,7 +148,7 @@ namespace gl } } - void dma_transfer(gl::command_context& cmd, gl::texture* src, const areai& /*src_area*/, const utils::address_range32& /*valid_range*/, u32 pitch) + void dma_transfer(gl::command_context& cmd, gl::texture* src, const areai& src_area, const utils::address_range32& valid_range, u32 pitch) { init_buffer(src); glGetError(); @@ -165,6 +165,20 @@ namespace gl real_pitch = src->pitch(); rsx_pitch = pitch; + const coord3u src_rgn = + { + { static_cast(src_area.x1), static_cast(src_area.y1), 0 }, + { static_cast(src_area.width()), static_cast(src_area.height()), 1 } + }; + + u32 pbo_offset = 0; + if (valid_range.valid()) + { + const u32 section_base = get_section_base(); + pbo_offset = valid_range.start - section_base; + ensure(valid_range.start >= section_base && pbo_offset <= pbo.size()); + } + bool use_driver_pixel_transform = true; if (get_driver_caps().ARB_compute_shader_supported) [[likely]] { @@ -180,11 +194,12 @@ namespace gl pack_info.format = static_cast(format); pack_info.type = static_cast(type); - pack_info.size = (src->aspect() & image_aspect::stencil) ? 4 : 2; + pack_info.block_size = (src->aspect() & image_aspect::stencil) ? 4 : 2; pack_info.swap_bytes = true; + pack_info.row_length = rsx_pitch / pack_info.block_size; - mem_info.image_size_in_texels = src->width() * src->height(); - mem_info.image_size_in_bytes = src->pitch() * src->height(); + mem_info.image_size_in_texels = pack_info.row_length * src_area.height(); + mem_info.image_size_in_bytes = rsx_pitch * src_area.height(); mem_info.memory_required = 0; if (pack_info.type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV) @@ -193,14 +208,16 @@ namespace gl mem_info.image_size_in_bytes *= 2; } - void* out_offset = copy_image_to_buffer(cmd, pack_info, src, &scratch_mem, 0, 0, { {}, src->size3D() }, &mem_info); + void* out_offset = copy_image_to_buffer(cmd, pack_info, src, &scratch_mem, 0, 0, src_rgn, &mem_info); + real_pitch = rsx_pitch; glBindBuffer(GL_SHADER_STORAGE_BUFFER, GL_NONE); glMemoryBarrier(GL_BUFFER_UPDATE_BARRIER_BIT); - real_pitch = pack_info.size * src->width(); - const u64 data_length = pack_info.size * mem_info.image_size_in_texels; - scratch_mem.copy_to(&pbo, reinterpret_cast(out_offset), 0, data_length); + const u64 data_length = mem_info.image_size_in_bytes - rsx_pitch + (src_area.width() * pack_info.block_size); + ensure(data_length + pbo_offset <= static_cast(pbo.size()), "Memory allocation cannot fit image contents. Report to developers."); + + scratch_mem.copy_to(&pbo, reinterpret_cast(out_offset), pbo_offset, data_length); } else { @@ -219,13 +236,16 @@ namespace gl pack_unpack_swap_bytes = false; } - pbo.bind(buffer::target::pixel_pack); + const auto bpp = src->pitch() / src->width(); + real_pitch = rsx_pitch; + ensure((real_pitch % bpp) == 0); pixel_pack_settings pack_settings; pack_settings.alignment(1); pack_settings.swap_bytes(pack_unpack_swap_bytes); + pack_settings.row_length(rsx_pitch / bpp); - src->copy_to(nullptr, format, type, pack_settings); + src->copy_to(pbo, pbo_offset, format, type, 0, src_rgn, pack_settings); } if (auto error = glGetError()) @@ -266,6 +286,8 @@ namespace gl gl::texture* target_texture = vram_texture; u32 transfer_width = width; u32 transfer_height = height; + u32 transfer_x = 0, transfer_y = 0; + u16 resolution_scale_percent = 100; if (context == rsx::texture_upload_context::framebuffer_storage) { @@ -274,9 +296,10 @@ namespace gl target_texture = surface->get_surface(rsx::surface_access::transfer_read); transfer_width *= surface->samples_x; transfer_height *= surface->samples_y; + resolution_scale_percent = surface->resolution_scaling_config.scale_percent; } - if ((rsx::get_resolution_scale_percent() != 100 && context == rsx::texture_upload_context::framebuffer_storage) || + if ((resolution_scale_percent != 100 && context == rsx::texture_upload_context::framebuffer_storage) || (vram_texture->pitch() != rsx_pitch)) { areai src_area = { 0, 0, 0, 0 }; @@ -311,7 +334,35 @@ namespace gl } } - dma_transfer(cmd, target_texture, {}, {}, rsx_pitch); + const auto valid_range = get_confirmed_range(); + if (const auto section_range = get_section_range(); section_range != valid_range) + { + if (const auto offset = (valid_range.start - get_section_base())) + { + transfer_y = offset / rsx_pitch; + transfer_x = (offset % rsx_pitch) / rsx::get_format_block_size_in_bytes(gcm_format); + + ensure(transfer_width >= transfer_x); + ensure(transfer_height >= transfer_y); + transfer_width -= transfer_x; + transfer_height -= transfer_y; + } + + if (const auto tail = (section_range.end - valid_range.end)) + { + const auto row_count = tail / rsx_pitch; + + ensure(transfer_height >= row_count); + transfer_height -= row_count; + } + } + + areai src_area; + src_area.x1 = static_cast(transfer_x); + src_area.y1 = static_cast(transfer_y); + src_area.x2 = s32(transfer_x + transfer_width); + src_area.y2 = s32(transfer_y + transfer_height); + dma_transfer(cmd, target_texture, src_area, valid_range, rsx_pitch); } /** @@ -427,9 +478,7 @@ namespace gl using gl::viewable_image::viewable_image; }; - blitter m_hw_blitter; std::vector> m_temporary_surfaces; - const u32 max_cached_image_pool_size = 256; private: @@ -537,7 +586,8 @@ namespace gl gl::texture_view* generate_cubemap_from_images(gl::command_context& cmd, u32 gcm_format, u16 size, const rsx::simple_array& sources, const rsx::texture_channel_remap_t& remap_vector) override { auto _template = get_template_from_collection_impl(sources); - auto result = create_temporary_subresource_impl(cmd, _template, GL_NONE, GL_TEXTURE_CUBE_MAP, gcm_format, 0, 0, size, size, 1, 1, remap_vector, false); + const u8 mip_count = 1 + sources.reduce(0, FN(std::max(x, y.level))); + auto result = create_temporary_subresource_impl(cmd, _template, GL_NONE, GL_TEXTURE_CUBE_MAP, gcm_format, 0, 0, size, size, 1, mip_count, remap_vector, false); copy_transfer_regions_impl(cmd, result->image(), sources); return result; @@ -669,8 +719,8 @@ namespace gl } else { - //TODO: More tests on byte order - //ARGB8+native+unswizzled is confirmed with Dark Souls II character preview + // TODO: More tests on byte order + // ARGB8+native+unswizzled is confirmed with Dark Souls II character preview switch (gcm_format) { case CELL_GCM_TEXTURE_A8R8G8B8: @@ -697,8 +747,7 @@ namespace gl fmt::throw_exception("Unexpected gcm format 0x%X", gcm_format); } - //NOTE: Protection is handled by the caller - cached.set_dimensions(width, height, depth, (rsx_range.length() / height)); + // NOTE: Protection is handled by the caller no_access_range = cached.get_min_max(no_access_range, rsx::section_bounds::locked_range); } @@ -734,6 +783,7 @@ namespace gl gl::upload_texture(cmd, section->get_raw_texture(), gcm_format, input_swizzled, subresource_layout); + section->get_raw_texture()->set_name(fmt::format("Raw Texture @0x%x", rsx_range.start)); section->last_write_tag = rsx::get_shared_tag(); return section; } @@ -769,7 +819,7 @@ namespace gl { default: // TODO - err_once("Format incompatibility detected, reporting failure to force data copy (GL_INTERNAL_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast(ifmt), gcm_format); + warn_once("Format incompatibility detected, reporting failure to force data copy (GL_INTERNAL_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast(ifmt), gcm_format); return false; case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT: return (ifmt == gl::texture::internal_format::rgba16f); @@ -811,16 +861,11 @@ namespace gl using baseclass::texture_cache; void initialize() - { - m_hw_blitter.init(); - g_hw_blitter = &m_hw_blitter; - } + {} void destroy() override { clear(); - g_hw_blitter = nullptr; - m_hw_blitter.destroy(); } bool is_depth_texture(u32 rsx_address, u32 rsx_size) override @@ -866,7 +911,7 @@ namespace gl bool blit(gl::command_context& cmd, const rsx::blit_src_info& src, const rsx::blit_dst_info& dst, bool linear_interpolate, gl_render_targets& m_rtts) { - auto result = upload_scaled_image(src, dst, linear_interpolate, cmd, m_rtts, m_hw_blitter); + auto result = upload_scaled_image(src, dst, linear_interpolate, cmd, m_rtts, *g_hw_blitter); if (result.succeeded) { diff --git a/rpcs3/Emu/RSX/GL/OpenGL.cpp b/rpcs3/Emu/RSX/GL/OpenGL.cpp index 78241f557a..7381eb990d 100644 --- a/rpcs3/Emu/RSX/GL/OpenGL.cpp +++ b/rpcs3/Emu/RSX/GL/OpenGL.cpp @@ -38,9 +38,6 @@ void gl::init() #ifdef __unix__ glewExperimental = true; glewInit(); -#ifdef HAVE_X11 - glxewInit(); -#endif #endif } diff --git a/rpcs3/Emu/RSX/GL/glutils/blitter.cpp b/rpcs3/Emu/RSX/GL/glutils/blitter.cpp index 57998b761d..47c7d7b1ca 100644 --- a/rpcs3/Emu/RSX/GL/glutils/blitter.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/blitter.cpp @@ -8,6 +8,18 @@ namespace gl { blitter* g_hw_blitter = nullptr; + void blitter::init() + { + blit_src.create(); + blit_dst.create(); + } + + void blitter::destroy() + { + blit_dst.remove(); + blit_src.remove(); + } + void blitter::copy_image(gl::command_context&, const texture* src, const texture* dst, int src_level, int dst_level, const position3i& src_offset, const position3i& dst_offset, const size3i& size) const { ensure(src_level == 0); @@ -147,6 +159,9 @@ namespace gl gl::fbo::attachment dst_att{ blit_dst, static_cast(attachment) }; dst_att = *real_dst; + blit_src.check(); + blit_dst.check(); + blit_src.blit(blit_dst, src_rect, dst_rect, target, interp); // Release the attachments explicitly (not doing so causes glitches, e.g Journey Menu) diff --git a/rpcs3/Emu/RSX/GL/glutils/blitter.h b/rpcs3/Emu/RSX/GL/glutils/blitter.h index d7adc1dd14..d56754fcae 100644 --- a/rpcs3/Emu/RSX/GL/glutils/blitter.h +++ b/rpcs3/Emu/RSX/GL/glutils/blitter.h @@ -30,17 +30,9 @@ namespace gl public: - void init() - { - blit_src.create(); - blit_dst.create(); - } + void init(); - void destroy() - { - blit_dst.remove(); - blit_src.remove(); - } + void destroy(); void scale_image(gl::command_context& cmd, const texture* src, texture* dst, areai src_rect, areai dst_rect, bool linear_interpolation, const rsx::typeless_xfer& xfer_info); diff --git a/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp b/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp index 5c1f0d0447..f3849718d0 100644 --- a/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp @@ -131,6 +131,11 @@ namespace gl DSA_CALL2(NamedBufferSubData, m_id, offset, length, data); } + void buffer::fill(GLsizeiptr offset, GLsizeiptr length, GLuint pattern) + { + DSA_CALL2(ClearNamedBufferSubData, m_id, GL_R32UI, offset, length, GL_RED, GL_UNSIGNED_INT, &pattern); + } + GLubyte* buffer::map(GLsizeiptr offset, GLsizeiptr length, access access_) { ensure(m_memory_type == memory_type::host_visible); diff --git a/rpcs3/Emu/RSX/GL/glutils/buffer_object.h b/rpcs3/Emu/RSX/GL/glutils/buffer_object.h index dccb2a314e..28730bdd0d 100644 --- a/rpcs3/Emu/RSX/GL/glutils/buffer_object.h +++ b/rpcs3/Emu/RSX/GL/glutils/buffer_object.h @@ -15,7 +15,9 @@ namespace gl element_array = GL_ELEMENT_ARRAY_BUFFER, uniform = GL_UNIFORM_BUFFER, texture = GL_TEXTURE_BUFFER, - ssbo = GL_SHADER_STORAGE_BUFFER + ssbo = GL_SHADER_STORAGE_BUFFER, + copy_src = GL_COPY_READ_BUFFER, + copy_dst = GL_COPY_WRITE_BUFFER }; enum class access @@ -65,6 +67,8 @@ namespace gl case target::uniform: pname = GL_UNIFORM_BUFFER_BINDING; break; case target::texture: pname = GL_TEXTURE_BUFFER_BINDING; break; case target::ssbo: pname = GL_SHADER_STORAGE_BUFFER_BINDING; break; + case target::copy_src: pname = GL_COPY_READ_BUFFER_BINDING; break; + case target::copy_dst: pname = GL_COPY_WRITE_BUFFER_BINDING; break; default: fmt::throw_exception("Invalid binding state target (0x%x)", static_cast(target_)); } @@ -113,6 +117,7 @@ namespace gl void data(GLsizeiptr size, const void* data_ = nullptr, GLenum usage = GL_STREAM_DRAW); void sub_data(GLsizeiptr offset, GLsizeiptr length, const GLvoid* data); + void fill(GLsizeiptr offset, GLsizeiptr length, GLuint pattern); GLubyte* map(GLsizeiptr offset, GLsizeiptr length, access access_); void unmap(); diff --git a/rpcs3/Emu/RSX/GL/glutils/capabilities.cpp b/rpcs3/Emu/RSX/GL/glutils/capabilities.cpp index d6a51beb09..a6999d6f9c 100644 --- a/rpcs3/Emu/RSX/GL/glutils/capabilities.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/capabilities.cpp @@ -2,6 +2,7 @@ #include "capabilities.h" #include "Utilities/StrUtil.h" +#include "Emu/system_config.h" #include @@ -43,6 +44,8 @@ namespace gl all_extensions.emplace(reinterpret_cast(glGetStringi(GL_EXTENSIONS, i))); } + RENDERDOC_debug = !!g_cfg.video.renderdoc_compatiblity; + #define CHECK_EXTENSION_SUPPORT(extension_short_name)\ do {\ if (all_extensions.contains("GL_"#extension_short_name)) {\ diff --git a/rpcs3/Emu/RSX/GL/glutils/capabilities.h b/rpcs3/Emu/RSX/GL/glutils/capabilities.h index 756250430b..cfe104ffbe 100644 --- a/rpcs3/Emu/RSX/GL/glutils/capabilities.h +++ b/rpcs3/Emu/RSX/GL/glutils/capabilities.h @@ -23,6 +23,7 @@ namespace gl bool initialized = false; version_info glsl_version; + bool RENDERDOC_debug = false; bool EXT_direct_state_access_supported = false; bool EXT_depth_bounds_test_supported = false; bool AMD_pinned_memory_supported = false; diff --git a/rpcs3/Emu/RSX/GL/glutils/common.h b/rpcs3/Emu/RSX/GL/glutils/common.h index f99c3590a6..24e62a9189 100644 --- a/rpcs3/Emu/RSX/GL/glutils/common.h +++ b/rpcs3/Emu/RSX/GL/glutils/common.h @@ -76,10 +76,30 @@ namespace gl } }; - // Very useful util when capturing traces with RenderDoc - static inline void push_debug_label(const char* label) + template + struct named_object { - glInsertEventMarkerEXT(static_cast(strlen(label)), label); + protected: + GLuint m_id = GL_NONE; + std::string m_name = "Unnamed"; + + public: + void set_name(std::string_view name) + { + m_name = name.data(); + glObjectLabel(Ns, m_id, static_cast(name.length()), name.data()); + } + + std::string_view name() const + { + return m_name; + } + }; + + // Very useful util when capturing traces with RenderDoc + static inline void push_debug_label(std::string_view label) + { + glInsertEventMarkerEXT(static_cast(label.size()), label.data()); } // Checks if GL state is still valid diff --git a/rpcs3/Emu/RSX/GL/glutils/image.cpp b/rpcs3/Emu/RSX/GL/glutils/image.cpp index bb6439cc05..e2f02afdfa 100644 --- a/rpcs3/Emu/RSX/GL/glutils/image.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/image.cpp @@ -19,6 +19,54 @@ namespace gl } } + static const char* gl_type_to_str(texture::type type) + { + switch (type) + { + case texture::type::ubyte: return "GL_UNSIGNED_BYTE"; + case texture::type::ushort: return "GL_UNSIGNED_SHORT"; + case texture::type::uint: return "GL_UNSIGNED_INT"; + case texture::type::ubyte_3_3_2: return "GL_UNSIGNED_BYTE_3_3_2"; + case texture::type::ubyte_2_3_3_rev: return "GL_UNSIGNED_BYTE_2_3_3_REV"; + case texture::type::ushort_5_6_5: return "GL_UNSIGNED_SHORT_5_6_5"; + case texture::type::ushort_5_6_5_rev: return "GL_UNSIGNED_SHORT_5_6_5_REV"; + case texture::type::ushort_4_4_4_4: return "GL_UNSIGNED_SHORT_4_4_4_4"; + case texture::type::ushort_4_4_4_4_rev: return "GL_UNSIGNED_SHORT_4_4_4_4_REV"; + case texture::type::ushort_5_5_5_1: return "GL_UNSIGNED_SHORT_5_5_5_1"; + case texture::type::ushort_1_5_5_5_rev: return "GL_UNSIGNED_SHORT_1_5_5_5_REV"; + case texture::type::uint_8_8_8_8: return "GL_UNSIGNED_INT_8_8_8_8"; + case texture::type::uint_8_8_8_8_rev: return "GL_UNSIGNED_INT_8_8_8_8_REV"; + case texture::type::uint_10_10_10_2: return "GL_UNSIGNED_INT_10_10_10_2"; + case texture::type::uint_2_10_10_10_rev: return "GL_UNSIGNED_INT_2_10_10_10_REV"; + case texture::type::uint_24_8: return "GL_UNSIGNED_INT_24_8"; + case texture::type::float32_uint8: return "GL_FLOAT_32_UNSIGNED_INT_24_8_REV"; + case texture::type::sbyte: return "GL_BYTE"; + case texture::type::sshort: return "GL_SHORT"; + case texture::type::sint: return "GL_INT"; + case texture::type::f16: return "GL_HALF_FLOAT"; + case texture::type::f32: return "GL_FLOAT"; + case texture::type::f64: return "GL_DOUBLE"; + default: return "UNKNOWN"; + } + } + + static const char* gl_format_to_str(texture::format format) + { + switch (format) + { + case texture::format::r: return "GL_RED"; + case texture::format::rg: return "GL_RG"; + case texture::format::rgb: return "GL_RGB"; + case texture::format::rgba: return "GL_RGBA"; + case texture::format::bgr: return "GL_BGR"; + case texture::format::bgra: return "GL_BGRA"; + case texture::format::stencil: return "GL_STENCIL_INDEX"; + case texture::format::depth: return "GL_DEPTH_COMPONENT"; + case texture::format::depth_stencil: return "GL_DEPTH_STENCIL"; + default: return "UNKNOWN"; + } + } + texture::texture(GLenum target, GLuint width, GLuint height, GLuint depth, GLuint mipmaps, GLubyte samples, GLenum sized_format, rsx::format_class format_class) { // Upgrade targets for MSAA @@ -175,7 +223,7 @@ namespace gl m_id = GL_NONE; } - void texture::copy_from(const void* src, texture::format format, texture::type type, int level, const coord3u region, const pixel_unpack_settings& pixel_settings) + void texture::copy_from(const rsx::io_buffer& src, texture::format format, texture::type type, int level, const coord3u region, const pixel_unpack_settings& pixel_settings) { ensure(m_samples <= 1, "Transfer operations are unsupported on multisampled textures."); @@ -185,30 +233,30 @@ namespace gl { case GL_TEXTURE_1D: { - DSA_CALL(TextureSubImage1D, m_id, GL_TEXTURE_1D, level, region.x, region.width, static_cast(format), static_cast(type), src); + DSA_CALL(TextureSubImage1D, m_id, GL_TEXTURE_1D, level, region.x, region.width, static_cast(format), static_cast(type), src.data()); break; } case GL_TEXTURE_2D: { - DSA_CALL(TextureSubImage2D, m_id, GL_TEXTURE_2D, level, region.x, region.y, region.width, region.height, static_cast(format), static_cast(type), src); + DSA_CALL(TextureSubImage2D, m_id, GL_TEXTURE_2D, level, region.x, region.y, region.width, region.height, static_cast(format), static_cast(type), src.data()); break; } case GL_TEXTURE_3D: case GL_TEXTURE_2D_ARRAY: { - DSA_CALL(TextureSubImage3D, m_id, target_, level, region.x, region.y, region.z, region.width, region.height, region.depth, static_cast(format), static_cast(type), src); + DSA_CALL(TextureSubImage3D, m_id, target_, level, region.x, region.y, region.z, region.width, region.height, region.depth, static_cast(format), static_cast(type), src.data()); break; } case GL_TEXTURE_CUBE_MAP: { if (get_driver_caps().ARB_direct_state_access_supported) { - glTextureSubImage3D(m_id, level, region.x, region.y, region.z, region.width, region.height, region.depth, static_cast(format), static_cast(type), src); + glTextureSubImage3D(m_id, level, region.x, region.y, region.z, region.width, region.height, region.depth, static_cast(format), static_cast(type), src.data()); } else { rsx_log.warning("Cubemap upload via texture::copy_from is halfplemented!"); - auto ptr = static_cast(src); + auto ptr = static_cast(src.data()); const auto end = std::min(6u, region.z + region.depth); for (unsigned face = region.z; face < end; ++face) { @@ -221,40 +269,51 @@ namespace gl } } - void texture::copy_from(buffer& buf, u32 gl_format_type, u32 offset, u32 length) + void texture::copy_from(buffer& buf, GLsizeiptr offset, texture::format format, texture::type type, int level, const coord3u region, const pixel_unpack_settings& pixel_settings) { ensure(m_samples <= 1, "Transfer operations are unsupported on multisampled textures."); - if (get_target() != target::textureBuffer) - fmt::throw_exception("OpenGL error: texture cannot copy from buffer"); + buf.bind(buffer::target::pixel_unpack); - DSA_CALL(TextureBufferRange, m_id, GL_TEXTURE_BUFFER, gl_format_type, buf.id(), offset, length); + const rsx::io_buffer src{ reinterpret_cast(static_cast(offset)), buf.size() - offset }; + copy_from(src, format, type, level, region, pixel_settings); } void texture::copy_from(buffer_view& view) { - copy_from(*view.value(), view.format(), view.offset(), view.range()); + if (get_target() != target::textureBuffer) + fmt::throw_exception("OpenGL error: texture cannot copy from buffer"); + + DSA_CALL(TextureBufferRange, m_id, GL_TEXTURE_BUFFER, view.format(), view.value()->id(), view.offset(), view.range()); } - void texture::copy_to(void* dst, texture::format format, texture::type type, int level, const coord3u& region, const pixel_pack_settings& pixel_settings) const + void texture::copy_to(const rsx::io_buffer& dst, texture::format format, texture::type type, int level, const coord3u& region, const pixel_pack_settings& pixel_settings) const { ensure(m_samples <= 1, "Transfer operations are unsupported on multisampled textures."); pixel_settings.apply(); const auto& caps = get_driver_caps(); + if (caps.RENDERDOC_debug) + { + const auto msg = fmt::format("glGetTextureSubImage('[%u] %s', %u, %u, %u, %u, %u, %u, %u, %s, %s, %d, %p)", + m_id, m_name.c_str(), level, region.x, region.y, region.z, region.width, region.height, region.depth, + gl_format_to_str(format), gl_type_to_str(type), s32{ smax }, dst.data()); + push_debug_label(msg); + } + if (!region.x && !region.y && !region.z && region.width == m_width && region.height == m_height && region.depth == m_depth) { if (caps.ARB_direct_state_access_supported) - glGetTextureImage(m_id, level, static_cast(format), static_cast(type), s32{ smax }, dst); + glGetTextureImage(m_id, level, static_cast(format), static_cast(type), dst.size(), dst.data()); else - glGetTextureImageEXT(m_id, static_cast(m_target), level, static_cast(format), static_cast(type), dst); + glGetTextureImageEXT(m_id, static_cast(m_target), level, static_cast(format), static_cast(type), dst.data()); } else if (caps.ARB_direct_state_access_supported) { glGetTextureSubImage(m_id, level, region.x, region.y, region.z, region.width, region.height, region.depth, - static_cast(format), static_cast(type), s32{ smax }, dst); + static_cast(format), static_cast(type), s32{ smax }, dst.data()); } else { @@ -269,6 +328,16 @@ namespace gl } } + void texture::copy_to(buffer& buf, GLsizeiptr offset, texture::format format, texture::type type, int level, const coord3u& region, const pixel_pack_settings& pixel_settings) const + { + ensure(offset < buf.size(), "PBO write is out of range"); + + buf.bind(buffer::target::pixel_pack); + + const rsx::io_buffer dst{ reinterpret_cast(static_cast(offset)), buf.size() - offset }; + copy_to(dst, format, type, level, region, pixel_settings); + } + void texture_view::create(texture* data, GLenum target, GLenum sized_format, const subresource_range& range, const GLenum* argb_swizzle) { m_target = target; @@ -318,6 +387,34 @@ namespace gl } } + texture_view* texture_view::as(GLenum format) + { + if (format == this->m_view_format) + { + return this; + } + + auto self = m_root_view ? m_root_view : this; + if (auto found = self->m_subviews.find(format); + found != self->m_subviews.end()) + { + return found->second.get(); + } + + GLenum swizzle_argb[4] = + { + component_swizzle[3], + component_swizzle[0], + component_swizzle[1], + component_swizzle[2], + }; + + auto view = std::make_unique(m_image_data, m_target, format, swizzle_argb, m_aspect_flags); + auto ret = view.get(); + self->m_subviews.emplace(format, std::move(view)); + return ret; + } + void texture_view::bind(gl::command_context& cmd, GLuint layer) const { cmd->bind_texture(layer, m_target, m_id); @@ -369,6 +466,8 @@ namespace gl auto view = std::make_unique(this, swizzle, aspect_flags); auto result = view.get(); views.emplace(key, std::move(view)); + + result->set_name(fmt::format("%s, remap=%x", name(), remap.encoded)); return result; } diff --git a/rpcs3/Emu/RSX/GL/glutils/image.h b/rpcs3/Emu/RSX/GL/glutils/image.h index 6617caa54c..bd974c226a 100644 --- a/rpcs3/Emu/RSX/GL/glutils/image.h +++ b/rpcs3/Emu/RSX/GL/glutils/image.h @@ -4,6 +4,7 @@ #include "Utilities/geometry.h" #include "Emu/RSX/Common/TextureUtils.h" +#include "Emu/RSX/Common/io_buffer.h" //using enum rsx::format_class; using namespace ::rsx::format_class_; @@ -58,7 +59,7 @@ namespace gl GLuint num_layers; }; - class texture + class texture : public named_object { friend class texture_view; @@ -180,7 +181,6 @@ namespace gl }; protected: - GLuint m_id = GL_NONE; GLuint m_width = 0; GLuint m_height = 0; GLuint m_depth = 0; @@ -321,39 +321,43 @@ namespace gl } // Data management - void copy_from(const void* src, texture::format format, texture::type type, int level, const coord3u region, const pixel_unpack_settings& pixel_settings); + void copy_from(const rsx::io_buffer& src, texture::format format, texture::type type, int level, const coord3u region, const pixel_unpack_settings& pixel_settings); - void copy_from(buffer& buf, u32 gl_format_type, u32 offset, u32 length); + void copy_from(buffer& buf, GLsizeiptr offset, texture::format format, texture::type type, int level, const coord3u region, const pixel_unpack_settings& pixel_settings); void copy_from(buffer_view& view); - void copy_to(void* dst, texture::format format, texture::type type, int level, const coord3u& region, const pixel_pack_settings& pixel_settings) const; + void copy_to(const rsx::io_buffer& dst, texture::format format, texture::type type, int level, const coord3u& region, const pixel_pack_settings& pixel_settings) const; + + void copy_to(buffer& buf, GLsizeiptr offset, texture::format format, texture::type type, int level, const coord3u& region, const pixel_pack_settings& pixel_settings) const; // Convenience wrappers - void copy_from(const void* src, texture::format format, texture::type type, const pixel_unpack_settings& pixel_settings) + void copy_from(const rsx::io_buffer& src, texture::format format, texture::type type, const pixel_unpack_settings& pixel_settings) { const coord3u region = { {}, size3D() }; copy_from(src, format, type, 0, region, pixel_settings); } - void copy_to(void* dst, texture::format format, texture::type type, const pixel_pack_settings& pixel_settings) const + void copy_to(const rsx::io_buffer& dst, texture::format format, texture::type type, const pixel_pack_settings& pixel_settings) const { const coord3u region = { {}, size3D() }; copy_to(dst, format, type, 0, region, pixel_settings); } }; - class texture_view + class texture_view : public named_object { protected: - GLuint m_id = GL_NONE; GLenum m_target = 0; GLenum m_format = 0; GLenum m_view_format = 0; GLenum m_aspect_flags = 0; texture* m_image_data = nullptr; - GLenum component_swizzle[4] {}; + GLenum component_swizzle[4]{}; + + std::unordered_map> m_subviews; + texture_view* m_root_view = nullptr; texture_view() = default; @@ -395,6 +399,8 @@ namespace gl virtual ~texture_view(); + texture_view* as(GLenum format); + GLuint id() const { return m_id; @@ -457,6 +463,7 @@ namespace gl class viewable_image : public texture { + protected: std::unordered_map> views; public: diff --git a/rpcs3/Emu/RSX/GL/glutils/program.h b/rpcs3/Emu/RSX/GL/glutils/program.h index 72daef2523..5caca0ed98 100644 --- a/rpcs3/Emu/RSX/GL/glutils/program.h +++ b/rpcs3/Emu/RSX/GL/glutils/program.h @@ -14,7 +14,7 @@ namespace gl class shader { std::string source; - ::glsl::program_domain type; + ::glsl::program_domain type {}; GLuint m_id = GL_NONE; fence m_compiled_fence; diff --git a/rpcs3/Emu/RSX/GL/glutils/sampler.cpp b/rpcs3/Emu/RSX/GL/glutils/sampler.cpp index 580caf0dc2..4b1b603fc6 100644 --- a/rpcs3/Emu/RSX/GL/glutils/sampler.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/sampler.cpp @@ -72,7 +72,7 @@ namespace gl } // Apply sampler state settings - void sampler_state::apply(const rsx::fragment_texture& tex, const rsx::sampled_image_descriptor_base* sampled_image) + void sampler_state::apply(const rsx::fragment_texture& tex, const rsx::sampled_image_descriptor_base* sampled_image, bool allow_mipmaps) { set_parameteri(GL_TEXTURE_WRAP_S, wrap_mode(tex.wrap_s())); set_parameteri(GL_TEXTURE_WRAP_T, wrap_mode(tex.wrap_t())); @@ -82,17 +82,39 @@ namespace gl { // NOTE: In OpenGL, the border texels are processed by the pipeline and will be swizzled by the texture view. // Therefore, we pass the raw value here, and the texture view will handle the rest for us. - const auto encoded_color = tex.border_color(); - if (get_parameteri(GL_TEXTURE_BORDER_COLOR) != encoded_color) + const bool sext_conv_required = (sampled_image->format_ex.texel_remap_control & rsx::SEXT_MASK) != 0; + const auto encoded_color = tex.border_color(sext_conv_required); + const auto host_features = sampled_image->format_ex.host_features; + + if (get_parameteri(GL_TEXTURE_BORDER_COLOR) != encoded_color || + get_parameteri(GL_TEXTURE_BORDER_VALUES_NV) != host_features) { m_propertiesi[GL_TEXTURE_BORDER_COLOR] = encoded_color; - const auto border_color = rsx::decode_border_color(encoded_color); + m_propertiesi[GL_TEXTURE_BORDER_VALUES_NV] = host_features; + + auto border_color = rsx::decode_border_color(encoded_color); + if (sampled_image->format_ex.host_snorm_format_active()) [[ unlikely ]] + { + // Hardware SNORM is active + // Convert the border color in host space (2N - 1) + // HW does the conversion in integer space as (x - 128) / 127 which introduces a biasing error. + const float bias_v = 128.f / 255.f; + const float scale_v = 255.f / 127.f; + + color4f scale{ 1.f }, bias{ 0.f }; + const auto snorm_mask = tex.argb_signed(); + if (snorm_mask & 1) { scale.a = scale_v; bias.a = -bias_v; } + if (snorm_mask & 2) { scale.r = scale_v; bias.r = -bias_v; } + if (snorm_mask & 4) { scale.g = scale_v; bias.g = -bias_v; } + if (snorm_mask & 8) { scale.b = scale_v; bias.b = -bias_v; } + border_color = (border_color + bias) * scale; + } + glSamplerParameterfv(sampler_handle, GL_TEXTURE_BORDER_COLOR, border_color.rgba); } } - if (sampled_image->upload_context != rsx::texture_upload_context::shader_read || - tex.get_exact_mipmap_count() == 1) + if (!allow_mipmaps || tex.get_exact_mipmap_count() == 1) { GLint min_filter = tex_min_filter(tex.min_filter()); diff --git a/rpcs3/Emu/RSX/GL/glutils/sampler.h b/rpcs3/Emu/RSX/GL/glutils/sampler.h index 89200915f8..8e8482f196 100644 --- a/rpcs3/Emu/RSX/GL/glutils/sampler.h +++ b/rpcs3/Emu/RSX/GL/glutils/sampler.h @@ -75,7 +75,7 @@ namespace gl return (prop == m_propertiesf.end()) ? 0 : prop->second; } - void apply(const rsx::fragment_texture& tex, const rsx::sampled_image_descriptor_base* sampled_image); + void apply(const rsx::fragment_texture& tex, const rsx::sampled_image_descriptor_base* sampled_image, bool allow_mipmaps = true); void apply(const rsx::vertex_texture& tex, const rsx::sampled_image_descriptor_base* sampled_image); void apply_defaults(GLenum default_filter = GL_NEAREST); diff --git a/rpcs3/Emu/RSX/GL/glutils/state_tracker.hpp b/rpcs3/Emu/RSX/GL/glutils/state_tracker.hpp index 9835a5891f..694ed28cac 100644 --- a/rpcs3/Emu/RSX/GL/glutils/state_tracker.hpp +++ b/rpcs3/Emu/RSX/GL/glutils/state_tracker.hpp @@ -376,15 +376,12 @@ namespace gl GLuint get_bound_texture(GLuint layer, GLenum target) { - ensure(layer < 48); - return bound_textures[layer][target]; + return ::at32(bound_textures, layer)[target]; } void bind_texture(GLuint layer, GLenum target, GLuint name, GLboolean force = GL_FALSE) { - ensure(layer < 48); - - auto& bound = bound_textures[layer][target]; + auto& bound = ::at32(bound_textures, layer)[target]; if (bound != name || force) { glActiveTexture(GL_TEXTURE0 + layer); diff --git a/rpcs3/Emu/RSX/GL/upscalers/fsr1/fsr_pass.cpp b/rpcs3/Emu/RSX/GL/upscalers/fsr1/fsr_pass.cpp index cfd7b1cc08..75e2d3f3db 100644 --- a/rpcs3/Emu/RSX/GL/upscalers/fsr1/fsr_pass.cpp +++ b/rpcs3/Emu/RSX/GL/upscalers/fsr1/fsr_pass.cpp @@ -152,7 +152,7 @@ namespace gl void rcas_pass::configure() { // 0 is actually the sharpest with 2 being the chosen limit. Each progressive unit 'halves' the sharpening intensity. - auto cas_attenuation = 2.f - (g_cfg.video.vk.rcas_sharpening_intensity / 50.f); + auto cas_attenuation = 2.f - (g_cfg.video.rcas_sharpening_intensity / 50.f); FsrRcasCon(&m_constants_buf[0], cas_attenuation); } } diff --git a/rpcs3/Emu/RSX/GSRender.cpp b/rpcs3/Emu/RSX/GSRender.cpp index e9e859952e..f09f4704da 100644 --- a/rpcs3/Emu/RSX/GSRender.cpp +++ b/rpcs3/Emu/RSX/GSRender.cpp @@ -13,6 +13,8 @@ GSRender::GSRender(utils::serial* ar) noexcept : rsx::thread(ar) { m_frame = nullptr; } + + m_vsync_mode = g_cfg.video.vsync; } GSRender::~GSRender() diff --git a/rpcs3/Emu/RSX/GSRender.h b/rpcs3/Emu/RSX/GSRender.h index d2a6fd9c5f..f597b5562b 100644 --- a/rpcs3/Emu/RSX/GSRender.h +++ b/rpcs3/Emu/RSX/GSRender.h @@ -23,6 +23,8 @@ protected: draw_context_t m_context = nullptr; bool m_continuous_mode = false; + vsync_mode m_vsync_mode{}; + public: ~GSRender() override; diff --git a/rpcs3/Emu/RSX/NV47/HW/common.cpp b/rpcs3/Emu/RSX/NV47/HW/common.cpp index 45e7b001a1..e66e1703e2 100644 --- a/rpcs3/Emu/RSX/NV47/HW/common.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/common.cpp @@ -58,19 +58,8 @@ namespace rsx u32 get_report_data_impl([[maybe_unused]] rsx::context* ctx, u32 offset) { - u32 location = 0; blit_engine::context_dma report_dma = REGS(ctx)->context_dma_report(); - - switch (report_dma) - { - case blit_engine::context_dma::to_memory_get_report: location = CELL_GCM_CONTEXT_DMA_REPORT_LOCATION_LOCAL; break; - case blit_engine::context_dma::report_location_main: location = CELL_GCM_CONTEXT_DMA_REPORT_LOCATION_MAIN; break; - case blit_engine::context_dma::memory_host_buffer: location = CELL_GCM_CONTEXT_DMA_MEMORY_HOST_BUFFER; break; - default: - return vm::addr_t(0); - } - - return vm::cast(get_address(offset, location)); + return vm::cast(get_address(offset, static_cast(report_dma))); } void set_fragment_texture_dirty_bit(rsx::context* ctx, u32 arg, u32 index) diff --git a/rpcs3/Emu/RSX/NV47/HW/nv0039.cpp b/rpcs3/Emu/RSX/NV47/HW/nv0039.cpp index fcd30c45f8..d929caa488 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv0039.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv0039.cpp @@ -14,7 +14,7 @@ namespace rsx namespace nv0039 { // Transfer with stride - inline void block2d_copy_with_stride(u8* dst, const u8* src, u32 width, u32 height, u32 src_pitch, u32 dst_pitch, u8 src_stride, u8 dst_stride) + inline void block2d_copy_with_stride(u8* dst, const u8* src, u32 width, u32 height, s32 src_pitch, s32 dst_pitch, u8 src_stride, u8 dst_stride) { for (u32 row = 0; row < height; ++row) { @@ -33,7 +33,7 @@ namespace rsx } } - inline void block2d_copy(u8* dst, const u8* src, u32 width, u32 height, u32 src_pitch, u32 dst_pitch) + inline void block2d_copy(u8* dst, const u8* src, u32 width, u32 height, s32 src_pitch, s32 dst_pitch) { for (u32 i = 0; i < height; ++i) { diff --git a/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp b/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp index 666b4ef53a..6ac502b462 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp @@ -4,6 +4,7 @@ #include "Emu/RSX/RSXThread.h" #include "Emu/RSX/Core/RSXReservationLock.hpp" #include "Emu/RSX/Common/tiled_dma_copy.hpp" +#include "Emu/RSX/Host/MM.h" #include "context_accessors.define.h" @@ -187,19 +188,26 @@ namespace rsx const u32 in_offset = in_x * in_bpp + in_pitch * in_y; const u32 out_offset = out_x * out_bpp + out_pitch * out_y; - const u32 src_line_length = (in_w * in_bpp); + const u32 src_line_length = (std::min(in_w, in_x + static_cast(std::ceil(clip_w / scale_x))) * in_bpp); u32 src_address = 0; const u32 dst_address = get_address(dst_offset, dst_dma, 1); // TODO: Add size + if (!dst_address) + { + rsx_log.error("NV3089_IMAGE_IN_SIZE: Unmapped dst_address (dst_offset=0x%x, dst_dma=0x%dx)", dst_offset, dst_dma); + RSX(ctx)->recover_fifo(); + return { false, src_info, dst_info }; + } + if (is_block_transfer && (clip_h == 1 || (in_pitch == out_pitch && src_line_length == in_pitch))) { const u32 nb_lines = std::min(clip_h, in_h); const u32 data_length = nb_lines * src_line_length; - if (src_address = get_address(src_offset, src_dma, data_length); - !src_address || !dst_address) + if (src_address = get_address(src_offset, src_dma, data_length); !src_address) { + rsx_log.error("NV3089_IMAGE_IN_SIZE: Unmapped src_address for in block transfer (src_offset=0x%x, src_dma=0x%x, data_length=0x%x)", src_offset, src_dma, data_length); RSX(ctx)->recover_fifo(); return { false, src_info, dst_info }; } @@ -221,9 +229,9 @@ namespace rsx const u16 read_h = std::min(static_cast(clip_h / scale_y), in_h); const u32 data_length = in_pitch * (read_h - 1) + src_line_length; - if (src_address = get_address(src_offset, src_dma, data_length); - !src_address || !dst_address) + if (src_address = get_address(src_offset, src_dma, data_length); !src_address) { + rsx_log.error("NV3089_IMAGE_IN_SIZE: Unmapped src_address (src_offset=0x%x, src_dma=0x%x, data_length=0x%x)", src_offset, src_dma, data_length); RSX(ctx)->recover_fifo(); return { false, src_info, dst_info }; } @@ -574,9 +582,11 @@ namespace rsx const u16 out_h = REGS(ctx)->blit_engine_output_height(); // Lock here. RSX cannot execute any locking operations from this point, including ZCULL read barriers + const u32 read_length = src.pitch * src.height; + const u32 write_length = dst.pitch * dst.clip_height; auto res = ::rsx::reservation_lock( - dst.rsx_address, dst.pitch * dst.clip_height, - src.rsx_address, src.pitch * src.height); + dst.rsx_address, write_length, + src.rsx_address, read_length); if (!g_cfg.video.force_cpu_blit_processing && (dst.dma == CELL_GCM_CONTEXT_DMA_MEMORY_FRAME_BUFFER || src.dma == CELL_GCM_CONTEXT_DMA_MEMORY_FRAME_BUFFER) && @@ -586,6 +596,14 @@ namespace rsx return; } + // Conservative MM flush + rsx::simple_array flush_mm_ranges = + { + utils::address_range64::start_length(reinterpret_cast(dst.pixels), write_length), + utils::address_range64::start_length(reinterpret_cast(src.pixels), read_length) + }; + rsx::mm_flush(flush_mm_ranges); + std::vector mirror_tmp; bool src_is_temp = false; @@ -612,7 +630,7 @@ namespace rsx const bool interpolate = in_inter == blit_engine::transfer_interpolator::foh; auto real_dst = dst.pixels; - const auto tiled_region = RSX(ctx)->get_tiled_memory_region(utils::address_range32::start_length(dst.rsx_address, dst.pitch * dst.clip_height)); + const auto tiled_region = RSX(ctx)->get_tiled_memory_region(utils::address_range32::start_length(dst.rsx_address, write_length)); std::vector tmp; if (tiled_region) diff --git a/rpcs3/Emu/RSX/NV47/HW/nv308a.cpp b/rpcs3/Emu/RSX/NV47/HW/nv308a.cpp index 163ddb9a4c..ab811eb2b9 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv308a.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv308a.cpp @@ -89,27 +89,25 @@ namespace rsx rsx::reservation_lock rsx_lock(dst_address, data_length); if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]] - { - // Move last 32 bits - reinterpret_cast(dst)[0] = reinterpret_cast(src)[count - 1]; - RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 4); - } - else { - if (dst_dma & CELL_GCM_LOCATION_MAIN) - { - // May overlap - std::memmove(dst, src, data_length); - } - else - { - // Never overlaps - std::memcpy(dst, src, data_length); - } - - RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 4); + // Move last 32 bits + reinterpret_cast(dst)[0] = reinterpret_cast(src)[count - 1]; + RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 4); + return; } + if (dst_dma & CELL_GCM_LOCATION_MAIN) + { + // May overlap + std::memmove(dst, src, data_length); + } + else + { + // Never overlaps + std::memcpy(dst, src, data_length); + } + + RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 4); break; } case blit_engine::transfer_destination_format::r5g6b5: @@ -129,33 +127,33 @@ namespace rsx rsx::reservation_lock rsx_lock(dst_address, data_length); auto convert = [](u32 input) -> u16 - { - // Input is considered to be ARGB8 - u32 r = (input >> 16) & 0xFF; - u32 g = (input >> 8) & 0xFF; - u32 b = input & 0xFF; + { + // Input is considered to be ARGB8 + u32 r = (input >> 16) & 0xFF; + u32 g = (input >> 8) & 0xFF; + u32 b = input & 0xFF; - r = (r * 32) / 255; - g = (g * 64) / 255; - b = (b * 32) / 255; - return static_cast((r << 11) | (g << 5) | b); - }; + r = (r * 32) / 255; + g = (g * 64) / 255; + b = (b * 32) / 255; + return static_cast((r << 11) | (g << 5) | b); + }; if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]] - { - // Move last 16 bits - dst[0] = convert(src[count - 1]); - RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 2); - break; - } - - for (u32 i = 0; i < count; i++) - { - dst[i] = convert(src[i]); - } - - RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 2); + { + // Move last 16 bits + dst[0] = convert(src[count - 1]); + RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 2); break; + } + + for (u32 i = 0; i < count; i++) + { + dst[i] = convert(src[i]); + } + + RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 2); + break; } default: { diff --git a/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp b/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp index cbb04d140a..4307cc8289 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp @@ -86,7 +86,7 @@ namespace rsx RSX(ctx)->performance_counters.idle_time += (get_system_time() - start); } - void semaphore_release(context* ctx, u32 /*reg*/, u32 arg) + void semaphore_release(context* ctx, u32 reg, u32 arg) { const u32 offset = REGS(ctx)->semaphore_offset_406e(); @@ -122,7 +122,7 @@ namespace rsx arg = 1; } - util::write_gcm_label(ctx, addr, arg); + util::write_gcm_label(ctx, reg, addr, arg); } } } diff --git a/rpcs3/Emu/RSX/NV47/HW/nv4097.cpp b/rpcs3/Emu/RSX/NV47/HW/nv4097.cpp index d0298cf359..3cc40efed1 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv4097.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv4097.cpp @@ -250,8 +250,12 @@ namespace rsx const auto current = REGS(ctx)->decode(arg); const auto previous = REGS(ctx)->decode(REGS(ctx)->latch); - if (*current.antialias() != *previous.antialias() || // Antialias control has changed, update ROP parameters - current.is_integer_color_format() != previous.is_integer_color_format()) // The type of color format also requires ROP control update + if (current.is_integer_color_format() != previous.is_integer_color_format()) // Different ROP emulation + { + RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_state_dirty; + } + + if (*current.antialias() != *previous.antialias()) // Antialias control has changed, update ROP parameters { RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_state_dirty; } @@ -302,6 +306,34 @@ namespace rsx REGS(ctx)->decode(reg, REGS(ctx)->latch); } + void set_aa_control(context* ctx, u32 /*reg*/, u32 arg) + { + const auto latch = REGS(ctx)->latch; + if (arg == latch) + { + return; + } + + // Reconfigure pipeline. + RSX(ctx)->m_graphics_state |= rsx::pipeline_config_dirty; + + // If we support A2C in hardware, leave the rest upto the hardware. The pipeline config should take care of it. + const auto& backend_config = RSX(ctx)->get_backend_config(); + if (backend_config.supports_hw_a2c && + backend_config.supports_hw_a2c_1spp) + { + return; + } + + // No A2C hardware support or partial hardware support. Invalidate the current program if A2C state changed. + const auto a2c_old = REGS(ctx)->decode(latch).msaa_alpha_to_coverage(); + const auto a2c_new = REGS(ctx)->decode(arg).msaa_alpha_to_coverage(); + if (a2c_old != a2c_new) + { + RSX(ctx)->m_graphics_state |= rsx::fragment_program_state_dirty; + } + } + ///// Draw call setup (vertex, etc) void set_array_element16(context* ctx, u32, u32 arg) @@ -601,9 +633,17 @@ namespace rsx case 2: break; default: - rsx_log.error("Unknown render mode %d", mode); + { + struct logged_t + { + atomic_t logged_cause[256]{}; + }; + + const auto& is_error = ::at32(g_fxo->get().logged_cause, mode).try_inc(10); + (is_error ? rsx_log.error : rsx_log.trace)("Unknown render mode %d", mode); return; } + } const u32 offset = arg & 0xffffff; auto address_ptr = util::get_report_data_impl(ctx, offset); @@ -658,7 +698,7 @@ namespace rsx }); } - void texture_read_semaphore_release(context* ctx, u32 /*reg*/, u32 arg) + void texture_read_semaphore_release(context* ctx, u32 reg, u32 arg) { // Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier. // Ideally the GPU only needs to have cached all textures declared up to this point before writing the label. @@ -683,15 +723,15 @@ namespace rsx if (g_cfg.video.strict_rendering_mode) [[ unlikely ]] { - util::write_gcm_label(ctx, addr, arg); + util::write_gcm_label(ctx, reg, addr, arg); } else { - util::write_gcm_label(ctx, addr, arg); + util::write_gcm_label(ctx, reg, addr, arg); } } - void back_end_write_semaphore_release(context* ctx, u32 /*reg*/, u32 arg) + void back_end_write_semaphore_release(context* ctx, u32 reg, u32 arg) { // Full pipeline barrier. GPU must flush pipeline before writing the label @@ -712,7 +752,7 @@ namespace rsx } const u32 val = (arg & 0xff00ff00) | ((arg & 0xff) << 16) | ((arg >> 16) & 0xff); - util::write_gcm_label(ctx, addr, val); + util::write_gcm_label(ctx, reg, addr, val); } void sync(context* ctx, u32, u32) diff --git a/rpcs3/Emu/RSX/NV47/HW/nv4097.h b/rpcs3/Emu/RSX/NV47/HW/nv4097.h index db736396b9..a5a434e47d 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv4097.h +++ b/rpcs3/Emu/RSX/NV47/HW/nv4097.h @@ -87,6 +87,8 @@ namespace rsx void set_transform_constant_load(context* ctx, u32 reg, u32 arg); + void set_aa_control(context* ctx, u32 reg, u32 arg); + #define RSX(ctx) ctx->rsxthr #define REGS(ctx) (&rsx::method_registers) diff --git a/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp b/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp index 9f39f84c00..fe2522c31c 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp @@ -13,13 +13,13 @@ namespace rsx namespace util { template - static void write_gcm_label(context* ctx, u32 address, u32 data) + static void write_gcm_label(context* ctx, u32 type, u32 address, u32 data) { const bool is_flip_sema = (address == (RSX(ctx)->label_addr + 0x10) || address == (RSX(ctx)->device_addr + 0x30)); if (!is_flip_sema) { // First, queue the GPU work. If it flushes the queue for us, the following routines will be faster. - const bool handled = RSX(ctx)->get_backend_config().supports_host_gpu_labels && RSX(ctx)->release_GCM_label(address, data); + const bool handled = RSX(ctx)->get_backend_config().supports_host_gpu_labels && RSX(ctx)->release_GCM_label(type, address, data); if (vm::_ref(address) == data) { diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_icons.cpp b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_icons.cpp new file mode 100644 index 0000000000..4ef9dbea9a --- /dev/null +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_icons.cpp @@ -0,0 +1,83 @@ +#include "stdafx.h" +#include "overlay_home_icons.h" + +#include "Emu/RSX/Overlays/overlay_controls.h" + +#include + +namespace rsx::overlays::home_menu +{ + std::unordered_map> g_icons_cache; + std::mutex g_icons_cache_lock; + + static const char* fa_icon_to_filename(fa_icon icon) + { + switch (icon) + { + default: + case fa_icon::none: + return ""; + case fa_icon::home: + return "home.png"; + case fa_icon::settings: + return "settings.png"; + case fa_icon::back: + return "circle-left-solid.png"; + case fa_icon::floppy: + return "floppy-disk-solid.png"; + case fa_icon::maximize: + return "maximize-solid.png"; + case fa_icon::play: + return "play-button-arrowhead.png"; + case fa_icon::poweroff: + return "power-off-solid.png"; + case fa_icon::restart: + return "rotate-left-solid.png"; + case fa_icon::screenshot: + return "screenshot.png"; + case fa_icon::video_camera: + return "video-camera.png"; + case fa_icon::friends: + return "user-group-solid.png"; + case fa_icon::trophy: + return "trophy-solid.png"; + case fa_icon::audio: + return "headphones-solid.png"; + case fa_icon::video: + return "display-solid.png"; + case fa_icon::gamepad: + return "gamepad-solid.png"; + case fa_icon::settings_sliders: + return "sliders-solid.png"; + case fa_icon::settings_gauge: + return "gauge-solid.png"; + case fa_icon::bug: + return "bug-solid.png"; + } + } + + void load_icon(fa_icon icon) + { + const std::string image_path = fmt::format("home/32/%s", fa_icon_to_filename(icon)); + g_icons_cache[icon] = rsx::overlays::resource_config::load_icon(image_path); + } + + const image_info* get_icon(fa_icon icon) + { + if (icon == fa_icon::none) + { + return nullptr; + } + + std::lock_guard lock(g_icons_cache_lock); + + auto found = g_icons_cache.find(icon); + if (found != g_icons_cache.end()) + { + return found->second.get(); + } + + load_icon(icon); + return g_icons_cache.at(icon).get(); + } +} diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_icons.h b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_icons.h new file mode 100644 index 0000000000..4b05b852e1 --- /dev/null +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_icons.h @@ -0,0 +1,32 @@ +#pragma once + +#include "Emu/RSX/Overlays/overlays.h" +#include "Emu/RSX/Overlays/overlay_controls.h" + +namespace rsx::overlays::home_menu +{ + enum class fa_icon + { + none = 0, + home, + settings, + back, + floppy, + maximize, + play, + poweroff, + restart, + screenshot, + video_camera, + trophy, + friends, + audio, + video, + gamepad, + settings_sliders, + settings_gauge, + bug, + }; + + const image_info* get_icon(fa_icon icon); +} diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp index 497ce12031..1dadaa5e7d 100644 --- a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp @@ -21,7 +21,7 @@ namespace rsx m_allow_input_on_pause = true; m_dim_background.set_size(virtual_width, virtual_height); - m_dim_background.back_color.a = 0.5f; + m_dim_background.back_color.a = 0.85f; m_description.set_font("Arial", 20); m_description.set_pos(20, 37); @@ -56,6 +56,8 @@ namespace rsx m_time_display.auto_resize(); last_time = std::move(new_time); } + + m_main_menu.update(timestamp_us); } void home_menu_dialog::on_button_pressed(pad_button button_press, bool is_auto_repeat) @@ -88,6 +90,11 @@ namespace rsx std::string path = page->title; for (home_menu_page* parent = page->parent; parent; parent = parent->parent) { + if (parent->title.empty()) + { + break; + } + path = parent->title + " > " + path; } m_description.set_text(path); diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_components.cpp b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_components.cpp index d0ed9dc460..94e70f4c63 100644 --- a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_components.cpp +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_components.cpp @@ -5,61 +5,106 @@ namespace rsx { namespace overlays { - home_menu_entry::home_menu_entry(const std::string& text) + home_menu_entry::home_menu_entry(home_menu::fa_icon icon, const std::string& text, u16 width, text_align alignment) { - std::unique_ptr text_stack = std::make_unique(); - std::unique_ptr padding = std::make_unique(); - std::unique_ptr title = std::make_unique