41 lines
706 B
C++
41 lines
706 B
C++
|
|
#ifndef __CARDOBJECT_H__
|
|
#define __CARDOBJECT_H__
|
|
|
|
#include <actBlob.h>
|
|
|
|
class SlotList;
|
|
|
|
namespace act
|
|
{
|
|
class IToken;
|
|
class ITokenKey;
|
|
}
|
|
|
|
/*
|
|
* Provides the search functionality over slots and keys
|
|
*/
|
|
class CardObject
|
|
{
|
|
public:
|
|
|
|
CardObject(SlotList *sl);
|
|
~CardObject();
|
|
|
|
// act::PRIVATEKEY, act::PUBLICKEY or act::CERTIFICATE
|
|
bool searchFor(int searchType, const char *s_key_id);
|
|
|
|
inline act::ITokenKey* getKey() const { return m_found_key; }
|
|
inline const act::Blob& getCertBlob() const { return m_found_certificate; }
|
|
|
|
private:
|
|
int m_search_type;
|
|
act::IToken* m_selected_token;
|
|
act::ITokenKey* m_found_key;
|
|
act::Blob m_found_certificate;
|
|
SlotList* m_slot_list;
|
|
};
|
|
|
|
#endif
|
|
|