Public Member Functions | |
gServerFavorite (int ID, char const *prefix) | |
constructor | |
void | Connect () |
connects to the server | |
int | GetIndex () |
returns the index in the favorite holder | |
Public Attributes | |
tString | name_ |
the human readable name | |
tString | address_ |
connection address | |
int | port_ |
port to connect to | |
Private Attributes | |
int | index_ |
index in favorite holder | |
tConfItemLine | confName_ |
configuration item holding the name | |
tConfItemLine | confAddress_ |
configuration item holding the address | |
tConfItem< int > | confPort |
configuration item holding the port | |
Friends | |
class | gServerFavoritesHolder |
Definition at line 74 of file gServerFavorites.cpp.
gServerFavorite::gServerFavorite | ( | int | ID, | |
char const * | prefix | |||
) | [inline] |
constructor
Definition at line 80 of file gServerFavorites.cpp.
00081 : name_( "" ) 00082 , port_( sn_defaultPort ) 00083 , index_( ID ) 00084 , confName_( sg_ConfName( ID, prefix, "_NAME") ,name_ ) 00085 , confAddress_( sg_ConfName( ID, prefix, "_ADDRESS"), address_ ) 00086 , confPort( sg_ConfName( ID, prefix, "_PORT"), port_ ) 00087 { 00088 };
void gServerFavorite::Connect | ( | ) | [inline] |
connects to the server
Definition at line 91 of file gServerFavorites.cpp.
References address_, ConnectToServer(), port_, and gLogo::SetDisplayed().
Referenced by sg_ConnectFavorite().
00092 { 00093 gServerInfoFavorite fav( address_, port_ ); 00094 00095 gLogo::SetDisplayed(false); 00096 00097 ConnectToServer( &fav ); 00098 }
int gServerFavorite::GetIndex | ( | ) | [inline] |
returns the index in the favorite holder
Definition at line 101 of file gServerFavorites.cpp.
References index_.
Referenced by gCustomConnectEntries::Generate(), and gServerFavoriteMenuEntries::gServerFavoriteMenuEntries().
00102 { 00103 return index_; 00104 }
friend class gServerFavoritesHolder [friend] |
Definition at line 77 of file gServerFavorites.cpp.
the human readable name
Definition at line 106 of file gServerFavorites.cpp.
Referenced by gServerFavoritesHolder::AddFavorite(), gServerFavoriteMenuEntries::gServerFavoriteMenuEntries(), gServerFavoritesHolder::IsFavorite(), and sg_GenerateConnectionItems().
connection address
Definition at line 107 of file gServerFavorites.cpp.
Referenced by gServerFavoritesHolder::AddFavorite(), Connect(), gCustomConnectEntries::Generate(), gServerFavoritesHolder::IsFavorite(), sg_AlternativeMaster(), and sg_GenerateConnectionItems().
port to connect to
Definition at line 108 of file gServerFavorites.cpp.
Referenced by gServerFavoritesHolder::AddFavorite(), Connect(), gCustomConnectEntries::Generate(), gServerFavoritesHolder::IsFavorite(), and sg_AlternativeMaster().
int gServerFavorite::index_ [private] |
index in favorite holder
Definition at line 111 of file gServerFavorites.cpp.
Referenced by GetIndex().
tConfItemLine gServerFavorite::confName_ [private] |
tConfItemLine gServerFavorite::confAddress_ [private] |
tConfItem<int> gServerFavorite::confPort [private] |