1 /* 2 * Copyright (C) 2006-2021 Registro.br. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 7 * 1. Redistribution of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY REGISTRO.BR ``AS IS AND ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 * WARRANTIE OF FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 16 * EVENT SHALL REGISTRO.BR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 18 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 19 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 21 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 22 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 23 * DAMAGE. 24 */ 25 /* $Id$ */ 26 /** @file SMD.H 27 * @brief Signed Mark Data (SMD) 28 */ 29 30 #ifndef __SMD_H__ 31 #define __SMD_H__ 32 33 #include <list> 34 #include <map> 35 #include <string> 36 37 #include "CommonData.H" 38 39 using std::list; 40 using std::make_pair; 41 using std::map; 42 using std::pair; 43 using std::string; 44 45 LIBEPP_NICBR_NS_BEGIN 46 47 /// EPP SMDHolder Class 48 class SMDHolder 49 { 50 public: 51 /// EPP SMDHolder::Type Class 52 class Type 53 { 54 public: 55 /// Possible types of holder 56 enum Value { 57 NONE, 58 OWNER, 59 ASSIGNEE, 60 LICENSEE 61 }; 62 63 /// Convert type into text 64 /* 65 @param type holder type 66 @return text representation of the type 67 */ toStr(const Value type)68 static string toStr(const Value type) { 69 switch(type) { 70 case NONE: 71 break; 72 case OWNER: 73 return "owner"; 74 case ASSIGNEE: 75 return "assignee"; 76 case LICENSEE: 77 return "licensee"; 78 } 79 80 return ""; 81 } 82 83 /// Convert a text into enum 84 /* 85 @param typeStr text based type 86 @return enum representation of the type 87 */ fromStr(const string typeStr)88 static Value fromStr(const string typeStr) { 89 if (typeStr == "owner") { 90 return OWNER; 91 } else if (typeStr == "assignee") { 92 return ASSIGNEE; 93 } else if (typeStr == "licensee") { 94 return LICENSEE; 95 } 96 97 return NONE; 98 } 99 }; 100 101 /// Default constructor SMDHolder()102 SMDHolder() 103 { 104 reset(); 105 } 106 107 /// Sets the name of the holder 108 /** 109 * @param name Name of the holder 110 */ set_name(const string & name)111 void set_name(const string &name) { _name = name; } 112 113 /// Returns the name of the holder 114 /** 115 * @return name of the holder 116 */ get_name()117 string get_name() const { return _name; } 118 119 /// Sets the name of the organization holder of the mark 120 /** 121 * @param org name of the organization holder of the mark 122 */ set_org(const string & org)123 void set_org(const string &org) { _org = org; } 124 125 /// Returns the name of the organization holder of the mark 126 /** 127 * @return name of the organization holder of the mark 128 */ get_org()129 string get_org() const { return _org; } 130 131 /// Sets the address information of the holder of a mark 132 /** 133 * @param postalInfo Address information of the holder of a mark 134 */ set_postalInfo(const PostalInfo & postalInfo)135 void set_postalInfo(const PostalInfo &postalInfo) { _postalInfo = postalInfo; } 136 137 /// Returns the address information of the holder of a mark 138 /** 139 * @return address information of the holder of a mark 140 */ get_postalInfo()141 PostalInfo get_postalInfo() const { return _postalInfo; } 142 143 /// Sets the organization's voice telephone number 144 /** 145 * @param voice organization's voice telephone number 146 */ set_voice(const string & voice)147 void set_voice(const string &voice) { _voice = voice; } 148 149 /// Returns the organization's voice telephone number 150 /** 151 * @return organization's voice telephone number 152 */ get_voice()153 string get_voice() const { return _voice; } 154 155 /// Sets the organization's facsimile telephone number 156 /** 157 * @param fax organization's facsimile telephone number 158 */ set_fax(const string & fax)159 void set_fax(const string &fax) { _fax = fax; } 160 161 /// Returns the organization's facsimile telephone number 162 /** 163 * @return organization's facsimile telephone number 164 */ get_fax()165 string get_fax() const { return _fax; } 166 167 /// Sets the contact's email address 168 /** 169 * @param email contact's email address 170 */ set_email(const string & email)171 void set_email(const string &email) { _email = email; } 172 173 /// Returns the contact's email address 174 /** 175 * @return email contact's email address 176 */ get_email()177 string get_email() const { return _email; } 178 179 /// Reset object attributes reset()180 void reset() 181 { 182 _name.clear(); 183 _org.clear(); 184 _postalInfo.reset(); 185 _voice.clear(); 186 _fax.clear(); 187 _email.clear(); 188 } 189 190 private: 191 /// Name of the holder 192 string _name; 193 194 /// Name of the organization holder of the mark 195 string _org; 196 197 /// Address information of the holder of a mark 198 PostalInfo _postalInfo; 199 200 /// Organization's voice telephone number 201 string _voice; 202 203 /// Organization's facsimile telephone number 204 string _fax; 205 206 /// Email address of the holder 207 string _email; 208 }; 209 210 /// EPP SMDContact Class 211 class SMDContact 212 { 213 public: 214 /// EPP SMDContact::Type Class 215 class Type 216 { 217 public: 218 /// Possible types of contacts 219 enum Value { 220 NONE, 221 OWNER, 222 AGENT, 223 THIRD_PARTY 224 }; 225 226 /// Convert type into text 227 /* 228 @param type contact type 229 @return text representation of the type 230 */ toStr(const Value type)231 static string toStr(const Value type) { 232 switch(type) { 233 case NONE: 234 break; 235 case OWNER: 236 return "owner"; 237 case AGENT: 238 return "agent"; 239 case THIRD_PARTY: 240 return "thirdparty"; 241 } 242 243 return ""; 244 } 245 246 /// Convert a text into enum 247 /* 248 @param typeStr text based type 249 @return enum representation of the type 250 */ fromStr(const string typeStr)251 static Value fromStr(const string typeStr) { 252 if (typeStr == "owner") { 253 return OWNER; 254 } else if (typeStr == "agent") { 255 return AGENT; 256 } else if (typeStr == "thirdparty") { 257 return THIRD_PARTY; 258 } 259 260 return NONE; 261 } 262 }; 263 264 /// Default constructor SMDContact()265 SMDContact() 266 { 267 reset(); 268 } 269 270 /// Sets the name of the responsible person 271 /** 272 * @param name name of the responsible person 273 */ set_name(const string & name)274 void set_name(const string &name) { _name = name; } 275 276 /// Returns the name of the responsible person 277 /** 278 * @return name of the responsible person 279 */ get_name()280 string get_name() const { return _name; } 281 282 /// Sets the name of the organization of the contact 283 /** 284 * @param org name of the organization of the contact 285 */ set_org(const string & org)286 void set_org(const string &org) { _org = org; } 287 288 /// Sets the name of the organization of the contact 289 /** 290 * @return name of the organization of the contact 291 */ get_org()292 string get_org() const { return _org; } 293 294 /// Sets the address information of the contact 295 /** 296 * @param postalInfo address information of the contact 297 */ set_postalInfo(const PostalInfo & postalInfo)298 void set_postalInfo(const PostalInfo &postalInfo) { _postalInfo = postalInfo; } 299 300 /// Returns the address information of the contact 301 /** 302 * @return address information of the contact 303 */ get_postalInfo()304 PostalInfo get_postalInfo() const { return _postalInfo; } 305 306 /// Sets the contact's voice telephone number 307 /** 308 * @param voice contact's voice telephone number 309 */ set_voice(const string & voice)310 void set_voice(const string &voice) { _voice = voice; } 311 312 /// Returns the contact's voice telephone number 313 /** 314 * @return contact's voice telephone number 315 */ get_voice()316 string get_voice() const { return _voice; } 317 318 /// Sets the contact's facsimile telephone number 319 /** 320 * @param fax contact's facsimile telephone number 321 */ set_fax(const string & fax)322 void set_fax(const string &fax) { _fax = fax; } 323 324 /// Returns the contact's facsimile telephone number 325 /** 326 * @return contact's facsimile telephone number 327 */ get_fax()328 string get_fax() const { return _fax; } 329 330 /// Sets the contact's email address 331 /** 332 * @param email contact's email address 333 */ set_email(const string & email)334 void set_email(const string &email) { _email = email; } 335 336 /// Returns the contact's email address 337 /** 338 * @return contact's email address 339 */ get_email()340 string get_email() const { return _email; } 341 342 /// Reset object attributes reset()343 void reset() 344 { 345 _name.clear(); 346 _org.clear(); 347 _postalInfo.reset(); 348 _voice.clear(); 349 _fax.clear(); 350 _email.clear(); 351 } 352 353 private: 354 /// Name of the responsible person 355 string _name; 356 357 /// Name of the organization of the contact 358 string _org; 359 360 /// Address information of the contact 361 PostalInfo _postalInfo; 362 363 /// Contact's voice telephone number 364 string _voice; 365 366 /// Contact's facsimile telephone number 367 string _fax; 368 369 /// Contact's email address 370 string _email; 371 }; 372 373 /// EPP SMDTrademark Class 374 class SMDTrademark 375 { 376 public: 377 /// Default constructor SMDTrademark()378 SMDTrademark() 379 { 380 reset(); 381 } 382 383 /// Sets the identifier of the mark 384 /** 385 * @param id identifier of the mark 386 */ set_id(const string & id)387 void set_id(const string &id) { _id = id; } 388 389 /// Returns the identifier of the mark 390 /** 391 * @return identifier of the mark 392 */ get_id()393 string get_id() const { return _id; } 394 395 /// Sets the mark text string 396 /** 397 * @param markName Mark text string 398 */ set_markName(const string & markName)399 void set_markName(const string &markName) { _markName = markName; } 400 401 /// Returns the mark text string 402 /** 403 * @return markName Mark text string 404 */ get_markName()405 string get_markName() const { return _markName; } 406 407 /// Sets the information of the holder of the mark 408 /** 409 * @param holders information of the holder of the mark 410 */ set_holders(const list<pair<SMDHolder::Type::Value,SMDHolder>> & holders)411 void set_holders(const list<pair<SMDHolder::Type::Value, SMDHolder> > &holders) 412 { 413 _holders = holders; 414 } 415 416 /// Add a holder of the mark 417 /** 418 * @param type identify the entitlement of the holder 419 * @param holder information of the holder of the mark 420 */ add_holder(const SMDHolder::Type::Value type,const SMDHolder & holder)421 void add_holder(const SMDHolder::Type::Value type, const SMDHolder &holder) 422 { 423 _holders.push_back(make_pair(type, holder)); 424 } 425 426 /// Returns the information of the holder of the mark 427 /** 428 * @return information of the holder of the mark 429 */ get_holders()430 list<pair<SMDHolder::Type::Value, SMDHolder> > get_holders() const { return _holders; } 431 432 /// Sets the information of the representative of the mark registration 433 /** 434 * @param contacts information of the representative of the mark registration 435 */ set_contacts(const map<SMDContact::Type::Value,SMDContact> & contacts)436 void set_contacts(const map<SMDContact::Type::Value, SMDContact> &contacts) 437 { 438 _contacts = contacts; 439 } 440 441 /// Add information of the representative of the mark registration 442 /** 443 * @param type contact type 444 * @param contact information of the representative of the mark registration 445 */ add_contact(const SMDContact::Type::Value type,const SMDContact & contact)446 void add_contact(const SMDContact::Type::Value type, const SMDContact &contact) 447 { 448 _contacts[type] = contact; 449 } 450 451 /// Returns the information of the representative of the mark registration 452 /** 453 * @return information of the representative of the mark registration 454 */ get_contacts()455 map<SMDContact::Type::Value, SMDContact> get_contacts() const { return _contacts; } 456 457 /// Sets the two-character code of the jurisdiction where the 458 /// trademark was registered 459 /** 460 * @param jurisdiction two-character code of the jurisdiction where 461 * the trademark was registered 462 */ set_jurisdiction(const string & jurisdiction)463 void set_jurisdiction(const string &jurisdiction) { _jurisdiction = jurisdiction; } 464 465 /// Returns the two-character code of the jurisdiction where the 466 /// trademark was registered 467 /** 468 * @return two-character code of the jurisdiction where the 469 * trademark was registered 470 */ get_jurisdiction()471 string get_jurisdiction() const { return _jurisdiction; } 472 473 /// Sets the Nice Classification class numbers of the mark 474 /** 475 * @param classes Nice Classification class numbers of the mark 476 */ set_classes(const list<string> & classes)477 void set_classes(const list<string> &classes) { _classes = classes; } 478 479 /// Add a Nice Classification class numbers of the mark 480 /** 481 * @param markClass Nice Classification class numbers of the mark 482 */ add_class(const string & markClass)483 void add_class(const string &markClass) { _classes.push_back(markClass); } 484 485 /// Returns the Nice Classification class numbers of the mark 486 /** 487 * @return Nice Classification class numbers of the mark 488 */ get_classes()489 list<string> get_classes() const { return _classes; } 490 491 /// Sets the a-label form of the label that correspond to the 492 /// <mark:markName> 493 /** 494 * @param labels a-label form of the label that correspond to the 495 * <mark:markName> 496 */ set_labels(const list<string> & labels)497 void set_labels(const list<string> &labels) { _labels = labels; } 498 499 /// Add a a-label form of the label that correspond to the 500 /// <mark:markName> 501 /** 502 * @param label a-label form of the label that correspond to the 503 * <mark:markName> 504 */ add_label(const string & label)505 void add_label(const string &label) { _labels.push_back(label); } 506 507 /// Returns the a-label form of the label that correspond to the 508 /// <mark:markName> 509 /** 510 * @return a-label form of the label that correspond to the 511 * <mark:markName> 512 */ get_labels()513 list<string> get_labels() const { return _labels; } 514 515 /// Sets the full description of the goods and services mentioned in 516 /// the mark registration document 517 /** 518 * @param goodsAndServices full description of the goods and 519 * services mentioned in the mark registration document 520 */ set_goodsAndServices(const string & goodsAndServices)521 void set_goodsAndServices(const string &goodsAndServices) 522 { 523 _goodsAndServices = goodsAndServices; 524 } 525 526 /// Returns the full description of the goods and services mentioned 527 /// in the mark registration document 528 /** 529 * @return full description of the goods and services mentioned in 530 * the mark registration document 531 */ get_goodsAndServices()532 string get_goodsAndServices() const { return _goodsAndServices; } 533 534 /// Sets the trademark application ID registered in the trademark 535 /// office 536 /** 537 * @param apId trademark application ID registered in the trademark 538 * office 539 */ set_apId(const string & apId)540 void set_apId(const string &apId) { _apId = apId; } 541 542 /// Returns the trademark application ID registered in the trademark 543 /// office 544 /** 545 * @return trademark application ID registered in the trademark 546 * office 547 */ get_apId()548 string get_apId() const { return _apId; } 549 550 /// Sets the date the trademark was applied for 551 /** 552 * @param apDate date the trademark was applied for 553 */ set_apDate(const string & apDate)554 void set_apDate(const string &apDate) { _apDate = apDate; } 555 556 /// Returns the date the trademark was applied for 557 /** 558 * @return date the trademark was applied for 559 */ get_apDate()560 string get_apDate() const { return _apDate; } 561 562 /// Sets the trademark registration number registered in the 563 /// trademark office 564 /** 565 * @param regNum trademark registration number registered in the 566 * trademark office 567 */ set_regNum(const string & regNum)568 void set_regNum(const string ®Num) { _regNum = regNum; } 569 570 /// Returns the trademark registration number registered in the 571 /// trademark office 572 /** 573 * @return trademark registration number registered in the trademark 574 * office 575 */ get_regNum()576 string get_regNum() const { return _regNum; } 577 578 /// Sets the date the trademark was registered 579 /** 580 * @param regDate date the trademark was registered 581 */ set_regDate(const string & regDate)582 void set_regDate(const string ®Date) { _regDate = regDate; } 583 584 /// Returns the date the trademark was registered 585 /** 586 * @return date the trademark was registered 587 */ get_regDate()588 string get_regDate() const { return _regDate; } 589 590 /// Sets the expiration date of the trademark 591 /** 592 * @param exDate expiration date of the trademark 593 */ set_exDate(const string & exDate)594 void set_exDate(const string &exDate) { _exDate = exDate; } 595 596 /// Returns the expiration date of the trademark 597 /** 598 * @return expiration date of the trademark 599 */ get_exDate()600 string get_exDate() const { return _exDate; } 601 602 /// Reset object attributes reset()603 void reset() 604 { 605 _id.clear(); 606 _markName.clear(); 607 _holders.clear(); 608 _contacts.clear(); 609 _jurisdiction.clear(); 610 _classes.clear(); 611 _labels.clear(); 612 _goodsAndServices.clear(); 613 _apId.clear(); 614 _apDate.clear(); 615 _regNum.clear(); 616 _regDate.clear(); 617 _exDate.clear(); 618 } 619 620 private: 621 /// Identifier of the mark 622 string _id; 623 624 /// Mark text string 625 string _markName; 626 627 /// Information of the holder of the mark 628 list<pair<SMDHolder::Type::Value, SMDHolder> > _holders; 629 630 /// Information of the representative of the mark registration 631 map<SMDContact::Type::Value, SMDContact> _contacts; 632 633 /// Two-character code of the jurisdiction where the trademark was 634 /// registered 635 string _jurisdiction; 636 637 /// Nice Classification class numbers of the mark as defined in the 638 /// Nice List of Classes - 639 /// http://www.wipo.int/classifications/nivilo/nice/index.htm 640 list<string> _classes; 641 642 /// A-label form of the label that correspond to the <mark:markName> 643 list<string> _labels; 644 645 /// Full description of the goods and services mentioned in the mark 646 /// registration document 647 string _goodsAndServices; 648 649 /// Trademark application ID registered in the trademark office 650 string _apId; 651 652 /// Date the trademark was applied for 653 string _apDate; 654 655 /// Trademark registration number registered in the trademark office 656 string _regNum; 657 658 /// Date the trademark was registered 659 string _regDate; 660 661 /// Expiration date of the trademark 662 string _exDate; 663 }; 664 665 /// EPP SMDProtection Class 666 class SMDProtection 667 { 668 public: 669 /// Default constructor SMDProtection()670 SMDProtection() 671 { 672 reset(); 673 } 674 675 /// Sets the two-character code of the country in which the mark is 676 /// protected 677 /** 678 * @param cc two-character code of the country in which the mark is 679 * protected 680 */ set_cc(const string & cc)681 void set_cc(const string &cc) { _cc = cc; } 682 683 /// Returns the two-character code of the country in which the mark 684 /// is protected 685 /** 686 * @return two-character code of the country in which the mark is 687 * protected 688 */ get_cc()689 string get_cc() const { return _cc; } 690 691 /// Sets the name of a city, state, province or other geographic 692 /// region of <mark:country> in which the mark is protected 693 /** 694 * @param region name of a city, state, province or other geographic 695 * region of <mark:country> in which the mark is protected 696 */ set_region(const string & region)697 void set_region(const string ®ion) { _region = region; } 698 699 /// Returns the name of a city, state, province or other geographic 700 /// region of <mark:country> in which the mark is protected 701 /** 702 * @return name of a city, state, province or other geographic 703 * region of <mark:country> in which the mark is protected 704 */ get_region()705 string get_region() const { return _region; } 706 707 /// Sets the two-character code of the countries of the ruling 708 /** 709 * @param rulings two-character code of the countries of the ruling 710 */ set_rulings(const list<string> & rulings)711 void set_rulings(const list<string> &rulings) { _rulings = rulings; } 712 713 /// Add a two-character code of the country of the ruling 714 /** 715 * @param ruling two-character code of the country of the ruling 716 */ add_ruling(const string & ruling)717 void add_ruling(const string &ruling) { _rulings.push_back(ruling); } 718 719 /// Returns the two-character code of the countries of the ruling 720 /** 721 * @return two-character code of the countries of the ruling 722 */ get_rulings()723 list<string> get_rulings() const { return _rulings; } 724 725 /// Reset object attributes reset()726 void reset() 727 { 728 _cc.clear(); 729 _region.clear(); 730 _rulings.clear(); 731 } 732 733 private: 734 /// Two-character code of the country in which the mark is protected 735 string _cc; 736 737 /// Name of a city, state, province or other geographic region of 738 /// <mark:country> in which the mark is protected 739 string _region; 740 741 /// The two-character code of the countries of the ruling 742 list<string> _rulings; 743 }; 744 745 /// EPP SMDTreatyOrStatute Class 746 class SMDTreatyOrStatute 747 { 748 public: 749 /// Default constructor SMDTreatyOrStatute()750 SMDTreatyOrStatute() 751 { 752 reset(); 753 } 754 755 /// Sets the identifier of the mark 756 /** 757 * @param id identifier of the mark 758 */ set_id(const string & id)759 void set_id(const string &id) { _id = id; } 760 761 /// Returns the identifier of the mark 762 /** 763 * @return identifier of the mark 764 */ get_id()765 string get_id() const { return _id; } 766 767 /// Sets the mark text string 768 /** 769 * @param markName mark text string 770 */ set_markName(const string & markName)771 void set_markName(const string &markName) { _markName = markName; } 772 773 /// Returns the mark text string 774 /** 775 * @return mark text string 776 */ get_markName()777 string get_markName() const { return _markName; } 778 779 /// Sets the information of the holder of the mark 780 /** 781 * @param holders information of the holder of the mark 782 */ set_holders(const list<pair<SMDHolder::Type::Value,SMDHolder>> & holders)783 void set_holders(const list<pair<SMDHolder::Type::Value, SMDHolder> > &holders) 784 { 785 _holders = holders; 786 } 787 788 /// Add a holder of the mark 789 /** 790 * @param type identify the entitlement of the holder 791 * @param holder information of the holder of the mark 792 */ add_holder(const SMDHolder::Type::Value type,const SMDHolder & holder)793 void add_holder(const SMDHolder::Type::Value type, const SMDHolder &holder) 794 { 795 _holders.push_back(make_pair(type, holder)); 796 } 797 798 /// Returns information of the holder of the mark 799 /** 800 * @return information of the holder of the mark 801 */ get_holders()802 list<pair<SMDHolder::Type::Value, SMDHolder> > get_holders() const { return _holders; } 803 804 /// Sets the information of the representative of the mark 805 /// registration 806 /** 807 * @param contacts information of the representative of the mark 808 * registration 809 */ set_contacts(const map<SMDContact::Type::Value,SMDContact> & contacts)810 void set_contacts(const map<SMDContact::Type::Value, SMDContact> &contacts) 811 { 812 _contacts = contacts; 813 } 814 815 /// Add information of the representative of the mark registration 816 /** 817 * @param type contact type 818 * @param contact information of the representative of the mark registration 819 */ add_contact(const SMDContact::Type::Value type,const SMDContact & contact)820 void add_contact(const SMDContact::Type::Value type, const SMDContact &contact) 821 { 822 _contacts[type] = contact; 823 } 824 825 /// Returns the information of the representative of the mark 826 /// registration 827 /** 828 * @return information of the representative of the mark 829 * registration 830 */ get_contacts()831 map<SMDContact::Type::Value, SMDContact> get_contacts() const { return _contacts; } 832 833 /// Sets the countries and region of the country where the mark is 834 /// protected 835 /** 836 * @param protections countries and region of the country where the 837 * mark is protected 838 */ set_protections(const list<SMDProtection> & protections)839 void set_protections(const list<SMDProtection> &protections) 840 { 841 _protections = protections; 842 } 843 844 /// Add the country and region of the country where the mark is 845 /// protected 846 /** 847 * @param protection country and region of the country where the 848 * mark is protected 849 */ add_protection(const SMDProtection & protection)850 void add_protection(const SMDProtection &protection) 851 { 852 _protections.push_back(protection); 853 } 854 855 /// Returns the countries and region of the country where the mark 856 /// is protected 857 /** 858 * @return countries and region of the country where the mark is 859 * protected 860 */ get_protections()861 list<SMDProtection> get_protections() const { return _protections; } 862 863 /// Sets the a-label form of the label that correspond to the 864 /// <mark:markName> 865 /** 866 * @param labels a-label form of the label that correspond to the 867 * <mark:markName> 868 */ set_labels(const list<string> & labels)869 void set_labels(const list<string> &labels) { _labels = labels; } 870 871 /// Add a a-label form of the label that correspond to the 872 /// <mark:markName> 873 /** 874 * @param label a-label form of the label that correspond to the 875 * <mark:markName> 876 */ add_label(const string & label)877 void add_label(const string &label) { _labels.push_back(label); } 878 879 /// Returns the a-label form of the label that correspond to the 880 /// <mark:markName> 881 /** 882 * @return a-label form of the label that correspond to the 883 * <mark:markName> 884 */ get_labels()885 list<string> get_labels() const { return _labels; } 886 887 /// Sets the full description of the goods and services mentioned in 888 /// the mark registration document 889 /** 890 * @param goodsAndServices full description of the goods and 891 * services mentioned in the mark registration document 892 */ set_goodsAndServices(const string & goodsAndServices)893 void set_goodsAndServices(const string &goodsAndServices) 894 { 895 _goodsAndServices = goodsAndServices; 896 } 897 898 /// Returns the full description of the goods and services mentioned 899 /// in the mark registration document 900 /** 901 * @return full description of the goods and services mentioned in 902 * the mark registration document 903 */ get_goodsAndServices()904 string get_goodsAndServices() const { return _goodsAndServices; } 905 906 /// Sets the number of the mark of the treaty or statute 907 /** 908 * @param refNum number of the mark of the treaty or statute 909 */ set_refNum(const string & refNum)910 void set_refNum(const string &refNum) { _refNum = refNum; } 911 912 /// Returns the number of the mark of the treaty or statute 913 /** 914 * @return number of the mark of the treaty or statute 915 */ get_refNum()916 string get_refNum() const { return _refNum; } 917 918 /// Sets the date of protection of the mark 919 /** 920 * @param proDate date of protection of the mark 921 */ set_proDate(const string & proDate)922 void set_proDate(const string &proDate) { _proDate = proDate; } 923 924 /// Returns the date of protection of the mark 925 /** 926 * @return date of protection of the mark 927 */ get_proDate()928 string get_proDate() const { return _proDate; } 929 930 /// Sets the title of the treaty or statute 931 /** 932 * @param title title of the treaty or statute 933 */ set_title(const string & title)934 void set_title(const string &title) { _title = title; } 935 936 /// Returns the title of the treaty or statute 937 /** 938 * @return title of the treaty or statute 939 */ get_title()940 string get_title() const { return _title; } 941 942 /// Sets the execution date of the treaty or statute 943 /** 944 * @param execDate execution date of the treaty or statute 945 */ set_execDate(const string & execDate)946 void set_execDate(const string &execDate) { _execDate = execDate; } 947 948 /// Returns the execution date of the treaty or statute 949 /** 950 * @return execution date of the treaty or statute 951 */ get_execDate()952 string get_execDate() const { return _execDate; } 953 954 /// Reset object attributes reset()955 void reset() 956 { 957 _id.clear(); 958 _markName.clear(); 959 _holders.clear(); 960 _contacts.clear(); 961 _protections.clear(); 962 _labels.clear(); 963 _goodsAndServices.clear(); 964 _refNum.clear(); 965 _proDate.clear(); 966 _title.clear(); 967 _execDate.clear(); 968 } 969 970 private: 971 /// Identifier of the mark 972 string _id; 973 974 /// Mark text string 975 string _markName; 976 977 /// Information of the holder of the mark 978 list<pair<SMDHolder::Type::Value, SMDHolder> > _holders; 979 980 /// Information of the representative of the mark registration 981 map<SMDContact::Type::Value, SMDContact> _contacts; 982 983 /// Countries and region of the country where the mark is protected 984 list<SMDProtection> _protections; 985 986 /// A-label form of the label that correspond to the <mark:markName> 987 list<string> _labels; 988 989 /// Full description of the goods and services mentioned in the mark 990 /// registration document 991 string _goodsAndServices; 992 993 /// Number of the mark of the treaty or statute 994 string _refNum; 995 996 /// Date of protection of the mark 997 string _proDate; 998 999 /// Title of the treaty or statute 1000 string _title; 1001 1002 /// Execution date of the treaty or statute 1003 string _execDate; 1004 }; 1005 1006 /// EPP SMDCourt Class 1007 class SMDCourt 1008 { 1009 public: 1010 /// Default constructor SMDCourt()1011 SMDCourt() 1012 { 1013 reset(); 1014 } 1015 1016 /// Sets the identifier of the mark 1017 /** 1018 * @param id identifier of the mark 1019 */ set_id(const string & id)1020 void set_id(const string &id) { _id = id; } 1021 1022 /// Returns the identifier of the mark 1023 /** 1024 * @return identifier of the mark 1025 */ get_id()1026 string get_id() const { return _id; } 1027 1028 /// Sets the mark text string 1029 /** 1030 * @param markName mark text string 1031 */ set_markName(const string & markName)1032 void set_markName(const string &markName) { _markName = markName; } 1033 1034 /// Returns the mark text string 1035 /** 1036 * @return mark text string 1037 */ get_markName()1038 string get_markName() const { return _markName; } 1039 1040 /// Sets the information of the holder of the mark 1041 /** 1042 * @param holders information of the holder of the mark 1043 */ set_holders(const list<pair<SMDHolder::Type::Value,SMDHolder>> & holders)1044 void set_holders(const list<pair<SMDHolder::Type::Value, SMDHolder> > &holders) 1045 { 1046 _holders = holders; 1047 } 1048 1049 /// Add a holder of the mark 1050 /** 1051 * @param type identify the entitlement of the holder 1052 * @param holder information of the holder of the mark 1053 */ add_holder(const SMDHolder::Type::Value type,const SMDHolder & holder)1054 void add_holder(const SMDHolder::Type::Value type, const SMDHolder &holder) 1055 { 1056 _holders.push_back(make_pair(type, holder)); 1057 } 1058 1059 /// Returns the information of the holder of the mark 1060 /** 1061 * @return information of the holder of the mark 1062 */ get_holders()1063 list<pair<SMDHolder::Type::Value, SMDHolder> > get_holders() const { return _holders; } 1064 1065 /// Sets the information of the representative of the mark 1066 /// registration 1067 /** 1068 * @param contacts information of the representative of the mark 1069 * registration 1070 */ set_contacts(const map<SMDContact::Type::Value,SMDContact> & contacts)1071 void set_contacts(const map<SMDContact::Type::Value, SMDContact> &contacts) 1072 { 1073 _contacts = contacts; 1074 } 1075 1076 /// Add information of the representative of the mark registration 1077 /** 1078 * @param type contact type 1079 * @param contact information of the representative of the mark registration 1080 */ add_contact(const SMDContact::Type::Value type,const SMDContact & contact)1081 void add_contact(const SMDContact::Type::Value type, const SMDContact &contact) 1082 { 1083 _contacts[type] = contact; 1084 } 1085 1086 /// Returns the information of the representative of the mark 1087 /// registration 1088 /** 1089 * @return information of the representative of the mark 1090 * registration 1091 */ get_contacts()1092 map<SMDContact::Type::Value, SMDContact> get_contacts() const { return _contacts; } 1093 1094 /// Sets the a-label form of the label that correspond to the 1095 /// <mark:markName> 1096 /** 1097 * @param labels a-label form of the label that correspond to the 1098 * <mark:markName> 1099 */ set_labels(const list<string> & labels)1100 void set_labels(const list<string> &labels) { _labels = labels; } 1101 1102 /// Add a a-label form of the label that correspond to the 1103 /// <mark:markName> 1104 /** 1105 * @param label a-label form of the label that correspond to the 1106 * <mark:markName> 1107 */ add_label(const string & label)1108 void add_label(const string &label) { _labels.push_back(label); } 1109 1110 /// Returns the a-label form of the label that correspond to the 1111 /// <mark:markName> 1112 /** 1113 * @return a-label form of the label that correspond to the 1114 * <mark:markName> 1115 */ get_labels()1116 list<string> get_labels() const { return _labels; } 1117 1118 /// Sets the full description of the goods and services mentioned in 1119 /// the mark registration document 1120 /** 1121 * @param goodsAndServices full description of the goods and 1122 * services mentioned in the mark registration document 1123 */ set_goodsAndServices(const string & goodsAndServices)1124 void set_goodsAndServices(const string &goodsAndServices) 1125 { 1126 _goodsAndServices = goodsAndServices; 1127 } 1128 1129 /// Returns the full description of the goods and services mentioned 1130 /// in the mark registration document 1131 /** 1132 * @return full description of the goods and services mentioned in 1133 * the mark registration document 1134 */ get_goodsAndServices()1135 string get_goodsAndServices() const { return _goodsAndServices; } 1136 1137 /// Sets the reference number of the court's opinion 1138 /** 1139 * @param refNum reference number of the court's opinion 1140 */ set_refNum(const string & refNum)1141 void set_refNum(const string &refNum) { _refNum = refNum; } 1142 1143 /// Returns the reference number of the court's opinion 1144 /** 1145 * @return reference number of the court's opinion 1146 */ get_refNum()1147 string get_refNum() const { return _refNum; } 1148 1149 /// Sets the date of protection of the mark 1150 /** 1151 * @param proDate date of protection of the mark 1152 */ set_proDate(const string & proDate)1153 void set_proDate(const string &proDate) { _proDate = proDate; } 1154 1155 /// Returns the date of protection of the mark 1156 /** 1157 * @return date of protection of the mark 1158 */ get_proDate()1159 string get_proDate() const { return _proDate; } 1160 1161 /// Sets the two-character code of the country where the court is 1162 /// located 1163 /** 1164 * @param cc two-character code of the country where the court is 1165 * located 1166 */ set_cc(const string & cc)1167 void set_cc(const string &cc) { _cc = cc; } 1168 1169 /// Returns the two-character code of the country where the court is 1170 /// located 1171 /** 1172 * @return two-character code of the country where the court is 1173 * located 1174 */ get_cc()1175 string get_cc() const { return _cc; } 1176 1177 /// Sets the name of a city, state, province or other geographic 1178 /// region of <mark:cc> in which the mark is protected 1179 /** 1180 * @param regions name of a city, state, province or other 1181 * geographic region of <mark:cc> in which the mark is protected 1182 */ set_regions(const list<string> & regions)1183 void set_regions(const list<string> ®ions) { _regions = regions; } 1184 1185 /// Add the name of a city, state, province or other geographic 1186 /// region of <mark:cc> in which the mark is protected 1187 /** 1188 * @param region name of a city, state, province or other geographic 1189 * region of <mark:cc> in which the mark is protected 1190 */ add_region(const string & region)1191 void add_region(const string ®ion) { _regions.push_back(region); } 1192 1193 /// Returns the name of a city, state, province or other geographic 1194 /// region of <mark:cc> in which the mark is protected 1195 /** 1196 * @return name of a city, state, province or other geographic 1197 * region of <mark:cc> in which the mark is protected 1198 */ get_regions()1199 list<string> get_regions() const { return _regions; } 1200 1201 /// Sets the name of the court 1202 /** 1203 * @param courtName name of the court 1204 */ set_courtName(const string & courtName)1205 void set_courtName(const string &courtName) { _courtName = courtName; } 1206 1207 /// Returns the name of the court 1208 /** 1209 * @return name of the court 1210 */ get_courtName()1211 string get_courtName() const { return _courtName; } 1212 1213 /// Reset object attributes reset()1214 void reset() 1215 { 1216 _id.clear(); 1217 _markName.clear(); 1218 _holders.clear(); 1219 _contacts.clear(); 1220 _labels.clear(); 1221 _goodsAndServices.clear(); 1222 _refNum.clear(); 1223 _proDate.clear(); 1224 _cc.clear(); 1225 _regions.clear(); 1226 _courtName.clear(); 1227 } 1228 1229 private: 1230 /// Identifier of the mark 1231 string _id; 1232 1233 /// Mark text string 1234 string _markName; 1235 1236 /// Information of the holder of the mark 1237 list<pair<SMDHolder::Type::Value, SMDHolder> > _holders; 1238 1239 /// Information of the representative of the mark registration 1240 map<SMDContact::Type::Value, SMDContact> _contacts; 1241 1242 /// A-label form of the label that correspond to the <mark:markName> 1243 list<string> _labels; 1244 1245 /// Full description of the goods and services mentioned in the mark 1246 /// registration document 1247 string _goodsAndServices; 1248 1249 /// Reference number of the court's opinion 1250 string _refNum; 1251 1252 /// Date of protection of the mark 1253 string _proDate; 1254 1255 /// Two-character code of the country where the court is located 1256 string _cc; 1257 1258 /// Name of a city, state, province or other geographic region of 1259 /// <mark:cc> in which the mark is protected 1260 list<string> _regions; 1261 1262 /// Name of the court 1263 string _courtName; 1264 }; 1265 1266 /// EPP SMDMark Class 1267 class SMDMark 1268 { 1269 public: 1270 /// Default constructor SMDMark()1271 SMDMark() 1272 { 1273 reset(); 1274 } 1275 1276 /// Sets the list of trademarks 1277 /** 1278 * @param trademarks list of trademarks 1279 */ set_trademarks(const list<SMDTrademark> & trademarks)1280 void set_trademarks(const list<SMDTrademark> &trademarks) { _trademarks = trademarks; } 1281 1282 /// Add a trademark 1283 /** 1284 * @param trademark trademark 1285 */ add_trademark(const SMDTrademark & trademark)1286 void add_trademark(const SMDTrademark &trademark) { _trademarks.push_back(trademark); } 1287 1288 /// Returns the list of trademarks 1289 /** 1290 * @return list of trademarks 1291 */ get_trademarks()1292 list<SMDTrademark> get_trademarks() const { return _trademarks; } 1293 1294 /// Sets the list of treaty or statutes 1295 /** 1296 * @param treatyOrStatute list of treaty or statutes 1297 */ set_treatyOrStatutes(const list<SMDTreatyOrStatute> & treatyOrStatute)1298 void set_treatyOrStatutes(const list<SMDTreatyOrStatute> &treatyOrStatute) 1299 { 1300 _treatyOrStatutes = treatyOrStatute; 1301 } 1302 1303 /// Add a treaty or statute 1304 /** 1305 * @param treatyOrStatute treaty or statute 1306 */ add_treatyOrStatute(const SMDTreatyOrStatute & treatyOrStatute)1307 void add_treatyOrStatute(const SMDTreatyOrStatute &treatyOrStatute) 1308 { 1309 _treatyOrStatutes.push_back(treatyOrStatute); 1310 } 1311 1312 /// Returns the list of treaty or statutes 1313 /** 1314 * @return list of treaty or statutes 1315 */ get_treatyOrStatutes()1316 list<SMDTreatyOrStatute> get_treatyOrStatutes() const { return _treatyOrStatutes; } 1317 1318 /// Sets the list of court 1319 /** 1320 * @param court list of court 1321 */ set_court(const list<SMDCourt> & court)1322 void set_court(const list<SMDCourt> &court) { _court = court; } 1323 1324 /// Add a court 1325 /** 1326 * @param court court 1327 */ add_court(const SMDCourt & court)1328 void add_court(const SMDCourt &court) { _court.push_back(court); } 1329 1330 /// Returns the list of court 1331 /** 1332 * @return list of court 1333 */ get_court()1334 list<SMDCourt> get_court() const { return _court; } 1335 1336 /// Reset object attributes reset()1337 void reset() 1338 { 1339 _trademarks.clear(); 1340 _treatyOrStatutes.clear(); 1341 _court.clear(); 1342 } 1343 is_empty()1344 bool is_empty() const 1345 { 1346 return _trademarks.empty() && _treatyOrStatutes.empty() && _court.empty(); 1347 } 1348 1349 private: 1350 /// List of trademarks 1351 list<SMDTrademark> _trademarks; 1352 1353 /// List of treaty or statutes 1354 list<SMDTreatyOrStatute> _treatyOrStatutes; 1355 1356 /// List of court 1357 list<SMDCourt> _court; 1358 }; 1359 1360 /// EPP SMDIssuerInfo Class 1361 class SMDIssuerInfo 1362 { 1363 public: 1364 /// Default constructor SMDIssuerInfo()1365 SMDIssuerInfo() 1366 { 1367 reset(); 1368 } 1369 1370 /// Sets the identifier of the issuer 1371 /** 1372 * @param id identifier of the issuer 1373 */ set_id(const string & id)1374 void set_id(const string &id) { _id = id; } 1375 1376 /// Returns the identifier of the issuer 1377 /** 1378 * @return identifier of the issuer 1379 */ get_id()1380 string get_id() const { return _id; } 1381 1382 /// Sets the organization name of the issuer 1383 /** 1384 * @param org organization name of the issuer 1385 */ set_org(const string & org)1386 void set_org(const string &org) { _org = org; } 1387 1388 /// Returns the organization name of the issuer 1389 /** 1390 * @return organization name of the issuer 1391 */ get_org()1392 string get_org() const { return _org; } 1393 1394 /// Sets the issuer customer support email address 1395 /** 1396 * @param email issuer customer support email address 1397 */ set_email(const string & email)1398 void set_email(const string &email) { _email = email; } 1399 1400 /// Returns the issuer customer support email address 1401 /** 1402 * @return issuer customer support email address 1403 */ get_email()1404 string get_email() const { return _email; } 1405 1406 /// Sets the HTTP URL of the issuer's site 1407 /** 1408 * @param url HTTP URL of the issuer's site 1409 */ set_url(const string & url)1410 void set_url(const string &url) { _url = url; } 1411 1412 /// Returns the HTTP URL of the issuer's site 1413 /** 1414 * @return HTTP URL of the issuer's site 1415 */ get_url()1416 string get_url() const { return _url; } 1417 1418 /// Sets the issuer's voice telephone number 1419 /** 1420 * @param voice issuer's voice telephone number 1421 */ set_voice(const string & voice)1422 void set_voice(const string &voice) { _voice = voice; } 1423 1424 /// Returns the issuer's voice telephone number 1425 /** 1426 * @return issuer's voice telephone number 1427 */ get_voice()1428 string get_voice() const { return _voice; } 1429 1430 /// Reset object attributes reset()1431 void reset() 1432 { 1433 _id.clear(); 1434 _org.clear(); 1435 _email.clear(); 1436 _url.clear(); 1437 _voice.clear(); 1438 } 1439 1440 private: 1441 /// Identifier of the issuer 1442 string _id; 1443 1444 /// Organization name of the issuer 1445 string _org; 1446 1447 /// Issuer customer support email address 1448 string _email; 1449 1450 /// HTTP URL of the issuer's site 1451 string _url; 1452 1453 /// Issuer's voice telephone number 1454 string _voice; 1455 }; 1456 1457 /// EPP SMD Class 1458 class SMD 1459 { 1460 public: 1461 /// Default constructor SMD()1462 SMD() 1463 { 1464 reset(); 1465 } 1466 1467 /// Sets the concatenation of the local identifier, followed by a 1468 /// hyphen ("-", ASCII value 0x002D), followed by the issuer 1469 /// identifier 1470 /** 1471 * @param id concatenation of the local identifier, followed by a 1472 * hyphen ("-", ASCII value 0x002D), followed by the issuer 1473 * identifier 1474 */ set_id(const string & id)1475 void set_id(const string &id) { _id = id; } 1476 1477 /// Returns the concatenation of the local identifier, followed by a 1478 /// hyphen ("-", ASCII value 0x002D), followed by the issuer 1479 /// identifier 1480 /** 1481 * @return concatenation of the local identifier, followed by a 1482 * hyphen ("-", ASCII value 0x002D), followed by the issuer 1483 * identifier 1484 */ get_id()1485 string get_id() const { return _id; } 1486 1487 /// Sets the information of the issuer of the mark registration 1488 /** 1489 * @param issuerInfo information of the issuer of the mark registration 1490 */ set_issuerInfo(const SMDIssuerInfo & issuerInfo)1491 void set_issuerInfo(const SMDIssuerInfo &issuerInfo) { _issuerInfo = issuerInfo; } 1492 1493 /// Returns the information of the issuer of the mark registration 1494 /** 1495 * @return information of the issuer of the mark registration 1496 */ get_issuerInfo()1497 SMDIssuerInfo get_issuerInfo() const { return _issuerInfo; } 1498 1499 /// Sets the creation date and time of the signed mark 1500 /** 1501 * @param notBefore creation date and time of the signed mark 1502 */ set_notBefore(const string & notBefore)1503 void set_notBefore(const string ¬Before) { _notBefore = notBefore; } 1504 1505 /// Returns the creation date and time of the signed mark 1506 /** 1507 * @return creation date and time of the signed mark 1508 */ get_notBefore()1509 string get_notBefore() const { return _notBefore; } 1510 1511 /// Sets the expiration date and time of the signed mark 1512 /** 1513 * @param notAfter expiration date and time of the signed mark 1514 */ set_notAfter(const string & notAfter)1515 void set_notAfter(const string ¬After) { _notAfter = notAfter; } 1516 1517 /// Returns the expiration date and time of the signed mark 1518 /** 1519 * @return expiration date and time of the signed mark 1520 */ get_notAfter()1521 string get_notAfter() const { return _notAfter; } 1522 1523 /// Sets the mark information 1524 /** 1525 * @param mark mark information 1526 */ set_mark(const SMDMark & mark)1527 void set_mark(const SMDMark &mark) { _mark = mark; } 1528 1529 /// Returns the mark information 1530 /** 1531 * @return mark information 1532 */ get_mark()1533 SMDMark get_mark() const { return _mark; } 1534 1535 /// Sets the XML Signature for the <smd:signedMark> 1536 /** 1537 * @param signature XML Signature for the <smd:signedMark> 1538 */ set_signature(const string & signature)1539 void set_signature(const string &signature) { _signature = signature; } 1540 1541 /// Returns the XML Signature for the <smd:signedMark> 1542 /** 1543 * @return XML Signature for the <smd:signedMark> 1544 */ get_signature()1545 string get_signature() const { return _signature; } 1546 1547 /// Reset object attributes reset()1548 void reset() 1549 { 1550 _id.clear(); 1551 _issuerInfo.reset(); 1552 _notBefore.clear(); 1553 _notAfter.clear(); 1554 _mark.reset(); 1555 _signature.clear(); 1556 } 1557 1558 private: 1559 /// Concatenation of the local identifier, followed by a hyphen 1560 /// ("-", ASCII value 0x002D), followed by the issuer identifier 1561 string _id; 1562 1563 /// Information of the issuer of the mark registration 1564 SMDIssuerInfo _issuerInfo; 1565 1566 /// Creation date and time of the signed mark 1567 string _notBefore; 1568 1569 /// Expiration date and time of the signed mark 1570 string _notAfter; 1571 1572 /// Mark information 1573 SMDMark _mark; 1574 1575 /// XML Signature for the <smd:signedMark> 1576 string _signature; 1577 }; 1578 1579 LIBEPP_NICBR_NS_END 1580 1581 #endif // __SMD_H__ 1582