+
+ def set_active_status(self, type, msg=None):
+ cdef status.PurpleStatusType *c_statustype = NULL
+
+ if self.__exists:
+ if msg:
+ account.purple_account_set_status(self._get_structure(),
+ <char *> type, True, "message", <char *> msg, NULL)
+ else:
+ account.purple_account_set_status(self._get_structure(),
+ <char *> type, True, NULL)
+ return True
+ else:
+ return False
+
+ def set_status_message(self, type, msg):
+ cdef status.PurpleStatus* c_status = NULL
+ cdef status.PurpleStatusType *c_statustype = NULL
+
+ if self.__exists and msg:
+ c_status = account.purple_account_get_status(self._get_structure(),
+ type)
+ status.purple_status_set_attr_string(c_status, "message", msg)
+ return True
+ else:
+ return False