examples/ForumNokia/Symbian_OS_End-to-End_Sockets_API_Example/SocketTaskManager/inc/TaskManagerConnInfo.h

00001 /*
00002  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
00003  *    
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions are met:
00006  *    
00007  *  * Redistributions of source code must retain the above copyright notice, this
00008  *    list of conditions and the following disclaimer.
00009  *  * Redistributions in binary form must reproduce the above copyright notice,
00010  *    this list of conditions and the following disclaimer in the documentation
00011  *    and/or other materials provided with the distribution.
00012  *  * Neither the name of Nokia Corporation nor the names of its contributors
00013  *    may be used to endorse or promote products derived from this software
00014  *    without specific prior written permission.
00015  *    
00016  *    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00017  *    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00018  *    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00019  *    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00020  *    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00021  *    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00022  *    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00023  *    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00024  *    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00025  *    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026  *    
00027  *    Description:  
00028  */
00029 
00030 
00031 #ifndef TASKMANAGERCONNINFO_H
00032 #define TASKMANAGERCONNINFO_H
00033 
00034 // INCLUDE FILES
00035 #include "TaskManager.hrh"
00036 
00037 #include <e32std.h>
00038 #include <e32def.h>
00039 #include <s32strm.h>
00040 
00041 // CLASS DECLARATION
00042 
00047 class TTaskManagerConnInfo
00048         {
00049 public: // Constructors
00050 
00054         TTaskManagerConnInfo();
00055         
00056 public: // Getters and setters
00057 
00058         void SetServerAddress( const TDesC& aAddress );
00059         TBufC< KMaxServerNameLength > ServerAddress() const;
00060         
00061         void SetPort( const TInt aPort );
00062         const TInt Port() const;
00063         
00064         void SetUsername( const TDesC& aUsername );
00065         TBufC< KMaxUsernameLength > Username() const;
00066         
00067         void SetPassword( const TDesC& aPassword );
00068         TBufC< KMaxPasswordLength > Password() const;
00069         
00070         void SetIap( const TUint32& aId);
00071         TUint32 Iap() const;
00072         
00073 public: // New functions
00074 
00079         void ExternalizeL(RWriteStream& aStream) const;
00080         
00085         void InternalizeL(RReadStream& aStream);
00086         
00087 private: // Data members
00088 
00089     // Default port, defined in .cpp file
00090     static const TInt               KDefaultPort;
00091 
00092         // Address of the server
00093         TBuf< KMaxServerNameLength >    iServerAddress;
00094         
00095         // Port number
00096         TInt iPort;
00097         
00098         // Username
00099         TBuf< KMaxUsernameLength >      iUsername;
00100         
00101         // Password
00102         TBuf< KMaxPasswordLength >      iPassword;
00103         
00104         // Default IAP;
00105         TUint32 iIap;
00106         
00107         };
00108 
00109 #endif
00110 
00111 // End of file
00112 
00113 
00114 
00115 
00116 

Generated by  doxygen 1.6.2