upnpsharing/upnpcontentserver/inc/upnpcontentserverdefs.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:      Internal definitions of upnp content server and client
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __UPNPCONTENTSERVERDEFS_H__
       
    23 #define __UPNPCONTENTSERVERDEFS_H__
       
    24 #include <e32debug.h>
       
    25 
       
    26 namespace UpnpContentServer
       
    27     {
       
    28 // CONSTANTS
       
    29     _LIT( KUpnpContentServer, "upnpcontentserver" );
       
    30 
       
    31     _LIT( KUpnpContentServerNameAndDir, "\\sys\\bin\\upnpcontentserver.exe" );
       
    32 
       
    33     _LIT8( KImageItemObjectClass, "object.item.imageItem.photo" );
       
    34     _LIT8( KMusicItemObjectClass, "object.item.audioItem.musicTrack" );
       
    35     _LIT8( KVideoItemObjectClass, "object.item.videoItem.movie" );
       
    36 
       
    37 // container classes
       
    38     _LIT8( KImageVideoContainerClass, "object.container.storageFolder" );
       
    39     _LIT8( KPlaylistContainerClass, "object.container.playlistContainer" );
       
    40     _LIT8( KStorageFolderContainerClass, "object.container.storageFolder" );
       
    41 
       
    42 // upload directories
       
    43     _LIT( KUploadDirectory, "Download\\Media\\" );
       
    44 
       
    45 // default container names
       
    46     _LIT8( KUploadedContainerName, "Uploaded" );
       
    47     _LIT8(KImageContainerName, "Images&Videos");
       
    48     _LIT8(KMusicContainerName, "Music");
       
    49 
       
    50     const TInt KRootContainerId = 0;
       
    51     _LIT8( KRootContainerIdDesc8, "0" );
       
    52     const TInt KUpnpContentServerVersionMajor = 1;
       
    53     const TInt KUpnpContentServerVersionMinor = 0;
       
    54     const TInt KDefaultMessageSlots = 4;
       
    55     const TInt KTintSize = sizeof( TInt );
       
    56 // There is two paths to store uploads, length of both is <25
       
    57     const TInt KMaxUploadPathLength = 25;
       
    58 
       
    59 // File names for the selected albums
       
    60     _LIT( KMusicFile, "music.txt" );
       
    61     _LIT( KVisualFile, "visual.txt" );
       
    62 
       
    63 /**
       
    64  * Enumeration for client server communication
       
    65  */
       
    66     enum TUpnpContentServerCmds
       
    67         {
       
    68         EStartUploadListener,
       
    69         EStopUploadListener,
       
    70         ERequestSelectionContent,
       
    71         EGetSelectionIndexes,
       
    72         EChangeShareContent,
       
    73         ERefreshShareContent,
       
    74         ERequestProgressInfo,
       
    75         ERequestObjectCount,
       
    76         EStartConnectionMonitor,
       
    77         EStopConnectionMonitor
       
    78         };
       
    79 
       
    80 /**
       
    81  * Type for Upnp media
       
    82  */
       
    83     enum TUpnpMediaType
       
    84         {
       
    85         EImageAndVideo = 0,
       
    86         EPlaylist,
       
    87         EPhotoFile,
       
    88         EVideoFile,
       
    89         EMusicFile
       
    90         };
       
    91 
       
    92 /**
       
    93  * Type for sharing selection
       
    94  */
       
    95     enum TUpnpSharingSelection
       
    96         {
       
    97         ENoChange = -99,
       
    98         EShareNone = 0,
       
    99         EShareMany,
       
   100         EShareAll
       
   101         };
       
   102 
       
   103     } // namespace UpnpContentServer
       
   104 
       
   105 
       
   106 // Temporary solution until clf..extended.hrh is back begin
       
   107 //
       
   108 /**
       
   109  *  Content Listing Framework list model media types.
       
   110  *  Last default media type is 0x7FFFFFFF,
       
   111  *  Custom media type range 0x80000000 0xFFFFFFFF
       
   112  */
       
   113 enum TCLFMediaTypeExtended
       
   114     {
       
   115     /// Gallery collections
       
   116     ECLFMediaTypeCollection     = 0x7
       
   117     };
       
   118 
       
   119 /**
       
   120  *  S60 internal Content Listing Framework item field IDs.
       
   121  *  Last default field ID is 0x7FFFFFFF,
       
   122  *  Custom field ID range 0x80000000 - 0xFFFFFFFF
       
   123  */
       
   124 enum TCLFExtendedFieldId
       
   125     {
       
   126     /// Media gallery collection name:
       
   127     /// descriptor
       
   128     ECLFFieldIdCollectionName       = 0x00002000,
       
   129     /// Media gallery collection ID:
       
   130     /// integer
       
   131     ECLFFieldIdCollectionId         = 0x00002001,
       
   132     /// Media gallery collection type:
       
   133     /// integer
       
   134     ECLFFieldIdCollectionType       = 0x00002002,
       
   135     /// Media gallery collection memory:
       
   136     /// integer
       
   137     ECLFFieldIdCollectionMemory     = 0x00002003,
       
   138     /// Media gallery collection properties:
       
   139     /// integer
       
   140     ECLFFieldIdCollectionProperties = 0x00002004,
       
   141     /// Media gallery collection files:
       
   142     /// descriptor
       
   143     ECLFFieldIdCollectionFiles      = 0x00002005,
       
   144     /// Media gallery item count of the collection:
       
   145     /// integer
       
   146     ECLFFieldIdCollectionItemCount  = 0x00002006
       
   147     };
       
   148 
       
   149 //temp solution ends
       
   150 
       
   151 
       
   152 // for Debugging
       
   153 /*
       
   154 #define __*LOGB __LOG8_1( "%s begin.", __PRETTY_FUNCTION__ );
       
   155 #define __*LOGE __LOG8_1( "%s end.", __PRETTY_FUNCTION__ );
       
   156 #define __*LOGEr __LOG3( "%s: %s:%d", "Error", __FILE__, __LINE__ );
       
   157 #define __*LOGEc(a) if (a) __LOG2( "%s: Error: %d", __PRETTY_FUNCTION__, a );
       
   158 */
       
   159 
       
   160 
       
   161 
       
   162 #endif // __UPNPCONTENTSERVERDEFS_H__