X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Flibsharing%2Fsharing-account.h;fp=src%2Flibsharing%2Fsharing-account.h;h=056eb95c75af1e4772d285e967ef9518756b9f81;hb=3787cd323f8bae8096463890982f100a69e348d2;hp=0000000000000000000000000000000000000000;hpb=c41d20b662ee28711818d5ff1e02c43404876c79;p=yandexfotkisp diff --git a/src/libsharing/sharing-account.h b/src/libsharing/sharing-account.h new file mode 100644 index 0000000..056eb95 --- /dev/null +++ b/src/libsharing/sharing-account.h @@ -0,0 +1,83 @@ +/* + * This file is part of Sharing Application Library + * + * Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: Alexander Bokovoy + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef _SHARING_ACCOUNT_H_ +#define _SHARING_ACCOUNT_H_ + +#include +#include "sharing-service.h" + +G_BEGIN_DECLS + +typedef struct SharingAccount SharingAccount; + +void sharing_account_free (SharingAccount* self); +gboolean sharing_account_set_param (const SharingAccount* self, + const gchar* key, const gchar* value); +gchar* sharing_account_get_param (const SharingAccount* self, const gchar* key); +gboolean sharing_account_set_option_values (const SharingAccount* self, + const gchar* key, const GSList * values); + +/** + * sharing_account_set_username: + * @self: Used #SharingAccount. + * @value: Username to set. + * + * Macro for setting the username to account. + */ +#define sharing_account_set_username(self,value) \ + sharing_account_set_param(self, "username", value) +/** + * sharing_account_get_username: + * @self: Used #SharingAccount. + * + * Macro for getting the username from account. + * + * Returns: Username as gchar*. + */ +#define sharing_account_get_username(self) \ + sharing_account_get_param(self, "username") +/** + * sharing_account_set_password: + * @self: Used #SharingAccount. + * @value: Password to set. + * + * Macro for setting the password to account. + */ +#define sharing_account_set_password(self,value) \ + sharing_account_set_param(self, "password", value) +/** + * sharing_account_get_password: + * self: Used #SharingAccount. + * + * Macro for getting the username from account. + * + * Returns: Password as gchar* + */ +#define sharing_account_get_password(self) \ + sharing_account_get_param(self, "password") + + +G_END_DECLS + +#endif /* #ifndef _SHARING_ACCOUNT_H_ */