~gz/ubuntu/wily/steam/new_rel_udev_rules

« back to all changes in this revision

Viewing changes to server/factories/LinkFactory.pike

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-10-29 19:51:18 UTC
  • mfrom: (1.1.4) (0.1.4 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131029195118-b9bxciz5hwx5z459
Tags: 1:1.0.0.39-2ubuntu1
Add an epoch to the version number as there was an unrelated steam package
in the archive with a higher version number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2004  Thomas Bopp, Thorsten Hampel, Ludger Merkens
2
 
 *
3
 
 *  This program is free software; you can redistribute it and/or modify
4
 
 *  it under the terms of the GNU General Public License as published by
5
 
 *  the Free Software Foundation; either version 2 of the License, or
6
 
 *  (at your option) any later version.
7
 
 *
8
 
 *  This program is distributed in the hope that it will be useful,
9
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 *  GNU General Public License for more details.
12
 
 *
13
 
 *  You should have received a copy of the GNU General Public License
14
 
 *  along with this program; if not, write to the Free Software
15
 
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
 
 * 
17
 
 * $Id: LinkFactory.pike,v 1.1.1.1 2006/03/27 12:40:08 exodusd Exp $
18
 
 */
19
 
 
20
 
constant cvs_version="$Id: LinkFactory.pike,v 1.1.1.1 2006/03/27 12:40:08 exodusd Exp $";
21
 
 
22
 
inherit "/factories/ObjectFactory";
23
 
 
24
 
#include <attributes.h>
25
 
#include <macros.h>
26
 
#include <classes.h>
27
 
#include <access.h>
28
 
#include <database.h>
29
 
#include <events.h>
30
 
 
31
 
object execute(mapping vars)
32
 
{
33
 
    object obj,  link_to;
34
 
 
35
 
    link_to = vars["link_to"];
36
 
 
37
 
    try_event(EVENT_EXECUTE, CALLER, obj, link_to);
38
 
    if ( vars->transient ) {
39
 
      if ( mappingp(vars->attributes) )
40
 
        vars->attributes[OBJ_TEMP] = 1;
41
 
      else
42
 
        vars->attributes = ([ OBJ_TEMP : 1 ]);
43
 
    }
44
 
    obj = ::object_create(vars["name"], CLASS_NAME_LINK, 0,vars["attributes"],
45
 
                vars["attributesAcquired"], vars["attributesLocked"]); 
46
 
    obj->set_link_object(link_to);
47
 
    run_event(EVENT_EXECUTE, CALLER, obj, link_to);
48
 
    return obj->this();
49
 
}
50
 
 
51
 
string get_identifier() { return "Link.factory"; }
52
 
string get_class_name() { return "Link"; }
53
 
int get_class_id() { return CLASS_LINK; }