tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

MLSTransactionMessage.h (2107B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_dom_MLSTransactionMessage_h
      8 #define mozilla_dom_MLSTransactionMessage_h
      9 
     10 #include "ipc/EnumSerializer.h"
     11 #include "ipc/IPCMessageUtils.h"
     12 #include "ipc/IPCMessageUtilsSpecializations.h"
     13 #include "mozilla/security/mls/mls_gk_ffi_generated.h"
     14 #include "nsTArray.h"
     15 
     16 using namespace mozilla::security::mls;
     17 
     18 namespace IPC {
     19 
     20 template <>
     21 struct ParamTraits<mozilla::security::mls::GkReceived::Tag>
     22    : public ContiguousEnumSerializerInclusive<
     23          mozilla::security::mls::GkReceived::Tag,
     24          mozilla::security::mls::GkReceived::Tag::None,
     25          mozilla::security::mls::GkReceived::Tag::CommitOutput> {};
     26 template <>
     27 struct ParamTraits<mozilla::security::mls::GkReceived> {
     28  using paramType = mozilla::security::mls::GkReceived;
     29  static void Write(MessageWriter* aWriter, const paramType& aValue);
     30  static bool Read(MessageReader* aReader, paramType* aResult);
     31 };
     32 
     33 DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkGroupIdEpoch,
     34                                  group_id, group_epoch);
     35 
     36 DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkMlsCommitOutput,
     37                                  commit, welcome, group_info, ratchet_tree,
     38                                  identity);
     39 
     40 DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkClientIdentifiers,
     41                                  identity, credential);
     42 
     43 DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkGroupDetails,
     44                                  group_id, group_epoch, group_members);
     45 
     46 DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkExporterOutput,
     47                                  group_id, group_epoch, label, context,
     48                                  exporter);
     49 
     50 };  // namespace IPC
     51 
     52 #endif  // mozilla_dom_MLSTransactionMessage_h