Infosharing Daemon API Description
*************************************

Configuration hierarchy
=======================

SERVICE         org.indt.carmand
OBJECT PATH     /org/indt/carmand
INTERFACE       org.indt.carmanplugin.Service

Methods:

        bool AccountExists()

                Returns True if an account is created, False
                otherwise.

		Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        bool AccountIsConnected()

                Returns True if an account is connected, False
                otherwise.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        bool AccountIsConnecting()

                Returns True if an account is connecting, False
                otherwise.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        bool AccountIsDisconnected()

                Returns True if an account is Disconnected, False
                otherwise.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        bool AccountIsEnabled()

                Returns True if an account is enabled, False
                otherwise.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        void AddBuddy(string username, string alias, string group)

                Request to add a buddy with specified group and alias.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments
                                 org.indt.carmanplugin.Error.AccountNotExists
                                 org.indt.carmanplugin.Error.AccountNotConnected


        void AuthorizeBuddy(string buddy, bool authorize)

                Authorizes or denies a request to be added by a remote buddy.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        bool BuddyExists(string buddy)

                Returns True if the given buddy exists, False otherwise.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments
                                 org.indt.carmanplugin.Error.AccountNotExists


        void SendMsg(string buddy, string message)

                Sends a message to a specified buddy.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        void RemoveAccount()

                Removes the Infoshare account. This method does not remove from
		server.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        void SetAccountUsername(string username)

                Sets the account's username.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        void SetAccountAlias(string alias)

                Sets the account's alias.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        void SetAccountPassword(string password)

                Sets the account's password.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


	void SetAccountProtocolID(string protocol_id)

		Sets the account's protocol id.

		Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


	void SetAccountProtocolOptions(dict options)

		Sets all options for the Infoshare account. Options could be
		server, server port and other values. This dictionary must be
		composed by {key: value}, where key is an string and value can
		be an integer, boolean, string.

		Possible Errors: org.indt.carmanplugin.Error.Unknown
				 org.indt.carmanplugin.Error.AccountNotExists
				 org.indt.carmanplugin.Error.InvalidArguments


        void SetAccountRemPwd(bool value)

                Sets the account's "Remember Password" flag.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        string GetAccountUsername()

                Returns the account's username.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        string GetAccountProtocolID()

                Returns the account's protocol id.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists

	dict GetAccountProtocolOptions()

		Returns a dictionary containing all protocol options from configured
		infoshare account. More information about protocol options, see
		libpurple documentation.

		Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


	dict GetProtocolOptions(string protocol_id)

		Returns a dictionary containing default protocol options for
		"protocol_id". These options come from libpurple. More information
		about protocol options, see libpurple documentation.

		Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        string GetAccountAlias()

                Returns the account's alias.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        string GetAccountPassword()

                Returns the account's password.

                Possible Errors: org.indt.carmanplugin.Error.PasswordNotPresent
				 org.indt.carmanplugin.Error.AccountNotExists


        bool GetAccountRemPwd()

                Returns the account's "Remember Password" flag.

		Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        void NewAccount(string username, string protocol_id)

                Creates a new account with the given username
                and protocol id.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        void ConnectAccount()

                Connects to configured Infoshare account.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists


        void DisconnectAccount()

                Disconnects from Infoshare account. All connected buddies
		will be disconnected as well.

                Possible Errors: org.indt.carmanplugin.Error.AccountNotExists



        int32 SetAccountStatus(string type, string message)

                Sets the account's status type with given "message".

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments
                                 org.indt.carmanplugin.Error.AccountNotExists



        void RemoveBuddy(string buddy)

                Removes the specified buudy from the
                buddy list.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments
                                 org.indt.carmanplugin.Error.AccountNotExists
                                 org.indt.carmanplugin.Error.BuddyNotExists


        GSList* GetBuddies()

                Returns the list of all buddies.

                Possible Errors: org.indt.carmanplugin.Error.Unknown
                                 org.indt.carmanplugin.Error.AccountNotExists


        GSList* GetCarmanBuddies()

                Returns the list of Carman buddies only. Carman buddies are
		identified by "Online from Carman" message configured for
		buddy status message.

                Possible Errors: org.indt.carmanplugin.Error.Unknown
                                 org.indt.carmanplugin.Error.AccountNotExists


        bool GetBuddyPresence(string buddy)

                Returns True if a buddy is online, False otherwise.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


        void SetBuddyAlias(string buddy, string alias)

                Sets the buddy alias to the specified alias.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments
                                 org.indt.carmanplugin.Error.AccountNotExists
                                 org.indt.carmanplugin.Error.BuddyNotExists


        string GetBuddyAlias(string buddy)

                Returns the buddy alias for given buddy.

                Possible Errors: org.indt.carmanplugin.Error.InvalidArguments


	void SetClientBusName(string client)

		Sets the client bus name which is monitoring infosharingd's
		lifetime.

		Possible Errors: org.indt.carmanplugin.Error.InvalidArguments

Signals:


        RequestAddBuddy(string buddy, string alias, string group)

                When the user wants to add a buddy, this
                signal is emitted.


        RequestAuthorizeBuddy(string buddy, string alias, string message, bool on_list)

                When user receives a request to authorize a buddy to
		be added to his list, this signal is emitted.


        BuddySignedOn(string buddy, string alias)

                When the specified buddy signed on to Carman,
                this signal is emitted.


        BuddySignedOff(string buddy, string alias)

                When the specified buddy signed off from Carman,
                this signal is emitted.


        SignedOn(string username, string protocol_id)

                When the user signs on to Carman,
                this signal is emitted.


        SignedOff(string username, string protocol_id)

                When the user signs off to Carman, this signal is emitted.


        ConnectionError(string username, string protocol_id, string sdesc, string desc)

                When a connection error occurs, this
                signal is emitted.


        ReceivingImMessage(string sender, string alias, string stripped)

                When the user is receiving a message from a remote buddy,
                this signal is emitted.

