Explorar o código

added functions for storing and dumping offline authorization info via
watcherinfo NOTIFY (documentation will be added soon)

Vaclav Kubart %!s(int64=19) %!d(string=hai) anos
pai
achega
36f2943860

+ 69 - 0
db/schema/offline_winfo.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
+  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table role="presence"
+    xmlns:db="http://docbook.org/ns/docbook"
+    xmlns:my="http://iptel.org/dbschema/mysql"
+    xmlns:pg="http://iptel.org/dbschema/postgres"
+    xmlns:dt="http://iptel.org/dbschema/dbtext">
+    <name>offline_winfo</name>
+    <version>1</version>
+    
+	<column id="offline_winfo.uid">
+		<name>uid</name>
+		<type>string</type>
+		<size>&id_len;</size>
+    </column>
+    
+	<column>
+		<name>watcher</name>
+		<type>string</type>
+		<size>&uri_len;</size>
+    </column>
+    
+	<column>
+		<name>events</name>
+		<type>string</type>
+		<size>64</size>
+    </column>
+	
+	<column>
+		<name>domain</name>
+		<type>string</type>
+		<size>64</size>
+		<null/>
+    </column>
+	
+    <column>
+		<name>created_on</name>
+		<type>datetime</type>
+		<default>2006-01-31 13:13:13</default>
+    </column>
+    
+	<column>
+		<name>expires_on</name>
+		<type>datetime</type>
+		<default>2006-01-31 13:13:13</default>
+    </column>
+    
+	<column id="offline_winfo.dbid">
+		<name>dbid</name>
+		<type>unsigned int</type>
+		<size>10</size>
+		<my:type>INT(10) UNSIGNED AUTO_INCREMENT</my:type>
+		<pg:type>SERIAL</pg:type>
+		<dt:type>int,auto</dt:type>
+    </column>
+    
+	<index>
+		<name>offline_winfo_key</name>
+		<colref linkend="offline_winfo.dbid"/>
+    </index>
+
+</table>

+ 1 - 0
db/schema/ser.xml

@@ -70,6 +70,7 @@
     <xi:include href="presentity_contact.xml"/>
     <xi:include href="watcherinfo.xml"/>
     <xi:include href="tuple_notes.xml"/>
+    <xi:include href="offline_winfo.xml"/>
     
 	<!-- Resource-lists related tables -->
     <xi:include href="rls_subscription.xml"/>

+ 1 - 0
scripts/dbtext/ser_db/offline_winfo

@@ -0,0 +1 @@
+uid(str) watcher(str) events(str) domain(str,null) created_on(int) expires_on(int) dbid(int,auto) 

+ 11 - 0
scripts/mysql/my_create.sql

@@ -381,6 +381,17 @@ CREATE TABLE tuple_notes (
     lang VARCHAR(64) NOT NULL
 );
 
+CREATE TABLE offline_winfo (
+    uid VARCHAR(64) NOT NULL,
+    watcher VARCHAR(255) NOT NULL,
+    events VARCHAR(64) NOT NULL,
+    domain VARCHAR(64),
+    created_on DATETIME NOT NULL DEFAULT '2006-01-31 13:13:13',
+    expires_on DATETIME NOT NULL DEFAULT '2006-01-31 13:13:13',
+    dbid INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
+    KEY offline_winfo_key (dbid)
+);
+
 CREATE TABLE rls_subscription (
     id VARCHAR(48) NOT NULL,
     doc_version INT NOT NULL,

+ 10 - 0
scripts/oracle/or_create.sql

@@ -365,6 +365,16 @@ CREATE TABLE tuple_notes (
     lang string(64) NOT NULL
 );
 
+CREATE TABLE offline_winfo (
+    uid string(64) NOT NULL,
+    watcher string(255) NOT NULL,
+    events string(64) NOT NULL,
+    domain string(64),
+    created_on datetime NOT NULL DEFAULT '2006-01-31 13:13:13',
+    expires_on datetime NOT NULL DEFAULT '2006-01-31 13:13:13',
+    dbid int(10) NOT NULL
+);
+
 CREATE TABLE rls_subscription (
     id string(48) NOT NULL,
     doc_version int NOT NULL,

+ 14 - 2
scripts/postgres/pg_create.sql

@@ -397,6 +397,18 @@ CREATE TABLE tuple_notes (
     lang VARCHAR(64) NOT NULL
 );
 
+CREATE TABLE offline_winfo (
+    uid VARCHAR(64) NOT NULL,
+    watcher VARCHAR(255) NOT NULL,
+    events VARCHAR(64) NOT NULL,
+    domain VARCHAR(64),
+    created_on TIMESTAMP NOT NULL DEFAULT '2006-01-31 13:13:13',
+    expires_on TIMESTAMP NOT NULL DEFAULT '2006-01-31 13:13:13',
+    dbid SERIAL NOT NULL
+);
+
+CREATE INDEX offline_winfo_key ON offline_winfo (dbid);
+
 CREATE TABLE rls_subscription (
     id VARCHAR(48) NOT NULL,
     doc_version INTEGER NOT NULL,
@@ -551,5 +563,5 @@ CREATE TABLE customers (
 );
 
 
-GRANT ALL ON version,acc,missed_calls,credentials,attr_types,global_attrs,domain_attrs,user_attrs,domain,location,trusted,server_monitoring,server_monitoring_agg,phonebook,gw,gw_grp,lcr,grp,silo,uri,speed_dial,sd_attrs,presentity,presentity_notes,presentity_contact,watcherinfo,tuple_notes,rls_subscription,rls_vs,rls_vs_names,i18n,pdt,customers TO ser;
-GRANT SELECT ON version,acc,missed_calls,credentials,attr_types,global_attrs,domain_attrs,user_attrs,domain,location,trusted,server_monitoring,server_monitoring_agg,phonebook,gw,gw_grp,lcr,grp,silo,uri,speed_dial,sd_attrs,presentity,presentity_notes,presentity_contact,watcherinfo,tuple_notes,rls_subscription,rls_vs,rls_vs_names,i18n,pdt,customers TO serro;
+GRANT ALL ON version,acc,missed_calls,credentials,attr_types,global_attrs,domain_attrs,user_attrs,domain,location,trusted,server_monitoring,server_monitoring_agg,phonebook,gw,gw_grp,lcr,grp,silo,uri,speed_dial,sd_attrs,presentity,presentity_notes,presentity_contact,watcherinfo,tuple_notes,offline_winfo,rls_subscription,rls_vs,rls_vs_names,i18n,pdt,customers TO ser;
+GRANT SELECT ON version,acc,missed_calls,credentials,attr_types,global_attrs,domain_attrs,user_attrs,domain,location,trusted,server_monitoring,server_monitoring_agg,phonebook,gw,gw_grp,lcr,grp,silo,uri,speed_dial,sd_attrs,presentity,presentity_notes,presentity_contact,watcherinfo,tuple_notes,offline_winfo,rls_subscription,rls_vs,rls_vs_names,i18n,pdt,customers TO serro;