
// ---------------------------------------Service.js
SConnect.RegisterNamespace("MyCompany.Server");

MyCompany.Server.Service = function(readerName,portNum,serviceName){
	this.marshaller = new SConnect.Marshaller(readerName,portNum,serviceName,0xE38E8F, 0xBAC2);
}

MyCompany.Server.Service.prototype = {

	getC : function(){
		return this.marshaller.invoke(0, 0xA45D, MARSHALLER_TYPE_RET_STRING);
	},

	getW : function(){
		return this.marshaller.invoke(0, 0x85C2, MARSHALLER_TYPE_RET_S4ARRAY);
	},

	getQ : function(){
		return this.marshaller.invoke(0, 0x3B97, MARSHALLER_TYPE_RET_S4ARRAY);
	},

	getMAP : function(){
		return this.marshaller.invoke(0, 0x349D, MARSHALLER_TYPE_RET_S4);
	},

	getT_r : function(){
		return this.marshaller.invoke(0, 0xED4A, MARSHALLER_TYPE_RET_STRING);
	},

	setEraseTokenList : function(eraseTokenList){
		this.marshaller.invoke(1, 0x8454, MARSHALLER_TYPE_IN_BOOL, eraseTokenList, MARSHALLER_TYPE_RET_VOID);
	},

	getCount : function(){
		return this.marshaller.invoke(0, 0x974D, MARSHALLER_TYPE_RET_S4);
	},

	PutOnCard_token : function(token_a,sig_PA,r){
		this.marshaller.invoke(3, 0x3C92, MARSHALLER_TYPE_IN_STRING, token_a, MARSHALLER_TYPE_IN_STRING, sig_PA, MARSHALLER_TYPE_IN_STRING, r, MARSHALLER_TYPE_RET_VOID);
	},

	PutOnCard_param : function(c,w,q,mAP){
		this.marshaller.invoke(4, 0xB7AE, MARSHALLER_TYPE_IN_STRING, c, MARSHALLER_TYPE_IN_S4ARRAY, w, MARSHALLER_TYPE_IN_S4ARRAY, q, MARSHALLER_TYPE_IN_S4, mAP, MARSHALLER_TYPE_RET_VOID);
	},

	GetFromCard_token : function(){
		return this.marshaller.invoke(0, 0x39A9, MARSHALLER_TYPE_RET_STRING);
	},

	GetFromCard_eResponse : function(randE){
		return this.marshaller.invoke(1, 0xAE4E, MARSHALLER_TYPE_IN_S4ARRAY, randE, MARSHALLER_TYPE_RET_S4ARRAY);
	},

	dispose : function(){
		this.marshaller.dispose();
	}

};
