//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef PProfiler_h
#define PProfiler_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"
#include "mozilla/ProfilerTypes.h"

namespace mozilla {
class PProfilerParent;
} // namespace mozilla
namespace mozilla {
class PProfilerChild;
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PProfilerChild and PProfilerParent
//
namespace mozilla {
namespace PProfiler {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::PProfilerParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PProfilerChild>* aChild);

nsresult
CreateEndpoints(
        mozilla::ipc::Endpoint<::mozilla::PProfilerParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PProfilerChild>* aChild);

enum MessageType {
    PProfilerStart = PProfilerMsgStart << 16,
    Msg_Start__ID,
    Reply_Start__ID,
    Msg_EnsureStarted__ID,
    Reply_EnsureStarted__ID,
    Msg_Stop__ID,
    Reply_Stop__ID,
    Msg_Pause__ID,
    Reply_Pause__ID,
    Msg_Resume__ID,
    Reply_Resume__ID,
    Msg_PauseSampling__ID,
    Reply_PauseSampling__ID,
    Msg_ResumeSampling__ID,
    Reply_ResumeSampling__ID,
    Msg_WaitOnePeriodicSampling__ID,
    Reply_WaitOnePeriodicSampling__ID,
    Msg_AwaitNextChunkManagerUpdate__ID,
    Reply_AwaitNextChunkManagerUpdate__ID,
    Msg_DestroyReleasedChunksAtOrBefore__ID,
    Msg_GatherProfile__ID,
    Reply_GatherProfile__ID,
    Msg_GetGatherProfileProgress__ID,
    Reply_GetGatherProfileProgress__ID,
    Msg_ClearAllPages__ID,
    PProfilerEnd
};

mozilla::UniquePtr<IPC::Message>
Msg_Start(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Start(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_EnsureStarted(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_EnsureStarted(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Stop(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Stop(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Pause(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Pause(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Resume(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Resume(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PauseSampling(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PauseSampling(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ResumeSampling(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_ResumeSampling(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_WaitOnePeriodicSampling(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_WaitOnePeriodicSampling(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_AwaitNextChunkManagerUpdate(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_AwaitNextChunkManagerUpdate(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_DestroyReleasedChunksAtOrBefore(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GatherProfile(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GatherProfile(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetGatherProfileProgress(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetGatherProfileProgress(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ClearAllPages(IPC::Message::routeid_t routingId);



} // namespace PProfiler
} // namespace mozilla

#endif // ifndef PProfiler_h
