/*
      _______                          .__ .__   .__   .__                 
      \      \    ____   __ __ _______ |__||  |  |  |  |__|  ____    ____  
      /   |   \ _/ __ \ |  |  \\_  __ \|  ||  |  |  |  |  | /  _ \  /    \ 
     /    |    \\  ___/ |  |  / |  | \/|  ||  |__|  |__|  |(  <_> )|   |  \
     \____|__  / \___  >|____/  |__|   |__||____/|____/|__| \____/ |___|  /
    =========\/======\/=================================================\/==
  v0.01 04/JUL/2007 © Copyright 2007-2007 Scott D. Yelich SOME RIGHTS RESERVED
 .,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.-*~'`^`'~*-,._.,-*~'`^`'~*-,. 


  LICENSE:  Creative Commons Attribution 3.0 License.
  SEE:      http://creativecommons.org/licenses/by/3.0/


  Sun Jul 29 21:33:38 EDT 2007, v0.02 sdy

*/

#ifndef COUNTER_H
#define COUNTER_H

//  C++

#include <ctime>
#include <string>
#include <sstream>

//  LOCAL

#include "Xql3.h"

//  

class Counter
{

  public:

  static int const MINTIME = 0; // seconds

   Counter();
  ~Counter();

  int hit(std::string const &);
  int hits(std::string const &);


  private:

  Xql3 _sql3;

  //  BUILT IN DEFAULT 1x1t.gif IMAGE created with GIMP:
  //    std::string gif1x1t = string("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\xff\xff\xff\xff\xff\xff\x21\xf9\x04\x01\x0a\x00\x01\x00\x2c\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x4c\x01\x00\x3b\x00");

  //    static const char DBNAME[] = "/www/neurillion/p/33/databases/hits.sq3";

};

#endif
