Program Listing for File apicallcontext.h

Return to documentation for file (include\serialization\apicallcontext.h)

/******************************************************************************
© Intel Corporation.

This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.


 This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.

******************************************************************************/

#pragma once

#include "igpa-config.h"

#include "serialization/token.h"

#include <cstdint>
#include <functional>
#include <limits>

struct GPADispatchTable;

namespace gpa {

namespace capture_support {
class DataManager;
}  // namespace capture_support

namespace stream {
class View;
}  // namespace stream

namespace serialization {

class MemoryBackedSerializer;


enum StreamPacketHeaderVersion : uint32_t {
    VERSION_1,
    VERSION_2,
    VERSION_COUNT,
};

struct StreamPacketHeader
{
    bool operator==(StreamPacketHeader const& other) const;
    bool operator!=(StreamPacketHeader const& other) const;

    bool IsOperation() const;

    GPAToken token{};
    GPATimestamp timestamp{};
    uint64_t version{};
};

using ArgsLenType = uint64_t;

struct StreamPacketHeaderEx : public StreamPacketHeader
{
    ArgsLenType argumentDataLength = 0;
};

extern GPAToken const kInvalidToken;
extern StreamPacketHeader const kInvalidApiCallContext;

}  // namespace serialization

class IStreamPacket
{
public:
    serialization::StreamPacketHeaderEx header = {};
    uint64_t substreamID = 0;
    uint64_t dataOffset = 0;

private:
};

}  // namespace gpa