]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/OStatus/lib/activity.php
Merge branch 'ssleverything' into testing
[quix0rs-gnu-social.git] / plugins / OStatus / lib / activity.php
1 <?php
2 /**
3  * StatusNet, the distributed open-source microblogging tool
4  *
5  * An activity
6  *
7  * PHP version 5
8  *
9  * LICENCE: This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU Affero General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Affero General Public License for more details.
18  *
19  * You should have received a copy of the GNU Affero General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  * @category  OStatus
23  * @package   StatusNet
24  * @author    Evan Prodromou <evan@status.net>
25  * @copyright 2010 StatusNet, Inc.
26  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
27  * @link      http://status.net/
28  */
29
30 if (!defined('STATUSNET')) {
31     exit(1);
32 }
33
34 class ActivityNoun
35 {
36     const ARTICLE   = 'http://activitystrea.ms/schema/1.0/article';
37     const BLOGENTRY = 'http://activitystrea.ms/schema/1.0/blog-entry';
38     const NOTE      = 'http://activitystrea.ms/schema/1.0/note';
39     const STATUS    = 'http://activitystrea.ms/schema/1.0/status';
40     const FILE      = 'http://activitystrea.ms/schema/1.0/file';
41     const PHOTO     = 'http://activitystrea.ms/schema/1.0/photo';
42     const ALBUM     = 'http://activitystrea.ms/schema/1.0/photo-album';
43     const PLAYLIST  = 'http://activitystrea.ms/schema/1.0/playlist';
44     const VIDEO     = 'http://activitystrea.ms/schema/1.0/video';
45     const AUDIO     = 'http://activitystrea.ms/schema/1.0/audio';
46     const BOOKMARK  = 'http://activitystrea.ms/schema/1.0/bookmark';
47     const PERSON    = 'http://activitystrea.ms/schema/1.0/person';
48     const GROUP     = 'http://activitystrea.ms/schema/1.0/group';
49     const PLACE     = 'http://activitystrea.ms/schema/1.0/place';
50     const COMMENT   = 'http://activitystrea.ms/schema/1.0/comment'; // tea
51
52     public $type;
53     public $id;
54     public $title;
55     public $summary;
56     public $content;
57 }
58
59 class Activity
60 {
61     const NAMESPACE = 'http://activitystrea.ms/schema/1.0/';
62
63     const POST     = 'http://activitystrea.ms/schema/1.0/post';
64     const SHARE    = 'http://activitystrea.ms/schema/1.0/share';
65     const SAVE     = 'http://activitystrea.ms/schema/1.0/save';
66     const FAVORITE = 'http://activitystrea.ms/schema/1.0/favorite';
67     const PLAY     = 'http://activitystrea.ms/schema/1.0/play';
68     const FOLLOW   = 'http://activitystrea.ms/schema/1.0/follow';
69     const FRIEND   = 'http://activitystrea.ms/schema/1.0/make-friend';
70     const JOIN     = 'http://activitystrea.ms/schema/1.0/join';
71     const TAG      = 'http://activitystrea.ms/schema/1.0/tag';
72
73     public $actor; // an ActivityNoun
74     public $verb;  // a string (the URL)
75     public $object; // an ActivityNoun
76     public $target; // an ActivityNoun
77
78     static function fromAtomEntry($domEntry)
79     {
80     }
81
82     function toAtomEntry()
83     {
84     }
85 }