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