snappymail/dev/Model/OpenPgpKey.js

50 lines
1.1 KiB
JavaScript
Raw Normal View History

2014-09-05 06:49:03 +08:00
(function () {
2014-08-20 23:03:12 +08:00
2014-08-25 23:49:01 +08:00
'use strict';
2014-08-20 23:03:12 +08:00
var
2014-10-04 19:58:01 +08:00
_ = require('_'),
ko = require('ko'),
AbstractModel = require('Knoin/AbstractModel')
2014-08-20 23:03:12 +08:00
;
/**
* @param {string} iIndex
* @param {string} sGuID
* @param {string} sID
* @param {string} sUserID
* @param {string} sEmail
* @param {boolean} bIsPrivate
* @param {string} sArmor
* @constructor
*/
function OpenPgpKeyModel(iIndex, sGuID, sID, sUserID, sEmail, bIsPrivate, sArmor)
{
2014-10-04 19:58:01 +08:00
AbstractModel.call(this, 'OpenPgpKeyModel');
2014-08-20 23:03:12 +08:00
this.index = iIndex;
this.id = sID;
this.guid = sGuID;
this.user = sUserID;
this.email = sEmail;
this.armor = sArmor;
this.isPrivate = !!bIsPrivate;
this.deleteAccess = ko.observable(false);
}
2014-10-04 19:58:01 +08:00
_.extend(OpenPgpKeyModel.prototype, AbstractModel.prototype);
2014-08-20 23:03:12 +08:00
OpenPgpKeyModel.prototype.index = 0;
OpenPgpKeyModel.prototype.id = '';
OpenPgpKeyModel.prototype.guid = '';
OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false;
module.exports = OpenPgpKeyModel;
2014-09-05 06:49:03 +08:00
}());