6 * Copyright (C) 2011 SIPE Project <http://sipe.sourceforge.net/>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
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 General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "sipe-backend.h"
29 #include "sipe-core.h"
30 #include "sipe-core-private.h"
31 #include "sipe-ocs2005.h"
32 #include "sipe-ocs2007.h"
33 #include "sipe-status.h"
34 #define _SIPE_NEED_ACTIVITIES
37 void sipe_core_reset_status(struct sipe_core_public
*sipe_public
)
39 struct sipe_core_private
*sipe_private
= SIPE_CORE_PRIVATE
;
40 if (SIPE_CORE_PRIVATE_FLAG_IS(OCS2007
))
41 sipe_ocs2007_reset_status(sipe_private
);
43 sipe_ocs2005_reset_status(sipe_private
);
46 void sipe_status_and_note(struct sipe_core_private
*sipe_private
,
47 const gchar
*status_id
)
49 struct sipe_account_data
*sip
= SIPE_ACCOUNT_DATA_PRIVATE
;
50 gboolean changed
= sipe_backend_status_and_note(SIPE_CORE_PUBLIC
,
55 sipe_activity activity
= sipe_activity_from_token(status_id
);
57 sip
->do_not_publish
[activity
] = time(NULL
);
58 SIPE_DEBUG_INFO("sipe_status_and_note: do_not_publish[%s]=%d [now]",
60 (int) sip
->do_not_publish
[activity
]);