Blame view

pma/libraries/engines/pbms.lib.php 4.18 KB
a1684257   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  <?php
  /* vim: set expandtab sw=4 ts=4 sts=4: */
  /**
   * @package PhpMyAdmin-Engines
   */
  
  /**
   * the PBMS daemon
   * @package PhpMyAdmin-Engines
   */
  class PMA_StorageEngine_pbms extends PMA_StorageEngine
  {
      /**
       * returns array with variable names dedicated to PBMS daemon
       *
       * @return  array   variable names
       */
      function engine_init()
      {
          $this->engine  = "PBMS";
          $this->title   = "PrimeBase Media Streaming Daemon";
          $this->comment = "Provides BLOB streaming service for storage engines,";
          $this->support = PMA_ENGINE_SUPPORT_YES;
      }
  
      function getVariables()
      {
          return array(
              'pbms_garbage_threshold' => array(
                  'title' => __('Garbage Threshold'),
                  'desc'  => __('The percentage of garbage in a repository file before it is compacted.'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
              'pbms_port' => array(
                  'title' => __('Port'),
                  'desc'  => __('The port for the PBMS stream-based communications. Setting this value to 0 will disable HTTP communication with the daemon.'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
              'pbms_repository_threshold' => array(
                  'title' => __('Repository Threshold'),
                  'desc'  => __('The maximum size of a BLOB repository file. You may use Kb, MB or GB to indicate the unit of the value. A value in bytes is assumed when no unit is specified.'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
              'pbms_temp_blob_timeout' => array(
                  'title' => __('Temp Blob Timeout'),
                  'desc'  => __('The timeout, in seconds, for temporary BLOBs. Uploaded BLOB data is removed after this time, unless they are referenced by a record in the database.'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
              'pbms_temp_log_threshold' => array(
                  'title' => __('Temp Log Threshold'),
                  'desc'  => __('The maximum size of a temporary BLOB log file. You may use Kb, MB or GB to indicate the unit of the value. A value in bytes is assumed when no unit is specified.'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
              'pbms_max_keep_alive' => array(
                  'title' => __('Max Keep Alive'),
                  'desc'  => __('The timeout for inactive connection with the keep-alive flag set. After this time the connection will be closed. The time-out is in milliseconds (1/1000).'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
              'pbms_http_metadata_headers' => array(
                  'title' => __('Metadata Headers'),
                  'desc'  => __('A ":" delimited list of metadata headers to be used to initialize the pbms_metadata_header table when a database is created.'),
                  'type'  => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
              ),
          );
      }
  
      //--------------------
      function getInfoPages()
      {
          $pages = array();
          $pages['Documentation'] = __('Documentation');
          return $pages;
      }
  
      //--------------------
      function getPage($id)
      {
          if (! array_key_exists($id, $this->getInfoPages())) {
              return false;
          }
  
          $id = 'getPage' . $id;
  
          return $this->$id();
      }
  
      function getPageConfigure()
      {
      }
  
      function getPageDocumentation()
      {
          $output = '<p>'
          . sprintf(__('Documentation and further information about PBMS can be found on %sThe PrimeBase Media Streaming home page%s.'), '<a href="' . PMA_linkURL('http://www.blobstreaming.org/') . '" target="_blank">', '</a>')
          . '</p>' . "\n"
          . '<h3>' . __('Related Links') . '</h3>' . "\n"
          . '<ul>' . "\n"
          . '<li><a href="' . PMA_linkURL('http://bpbdev.blogspot.com/') . '" target="_blank">' . __('The PrimeBase Media Streaming Blog by Barry Leslie') . '</a></li>' . "\n"
          . '<li><a href="' . PMA_linkURL('http://www.primebase.com/xt') . '" target="_blank">' . __('PrimeBase XT Home Page') . '</a></li>' . "\n"
          . '</ul>' . "\n";
  
          return $output;
      }
  }
  
  ?>