Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

approx_filter.js 763B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2011 Mark Cavage, Inc. All rights reserved.
  2. var assert = require('assert');
  3. var util = require('util');
  4. var parents = require('ldap-filter');
  5. var Filter = require('./filter');
  6. ///--- API
  7. function ApproximateFilter(options) {
  8. parents.ApproximateFilter.call(this, options);
  9. }
  10. util.inherits(ApproximateFilter, parents.ApproximateFilter);
  11. Filter.mixin(ApproximateFilter);
  12. module.exports = ApproximateFilter;
  13. ApproximateFilter.prototype.parse = function (ber) {
  14. assert.ok(ber);
  15. this.attribute = ber.readString().toLowerCase();
  16. this.value = ber.readString();
  17. return true;
  18. };
  19. ApproximateFilter.prototype._toBer = function (ber) {
  20. assert.ok(ber);
  21. ber.writeString(this.attribute);
  22. ber.writeString(this.value);
  23. return ber;
  24. };