<configure 
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    i18n_domain="zope"
    >
    
  <adapter
      for="zope.publisher.interfaces.IRequest"
      provides=".interfaces.IClientId"
      factory=".session.ClientId"
      permission="zope.Public" 
      />

  <adapter
      for="zope.publisher.interfaces.IRequest"
      provides=".interfaces.ISession"
      factory=".session.Session"
      permission="zope.Public"
      />

  <adapter
      for="zope.publisher.interfaces.IRequest"
      provides="zope.app.traversing.interfaces.IPathAdapter"
      factory=".session.Session"
      name="session"
      permission="zope.Public"
      />

  <content class=".session.Session">
    <allow interface=".interfaces.ISession" />
    <implements interface="zope.app.traversing.interfaces.IPathAdapter" />
  </content>

  <content class=".http.CookieClientIdManager">
    <require
        interface=".http.ICookieClientIdManager"
        permission="zope.Public" />
    <require
        set_schema=".http.ICookieClientIdManager"
        permission="zope.ManageServices" />
  </content>

  <content class=".session.PersistentSessionDataContainer">
    <require
        interface=".interfaces.ISessionDataContainer"
        permission="zope.Public" />
    <require
        set_schema=".interfaces.ISessionDataContainer"
        permission="zope.ManageServices" />
  </content>

  <content class=".session.RAMSessionDataContainer">
    <require
        interface=".interfaces.ISessionDataContainer"
        permission="zope.Public" />
    <require
        set_schema=".interfaces.ISessionDataContainer"
        permission="zope.ManageServices" />
  </content>

  <content class=".session.SessionData">
    <allow interface=".interfaces.ISessionData" />
  </content>

  <content class=".session.SessionPkgData">
    <allow interface=".interfaces.ISessionPkgData" />
  </content>

  <subscriber
      for="zope.app.appsetup.IDatabaseOpenedEvent"
      handler=".bootstrap.bootStrapSubscriber"
      />

  <include file="browser.zcml" />

  <!-- Registering documentation with API doc -->
  <configure
      xmlns:apidoc="http://namespaces.zope.org/apidoc"
      xmlns:zcml="http://namespaces.zope.org/zcml"
      zcml:condition="have apidoc">

    <apidoc:bookchapter
        id="session"
        title="Sessions"
        doc_path="design.txt"
        />
    <apidoc:bookchapter
        id="api"
        title="API"
        doc_path="api.txt"
        parent="session"
        />

  </configure>

</configure>
