Author: lindner
Date: Mon May 19 16:02:43 2008
New Revision: 658028

URL: http://svn.apache.org/viewvc?rev=658028&view=rev
Log:
Implement the rest of SHNIDIG-280 for NetworkPresence

Modified:
    incubator/shindig/trunk/features/opensocial-current/jsonperson.js
    incubator/shindig/trunk/features/opensocial-reference/enum.js
    incubator/shindig/trunk/php/src/socialdata/opensocial/model/Enum.php
    incubator/shindig/trunk/php/src/socialdata/opensocial/model/Person.php

Modified: incubator/shindig/trunk/features/opensocial-current/jsonperson.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-current/jsonperson.js?rev=658028&r1=658027&r2=658028&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-current/jsonperson.js (original)
+++ incubator/shindig/trunk/features/opensocial-current/jsonperson.js Mon May 
19 16:02:43 2008
@@ -45,6 +45,7 @@
   JsonPerson.constructEnum(opt_params, "gender");
   JsonPerson.constructEnum(opt_params, "smoker");
   JsonPerson.constructEnum(opt_params, "drinker");
+  JsonPerson.constructEnum(opt_params, "networkPresence");
 
   opensocial.Person.call(this, opt_params, opt_params['isOwner'],
       opt_params['isViewer']);

Modified: incubator/shindig/trunk/features/opensocial-reference/enum.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-reference/enum.js?rev=658028&r1=658027&r2=658028&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-reference/enum.js (original)
+++ incubator/shindig/trunk/features/opensocial-reference/enum.js Mon May 19 
16:02:43 2008
@@ -174,3 +174,30 @@
   /** @member opensocial.Enum.Gender */
   FEMALE : 'FEMALE'
 };
+
+/**
+ * @static
+ * @class
+ * The enum keys used by the networkPresence field.
+ * <p><b>See also:</b>
+ * <a href="opensocial.Person.Field.html">
+ * opensocial.Person.Field.NetworkPresence</a>
+ * </p>
+ *
+ * @name opensocial.Enum.NetworkPresence
+ */
+opensocial.Enum.NetworkPresence = {
+  /** @member opensocial.Enum.NetworkPresence */
+  AWAY : 'AWAY',
+  /** @member opensocial.Enum.NetworkPresence */
+  CHAT : 'CHAT',
+  /** @member opensocial.Enum.NetworkPresence */
+  DND : 'DND',
+  /** @member opensocial.Enum.NetworkPresence */
+  OFFLINE : 'OFFLINE',
+  /** @member opensocial.Enum.NetworkPresence */
+  ONLINE : 'ONLINE',
+  /** @member opensocial.Enum.NetworkPresence */
+  XA : 'XA'
+};
+

Modified: incubator/shindig/trunk/php/src/socialdata/opensocial/model/Enum.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/socialdata/opensocial/model/Enum.php?rev=658028&r1=658027&r2=658028&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/socialdata/opensocial/model/Enum.php 
(original)
+++ incubator/shindig/trunk/php/src/socialdata/opensocial/model/Enum.php Mon 
May 19 16:02:43 2008
@@ -100,3 +100,17 @@
        'YES' => "Yes"
        );
 }
+
+/**
+ * public Enum for opensocial.Enum.Smoker
+ */
+class EnumNetworkPresence extends Enum {
+       public $values = array(
+    'AWAY' => "Away",
+    'CHAT' => "Chat",
+    'DND' => "Do Not Disturb",
+    'OFFLINE' => "Offline",
+    'ONLINE' => "Online",
+    'XA' => "Extended Away"
+    );
+}

Modified: incubator/shindig/trunk/php/src/socialdata/opensocial/model/Person.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/socialdata/opensocial/model/Person.php?rev=658028&r1=658027&r2=658028&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/socialdata/opensocial/model/Person.php 
(original)
+++ incubator/shindig/trunk/php/src/socialdata/opensocial/model/Person.php Mon 
May 19 16:02:43 2008
@@ -76,6 +76,7 @@
        public $turnOns;
        public $tvShows;
        public $urls;
+        public $networkPresence;
        
        // Note: Not in the opensocial js person object directly
        public $isOwner = false;
@@ -617,6 +618,16 @@
                $this->urls = $urls;
        }
        
+       public function getNetworkPresence()
+       {
+               return $this->networkPresence;
+       }
+       
+       public function setNetworkPresence($networkPresence)
+       {
+               $this->networkPresence = $networkPresence;
+       }
+       
        public function getIsOwner()
        {
                return $this->isOwner;


Reply via email to