aboutsummaryrefslogtreecommitdiff
path: root/src/node_public.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_public.erl')
-rw-r--r--src/node_public.erl97
1 files changed, 48 insertions, 49 deletions
diff --git a/src/node_public.erl b/src/node_public.erl
index efefd67fe..df4f1c080 100644
--- a/src/node_public.erl
+++ b/src/node_public.erl
@@ -1,28 +1,27 @@
-%%% ====================================================================
-%%% ``The contents of this file are subject to the Erlang Public License,
-%%% Version 1.1, (the "License"); you may not use this file except in
-%%% compliance with the License. You should have received a copy of the
-%%% Erlang Public License along with this software. If not, it can be
-%%% retrieved via the world wide web at http://www.erlang.org/.
+%%%----------------------------------------------------------------------
+%%% File : node_public.erl
+%%% Author : Christophe Romain <christophe.romain@process-one.net>
+%%% Purpose :
+%%% Created : 1 Dec 2007 by Christophe Romain <christophe.romain@process-one.net>
%%%
%%%
-%%% Software distributed under the License is distributed on an "AS IS"
-%%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%%% the License for the specific language governing rights and limitations
-%%% under the License.
+%%% ejabberd, Copyright (C) 2002-2016 ProcessOne
%%%
+%%% This program is free software; you can redistribute it and/or
+%%% modify it under the terms of the GNU General Public License as
+%%% published by the Free Software Foundation; either version 2 of the
+%%% License, or (at your option) any later version.
%%%
-%%% The Initial Developer of the Original Code is ProcessOne.
-%%% Portions created by ProcessOne are Copyright 2006-2015, ProcessOne
-%%% All Rights Reserved.''
-%%% This software is copyright 2006-2015, ProcessOne.
+%%% This program is distributed in the hope that it will be useful,
+%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%%% General Public License for more details.
%%%
-%%% @copyright 2006-2015 ProcessOne
-%%% @author Christophe Romain <christophe.romain@process-one.net>
-%%% [http://www.process-one.net/]
-%%% @version {@vsn}, {@date} {@time}
-%%% @end
-%%% ====================================================================
+%%% You should have received a copy of the GNU General Public License along
+%%% with this program; if not, write to the Free Software Foundation, Inc.,
+%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+%%%
+%%%----------------------------------------------------------------------
-module(node_public).
-behaviour(gen_pubsub_node).
@@ -45,10 +44,10 @@
path_to_node/1]).
init(Host, ServerHost, Opts) ->
- node_hometree:init(Host, ServerHost, Opts).
+ node_flat:init(Host, ServerHost, Opts).
terminate(Host, ServerHost) ->
- node_hometree:terminate(Host, ServerHost).
+ node_flat:terminate(Host, ServerHost).
options() ->
[{deliver_payloads, true},
@@ -85,89 +84,89 @@ features() ->
<<"subscription-notifications">>].
create_node_permission(Host, ServerHost, Node, ParentNode, Owner, Access) ->
- node_hometree:create_node_permission(Host, ServerHost, Node, ParentNode, Owner, Access).
+ node_flat:create_node_permission(Host, ServerHost, Node, ParentNode, Owner, Access).
create_node(Nidx, Owner) ->
- node_hometree:create_node(Nidx, Owner).
+ node_flat:create_node(Nidx, Owner).
delete_node(Removed) ->
- node_hometree:delete_node(Removed).
+ node_flat:delete_node(Removed).
subscribe_node(Nidx, Sender, Subscriber, AccessModel,
SendLast, PresenceSubscription, RosterGroup, Options) ->
- node_hometree:subscribe_node(Nidx, Sender, Subscriber, AccessModel, SendLast,
+ node_flat:subscribe_node(Nidx, Sender, Subscriber, AccessModel, SendLast,
PresenceSubscription, RosterGroup, Options).
unsubscribe_node(Nidx, Sender, Subscriber, SubId) ->
- node_hometree:unsubscribe_node(Nidx, Sender, Subscriber, SubId).
+ node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId).
publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) ->
- node_hometree:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload).
+ node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload).
remove_extra_items(Nidx, MaxItems, ItemIds) ->
- node_hometree:remove_extra_items(Nidx, MaxItems, ItemIds).
+ node_flat:remove_extra_items(Nidx, MaxItems, ItemIds).
delete_item(Nidx, Publisher, PublishModel, ItemId) ->
- node_hometree:delete_item(Nidx, Publisher, PublishModel, ItemId).
+ node_flat:delete_item(Nidx, Publisher, PublishModel, ItemId).
purge_node(Nidx, Owner) ->
- node_hometree:purge_node(Nidx, Owner).
+ node_flat:purge_node(Nidx, Owner).
get_entity_affiliations(Host, Owner) ->
- node_hometree:get_entity_affiliations(Host, Owner).
+ node_flat:get_entity_affiliations(Host, Owner).
get_node_affiliations(Nidx) ->
- node_hometree:get_node_affiliations(Nidx).
+ node_flat:get_node_affiliations(Nidx).
get_affiliation(Nidx, Owner) ->
- node_hometree:get_affiliation(Nidx, Owner).
+ node_flat:get_affiliation(Nidx, Owner).
set_affiliation(Nidx, Owner, Affiliation) ->
- node_hometree:set_affiliation(Nidx, Owner, Affiliation).
+ node_flat:set_affiliation(Nidx, Owner, Affiliation).
get_entity_subscriptions(Host, Owner) ->
- node_hometree:get_entity_subscriptions(Host, Owner).
+ node_flat:get_entity_subscriptions(Host, Owner).
get_node_subscriptions(Nidx) ->
- node_hometree:get_node_subscriptions(Nidx).
+ node_flat:get_node_subscriptions(Nidx).
get_subscriptions(Nidx, Owner) ->
- node_hometree:get_subscriptions(Nidx, Owner).
+ node_flat:get_subscriptions(Nidx, Owner).
set_subscriptions(Nidx, Owner, Subscription, SubId) ->
- node_hometree:set_subscriptions(Nidx, Owner, Subscription, SubId).
+ node_flat:set_subscriptions(Nidx, Owner, Subscription, SubId).
get_pending_nodes(Host, Owner) ->
- node_hometree:get_pending_nodes(Host, Owner).
+ node_flat:get_pending_nodes(Host, Owner).
get_states(Nidx) ->
- node_hometree:get_states(Nidx).
+ node_flat:get_states(Nidx).
get_state(Nidx, JID) ->
- node_hometree:get_state(Nidx, JID).
+ node_flat:get_state(Nidx, JID).
set_state(State) ->
- node_hometree:set_state(State).
+ node_flat:set_state(State).
get_items(Nidx, From, RSM) ->
- node_hometree:get_items(Nidx, From, RSM).
+ node_flat:get_items(Nidx, From, RSM).
get_items(Nidx, JID, AccessModel, PresenceSubscription, RosterGroup, SubId, RSM) ->
- node_hometree:get_items(Nidx, JID, AccessModel,
+ node_flat:get_items(Nidx, JID, AccessModel,
PresenceSubscription, RosterGroup, SubId, RSM).
get_item(Nidx, ItemId) ->
- node_hometree:get_item(Nidx, ItemId).
+ node_flat:get_item(Nidx, ItemId).
get_item(Nidx, ItemId, JID, AccessModel, PresenceSubscription, RosterGroup, SubId) ->
- node_hometree:get_item(Nidx, ItemId, JID, AccessModel,
+ node_flat:get_item(Nidx, ItemId, JID, AccessModel,
PresenceSubscription, RosterGroup, SubId).
set_item(Item) ->
- node_hometree:set_item(Item).
+ node_flat:set_item(Item).
get_item_name(Host, Node, Id) ->
- node_hometree:get_item_name(Host, Node, Id).
+ node_flat:get_item_name(Host, Node, Id).
node_to_path(Node) ->
node_flat:node_to_path(Node).