zeroconf/zeroconfsharing/contactinfo.h
changeset 21 ff5174af067c
equal deleted inserted replaced
14:da856f45b798 21:ff5174af067c
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CONTACTINFO_H_
       
    19 #define CONTACTINFO_H_
       
    20 
       
    21 #include <BAUTILS.H> 
       
    22 
       
    23 class CContactInfo : public CBase
       
    24     {
       
    25     public:
       
    26         
       
    27         static CContactInfo* NewL();
       
    28         static CContactInfo* NewLC();
       
    29         
       
    30         ~CContactInfo();
       
    31         
       
    32         const TDesC8& ContactName()const;
       
    33         void SetContactName(const TDesC8& aContactName);
       
    34         
       
    35         const TDesC8& CurrentlyPlaying()const;
       
    36         void SetCurrentlyPlaying(const TDesC8& aCurrentlyPlaying);
       
    37         
       
    38         const TDesC8& Status()const;
       
    39         void SetStatus(const TDesC8& aStatus);
       
    40         //Create the contact-specific directory,
       
    41               
       
    42         //To get the file 
       
    43         void SetContactDirectory();
       
    44         void StoreContactDirectory(const TDesC8& aContactDirectory);
       
    45         const TDesC8& ContactDirectory();
       
    46         const TDesC8& IconFilePath(const TDesC8& aIconFile);
       
    47         const TDesC8& IconPath();
       
    48         const TDesC8& FileListPath(const TDesC8& aFileListName);
       
    49         const TDesC8& FilePath(const TDesC8& aFileName);
       
    50         const TDesC8& ImgFileName();
       
    51         const TDesC8& MusicFileName();
       
    52         const TDesC8& VideoFileName();
       
    53 
       
    54 
       
    55         //Base Url for the host, on the n/w (in Ip addr form) 
       
    56         //Set base Url & filename to get Absolute filename
       
    57         void SetBaseUrl(const TDesC8& aBaseUrl);
       
    58         const TDesC8& BaseUrl()const;
       
    59         const  TDesC8& FileUrl(const TDesC8& aFileName);
       
    60         
       
    61         
       
    62         //Checks if the file has already been downloaded
       
    63         TBool HasBeenDownloadedL(const TDesC8& aFileName);
       
    64                 
       
    65         
       
    66         
       
    67     private:
       
    68         
       
    69         CContactInfo();
       
    70         void ConstructL();    
       
    71     
       
    72     private:
       
    73 
       
    74         //Contact name :Key
       
    75         RBuf8 iContact;
       
    76                 
       
    77         //Directory in which the contact details are stored
       
    78         //Every contact will have different directory - on client
       
    79         RBuf8 iContactDirectory;
       
    80         
       
    81         //The path in which Icon is stored
       
    82         RBuf8 iIconPath;
       
    83         
       
    84         //The Path in which all the Info related to Contact's data is stored
       
    85         RBuf8 iFileListPath;
       
    86         RBuf8 iFilePath;
       
    87 
       
    88 		//BaseUrl of the particular contact over the network
       
    89 		RBuf8 iBaseUrl;
       
    90 
       
    91         //Current file's Url (file name)
       
    92         RBuf8 iFileUrl;
       
    93         
       
    94         RBuf8 iImgFile;
       
    95         RBuf8 iMusicFile;
       
    96         RBuf8 iVideoFile;
       
    97         
       
    98         //Currently Playing 
       
    99         RBuf8 iCurrentlyPlaying; 
       
   100         
       
   101         RBuf8 iStatus;
       
   102         
       
   103         RFs iFs;
       
   104         RFile iFile;
       
   105     };
       
   106 
       
   107 
       
   108 
       
   109 #endif /* CONTACTINFO_H_ */