d883c23d18
The settings file-hierarchy has been changed a bit: * Cardie/ * preferences * Accounts/ * Cache/ * Accounts/ * Add-Ons/ `Cardie/Protocols` is now `Cardie/Accounts`, and the cache directory has been split into two. `Cache/Accounts/` is for account-specific cached data (e.g., cached roster icons, data, etc.), and `Cache/Protocols` is for protocol-wide settings/data. For purple, this will be used as the user's libpurple directory, which has been moved from the default of `~/.purple` (yikes!) Some plugin search-paths have been given to purple, too― lib directories + "/purple2/", and Cardie/Cache/Add-Ons/purple/plugins/.
56 lines
1.6 KiB
C++
56 lines
1.6 KiB
C++
/*
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
|
* Copyright 2014, Funky Idea Software
|
|
* Copyright 2021, Jaidyn Levesque
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _APP_UTILS_H
|
|
#define _APP_UTILS_H
|
|
|
|
#include <image.h>
|
|
|
|
#include <GraphicsDefs.h>
|
|
#include <Mime.h>
|
|
#include <Resources.h>
|
|
|
|
#include "AppConstants.h"
|
|
#include "Server.h"
|
|
|
|
class BMenu;
|
|
|
|
|
|
const char* UserStatusToString(UserStatus status);
|
|
|
|
bool IsCommand(BString line);
|
|
BString CommandName(BString line);
|
|
BString CommandArgs(BString line);
|
|
|
|
BResources* ChatResources();
|
|
|
|
BMenu* CreateAccountMenu(AccountInstances accounts, BMessage msg,
|
|
BMessage* allMsg = NULL);
|
|
|
|
const char* AccountsPath();
|
|
const char* AccountPath(const char* signature, const char* subsignature);
|
|
|
|
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);
|
|
|
|
rgb_color TintColor(rgb_color color, int severity);
|
|
rgb_color ForegroundColor(rgb_color background);
|
|
|
|
// Borrowed from BePodder's own libfunky. Groovy B)
|
|
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);
|
|
|
|
extern "C" status_t our_image(image_info& image);
|
|
|
|
|
|
#endif // _APP_UTILS_H
|
|
|