‡Æ
zUó9c       sŽ     d  Z  ! # d Z % d Z ' d k Z ( d k l Z l Z l Z l Z * d k Z - d f  d „  ƒ  YZ	 Á d e i f d „  ƒ  YZ
 d S(	   sË  Data Store API.

Stores may have the following properties:

  read    - can open existing databases for reading
  write   - can open existing databases for writing
  create  - can create new databases (which are implicitly open for writing)
  delete  - can delete databases
  list    - can list databases and their info
  install - has an install method which should be used when copying into
            this store, instead of using the normal 'copy' method
s2   $Id: Store.py,v 1.10 1999/11/29 06:57:18 rob Exp $s.   Copyright 1999 Rob Tillotson <robt@debian.org>N(   s   Plugins   Databases	   PrefBlocks   _s	   BaseStorec      s4  - . f  Z  / f  Z 1 d „  Z 4 d „  Z 7 d „  Z = d „  Z A d „  Z F d „  Z I d „  Z L d „  Z	 P d	 „  Z
 R d
 „  Z f d e f  d „ Z l d d e f  e e d „ Z u d „  Z y d „  Z } d „  Z  e e e d „ Z … d d „ Z ‰ d d d „ Z Ž d „  Z ‘ d „  Z RS(   Nc    s   1 2 t  |  _ d  S(   N(   s   Nones   selfs   context(   s   selfs=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   __init__1 s   c    s   4 5 | |  _ d  S(   N(   s   cs   selfs   context(   s   selfs   cs=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   set_context4 s   c    sT   7 8 t  |  i d ƒ o |  i i i | ƒ o : |  i i | Sn ; t | ‚ d  S(   Ns   option_values(   s   hasattrs   selfs   contexts   option_valuess   has_keys   ks   AttributeError(   s   selfs   ks=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   __getattr__7 s   ,c    s0   = > t  |  i d ƒ o |  i i i | ƒ Sd  S(   Ns   option_values(   s   hasattrs   selfs   contexts   option_valuess   has_keys   k(   s   selfs   ks=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys
   has_option= s   c    s>   A B t  |  i d ƒ o C |  i i | Sn D t | ‚ d  S(   Ns   option_values(   s   hasattrs   selfs   contexts   option_valuess   ks   KeyError(   s   selfs   ks=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys
   get_optionA s   c    s    F G t  |  i i | | ƒ Sd  S(   N(   s   applys   selfs   contexts
   get_plugins   as   kw(   s   selfs   as   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys
   get_pluginF s   c    s    I J t  |  i i | | ƒ Sd  S(   N(   s   applys   selfs   contexts   list_pluginss   as   kw(   s   selfs   as   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   list_pluginsI s   c    s    L M t  |  i i | | ƒ Sd  S(   N(   s   applys   selfs   contexts   list_plugin_infos   as   kw(   s   selfs   as   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   list_plugin_infoL s   c    s   P P | |  i j Sd  S(   N(   s   ps   selfs
   properties(   s   selfs   ps=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   has_propertyP s    c    sK   R a b x1 | d b r$ } c | |  i j o c t Sn q Wd |  i Sd S(   s0  Check whether this store can provide a particular type of database.
	
	Given a list of DB properties, this function tests whether a database
	with the requested properties is possible using this store.  If it is,
	this function returns a propertly list which describes the resulting
	database.  (Note that the returned property list might be LONGER than
	the one supplied to this function: that is, if you ask for a database
	with the 'foo' property and the only way the store can grant that is
	by returning a ['foo', 'bar', 'baz'] database, that's what will be
	returned.  If the property combination isn't possible, returns None.

	The standard behavior of this function assumes that all databases opened
	by a particular Store have the same properties.  Should this not be
	the case, the Store should override.
	i    N(   s
   propertiess   ps   selfs   db_propertiess   None(   s   selfs
   propertiess   ps=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   test_db_propertiesR s    	 c    sf   f g |  i | ƒ o h t t d ƒ | ‚ n i t |  i | | | f | ƒ } j t | | ƒ Sd  S(   Ns$   cannot provide db with properties %s(   s   selfs   test_db_propertiess
   propertiess   RuntimeErrors   _s   applys   _opens   names   modes   kws   ts   dbclass(   s   selfs   names   modes   dbclasss
   propertiess   kws   ts=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   openf s   !s   rsc
  	  su   l o |  i | ƒ o p t t d ƒ | ‚ n q t |  i | | | | | | |	 f r |
 ƒ } s t | | ƒ Sd  S(   Ns$   cannot provide db with properties %s(   s   selfs   test_db_propertiess
   propertiess   RuntimeErrors   _s   applys   _creates   names   creators   types   flagss   versions   filenames   infos   kws   ts   dbclass(   s   selfs   names   creators   types   flagss   versions   dbclasss
   propertiess   filenames   infos   kws   ts=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   createl s
   $i    i   c    s   u v w t  t d ƒ ‚ d S(   s   Delete a database in the store.s   unimplemented methodN(   s   RuntimeErrors   _(   s   selfs   names   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   deleteu s   c    s   y z { t  t d ƒ ‚ d S(   s   Get info about a database.s   unimplemented methodN(   s   RuntimeErrors   _(   s   selfs   names   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   infoy s   c    s   } ~  t  t d ƒ ‚ d S(   s    Return a list of database names.s   unimplemented methodN(   s   RuntimeErrors   _(   s   selfs   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   list} s   c    s    ‚ ƒ t  t d ƒ ‚ d S(   s1   Return a list of database names with information.s   unimplemented methodN(   s   RuntimeErrors   _(   s   selfs   names   creators   types   kws=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   listinfo s   c    s   … † ‡ t  t d ƒ ‚ d S(   s'   Return a preference (as a raw string!).s   unimplemented methodN(   s   RuntimeErrors   _(   s   selfs   creators   ids   saveds=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   getpref… s   c    s   ‰ Š ‹ t  t d ƒ ‚ d S(   s   Set a preference.s   unimplemented methodN(   s   RuntimeErrors   _(   s   selfs   raws   creators   ids   versions   saveds=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   setpref‰ s   c    s   Ž  | i |  | ƒ d  S(   N(   s   stores   copys   selfs   name(   s   selfs   stores   names=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   installŽ s   c 	   s®  ‘ ’ “ |  i | d ƒ } ” y • | i | ƒ Wn – — n X˜ d } ™ | i d o ™ | d B} n š | i d o š | d B} n › | i d o › | d B} n œ | i d	 o œ | d
 B} n  | i d o  | d B} n ž | i d o ž | d B} n Ÿ | i d o Ÿ | d B} n   | i d o   | d B} n ¡ | i | | i d | i d ¢ | | i d d | i ƒ} ¤ y# ¥ | i
 ƒ  } ¦ | i | ƒ Wn § ¨ n X³ | i d oI ´ x? t d t | ƒ ƒ d ´ r# } µ | | } ¶ | i | ƒ qüWng ¸ x` t d t | ƒ ƒ d ¸ rD } ¹ | | } º | i p | i o
 » qEn ¼ | i | ƒ qEW¾ | i ƒ  ¿ | i ƒ  d S(   s#   Copy a database into another store.s   rsi    s	   flagReseti    s   flagResourcei   s	   flagNeweri   s   flagExcludeFromSynci€   s   flagAppInfoDirtyi   s   flagReadOnlyi   s
   flagBackupi   s   flagOpeni €  s   creators   types   versions   infoN(   s   selfs   opens   names   idbs   stores   deletes   flagss   infos   creates   odbs   get_appblocks   as   set_appblocks   ranges   lens   is   rs   appends   deleteds   archiveds   close(	   s   selfs   stores   names   idbs   flagss   odbs   as   is   rs=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   copy‘ sV   	          	 	
(   s
   propertiess   db_propertiess   __init__s   set_contexts   __getattr__s
   has_options
   get_options
   get_plugins   list_pluginss   list_plugin_infos   has_propertys   test_db_propertiess   Databases   opens   Nones   creates   deletes   infos   lists   listinfos   getprefs   setprefs   installs   copy(    s=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys	   BaseStore- s,   			s   Storec      s#   Á Â d Z  Ã e Z Å d „  Z RS(   Ns   Storec    s   Å Æ t  |  i | | ƒ } Ç | i |  ƒ É |  i | _ Ê |  i | _ Ë |  i	 | _	 Ì |  i
 | _
 Í |  i | _ Î | Sd  S(   N(   s   applys   selfs   store_classs   as   kws   os   set_contexts   names   versions   authors   descriptions   url(   s   selfs   as   kws   os=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   __call__Å s   (   s   types	   BaseStores   store_classs   __call__(    s=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   StoreÁ s   		(   s   __doc__s   __version__s   __copyright__s   Pyrites   Plugins   Databases	   PrefBlocks   _s   syss	   BaseStores   Store(    s=   /mit/python/lib/python2.0/site-packages/Pyrite/Store/Store.pys   ?! s   		"”