1BRoster() 2none 3 4bool IsRunning(const char *signature) const 5case 1: signature is NULL => 6 Should return false. 7case 2: signature is not NULL, but no app with this signature is running => 8 Should return false. 9case 3: signature is not NULL and an (two) app(s) with this signature is (are) 10 running; quit one; quit the second one => 11 Should return true; true; false. 12 13bool IsRunning(entry_ref *ref) const 14case 1: ref is NULL => 15 Should return false. 16case 2: ref is not NULL, but no app with this ref is running => 17 Should return false. 18case 3: ref is not NULL and an (two) app(s) with this ref is (are) 19 running; quit one; quit the second one => 20 Should return true; true; false. 21 22team_id TeamFor(const char *signature) const 23case 1: signature is NULL => 24 Should return B_BAD_VALUE. 25case 2: signature is not NULL, but no app with this signature is running => 26 Should return B_ERROR. 27case 3: signature is not NULL and an (two) app(s) with this signature is (are) 28 running; quit one; quit the second one => 29 Should return the ID of one of the teams; the ID of the second team; 30 B_ERROR. 31 32team_id TeamFor(entry_ref *ref) const 33case 1: ref is NULL => 34 Should return B_BAD_VALUE. 35case 2: ref is not NULL, but no app with this ref is running => 36 Should return B_ERROR. 37case 3: ref is not NULL and an (two) app(s) with this ref is (are) 38 running; quit one; quit the second one => 39 Should return the ID of one of the teams; the ID of the second team; 40 B_ERROR. 41 42status_t GetAppInfo(const char *signature, app_info *info) const 43case 1: signature is NULL or info is NULL => 44 Should return B_BAD_VALUE. 45case 2: signature/info are not NULL, but no app with this signature is 46 running => 47 Should return B_ERROR. 48case 3: signature/info are not NULL and an (two) app(s) with this signature 49 is (are) running; quit one; quit the second one => 50 Should 51 - fill the app info with the data of one of the apps and return B_OK; 52 - fill the app info with the data of the second apps and return B_OK; 53 - return B_ERROR. 54 55status_t GetAppInfo(entry_ref *ref, app_info *info) const 56case 1: ref is NULL or info is NULL => 57 Should return B_BAD_VALUE. 58case 2: ref/info are not NULL, but no app with this ref is running => 59 Should return B_ERROR. 60case 3: ref/info are not NULL and an (two) app(s) with this ref 61 is (are) running; quit one; quit the second one => 62 Should 63 - fill the app info with the data of one of the apps and return B_OK; 64 - fill the app info with the data of the second apps and return B_OK; 65 - return B_ERROR. 66 67status_t GetRunningAppInfo(team_id team, app_info *info) const 68case 1: info is NULL => 69 Should return B_BAD_VALUE. 70case 2: info is not NULL, but no app with the team ID is running => 71 Should return B_BAD_TEAM_ID, if team >= 0, B_ERROR otherwise. 72case 3: info is not NULL, and an app with the team ID is running => 73 Should fill the app info and return B_OK. 74 75void GetAppList(BList *teamIDList) const 76case 1: teamIDList is NULL => 77 Should do nothing. 78case 2: teamIDList is not NULL and not empty => 79 Should append the team IDs of all running apps to teamIDList. 80 81void GetAppList(const char *signature, BList *teamIDList) const 82case 1: signature or teamIDList are NULL => 83 Should do nothing/should not modify teamIDList. 84case 2: teamIDList is not NULL and not empty, signature is not NULL, but no 85 app with this signature is running => 86 Should not modify teamIDList. 87case 3: teamIDList is not NULL and not empty, signature is not NULL and 88 app(s) with this signature is (are) running => 89 Should append the team IDs of all running apps with the supplied 90 signature to teamIDList. 91 92void GetRecentApps(BMessage *refList, int32 maxCount) 93case A1: refList is NULL; maxCount < 0 94 R5: crashes 95 OBOS: should quietly do nothing. 96case A1: refList is NULL; maxCount == 0 97 R5: crashes 98 OBOS: should quietly do nothing. 99case A1: refList is NULL; maxCount > 0 100 R5: crashes 101 OBOS: should quietly do nothing. 102case B1: refList is valid; maxCount < 0 103 Should return zero recent apps 104case B2: refList is valid; maxCount == 0 105 Should return zero recent apps 106case B3: refList is valid; maxCount > 0 107 Should return maxCount apps 108case C1: Normal function, with the second most recent app being one with a 109 qualifying BEOS:APP_FLAGS attribute, and the most recent app launched 110 being one with no BEOS:APP_FLAGS attribute. 111 The latter application should *not* appear at the top 112 of the recent apps list. 113case C2: Normal function, with the second most recent app being one with a 114 qualifying BEOS:APP_FLAGS attribute, and the most recent app launched 115 also being one with a qualifying BEOS:APP_FLAGS attribute. 116 The latter application *should* appear at the top of the recent 117 apps list. 118case C3: Normal function, with the second most recent app being one with a 119 qualifying BEOS:APP_FLAGS attribute, and the most recent app launched 120 being one with a non-qualifying BEOS:APP_FLAGS attribute. 121 The latter application *should* appear at the top of the recent 122 apps list. 123 124void GetRecentDocuments(BMessage *refList, int32 maxCount, const char *fileType, 125 const char *appSig) 126void GetRecentDocuments(BMessage *refList, int32 maxCount, const char *fileTypes[], 127 int32 fileTypesCount, const char *appSig) 128case 1: refList is NULL; all other params are valid. 129 Should quietly do nothing. 130case 2: refList is non-NULL, maxCount is zero, fileType and appSig are NULL. 131 R5: Returns one recent document. 132 OBOS: Returns an empty message 133case 3: refList is non-NULL, maxCount is negative, fileType and appSig are NULL. 134 R5: Returns one recent document. 135 OBOS: Returns an empty message 136case 4: Normal function. 137case 5: Duplicate entries with different app sigs are added. When requested, 138 only most recent instance among the duplicates is returned. 139 140void GetRecentFolders(BMessage *refList, int32 maxCount, const char *appSig) 141case 1: refList is NULL; maxCount is valid, appSig is NULL. 142 Should quietly do nothing. 143case 2: refList is valid, maxCount is negative, appSig is NULL. 144 R5: Returns one recent document. 145 OBOS: Returns an empty message. 146case 3: refList is valid, maxCount is zero, appSig is NULL. 147 R5: Returns one recent document. 148 OBOS: Returns an empty message. 149case 4: Normal function 150case 5: Duplicate entries with different app sigs are added. When requested, 151 only most recent instance among the duplicates is returned. 152 153status_t FindApp() const: common cases 154case 1: uninstalled type mimeType => 155 Should return B_LAUNCH_FAILED_APP_NOT_FOUND. 156case 2: installed type mimeType, no preferred app => 157 Should return B_LAUNCH_FAILED_NO_PREFERRED_APP. 158case 3: installed type mimeType, preferred app, app type not installed, 159 app has no signature => 160 Should return B_LAUNCH_FAILED_APP_NOT_FOUND. 161case 4: installed type mimeType, preferred app, app type not installed, 162 app has signature => 163 Should return B_OK and set the ref to refer to the application's 164 executable. Should install the app type and set the app hint on it. 165case 5: installed type mimeType, preferred app, app type installed, 166 app has signature => 167 Should return B_OK and set the ref to refer to the application's 168 executable. Should set the app hint on the app type. 169case 6: installed type mimeType, preferred app, app type installed, 170 app has signature, app has no execute permission => 171 Should return B_OK and set the ref to refer to the application's 172 executable. Should set the app hint on the app type. 173case 7: installed type mimeType, preferred app, app type installed, 174 two apps have the signature => 175 Should return B_OK and set the ref to refer to the application 176 executable with the most recent modification time. Should set the app 177 hint on the app type. 178case 8: installed type mimeType, preferred app, app type installed, 179 two apps have the signature, one has a version info, the other one is 180 newer => 181 Should return B_OK and set the ref to refer to the application 182 executable with version info. Should set the app hint on the app type. 183case 9: installed type mimeType, preferred app, app type installed, 184 two apps have the signature, both apps have a version info => 185 Should return B_OK and set the ref to refer to the application 186 executable with the greater version. Should set the app 187 hint on the app type. 188case 10:installed type mimeType, preferred app, app type installed, 189 preferred app type has an app hint that points to an app with a 190 different signature => 191 Should return B_OK and set the ref to refer to the application's 192 executable. Should remove the incorrect app hint on the app type. 193 (OBOS: Should set the correct app hint. 194 Don't even return the wrong app?) 195case 11:installed type mimeType, preferred app, app type installed, 196 preferred app type has an app hint pointing to void, 197 a differently named app with this signature exists => 198 Should return B_OK and set the ref to refer to the application's 199 executable. (not R5: Should update the app hint on the app type?) 200case 12:mimeType is app signature, not installed => 201 Should return B_OK and set the ref to refer to the application 202 executable. Should set the app hint on the app type. 203case 13:mimeType is installed, but has no preferred application, 204 super type has preferred application => 205 Should return B_OK and set the ref to refer to the application 206 executable associated with the preferred app of the supertype. 207 Should set the app hint on the app type. 208case 14:installed type mimeType, preferred app, app type not installed, 209 app has signature, app is trash => 210 Should return B_LAUNCH_FAILED_APP_IN_TRASH. 211case 15:installed type mimeType, preferred app, app type installed, 212 preferred app type has an app hint pointing to void, 213 no app with this signature exists => 214 Should return B_LAUNCH_FAILED_APP_NOT_FOUND and unset the app type's 215 app hint. 216case 16:installed type mimeType, preferred app, app type installed, 217 preferred app type has an app hint pointing to a cyclic link, 218 no app with this signature exists => 219 R5: Should return B_OK and set the ref to refer to the link. 220 OBOS: Should return B_LAUNCH_FAILED_APP_NOT_FOUND and unset the app 221 type's app hint. 222 223status_t FindApp(const char *mimeType, entry_ref *app) const 224case 1: mimeType or app are NULL => 225 Should return B_BAD_VALUE. 226case 2: mimeType is invalid => 227 Should return B_BAD_VALUE. 228case 3: common tests (all) 229 230status_t FindApp(entry_ref *ref, entry_ref *app) const 231case 1: ref or app are NULL => 232 Should return B_BAD_VALUE. 233case 2: ref doesn't refer to an existing entry => 234 Should return B_ENTRY_NOT_FOUND. 235case 3: ref is valid, file has type and preferred app, preferred app is in 236 trash => 237 Should return B_LAUNCH_FAILED_APP_IN_TRASH. 238case 4: ref is valid, file has type and preferred app, app type is not 239 installed, app exists and has signature => 240 Should return B_OK and set the ref to refer to the file's (not the 241 file type's) preferred application's executable. Should install the 242 app type and set the app hint on it. 243case 5: ref is valid, file has no type, but preferred app, app type is not 244 installed, app exists and has signature => 245 Should return B_OK and set the ref to refer to the application's 246 executable. Should install the app type and set the app hint on it. 247case 6: ref is valid, file has type and app hint, the type's preferred app 248 type is not installed, app exists and has signature => 249 Should return B_OK and set the ref to refer to the file type's 250 preferred application's executable. Should install the app type and 251 set the app hint on it. 252case 7: ref is valid, file has type, the type's preferred app 253 type is not installed, app exists and has signature, file is 254 executable => 255 Should return B_OK and set the ref to refer to the file. 256 Should not set the app hint on the app or file type (Why?). 257case 8: ref is valid and refers to a link to a file, file has type, 258 the type's preferred app type is not installed, 259 app exists and has signature => 260 Should return B_OK and set the ref to refer to the file type's 261 preferred application's executable. Should install the app type and 262 set the app hint on it. 263case 9: ref is valid, file has type, 264 common cases 1-14 265case 10:ref is valid, file has no type, sniffing results in a type, 266 type is set on file, 267 common cases 2-14 268case 11:ref is valid and refers to a cyclic link => 269 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 270case 12:ref is valid and refers to a link to void => 271 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 272 273status_t Launch() const: common cases 274case 1: uninstalled type mimeType => 275 Should return B_LAUNCH_FAILED_APP_NOT_FOUND. 276case 2: installed type mimeType, no preferred app => 277 Should return B_LAUNCH_FAILED_NO_PREFERRED_APP. 278case 3: installed type mimeType, preferred app, app type not installed, 279 app has no signature => 280 Should return B_LAUNCH_FAILED_APP_NOT_FOUND. 281case 4: installed type mimeType, preferred app, app type not installed, 282 app has signature => 283 Should return B_OK and set team to the ID of the team running the 284 application's executable. Should install the app type and set the 285 app hint on it. 286case 5: installed type mimeType, preferred app, app type installed, 287 app has signature => 288 Should return B_OK and set team to the ID of the team running the 289 application's executable. Should set the app hint on the app type. 290case 6: installed type mimeType, preferred app, app type installed, 291 app has signature, app has no execute permission => 292 Should return B_OK and set team to the ID of the team running the 293 application's executable. Should set the app hint on the app type. 294case 7: installed type mimeType, preferred app, app type installed, 295 two apps have the signature => 296 Should return B_OK and set team to the ID of the team running the 297 application executable with the most recent modification time. 298 Should set the app hint on the app type. 299case 8: installed type mimeType, preferred app, app type installed, 300 two apps have the signature, one has a version info, the other one is 301 newer => 302 Should return B_OK and set team to the ID of the team running the 303 application executable with version info. Should set the app hint 304 on the app type. 305case 9: installed type mimeType, preferred app, app type installed, 306 two apps have the signature, both apps have a version info => 307 Should return B_OK and set team to the ID of the team running the 308 application executable with the greater version. Should set the app 309 hint on the app type. 310case 10:installed type mimeType, preferred app, app type installed, 311 preferred app type has an app hint that points to an app with a 312 different signature => 313 Should return B_OK and set team to the ID of the team running the 314 application's executable. Should remove the incorrect app hint on 315 the app type. 316 (OBOS: Should set the correct app hint. 317 Don't even run the wrong app?) 318case 11:installed type mimeType, preferred app, app type installed, 319 preferred app type has an app hint pointing to void, 320 a differently named app with this signature exists => 321 Should return B_OK and set team to the ID of the team running the 322 application's executable. 323 (not R5: Should update the app hint on the app type?) 324case 12:mimeType is app signature, not installed => 325 Should return B_OK and set team to the ID of the team running the 326 application executable. Should set the app hint on the app type. 327case 13:mimeType is installed, but has no preferred application, 328 super type has preferred application => 329 Should return B_OK and set team to the ID of the team running the 330 application executable associated with the preferred app of the 331 supertype. Should set the app hint on the app type. 332case 14:installed type mimeType, preferred app, app type not installed, 333 app has signature, app is trash => 334 Should return B_LAUNCH_FAILED_APP_IN_TRASH. 335case 15:installed type mimeType, preferred app, app type not installed, 336 app has signature, team is NULL => 337 Should return B_OK and set team to the ID of the team running the 338 application's executable. Should install the app type and set the 339 app hint on it. 340case 16:launch the app two times: B_MULTIPLE_LAUNCH | B_ARGV_ONLY => 341 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 342 second app: ArgvReceived(), ReadyToRun(), QuitRequested() 343case 17:launch the app two times: B_MULTIPLE_LAUNCH => 344 first app: {Message,Argv,Refs}Received()*, ReadyToRun(), 345 QuitRequested() 346 second app: {Message,Argv,Refs}Received()*, ReadyToRun(), 347 QuitRequested() 348case 18:launch the app two times: B_SINGLE_LAUNCH | B_ARGV_ONLY => 349 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 350 (No second ArgvReceived()!) 351 second app: Launch() fails with B_ALREADY_RUNNING 352case 19:launch the app two times: B_SINGLE_LAUNCH => 353 first app: {Message,Argv,Refs}Received()*, ReadyToRun(), 354 {Message,Argv,Refs}Received()*, QuitRequested() 355 second app: Launch() fails with B_ALREADY_RUNNING 356case 20:launch two apps with the same signature: 357 B_SINGLE_LAUNCH | B_ARGV_ONLY => 358 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 359 second app: ArgvReceived(), ReadyToRun(), QuitRequested() 360case 21:launch two apps with the same signature: B_SINGLE_LAUNCH => 361 first app: {Message,Argv,Refs}Received()*, ReadyToRun(), 362 QuitRequested() 363 second app: {Message,Argv,Refs}Received()*, ReadyToRun(), 364 QuitRequested() 365case 22:launch the app two times: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY => 366 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 367 (No second ArgvReceived()!) 368 second app: Launch() fails with B_ALREADY_RUNNING 369case 23:launch the app two times: B_EXCLUSIVE_LAUNCH => 370 first app: {Message,Argv,Refs}Received()*, ReadyToRun(), 371 {Message,Argv,Refs}Received()*, QuitRequested() 372 second app: Launch() fails with B_ALREADY_RUNNING 373case 24:launch two apps with the same signature: 374 B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY => 375 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 376 (No second ArgvReceived()!) 377 second app: Launch() fails with B_ALREADY_RUNNING 378case 25:launch two apps with the same signature: B_EXCLUSIVE_LAUNCH => 379 first app: {Message,Argv,Refs}Received()*, ReadyToRun(), 380 {Message,Argv,Refs}Received()*, QuitRequested() 381 second app: Launch() fails with B_ALREADY_RUNNING 382case 26:launch two apps with the same signature: 383 first: B_EXCLUSIVE_LAUNCH, 384 second: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY => 385 first app: {Message,Argv,Refs}Received()*, ReadyToRun(), 386 QuitRequested() 387 second app: Launch() fails with B_ALREADY_RUNNING 388case 27:launch two apps with the same signature: 389 first: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 390 second: B_EXCLUSIVE_LAUNCH => 391 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 392 (No second ArgvReceived()!) 393 second app: Launch() fails with B_ALREADY_RUNNING 394case 28:installed type mimeType, preferred app, app type installed, 395 preferred app type has an app hint pointing to void, 396 no app with this signature exists => 397 Should return B_LAUNCH_FAILED_APP_NOT_FOUND and unset the app type's 398 app hint. 399case 29:installed type mimeType, preferred app, app type installed, 400 preferred app type has an app hint pointing to a cyclic link, 401 no app with this signature exists => 402 Should return 403 OBOS: B_LAUNCH_FAILED_APP_NOT_FOUND and unset the app type's app hint. 404 R5: B_ENTRY_NOT_FOUND or B_LAUNCH_FAILED_NO_RESOLVE_LINK. 405case 30:installed type mimeType, preferred app, app type installed, 406 preferred app type has an app hint that points to an app without a 407 signature, app will pass a different signature to the 408 BApplication constructor => 409 Should return B_OK and set team to the ID of the team running the 410 application's executable. Should remove the incorrect app hint on 411 the app type. BRoster::GetRunningAppInfo() should return an app_info 412 with the signature passed to the BApplication constructor. 413 414status_t Launch(const char *mimeType, BMessage *initialMsg, 415 team_id *appTeam) const 416case 1: mimeType is NULL => 417 Should return B_BAD_VALUE. 418case 2: mimeType is invalid => 419 Should return B_BAD_VALUE. 420case 3: common cases (all) 421case 4: installed type mimeType, preferred app, app type not installed, 422 app has signature, NULL initialMsg => 423 Should return B_OK and set team to the ID of the team running the 424 application's executable. Should install the app type and set the 425 app hint on it. 426 427 428status_t Launch(const char *mimeType, BList *messageList, 429 team_id *appTeam) const 430case 1: mimeType is NULL => 431 Should return B_BAD_VALUE. 432case 2: mimeType is invalid => 433 Should return B_BAD_VALUE. 434case 3: common cases (all) 435case 4: installed type mimeType, preferred app, app type not installed, 436 app has signature, NULL messageList => 437 Should return B_OK and set team to the ID of the team running the 438 application's executable. Should install the app type and set the 439 app hint on it. 440case 5: installed type mimeType, preferred app, app type not installed, 441 app has signature, empty messageList => 442 Should return B_OK and set team to the ID of the team running the 443 application's executable. Should install the app type and set the 444 app hint on it. 445 446status_t Launch(const char *mimeType, int argc, char **args, 447 team_id *appTeam) const 448case 1: mimeType is NULL or argc > 0 and args is NULL => 449 Should return B_BAD_VALUE. 450case 2: mimeType is invalid => 451 Should return B_BAD_VALUE. 452case 3: common cases (all) 453case 4: installed type mimeType, preferred app, app type not installed, 454 app has signature, NULL args, argc is 0 => 455 Should return B_OK and set team to the ID of the team running 456 the application's executable. Should install the app type and set the 457 app hint on it. 458 459status_t Launch(const entry_ref *ref, const BMessage *initialMessage, 460 team_id *app_team) const 461case 1: ref is NULL => 462 Should return B_BAD_VALUE. 463case 2: ref doesn't refer to an existing entry => 464 Should return B_ENTRY_NOT_FOUND. 465case 3: ref is valid, file has type and preferred app, app type is not 466 installed, app exists and has signature => 467 Should return B_OK and set team to the ID of the team running the 468 file's (not the file type's) preferred application's executable. 469 Should install the app type and set the app hint on it. 470case 4: ref is valid, file has no type, but preferred app, app type is not 471 installed, app exists and has signature => 472 Should return B_OK and set team to the ID of the team running the 473 application's executable. Should install the app type and set the app 474 hint on it. 475case 5: ref is valid, file has type and app hint, the type's preferred app 476 type is not installed, app exists and has signature => 477 Should return B_OK and set team to the ID of the team running the file 478 type's preferred application's executable. Should install the app 479 type and set the app hint on it. 480case 6: ref is valid, file has type, the type's preferred app 481 type is not installed, app exists and has signature, file has 482 executable permission, but is not executable => 483 Should return B_LAUNCH_FAILED_EXECUTABLE. 484 Should not set the app hint on the app or file type. 485case 7: ref is valid and refers to a link to a file, file has type, 486 the type's preferred app type is not installed, 487 app exists and has signature => 488 Should return B_OK and set team to the ID of the team running the file 489 type's preferred application's executable. Should install the app 490 type and set the app hint on it. 491case 8: ref is valid, file has type, 492 common cases 1-14 493case 9: ref is valid, file has no type, sniffing results in a type, 494 type is set on file, 495 common cases 2-14 496case 10:ref is valid, file has no type, but preferred app, app type is not 497 installed, app exists and has signature, NULL initialMessage => 498 Should return B_OK and set team to the ID of the team running the 499 application's executable. Should install the app type and set the app 500 hint on it. 501case 11:ref is valid and refers to a cyclic link => 502 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 503case 12:ref is valid and refers to a link to void => 504 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 505case 13:ref is valid and refers to an executable without signature => 506 Should return B_OK and set team to the ID of the team running the 507 application's executable. 508 509 510status_t Launch(const entry_ref *ref, const BList *messageList, 511 team_id *appTeam) const 512case 1: ref is NULL => 513 Should return B_BAD_VALUE. 514case 2: ref doesn't refer to an existing entry => 515 Should return B_ENTRY_NOT_FOUND. 516case 3: ref is valid, file has type and preferred app, app type is not 517 installed, app exists and has signature => 518 Should return B_OK and set team to the ID of the team running the 519 file's (not the file type's) preferred application's executable. 520 Should install the app type and set the app hint on it. 521case 4: ref is valid, file has no type, but preferred app, app type is not 522 installed, app exists and has signature => 523 Should return B_OK and set team to the ID of the team running the 524 application's executable. Should install the app type and set the app 525 hint on it. 526case 5: ref is valid, file has type and app hint, the type's preferred app 527 type is not installed, app exists and has signature => 528 Should return B_OK and set team to the ID of the team running the file 529 type's preferred application's executable. Should install the app 530 type and set the app hint on it. 531case 6: ref is valid, file has type, the type's preferred app 532 type is not installed, app exists and has signature, file has 533 executable permission, but is not executable => 534 Should return B_LAUNCH_FAILED_EXECUTABLE. 535 Should not set the app hint on the app or file type. 536case 7: ref is valid and refers to a link to a file, file has type, 537 the type's preferred app type is not installed, 538 app exists and has signature => 539 Should return B_OK and set team to the ID of the team running the file 540 type's preferred application's executable. Should install the app 541 type and set the app hint on it. 542case 8: ref is valid, file has type, 543 common cases 1-14 544case 9: ref is valid, file has no type, sniffing results in a type, 545 type is set on file, 546 common cases 2-14 547case 10:ref is valid, file has no type, but preferred app, app type is not 548 installed, app exists and has signature, NULL messageList => 549 Should return B_OK and set team to the ID of the team running the 550 application's executable. Should install the app type and set the app 551 hint on it. 552case 11:ref is valid, file has no type, but preferred app, app type is not 553 installed, app exists and has signature, empty messageList => 554 Should return B_OK and set team to the ID of the team running the 555 application's executable. Should install the app type and set the app 556 hint on it. 557case 12:ref is valid and refers to a cyclic link => 558 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 559case 13:ref is valid and refers to a link to void => 560 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 561case 14:ref is valid and refers to an executable without signature => 562 Should return B_OK and set team to the ID of the team running the 563 application's executable. 564 565status_t Launch(const entry_ref *ref, int argc, const char * const *args, 566 team_id *appTeam) const 567case 1: ref is NULL => 568 Should return B_BAD_VALUE. 569case 2: ref doesn't refer to an existing entry => 570 Should return B_ENTRY_NOT_FOUND. 571case 3: ref is valid, file has type and preferred app, app type is not 572 installed, app exists and has signature => 573 Should return B_OK and set team to the ID of the team running the 574 file's (not the file type's) preferred application's executable. 575 Should install the app type and set the app hint on it. 576 ref is converted to path and added as additional argv. 577case 4: ref is valid, file has no type, but preferred app, app type is not 578 installed, app exists and has signature => 579 Should return B_OK and set team to the ID of the team running the 580 application's executable. Should install the app type and set the app 581 hint on it. 582 ref is converted to path and added as additional argv. 583case 5: ref is valid, file has type and app hint, the type's preferred app 584 type is not installed, app exists and has signature => 585 Should return B_OK and set team to the ID of the team running the file 586 type's preferred application's executable. Should install the app 587 type and set the app hint on it. 588 ref is converted to path and added as additional argv. 589case 6: ref is valid, file has type, the type's preferred app 590 type is not installed, app exists and has signature, file has 591 executable permission, but is not executable => 592 Should return B_LAUNCH_FAILED_EXECUTABLE. 593 Should not set the app hint on the app or file type. 594case 7: ref is valid and refers to a link to a file, file has type, 595 the type's preferred app type is not installed, 596 app exists and has signature => 597 Should return B_OK and set team to the ID of the team running the file 598 type's preferred application's executable. Should install the app 599 type and set the app hint on it. 600 ref is converted to path and added as additional argv. 601case 8: ref is valid, file has type, 602 common cases 1-14 603 (ref is converted to path and added as additional argv.) 604case 9: ref is valid, file has no type, sniffing results in a type, 605 type is set on file, 606 common cases 2-14 607 (ref is converted to path and added as additional argv.) 608case 10:ref is valid, file has no type, but preferred app, app type is not 609 installed, app exists and has signature, NULL args, argc is 0 => 610 Should return B_OK and set team to the ID of the team running the 611 application's executable. Should install the app type and set the app 612 hint on it. argv are ignored. 613case 11:ref is valid, file has no type, but preferred app, app type is not 614 installed, app exists and has signature, NULL args, argc > 0 => 615 Should return B_OK and set team to the ID of the team running the 616 application's executable. Should install the app type and set the app 617 hint on it. argv are ignored. 618case 12:ref is valid and refers to a cyclic link => 619 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 620case 13:ref is valid and refers to a link to void => 621 Should return B_LAUNCH_FAILED_NO_RESOLVE_LINK. 622case 14:ref is valid and refers to an executable without signature => 623 Should return B_OK and set team to the ID of the team running the 624 application's executable. 625 626status_t Broadcast(BMessage *message) const 627case 1: NULL message => 628 Should return B_BAD_VALUE. 629case 2: valid message, several apps, one is B_ARGV_ONLY => 630 Should return B_OK and send the message to all (including the 631 B_ARGV_ONLY) apps. 632 Replies go to be_app_messenger. 633 634status_t Broadcast(BMessage *message, BMessenger replyTo) const 635case 1: NULL message => 636 Should return B_BAD_VALUE. 637case 2: valid message, several apps, one is B_ARGV_ONLY, valid replyTo => 638 Should return B_OK and send the message to all (including the 639 B_ARGV_ONLY) apps. 640 Replies go to the specified messenger. 641case 3: valid message, several apps, one is B_ARGV_ONLY, invalid replyTo => 642 Should return B_OK and send the message to all (including the 643 B_ARGV_ONLY) apps. 644 Replies go to the roster! 645 646status_t StartWatching(BMessenger target, uint32 eventMask) const 647status_t StopWatching(BMessenger target) const 648case 1: {Start,Stop}Watching() with invalid messenger or invalid flags, 649 StopWatching() non-watching messenger => 650 Should return B_OK/B_BAD_VALUE. 651case 2: several apps, several watchers, different eventMasks => 652 Should return B_OK... 653 Watching ends, when target has become invalid and the next watching 654 message is tried to be sent. 655case 3: call StartWatching() twice, second time with different mask => 656 Should return B_OK. The second call simply overrides the first one. 657TODO: Watching app activation. 658 659