OwlCyberSecurity - MANAGER
Edit File: sql_apn.pyc
� �t�ac @ s� d d l m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z e � Z d e e e j � f d � � YZ d e f d � � YZ d S( i����( t SerializableRecordt fromTable( t Logger( t inlineCallbacks( t schema( t InvalidSubscriptionValuest APNSubscriptionsRecordc B s e Z d Z RS( sF @DynamicAttrs L{Record} for L{schema.APN_SUBSCRIPTIONS}. ( t __name__t __module__t __doc__( ( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyR s t APNSubscriptionsMixinc B sJ e Z d Z e d � � Z d � Z d � Z d � Z d � Z d � Z RS( sH A mixin for L{CommonStoreTransaction} that covers the APN API. c c s� | o | o | o | s$ t � � n | d } | d } t j | d | d | �V} | s� y6 t j | d | d | d | d | d | d | �VWq� t k r� q� Xn? y+ | d j d | d | d | d | � VWn t k r� n Xd S( Ni� t tokent resourceKeyt modifiedt subscriberGUIDt userAgentt ipAddri ( R R t querysimplet createt Exceptiont update( t selfR t keyt timestampt subscriberR R t records( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyt addAPNSubscription, s6 c C s t j | d | d | �S( NR R ( R t deletesimple( R R R ( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyt removeAPNSubscriptionW s c C s t j | t j | k � S( N( R t deletesomeR ( R t olderThan( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyt purgeOldAPNSubscriptions^ s c C s t j | d | �S( NR ( R R ( R R ( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyt apnSubscriptionsByTokend s c C s t j | d | �S( NR ( R R ( R R ( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyt apnSubscriptionsByKeyj s c C s t j | d | �S( NR ( R R ( R t guid( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyt apnSubscriptionsBySubscriberp s ( R R R R R R R R R! R# ( ( ( s1 /opt/cpanel-ccs/txdav/common/datastore/sql_apn.pyR '