PageRenderTime 1178ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/eidpt/Pin.cpp

#
C++ | 40 lines | 17 code | 3 blank | 20 comment | 0 complexity | 4fac8cb7f6e4c557f7ad5110e60a8a75 MD5 | raw file
Possible License(s): LGPL-3.0
  1. /*
  2. * Portuguese eID Card API .NET Wrapper
  3. *
  4. * Written by Fernando Nunes (fernando.nunes@devscope.net)
  5. * Copyright (c) 2009 DevScope Information Systems
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  20. */
  21. #pragma once
  22. #include "Stdafx.h"
  23. #include "Pin.h"
  24. #include "Interop.h"
  25. using namespace System;
  26. using namespace DevScope::CartaoDeCidadao;
  27. Pin::Pin(const PTEID_Pin& i)
  28. {
  29. this->Id = i.id;
  30. this->Type = (PinType)i.pinType;
  31. this->Usage = (PinUsage)i.usageCode;
  32. this->TriesLeft = i.triesLeft;
  33. this->Flags = i.flags;
  34. this->Label = Interop::CStrToNetStr((char*)i.label);
  35. this->ShortUsage = Interop::CStrToNetStr(i.shortUsage);
  36. this->LongUsage = Interop::CStrToNetStr(i.longUsage);
  37. }