pub fn init(ring_id: &str, rori_server: &str, rori_ring_id: &str) -> Result<Endpoint, &'static str> {
        let mut manager = Endpoint {
            account: Account::null(),

            rori_server: String::from(rori_server),
            rori_ring_id: String::from(rori_ring_id),
            ring_dbus: "cx.ring.Ring",
            configuration_path: "/cx/ring/Ring/ConfigurationManager",
            configuration_iface: "cx.ring.Ring.ConfigurationManager",
            to_say: Arc::new(Mutex::new(Vec::new()))
        };
        manager.account = Endpoint::build_account(ring_id);
        if !manager.account.enabled {
            info!("{} was not enabled. Enable it", ring_id);
            manager.enable_account();
        }
        debug!("Get: {}", manager.account.ring_id);
        if manager.account.ring_id == "" {
            return Err("Cannot build RORI account, please check configuration");
        }
        info!("{}: Account loaded", manager.account.id);
        Ok(manager)
    }
/**
     * Init the RORI server, the database and retrieve the RING account linked
     * @param ring_id to retrieve
     * @return a Manager if success, else an error
     */
Init the RORI server, the database and retrieve the RING account linked
@param ring_id to retrieve
@return a Manager if success, else an error
Init the RORI server the database and retrieve the RING account linked @param ring_id to retrieve @return a Manager if success else an error
pub fn init(ring_id: &str, rori_server: &str, rori_ring_id: &str) -> Result<Endpoint, &'static str> {
        let mut manager = Endpoint {
            account: Account::null(),
            rori_server: String::from(rori_server),
            rori_ring_id: String::from(rori_ring_id),
            ring_dbus: "cx.ring.Ring",
            configuration_path: "/cx/ring/Ring/ConfigurationManager",
            configuration_iface: "cx.ring.Ring.ConfigurationManager",
            to_say: Arc::new(Mutex::new(Vec::new()))
        };
        manager.account = Endpoint::build_account(ring_id);
        if !manager.account.enabled {
            info!("{} was not enabled. Enable it", ring_id);
            manager.enable_account();
        }
        debug!("Get: {}", manager.account.ring_id);
        if manager.account.ring_id == "" {
            return Err("Cannot build RORI account, please check configuration");
        }
        info!("{}: Account loaded", manager.account.id);
        Ok(manager)
    }
pub fn init ( ring_id : & str , rori_server : & str , rori_ring_id : & str ) -> Result < Endpoint , & ' static str > { let mut manager = Endpoint { account : Account :: null ( ) , rori_server : String :: from ( rori_server ) , rori_ring_id : String :: from ( rori_ring_id ) , ring_dbus : " " , configuration_path : " " , configuration_iface : " " , to_say : Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) } ; manager . account = Endpoint :: build_account ( ring_id ) ; if ! manager . account . enabled { info ! ( " " ring_id ) ; manager . enable_account ( ) ; } debug ! ( " " manager account ring_id ) ; if manager . account . ring_id == " " { return Err ( " " ) ; } info ! ( " " manager account id ) ; Ok ( manager ) }
Init the RORI server, the database and retrieve the RING account linked
 @param ring_id to retrieve
 @return a Manager if success, else an error
Init the RORI server the database and retrieve the RING account linked @param ring_id to retrieve @return a Manager if success else an error
ring_id
&str
rori_server
&str
rori_ring_id
&str
ring_id
&str
rori_server
&str
rori_ring_id
&str