Diff

Differences From Artifact [5999de848a]:

To Artifact [2732a78124]:


234
235
236
237
238
239
240
241

242
243
244
245
246
247
248
234
235
236
237
238
239
240

241
242
243
244
245
246
247
248







-
+







		cat << \_EOF_ > "${instdir}/include/PCSC/pcsc-nacl.h"
#ifndef PCSC_NACL_H
#define PCSC_NACL_H 1
#ifdef __cplusplus
#include <ppapi/cpp/core.h>
#include <ppapi/cpp/instance.h>

void pcscNaClInit(pp::Instance *instance, pp::Core *core);
void pcscNaClInit(pp::Instance *instance, pp::Core *core, const char *smartcardManagerAppId, const char *clientId);
bool pcscNaClHandleMessage(const pp::Var &message);

#endif
#endif
_EOF_

		# Copy out JavaScript files for later use
308
309
310
311
312
313
314
315

316
317








318
319
320
321
322
323

324
325
326
327
328
329
330
308
309
310
311
312
313
314

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
338







-
+


+
+
+
+
+
+
+
+





-
+








#include "pcsc_nacl_global.h"
#include "dom_requests_manager.h"
#include "pcsc_nacl.h"

static DomRequestsManager *pcscNaClDRM = NULL;

void pcscNaClInit(pp::Instance *instance, pp::Core *core) {
void pcscNaClInit(pp::Instance *instance, pp::Core *core, const char *smartcardManagerAppId, const char *clientId) {
	DomRequestsManager::PpDelegateImpl *drmDelegateImpl;
	PcscNacl *pcsc_nacl;

	if (smartcardManagerAppId == NULL) {
		smartcardManagerAppId = "khpfeaanjngmcnplbdlpegiifgpfgdco";
	}

	if (clientId == NULL) {
		clientId = "UNKNOWN";
	}

	drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);

	pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);

	pcsc_nacl = new PcscNacl(pcscNaClDRM, "khpfeaanjngmcnplbdlpegiifgpfgdco", "CACKey");
	pcsc_nacl = new PcscNacl(pcscNaClDRM, smartcardManagerAppId, clientId);

	if (!pcsc_nacl->Initialize()) {
		return;
	}

	SetPcscNaclGlobalInstance(pcsc_nacl);