Mailinglist Archive: zypp-devel (227 mails)
| < Previous | Next > |
Re: [zypp-devel] api proposal for locks
- From: Josef Reidinger <jreidinger@xxxxxxx>
- Date: Fri, 04 Apr 2008 09:43:23 +0200
- Message-id: <47F5DC1B.9010200@xxxxxxx>
After some time and comments I make new api which is cleaner and easier
to use (I hope).
void addLock( const PoolQuery& query );
void unlock( const PoolQuery& query );
void loadLocks( const Pathname& file = ZConfig::locksFile() );
void saveLocks( const Pathname& file = ZConfig::locksFile() );
boolean existEmptyLocks();
void removeEmptyLocks();
So It allow add and remove lock (remove lock has new callback for unlocking non identical query). Loading and storing query to/from file. And last two functions is for cleaning locks (after cleaning is good save it :).
Any critique?
Only think which I cannot decide is use callbacks for each lock in removeEmptyLocks (api can have something like yes/no/All/cancel) or clean it by iterator (so get all empty locks and frontend say what they want remove).
Pepa
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
void addLock( const PoolQuery& query );
void unlock( const PoolQuery& query );
void loadLocks( const Pathname& file = ZConfig::locksFile() );
void saveLocks( const Pathname& file = ZConfig::locksFile() );
boolean existEmptyLocks();
void removeEmptyLocks();
So It allow add and remove lock (remove lock has new callback for unlocking non identical query). Loading and storing query to/from file. And last two functions is for cleaning locks (after cleaning is good save it :).
Any critique?
Only think which I cannot decide is use callbacks for each lock in removeEmptyLocks (api can have something like yes/no/All/cancel) or clean it by iterator (so get all empty locks and frontend say what they want remove).
Pepa
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |