2010-05-07 04:47:10 -05:00
|
|
|
/*
|
2011-12-03 16:38:03 -06:00
|
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
2021-06-12 21:42:10 -05:00
|
|
|
* Copyright 2014, Funky Idea Software
|
|
|
|
* Copyright 2021, Jaidyn Levesque
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2021-06-20 12:44:20 -05:00
|
|
|
#ifndef _APP_UTILS_H
|
|
|
|
#define _APP_UTILS_H
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
#include <image.h>
|
2010-05-08 11:21:36 -05:00
|
|
|
|
2021-06-04 13:57:04 -05:00
|
|
|
#include <GraphicsDefs.h>
|
2010-05-07 04:47:10 -05:00
|
|
|
#include <Mime.h>
|
2010-05-09 03:23:53 -05:00
|
|
|
#include <Resources.h>
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
#include "AppConstants.h"
|
2021-06-18 18:42:10 -05:00
|
|
|
#include "Server.h"
|
|
|
|
|
|
|
|
class BMenu;
|
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
const char* UserStatusToString(UserStatus status);
|
2010-05-09 04:38:30 -05:00
|
|
|
|
2021-06-15 00:19:52 -05:00
|
|
|
bool IsCommand(BString line);
|
|
|
|
BString CommandName(BString line);
|
|
|
|
BString CommandArgs(BString line);
|
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
BResources* ChatResources();
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-06-18 18:42:10 -05:00
|
|
|
BMenu* CreateAccountMenu(AccountInstances accounts, BMessage msg,
|
|
|
|
BMessage* allMsg = NULL);
|
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
const char* AccountsPath();
|
|
|
|
const char* AccountPath(const char* signature, const char* subsignature);
|
2010-05-09 04:38:30 -05:00
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
const char* CachePath();
|
|
|
|
const char* AccountCachePath(const char* accountName);
|
|
|
|
const char* RoomsCachePath(const char* accountName);
|
|
|
|
const char* RoomCachePath(const char* accountName, const char* roomIdentifier);
|
|
|
|
const char* UserCachePath(const char* accountName, const char* userIdentifier);
|
|
|
|
const char* ContactCachePath(const char* accountName, const char* userIdentifier);
|
2021-05-24 14:20:57 -05:00
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
rgb_color TintColor(rgb_color color, int severity);
|
|
|
|
rgb_color ForegroundColor(rgb_color background);
|
2021-06-04 13:57:04 -05:00
|
|
|
|
2021-06-15 00:19:52 -05:00
|
|
|
// Borrowed from BePodder's own libfunky. Groovy B)
|
2021-06-06 12:02:26 -05:00
|
|
|
status_t ReadAttributeData(BNode* node, const char* name, char** buffer, int32 *size);
|
|
|
|
status_t WriteAttributeMessage(BNode* node, const char* name, BMessage* data);
|
|
|
|
status_t ReadAttributeMessage(BNode* node, const char* name, BMessage* data);
|
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
extern "C" status_t our_image(image_info& image);
|
|
|
|
|
2021-06-04 13:57:04 -05:00
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
#endif // _APP_UTILS_H
|
2021-06-04 13:57:04 -05:00
|
|
|
|