"Fossies" - the Fresh Open Source Software Archive

Member "src/Core/Unix/CoreServiceResponse.cpp" (10 Oct 2018, 3524 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "CoreServiceResponse.cpp" see the Fossies "Dox" file reference documentation.

    1 /*
    2  Derived from source code of TrueCrypt 7.1a, which is
    3  Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
    4  by the TrueCrypt License 3.0.
    5 
    6  Modifications and additions to the original source code (contained in this file)
    7  and all other portions of this file are Copyright (c) 2013-2017 IDRIX
    8  and are governed by the Apache License 2.0 the full text of which is
    9  contained in the file License.txt included in VeraCrypt binary and source
   10  code distribution packages.
   11 */
   12 
   13 #include "CoreServiceResponse.h"
   14 #include "Platform/SerializerFactory.h"
   15 
   16 namespace VeraCrypt
   17 {
   18     // CheckFilesystemResponse
   19     void CheckFilesystemResponse::Deserialize (shared_ptr <Stream> stream)
   20     {
   21     }
   22 
   23     void CheckFilesystemResponse::Serialize (shared_ptr <Stream> stream) const
   24     {
   25         Serializable::Serialize (stream);
   26     }
   27 
   28     // DismountFilesystemResponse
   29     void DismountFilesystemResponse::Deserialize (shared_ptr <Stream> stream)
   30     {
   31     }
   32 
   33     void DismountFilesystemResponse::Serialize (shared_ptr <Stream> stream) const
   34     {
   35         Serializable::Serialize (stream);
   36     }
   37 
   38     // DismountVolumeResponse
   39     void DismountVolumeResponse::Deserialize (shared_ptr <Stream> stream)
   40     {
   41         DismountedVolumeInfo = Serializable::DeserializeNew <VolumeInfo> (stream);
   42     }
   43 
   44     void DismountVolumeResponse::Serialize (shared_ptr <Stream> stream) const
   45     {
   46         Serializable::Serialize (stream);
   47         Serializer sr (stream);
   48         DismountedVolumeInfo->Serialize (stream);
   49     }
   50 
   51     // GetDeviceSectorSizeResponse
   52     void GetDeviceSectorSizeResponse::Deserialize (shared_ptr <Stream> stream)
   53     {
   54         Serializer sr (stream);
   55         sr.Deserialize ("Size", Size);
   56     }
   57 
   58     void GetDeviceSectorSizeResponse::Serialize (shared_ptr <Stream> stream) const
   59     {
   60         Serializable::Serialize (stream);
   61         Serializer sr (stream);
   62         sr.Serialize ("Size", Size);
   63     }
   64 
   65     // GetDeviceSizeResponse
   66     void GetDeviceSizeResponse::Deserialize (shared_ptr <Stream> stream)
   67     {
   68         Serializer sr (stream);
   69         sr.Deserialize ("Size", Size);
   70     }
   71 
   72     void GetDeviceSizeResponse::Serialize (shared_ptr <Stream> stream) const
   73     {
   74         Serializable::Serialize (stream);
   75         Serializer sr (stream);
   76         sr.Serialize ("Size", Size);
   77     }
   78 
   79     // GetHostDevicesResponse
   80     void GetHostDevicesResponse::Deserialize (shared_ptr <Stream> stream)
   81     {
   82         Serializable::DeserializeList (stream, HostDevices);
   83     }
   84 
   85     void GetHostDevicesResponse::Serialize (shared_ptr <Stream> stream) const
   86     {
   87         Serializable::Serialize (stream);
   88         Serializable::SerializeList (stream, HostDevices);
   89     }
   90 
   91     // MountVolumeResponse
   92     void MountVolumeResponse::Deserialize (shared_ptr <Stream> stream)
   93     {
   94         Serializer sr (stream);
   95         MountedVolumeInfo = Serializable::DeserializeNew <VolumeInfo> (stream);
   96     }
   97 
   98     void MountVolumeResponse::Serialize (shared_ptr <Stream> stream) const
   99     {
  100         Serializable::Serialize (stream);
  101         Serializer sr (stream);
  102         MountedVolumeInfo->Serialize (stream);
  103     }
  104 
  105     // SetFileOwnerResponse
  106     void SetFileOwnerResponse::Deserialize (shared_ptr <Stream> stream)
  107     {
  108     }
  109 
  110     void SetFileOwnerResponse::Serialize (shared_ptr <Stream> stream) const
  111     {
  112         Serializable::Serialize (stream);
  113     }
  114 
  115     TC_SERIALIZER_FACTORY_ADD_CLASS (CheckFilesystemResponse);
  116     TC_SERIALIZER_FACTORY_ADD_CLASS (DismountFilesystemResponse);
  117     TC_SERIALIZER_FACTORY_ADD_CLASS (DismountVolumeResponse);
  118     TC_SERIALIZER_FACTORY_ADD_CLASS (GetDeviceSectorSizeResponse);
  119     TC_SERIALIZER_FACTORY_ADD_CLASS (GetDeviceSizeResponse);
  120     TC_SERIALIZER_FACTORY_ADD_CLASS (GetHostDevicesResponse);
  121     TC_SERIALIZER_FACTORY_ADD_CLASS (MountVolumeResponse);
  122     TC_SERIALIZER_FACTORY_ADD_CLASS (SetFileOwnerResponse);
  123 }