1*d6b205f3SIngo Weinhold // BAppFileInfo.cpp 2*d6b205f3SIngo Weinhold 3*d6b205f3SIngo Weinhold #include <AppFileInfo.h> 4*d6b205f3SIngo Weinhold 5*d6b205f3SIngo Weinhold enum { 6*d6b205f3SIngo Weinhold NOT_IMPLEMENTED = B_ERROR, 7*d6b205f3SIngo Weinhold }; 8*d6b205f3SIngo Weinhold 9*d6b205f3SIngo Weinhold // constructor 10*d6b205f3SIngo Weinhold /*! \brief Creates an uninitialized BAppFileInfo object. 11*d6b205f3SIngo Weinhold */ 12*d6b205f3SIngo Weinhold BAppFileInfo::BAppFileInfo() 13*d6b205f3SIngo Weinhold : fResources(NULL), 14*d6b205f3SIngo Weinhold fWhere(B_USE_BOTH_LOCATIONS) 15*d6b205f3SIngo Weinhold { 16*d6b205f3SIngo Weinhold } 17*d6b205f3SIngo Weinhold 18*d6b205f3SIngo Weinhold // constructor 19*d6b205f3SIngo Weinhold /*! \brief Creates an BAppFileInfo object and initializes it to the supplied 20*d6b205f3SIngo Weinhold file. 21*d6b205f3SIngo Weinhold 22*d6b205f3SIngo Weinhold The caller retains ownership of the supplied BFile object. It must not 23*d6b205f3SIngo Weinhold be deleted during the life time of the BAppFileInfo. It is not deleted 24*d6b205f3SIngo Weinhold when the BAppFileInfo is destroyed. 25*d6b205f3SIngo Weinhold 26*d6b205f3SIngo Weinhold \param file The file the object shall be initialized to. 27*d6b205f3SIngo Weinhold */ 28*d6b205f3SIngo Weinhold BAppFileInfo::BAppFileInfo(BFile *file) 29*d6b205f3SIngo Weinhold : fResources(NULL), 30*d6b205f3SIngo Weinhold fWhere(B_USE_BOTH_LOCATIONS) 31*d6b205f3SIngo Weinhold { 32*d6b205f3SIngo Weinhold } 33*d6b205f3SIngo Weinhold 34*d6b205f3SIngo Weinhold // destructor 35*d6b205f3SIngo Weinhold /*! \brief Frees all resources associated with this object. 36*d6b205f3SIngo Weinhold 37*d6b205f3SIngo Weinhold The BFile the object is set to is not deleted. 38*d6b205f3SIngo Weinhold */ 39*d6b205f3SIngo Weinhold BAppFileInfo::~BAppFileInfo() 40*d6b205f3SIngo Weinhold { 41*d6b205f3SIngo Weinhold } 42*d6b205f3SIngo Weinhold 43*d6b205f3SIngo Weinhold // SetTo 44*d6b205f3SIngo Weinhold /*! \brief Initializes the BAppFileInfo to the supplied file. 45*d6b205f3SIngo Weinhold 46*d6b205f3SIngo Weinhold The caller retains ownership of the supplied BFile object. It must not 47*d6b205f3SIngo Weinhold be deleted during the life time of the BAppFileInfo. It is not deleted 48*d6b205f3SIngo Weinhold when the BAppFileInfo is destroyed. 49*d6b205f3SIngo Weinhold 50*d6b205f3SIngo Weinhold \param file The file the object shall be initialized to. 51*d6b205f3SIngo Weinhold 52*d6b205f3SIngo Weinhold \return 53*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 54*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a file or \a file is not properly initialized. 55*d6b205f3SIngo Weinhold */ 56*d6b205f3SIngo Weinhold status_t 57*d6b205f3SIngo Weinhold BAppFileInfo::SetTo(BFile *file) 58*d6b205f3SIngo Weinhold { 59*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 60*d6b205f3SIngo Weinhold } 61*d6b205f3SIngo Weinhold 62*d6b205f3SIngo Weinhold // GetType 63*d6b205f3SIngo Weinhold /*! \brief Gets the file's MIME type. 64*d6b205f3SIngo Weinhold 65*d6b205f3SIngo Weinhold \param type A pointer to a pre-allocated character buffer of size 66*d6b205f3SIngo Weinhold \c B_MIME_TYPE_LENGTH or larger into which the MIME type of the 67*d6b205f3SIngo Weinhold file shall be written. 68*d6b205f3SIngo Weinhold \return 69*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 70*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 71*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a type or the type string stored in the 72*d6b205f3SIngo Weinhold attribute/resources is longer than \c B_MIME_TYPE_LENGTH. 73*d6b205f3SIngo Weinhold - \c B_BAD_TYPE: The attribute/resources the type string is stored in have 74*d6b205f3SIngo Weinhold the wrong type. 75*d6b205f3SIngo Weinhold - \c B_ENTRY_NOT_FOUND: No type is set on the file. 76*d6b205f3SIngo Weinhold - other error codes 77*d6b205f3SIngo Weinhold */ 78*d6b205f3SIngo Weinhold status_t 79*d6b205f3SIngo Weinhold BAppFileInfo::GetType(char *type) const 80*d6b205f3SIngo Weinhold { 81*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 82*d6b205f3SIngo Weinhold } 83*d6b205f3SIngo Weinhold 84*d6b205f3SIngo Weinhold // SetType 85*d6b205f3SIngo Weinhold /*! \brief Sets the file's MIME type. 86*d6b205f3SIngo Weinhold 87*d6b205f3SIngo Weinhold If \a type is \c NULL the file's MIME type is unset. 88*d6b205f3SIngo Weinhold 89*d6b205f3SIngo Weinhold \param type The MIME type to be assigned to the file. Must not be longer 90*d6b205f3SIngo Weinhold than \c B_MIME_TYPE_LENGTH (including the terminating null). 91*d6b205f3SIngo Weinhold May be \c NULL. 92*d6b205f3SIngo Weinhold \return 93*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 94*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 95*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \a type is longer than \c B_MIME_TYPE_LENGTH. 96*d6b205f3SIngo Weinhold - other error codes 97*d6b205f3SIngo Weinhold */ 98*d6b205f3SIngo Weinhold status_t 99*d6b205f3SIngo Weinhold BAppFileInfo::SetType(const char *type) 100*d6b205f3SIngo Weinhold { 101*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 102*d6b205f3SIngo Weinhold } 103*d6b205f3SIngo Weinhold 104*d6b205f3SIngo Weinhold // GetSignature 105*d6b205f3SIngo Weinhold /*! \brief Gets the file's application signature. 106*d6b205f3SIngo Weinhold 107*d6b205f3SIngo Weinhold \param signature A pointer to a pre-allocated character buffer of size 108*d6b205f3SIngo Weinhold \c B_MIME_TYPE_LENGTH or larger into which the application 109*d6b205f3SIngo Weinhold signature of the file shall be written. 110*d6b205f3SIngo Weinhold \return 111*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 112*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 113*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a signature or the signature stored in the 114*d6b205f3SIngo Weinhold attribute/resources is longer than \c B_MIME_TYPE_LENGTH. 115*d6b205f3SIngo Weinhold - \c B_BAD_TYPE: The attribute/resources the signature is stored in have 116*d6b205f3SIngo Weinhold the wrong type. 117*d6b205f3SIngo Weinhold - \c B_ENTRY_NOT_FOUND: No signature is set on the file. 118*d6b205f3SIngo Weinhold - other error codes 119*d6b205f3SIngo Weinhold */ 120*d6b205f3SIngo Weinhold status_t 121*d6b205f3SIngo Weinhold BAppFileInfo::GetSignature(char *signature) const 122*d6b205f3SIngo Weinhold { 123*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 124*d6b205f3SIngo Weinhold } 125*d6b205f3SIngo Weinhold 126*d6b205f3SIngo Weinhold // SetSignature 127*d6b205f3SIngo Weinhold /*! \brief Sets the file's application signature. 128*d6b205f3SIngo Weinhold 129*d6b205f3SIngo Weinhold If \a signature is \c NULL the file's application signature is unset. 130*d6b205f3SIngo Weinhold 131*d6b205f3SIngo Weinhold \param signature The application signature to be assigned to the file. 132*d6b205f3SIngo Weinhold Must not be longer than \c B_MIME_TYPE_LENGTH (including the 133*d6b205f3SIngo Weinhold terminating null). May be \c NULL. 134*d6b205f3SIngo Weinhold \return 135*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 136*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 137*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \a signature is longer than \c B_MIME_TYPE_LENGTH. 138*d6b205f3SIngo Weinhold - other error codes 139*d6b205f3SIngo Weinhold */ 140*d6b205f3SIngo Weinhold status_t 141*d6b205f3SIngo Weinhold BAppFileInfo::SetSignature(const char *signature) 142*d6b205f3SIngo Weinhold { 143*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 144*d6b205f3SIngo Weinhold } 145*d6b205f3SIngo Weinhold 146*d6b205f3SIngo Weinhold // GetAppFlags 147*d6b205f3SIngo Weinhold /*! \brief Gets the file's application flags. 148*d6b205f3SIngo Weinhold 149*d6b205f3SIngo Weinhold \param flags A pointer to a pre-allocated uint32 into which the application 150*d6b205f3SIngo Weinhold flags of the file shall be written. 151*d6b205f3SIngo Weinhold \return 152*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 153*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 154*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a flags. 155*d6b205f3SIngo Weinhold - \c B_BAD_TYPE: The attribute/resources the flags are stored in have 156*d6b205f3SIngo Weinhold the wrong type. 157*d6b205f3SIngo Weinhold - \c B_ENTRY_NOT_FOUND: No application flags are set on the file. 158*d6b205f3SIngo Weinhold - other error codes 159*d6b205f3SIngo Weinhold */ 160*d6b205f3SIngo Weinhold status_t 161*d6b205f3SIngo Weinhold BAppFileInfo::GetAppFlags(uint32 *flags) const 162*d6b205f3SIngo Weinhold { 163*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 164*d6b205f3SIngo Weinhold } 165*d6b205f3SIngo Weinhold 166*d6b205f3SIngo Weinhold // SetAppFlags 167*d6b205f3SIngo Weinhold /*! \brief Sets the file's application flags. 168*d6b205f3SIngo Weinhold \param flags The application flags to be assigned to the file. 169*d6b205f3SIngo Weinhold \return 170*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 171*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 172*d6b205f3SIngo Weinhold - other error codes 173*d6b205f3SIngo Weinhold */ 174*d6b205f3SIngo Weinhold status_t 175*d6b205f3SIngo Weinhold BAppFileInfo::SetAppFlags(uint32 flags) 176*d6b205f3SIngo Weinhold { 177*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 178*d6b205f3SIngo Weinhold } 179*d6b205f3SIngo Weinhold 180*d6b205f3SIngo Weinhold // GetSupportedTypes 181*d6b205f3SIngo Weinhold /*! \brief Gets the MIME types supported by the application. 182*d6b205f3SIngo Weinhold 183*d6b205f3SIngo Weinhold The supported MIME types are added to a field "types" of type 184*d6b205f3SIngo Weinhold \c B_STRING_TYPE in \a types. 185*d6b205f3SIngo Weinhold 186*d6b205f3SIngo Weinhold \param types A pointer to a pre-allocated BMessage into which the 187*d6b205f3SIngo Weinhold MIME types supported by the appplication shall be written. 188*d6b205f3SIngo Weinhold \return 189*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 190*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 191*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a types. 192*d6b205f3SIngo Weinhold - \c B_BAD_TYPE: The attribute/resources the supported types are stored in 193*d6b205f3SIngo Weinhold have the wrong type. 194*d6b205f3SIngo Weinhold - \c B_ENTRY_NOT_FOUND: No supported types are set on the file. 195*d6b205f3SIngo Weinhold - other error codes 196*d6b205f3SIngo Weinhold */ 197*d6b205f3SIngo Weinhold status_t 198*d6b205f3SIngo Weinhold BAppFileInfo::GetSupportedTypes(BMessage *types) const 199*d6b205f3SIngo Weinhold { 200*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 201*d6b205f3SIngo Weinhold } 202*d6b205f3SIngo Weinhold 203*d6b205f3SIngo Weinhold // SetSupportedTypes 204*d6b205f3SIngo Weinhold /*! \brief Sets the MIME types supported by the application. 205*d6b205f3SIngo Weinhold 206*d6b205f3SIngo Weinhold If \a types is \c NULL the application's supported types are unset. 207*d6b205f3SIngo Weinhold 208*d6b205f3SIngo Weinhold The supported MIME types must be stored in a field "types" of type 209*d6b205f3SIngo Weinhold \c B_STRING_TYPE in \a types. 210*d6b205f3SIngo Weinhold 211*d6b205f3SIngo Weinhold \param types The supported types to be assigned to the file. 212*d6b205f3SIngo Weinhold May be \c NULL. 213*d6b205f3SIngo Weinhold \param syncAll ??? 214*d6b205f3SIngo Weinhold \return 215*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 216*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 217*d6b205f3SIngo Weinhold - other error codes 218*d6b205f3SIngo Weinhold 219*d6b205f3SIngo Weinhold \todo What does \a syncAll mean? 220*d6b205f3SIngo Weinhold */ 221*d6b205f3SIngo Weinhold status_t 222*d6b205f3SIngo Weinhold BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll) 223*d6b205f3SIngo Weinhold { 224*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 225*d6b205f3SIngo Weinhold } 226*d6b205f3SIngo Weinhold 227*d6b205f3SIngo Weinhold // SetSupportedTypes 228*d6b205f3SIngo Weinhold /*! \brief Sets the MIME types supported by the application. 229*d6b205f3SIngo Weinhold 230*d6b205f3SIngo Weinhold If \a types is \c NULL the application's supported types are unset. 231*d6b205f3SIngo Weinhold 232*d6b205f3SIngo Weinhold The supported MIME types must be stored in a field "types" of type 233*d6b205f3SIngo Weinhold \c B_STRING_TYPE in \a types. 234*d6b205f3SIngo Weinhold 235*d6b205f3SIngo Weinhold \param types The supported types to be assigned to the file. 236*d6b205f3SIngo Weinhold May be \c NULL. 237*d6b205f3SIngo Weinhold \return 238*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 239*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 240*d6b205f3SIngo Weinhold - other error codes 241*d6b205f3SIngo Weinhold */ 242*d6b205f3SIngo Weinhold status_t 243*d6b205f3SIngo Weinhold BAppFileInfo::SetSupportedTypes(const BMessage *types) 244*d6b205f3SIngo Weinhold { 245*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 246*d6b205f3SIngo Weinhold } 247*d6b205f3SIngo Weinhold 248*d6b205f3SIngo Weinhold // IsSupportedType 249*d6b205f3SIngo Weinhold /*! \brief Returns whether the application supports the supplied MIME type. 250*d6b205f3SIngo Weinhold 251*d6b205f3SIngo Weinhold If the application supports the wildcard type "application/octet-stream" 252*d6b205f3SIngo Weinhold any this method returns \c true for any MIME type. 253*d6b205f3SIngo Weinhold 254*d6b205f3SIngo Weinhold \param type The MIME type in question. 255*d6b205f3SIngo Weinhold \return \c true, if \a type is a valid MIME type and it is supported by 256*d6b205f3SIngo Weinhold the application, \c false otherwise. 257*d6b205f3SIngo Weinhold */ 258*d6b205f3SIngo Weinhold bool 259*d6b205f3SIngo Weinhold BAppFileInfo::IsSupportedType(const char *type) const 260*d6b205f3SIngo Weinhold { 261*d6b205f3SIngo Weinhold return false; // not implemented 262*d6b205f3SIngo Weinhold } 263*d6b205f3SIngo Weinhold 264*d6b205f3SIngo Weinhold // Supports 265*d6b205f3SIngo Weinhold /*! \brief Returns whether the application supports the supplied MIME type 266*d6b205f3SIngo Weinhold explicitly. 267*d6b205f3SIngo Weinhold 268*d6b205f3SIngo Weinhold Unlike IsSupportedType(), this method returns \c true, only if the type 269*d6b205f3SIngo Weinhold is explicitly supported, regardless of whether it supports 270*d6b205f3SIngo Weinhold "application/octet-stream". 271*d6b205f3SIngo Weinhold 272*d6b205f3SIngo Weinhold \param type The MIME type in question. 273*d6b205f3SIngo Weinhold \return \c true, if \a type is a valid MIME type and it is explicitly 274*d6b205f3SIngo Weinhold supported by the application, \c false otherwise. 275*d6b205f3SIngo Weinhold */ 276*d6b205f3SIngo Weinhold bool 277*d6b205f3SIngo Weinhold BAppFileInfo::Supports(BMimeType *type) const 278*d6b205f3SIngo Weinhold { 279*d6b205f3SIngo Weinhold return false; // not implemented 280*d6b205f3SIngo Weinhold } 281*d6b205f3SIngo Weinhold 282*d6b205f3SIngo Weinhold // GetIcon 283*d6b205f3SIngo Weinhold /*! \brief Gets the file's icon. 284*d6b205f3SIngo Weinhold \param icon A pointer to a pre-allocated BBitmap of the correct dimension 285*d6b205f3SIngo Weinhold to store the requested icon (16x16 for the mini and 32x32 for the 286*d6b205f3SIngo Weinhold large icon). 287*d6b205f3SIngo Weinhold \param which Specifies the size of the icon to be retrieved: 288*d6b205f3SIngo Weinhold \c B_MINI_ICON for the mini and \c B_LARGE_ICON for the large icon. 289*d6b205f3SIngo Weinhold \return 290*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 291*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 292*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a icon, unsupported icon size \a which or bitmap 293*d6b205f3SIngo Weinhold dimensions (\a icon) and icon size (\a which) do not match. 294*d6b205f3SIngo Weinhold - other error codes 295*d6b205f3SIngo Weinhold */ 296*d6b205f3SIngo Weinhold status_t 297*d6b205f3SIngo Weinhold BAppFileInfo::GetIcon(BBitmap *icon, icon_size which) const 298*d6b205f3SIngo Weinhold { 299*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 300*d6b205f3SIngo Weinhold } 301*d6b205f3SIngo Weinhold 302*d6b205f3SIngo Weinhold // SetIcon 303*d6b205f3SIngo Weinhold /*! \brief Sets the file's icon. 304*d6b205f3SIngo Weinhold 305*d6b205f3SIngo Weinhold If \a icon is \c NULL the file's icon is unset. 306*d6b205f3SIngo Weinhold 307*d6b205f3SIngo Weinhold \param icon A pointer to the BBitmap containing the icon to be set. 308*d6b205f3SIngo Weinhold May be \c NULL. 309*d6b205f3SIngo Weinhold \param which Specifies the size of the icon to be set: \c B_MINI_ICON 310*d6b205f3SIngo Weinhold for the mini and \c B_LARGE_ICON for the large icon. 311*d6b205f3SIngo Weinhold \return 312*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 313*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 314*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: Unknown icon size \a which or bitmap dimensions (\a icon) 315*d6b205f3SIngo Weinhold and icon size (\a which) do not match. 316*d6b205f3SIngo Weinhold - other error codes 317*d6b205f3SIngo Weinhold */ 318*d6b205f3SIngo Weinhold status_t 319*d6b205f3SIngo Weinhold BAppFileInfo::SetIcon(const BBitmap *icon, icon_size which) 320*d6b205f3SIngo Weinhold { 321*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 322*d6b205f3SIngo Weinhold } 323*d6b205f3SIngo Weinhold 324*d6b205f3SIngo Weinhold // GetVersionInfo 325*d6b205f3SIngo Weinhold /*! \brief Gets the file's version info. 326*d6b205f3SIngo Weinhold \param info A pointer to a pre-allocated version_info structure into which 327*d6b205f3SIngo Weinhold the version info should be written. 328*d6b205f3SIngo Weinhold \param kind Specifies the kind of the version info to be retrieved: 329*d6b205f3SIngo Weinhold \c B_APP_VERSION_KIND for the application's version info and 330*d6b205f3SIngo Weinhold \c B_SYSTEM_VERSION_KIND for the suite's info the application 331*d6b205f3SIngo Weinhold belongs to. 332*d6b205f3SIngo Weinhold \return 333*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 334*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 335*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a info. 336*d6b205f3SIngo Weinhold - other error codes 337*d6b205f3SIngo Weinhold */ 338*d6b205f3SIngo Weinhold status_t 339*d6b205f3SIngo Weinhold BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const 340*d6b205f3SIngo Weinhold { 341*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 342*d6b205f3SIngo Weinhold } 343*d6b205f3SIngo Weinhold 344*d6b205f3SIngo Weinhold // SetVersionInfo 345*d6b205f3SIngo Weinhold /*! \brief Sets the file's version info. 346*d6b205f3SIngo Weinhold 347*d6b205f3SIngo Weinhold If \a info is \c NULL the file's version info is unset. 348*d6b205f3SIngo Weinhold 349*d6b205f3SIngo Weinhold \param info The version info to be set. May be \c NULL. 350*d6b205f3SIngo Weinhold \param kind Specifies kind of version info to be set: 351*d6b205f3SIngo Weinhold \c B_APP_VERSION_KIND for the application's version info and 352*d6b205f3SIngo Weinhold \c B_SYSTEM_VERSION_KIND for the suite's info the application 353*d6b205f3SIngo Weinhold belongs to. 354*d6b205f3SIngo Weinhold \return 355*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 356*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 357*d6b205f3SIngo Weinhold - other error codes 358*d6b205f3SIngo Weinhold */ 359*d6b205f3SIngo Weinhold status_t 360*d6b205f3SIngo Weinhold BAppFileInfo::SetVersionInfo(const version_info *info, version_kind kind) 361*d6b205f3SIngo Weinhold { 362*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 363*d6b205f3SIngo Weinhold } 364*d6b205f3SIngo Weinhold 365*d6b205f3SIngo Weinhold // GetIconForType 366*d6b205f3SIngo Weinhold /*! \brief Gets the icon the application provides for a given MIME type. 367*d6b205f3SIngo Weinhold \param type The MIME type in question. 368*d6b205f3SIngo Weinhold \param icon A pointer to a pre-allocated BBitmap of the correct dimension 369*d6b205f3SIngo Weinhold to store the requested icon (16x16 for the mini and 32x32 for the 370*d6b205f3SIngo Weinhold large icon). 371*d6b205f3SIngo Weinhold \param which Specifies the size of the icon to be retrieved: 372*d6b205f3SIngo Weinhold \c B_MINI_ICON for the mini and \c B_LARGE_ICON for the large icon. 373*d6b205f3SIngo Weinhold \return 374*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 375*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 376*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: \c NULL \a type or \a icon, unsupported icon size 377*d6b205f3SIngo Weinhold \a which or bitmap dimensions (\a icon) and icon size (\a which) do 378*d6b205f3SIngo Weinhold not match. 379*d6b205f3SIngo Weinhold - other error codes 380*d6b205f3SIngo Weinhold */ 381*d6b205f3SIngo Weinhold status_t 382*d6b205f3SIngo Weinhold BAppFileInfo::GetIconForType(const char *type, BBitmap *icon, 383*d6b205f3SIngo Weinhold icon_size which) const 384*d6b205f3SIngo Weinhold { 385*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 386*d6b205f3SIngo Weinhold } 387*d6b205f3SIngo Weinhold 388*d6b205f3SIngo Weinhold // SetIconForType 389*d6b205f3SIngo Weinhold /*! \brief Sets the icon the application provides for a given MIME type. 390*d6b205f3SIngo Weinhold 391*d6b205f3SIngo Weinhold If \a icon is \c NULL the icon is unset. 392*d6b205f3SIngo Weinhold 393*d6b205f3SIngo Weinhold \param type The MIME type in question. 394*d6b205f3SIngo Weinhold \param icon A pointer to the BBitmap containing the icon to be set. 395*d6b205f3SIngo Weinhold May be \c NULL. 396*d6b205f3SIngo Weinhold \param which Specifies the size of the icon to be set: \c B_MINI_ICON 397*d6b205f3SIngo Weinhold for the mini and \c B_LARGE_ICON for the large icon. 398*d6b205f3SIngo Weinhold \return 399*d6b205f3SIngo Weinhold - \c B_OK: Everything went fine. 400*d6b205f3SIngo Weinhold - \c B_NO_INIT: The object is not properly initialized. 401*d6b205f3SIngo Weinhold - \c B_BAD_VALUE: Unknown icon size \a which or bitmap dimensions (\a icon) 402*d6b205f3SIngo Weinhold and icon size (\a which) do not match. 403*d6b205f3SIngo Weinhold - other error codes 404*d6b205f3SIngo Weinhold */ 405*d6b205f3SIngo Weinhold status_t 406*d6b205f3SIngo Weinhold BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon, 407*d6b205f3SIngo Weinhold icon_size which) 408*d6b205f3SIngo Weinhold { 409*d6b205f3SIngo Weinhold return NOT_IMPLEMENTED; 410*d6b205f3SIngo Weinhold } 411*d6b205f3SIngo Weinhold 412*d6b205f3SIngo Weinhold // SetInfoLocation 413*d6b205f3SIngo Weinhold /*! \brief Specifies the location where the meta data shall be stored. 414*d6b205f3SIngo Weinhold 415*d6b205f3SIngo Weinhold The options for \a location are: 416*d6b205f3SIngo Weinhold - \c B_USE_ATTRIBUTES: Store the data in the attributes. 417*d6b205f3SIngo Weinhold - \c B_USE_RESOURCES: Store the data in the resources. 418*d6b205f3SIngo Weinhold - \c B_USE_BOTH_LOCATIONS: Store the data in attributes and resources. 419*d6b205f3SIngo Weinhold 420*d6b205f3SIngo Weinhold \param location The location where the meta data shall be stored. 421*d6b205f3SIngo Weinhold */ 422*d6b205f3SIngo Weinhold void 423*d6b205f3SIngo Weinhold BAppFileInfo::SetInfoLocation(info_location location) 424*d6b205f3SIngo Weinhold { 425*d6b205f3SIngo Weinhold } 426*d6b205f3SIngo Weinhold 427*d6b205f3SIngo Weinhold // IsUsingAttributes 428*d6b205f3SIngo Weinhold /*! \brief Returns whether the object stores the meta data (also) in the 429*d6b205f3SIngo Weinhold file's attributes. 430*d6b205f3SIngo Weinhold \return \c true, if the meta data are (also) stored in the file's 431*d6b205f3SIngo Weinhold attributes, \c false otherwise. 432*d6b205f3SIngo Weinhold */ 433*d6b205f3SIngo Weinhold bool 434*d6b205f3SIngo Weinhold BAppFileInfo::IsUsingAttributes() const 435*d6b205f3SIngo Weinhold { 436*d6b205f3SIngo Weinhold return false; // not implemented 437*d6b205f3SIngo Weinhold } 438*d6b205f3SIngo Weinhold 439*d6b205f3SIngo Weinhold // IsUsingResources 440*d6b205f3SIngo Weinhold /*! \brief Returns whether the object stores the meta data (also) in the 441*d6b205f3SIngo Weinhold file's resources. 442*d6b205f3SIngo Weinhold \return \c true, if the meta data are (also) stored in the file's 443*d6b205f3SIngo Weinhold resources, \c false otherwise. 444*d6b205f3SIngo Weinhold */ 445*d6b205f3SIngo Weinhold bool 446*d6b205f3SIngo Weinhold BAppFileInfo::IsUsingResources() const 447*d6b205f3SIngo Weinhold { 448*d6b205f3SIngo Weinhold return false; // not implemented 449*d6b205f3SIngo Weinhold } 450*d6b205f3SIngo Weinhold 451*d6b205f3SIngo Weinhold // FBC 452*d6b205f3SIngo Weinhold void BAppFileInfo::_ReservedAppFileInfo1() {} 453*d6b205f3SIngo Weinhold void BAppFileInfo::_ReservedAppFileInfo2() {} 454*d6b205f3SIngo Weinhold void BAppFileInfo::_ReservedAppFileInfo3() {} 455*d6b205f3SIngo Weinhold 456*d6b205f3SIngo Weinhold // = 457*d6b205f3SIngo Weinhold /*! \brief Privatized assignment operator to prevent usage. 458*d6b205f3SIngo Weinhold */ 459*d6b205f3SIngo Weinhold BAppFileInfo & 460*d6b205f3SIngo Weinhold BAppFileInfo::operator=(const BAppFileInfo &) 461*d6b205f3SIngo Weinhold { 462*d6b205f3SIngo Weinhold return *this; 463*d6b205f3SIngo Weinhold } 464*d6b205f3SIngo Weinhold 465*d6b205f3SIngo Weinhold // copy constructor 466*d6b205f3SIngo Weinhold /*! \brief Privatized copy constructor to prevent usage. 467*d6b205f3SIngo Weinhold */ 468*d6b205f3SIngo Weinhold BAppFileInfo::BAppFileInfo(const BAppFileInfo &) 469*d6b205f3SIngo Weinhold { 470*d6b205f3SIngo Weinhold } 471*d6b205f3SIngo Weinhold 472