[Vtigercrm-commits] [vtiger-commits] r7914 - /branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun Jul 9 16:43:34 EDT 2006
Author: mmbrich
Date: Sun Jul 9 14:43:33 2006
New Revision: 7914
Log:
API comments
Modified:
branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php
Modified: branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php Sun Jul 9 14:43:33 2006
@@ -31,6 +31,30 @@
$this->db = new PearDatabase();
}
+ /* check for online help desk users in the CRM
+ * so that we can display an on-line/off-line status
+ * for the helpdesk module via SOAP
+ *
+ * @return array of ids for online CRM users who are
+ * agents in the helpdesk
+ */
+ function OnlineCRMHDeskUsers() {
+
+ }
+
+ /* check the helpdesk db and see who is currently online
+ * so that agents may initiate a live chat
+ *
+ * @return array of ids for online helpdesk users
+ */
+ function OnlineHDeskUsers() {
+
+ }
+
+ /*
+ * Send an Alert or IM Message to any CRM user.
+ * @return boolean success result
+ */
function SendAlert($msg_data,$msg_type,$recordid='0',$sending_user='0',$receivers='0') {
$nowdate=date('Y-m-d H:i:s');
switch($msg_type) {
@@ -73,6 +97,15 @@
return "false";
}
+ /*
+ * Get unread alerts for a user.
+ * @param $userid - user id of the person checking for alerts
+ * @param $get_old - boolean. Use this when first loading a chat agent
+ * in a page. Messages go through 3 stages. 0=unread, 1=seen, 2=seen for N seconds (usually about 2)
+ * if $get_old=true then all messages with a 0 or 1 status will be returned
+ * @return multi-dimensional array of message details
+ * array=($num=>'msgid',$num=>'msg_type',$num=>'msg_data',$num=>'recordid',$num=>'sending_user',$num=>'user_name',$num=>'sentdate');
+ */
function GetNewAlerts($userid,$get_old='') {
// This query will get all non-group/non-broadcast messages
if($get_old == 'true')
@@ -155,6 +188,10 @@
}
+ /*
+ * get all unseen mails for a user
+ * @return number of unseen emails
+ */
function CheckEmails() {
global $current_user;
require_once('include/utils/UserInfoUtil.php');
More information about the vtigercrm-commits
mailing list