Mercurial > core / lisp/lib/packy/proto.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
ea4f008ad13f
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 (in-package :packy/core) 3 (defclass package-id (id) 4 ((id :initform (make-array 16 :element-type 'octet) :initarg :id :type (octet-vector 16) :accessor id))) 6 (defmethod make-id ((kind (eql :package))) 7 (make-instance 'package-id)) 9 (defmethod make-random-id ((kind (eql :package))) 11 (dotimes (i 16) (push (random 255) l)) 12 (let ((v (make-array 16 :element-type 'octet 13 :initial-contents l))) 14 (make-instance 'package-id :id v)))) 16 (defmethod print-object ((self package-id) stream) 17 (print-unreadable-object (self stream) 18 (format stream "~A" (octet-vector-to-hex-string (id self))))) 20 (defclass abstract-package () ()) 22 (defgeneric pack (self &key &allow-other-keys)) 23 (defgeneric unpack (self &key &allow-other-keys)) 24 (defgeneric install-package (self &key &allow-other-keys)) 25 (defgeneric uninstall-package (self &key &allow-other-keys)) 26 (defgeneric update-package (self &key &allow-other-keys)) 27 (defgeneric push-package (self &key &allow-other-keys)) 28 (defgeneric pull-package (self &key &allow-other-keys)) 29 (defgeneric query-package (self &key &allow-other-keys)) 30 (defgeneric sync-package (self &key &allow-other-keys)) 31 (defgeneric build-package (self &key &allow-other-keys)) 32 (defgeneric prepare-package (self &key &allow-other-keys)) 33 (defgeneric check-package (self &key &allow-other-keys)) 34 (defgeneric package-version (self &key &allow-other-keys))